diff --git a/debian/changelog b/debian/changelog index 07dc6a3..b5ace15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +docker.io (20.10.25+dfsg1-ok4) nile; urgency=medium + + * Remove not exist orig. + + -- liwenjun Mon, 17 Jun 2024 17:30:12 +0800 + +docker.io (20.10.25+dfsg1-ok3) nile; urgency=medium + + * Apply build patches. + + -- liwenjun Mon, 17 Jun 2024 17:03:12 +0800 + docker.io (20.10.25+dfsg1-ok2) nile; urgency=medium * Add debian/source/options. diff --git a/debian/control b/debian/control index 0f237aa..3b95642 100644 --- a/debian/control +++ b/debian/control @@ -3,12 +3,6 @@ Section: admin Priority: optional Standards-Version: 4.6.0 Maintainer: openKylin Developers -XSBC-Original-Maintainer: Debian Go Packaging Team -Uploaders: Arnaud Rebillout - ,Dmitry Smirnov - ,Tim Potter - ,Tianon Gravi - ,Paul Tagliamonte Build-Conflicts: golang-github-docker-docker-dev Build-Depends: debhelper-compat (= 13) ,dh-apparmor ,dh-golang (>= 1.14~) ,bash-completion @@ -132,8 +126,8 @@ Build-Depends: debhelper-compat (= 13) ,dh-apparmor ,dh-golang (>= 1.14~) # ,golang-k8s-sigs-structured-merge-diff-dev ,golang-k8s-sigs-yaml-dev Homepage: https://mobyproject.org -Vcs-Browser: https://salsa.debian.org/go-team/packages/docker -Vcs-Git: https://salsa.debian.org/go-team/packages/docker.git +Vcs-Browser: https://gitee.com/openkylin/docker.io +Vcs-Git: https://gitee.com/openkylin/docker.io.git Rules-Requires-Root: no XS-Go-Import-Path: github.com/docker/docker diff --git a/debian/patches/0029-remove-not-exist-orig.patch b/debian/patches/0029-remove-not-exist-orig.patch new file mode 100644 index 0000000..29d0e0b --- /dev/null +++ b/debian/patches/0029-remove-not-exist-orig.patch @@ -0,0 +1,91 @@ +From: liwenjun +Date: Mon, 17 Jun 2024 17:28:08 +0800 +Subject: remove not exist orig + +--- + engine/distribution/xfer/download.go | 12 ++++++------ + engine/distribution/xfer/download_test.go | 18 +++++++++--------- + 2 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/engine/distribution/xfer/download.go b/engine/distribution/xfer/download.go +index 45eb366..29a5097 100644 +--- a/engine/distribution/xfer/download.go ++++ b/engine/distribution/xfer/download.go +@@ -272,7 +272,7 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor, + downloadReader io.ReadCloser + size int64 + err error +- retries int ++ attempt int = 1 + ) + + defer descriptor.Close() +@@ -292,16 +292,16 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor, + default: + } + +- retries++ +- if _, isDNR := err.(DoNotRetry); isDNR || retries > ldm.maxDownloadAttempts { +- logrus.Errorf("Download failed after %d attempts: %v", retries, err) ++ if _, isDNR := err.(DoNotRetry); isDNR || attempt >= ldm.maxDownloadAttempts { ++ logrus.Errorf("Download failed after %d attempts: %v", attempt, err) + d.err = err + return + } + +- logrus.Infof("Download failed, retrying (%d/%d): %v", retries, ldm.maxDownloadAttempts, err) +- delay := retries * 5 ++ logrus.Infof("Download failed, retrying (%d/%d): %v", attempt, ldm.maxDownloadAttempts, err) ++ delay := attempt * 5 + ticker := time.NewTicker(ldm.waitDuration) ++ attempt++ + + selectLoop: + for { +diff --git a/engine/distribution/xfer/download_test.go b/engine/distribution/xfer/download_test.go +index 0174177..cc36e16 100644 +--- a/engine/distribution/xfer/download_test.go ++++ b/engine/distribution/xfer/download_test.go +@@ -216,7 +216,7 @@ func (d *mockDownloadDescriptor) Download(ctx context.Context, progressOutput pr + + if d.retries < d.simulateRetries { + d.retries++ +- return nil, 0, fmt.Errorf("simulating download attempt %d/%d", d.retries, d.simulateRetries) ++ return nil, 0, fmt.Errorf("simulating download attempt failure %d/%d", d.retries, d.simulateRetries) + } + + return d.mockTarStream(), 0, nil +@@ -370,25 +370,25 @@ func TestMaxDownloadAttempts(t *testing.T) { + }{ + { + name: "max-attempts=5, succeed at 2nd attempt", +- simulateRetries: 2, ++ simulateRetries: 1, + maxDownloadAttempts: 5, + }, + { + name: "max-attempts=5, succeed at 5th attempt", +- simulateRetries: 5, ++ simulateRetries: 4, + maxDownloadAttempts: 5, + }, + { +- name: "max-attempts=5, fail at 6th attempt", +- simulateRetries: 6, ++ name: "max-attempts=5, fail at 5th attempt", ++ simulateRetries: 5, + maxDownloadAttempts: 5, +- expectedErr: "simulating download attempt 5/6", ++ expectedErr: "simulating download attempt failure 5/5", + }, + { +- name: "max-attempts=0, fail after 1 attempt", ++ name: "max-attempts=1, fail after 1 attempt", + simulateRetries: 1, +- maxDownloadAttempts: 0, +- expectedErr: "simulating download attempt 1/1", ++ maxDownloadAttempts: 1, ++ expectedErr: "simulating download attempt failure 1/1", + }, + } + for _, tc := range tests { diff --git a/debian/patches/series b/debian/patches/series index 95fb932..952b432 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -26,3 +26,4 @@ test--skip-TestGetRootUIDGID.patch test--skip-TestStateRunStop.patch avoid-consul.patch engine-client-dummy-hostname.patch +0029-remove-not-exist-orig.patch