Package: release.debian.org Severity: normal X-Debbugs-Cc: ap...@packages.debian.org Control: affects -1 + src:aptly User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package aptly. [ Reason ] This fixes #1104299, a bug that was recently identified upstream and later fixed via a very short patch. Being able to publish a repository to S3 is one of the core features of aptly: up until 1.6 this was made extremely efficient by only pushing changed files. Unfortunately, starting with 1.6 every single sync operation re-pushes the entire repository. [ Impact ] This regression is a show-stopper for users migrating from previous version(s). Not only does it severely impact the performance and duration of sync operations, it can also incur extra costs depending on the S3 provider. [ Tests ] This is was tested and validated by upstream. [ Risks ] This is a leaf package, and the fix is only two lines. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing unblock aptly/1.6.1+ds1-2
diff -Nru aptly-1.6.1+ds1/debian/changelog aptly-1.6.1+ds1/debian/changelog --- aptly-1.6.1+ds1/debian/changelog 2025-02-24 09:04:35.000000000 +0100 +++ aptly-1.6.1+ds1/debian/changelog 2025-04-28 15:38:43.000000000 +0200 @@ -1,3 +1,10 @@ +aptly (1.6.1+ds1-2) unstable; urgency=medium + + [ Sébastien Delafond ] + * Do not re-publish unchanged files to S3 every single time (Closes: #1104299) + + -- Sebastien Delafond <s...@debian.org> Mon, 28 Apr 2025 15:38:43 +0200 + aptly (1.6.1+ds1-1) unstable; urgency=medium [ Sébastien Delafond ] diff -Nru aptly-1.6.1+ds1/debian/patches/0005-Fixes-Issue-1435.patch aptly-1.6.1+ds1/debian/patches/0005-Fixes-Issue-1435.patch --- aptly-1.6.1+ds1/debian/patches/0005-Fixes-Issue-1435.patch 1970-01-01 01:00:00.000000000 +0100 +++ aptly-1.6.1+ds1/debian/patches/0005-Fixes-Issue-1435.patch 2025-04-28 15:38:43.000000000 +0200 @@ -0,0 +1,49 @@ +From: Christoph Fiehe <christoph.fi...@eurodata.de> +Date: Mon, 14 Apr 2025 13:20:08 +0200 +Signed-off-by: Christoph Fiehe <christoph.fi...@eurodata.de> +Description: Fixes Issue#1435. + Do not re-publish unchanged files to S3 every single time. +Origin: commit:https://github.com/aptly-dev/aptly/commit/67bd15487d5760fccae32516061d57d1ccbb0ebf +Applied-Upstream: 1.6.2 +Bug: https://github.com/aptly-dev/aptly/issues/1435 +Bug-Debian: https://bugs.debian.org/1104299 +--- + s3/public.go | 4 ++-- + s3/public_test.go | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/s3/public.go b/s3/public.go +index 47623a0..234a4b2 100644 +--- a/s3/public.go ++++ b/s3/public.go +@@ -338,7 +338,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath, + poolPath := filepath.Join(storage.prefix, relPath) + + if storage.pathCache == nil { +- paths, md5s, err := storage.internalFilelist(filepath.Join(storage.prefix, publishedPrefix, "pool"), true) ++ paths, md5s, err := storage.internalFilelist(filepath.Join(publishedPrefix, "pool"), true) + if err != nil { + return errors.Wrap(err, "error caching paths under prefix") + } +@@ -346,7 +346,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath, + storage.pathCache = make(map[string]string, len(paths)) + + for i := range paths { +- storage.pathCache[paths[i]] = md5s[i] ++ storage.pathCache[filepath.Join("pool", paths[i])] = md5s[i] + } + } + +diff --git a/s3/public_test.go b/s3/public_test.go +index 83605e3..a6631da 100644 +--- a/s3/public_test.go ++++ b/s3/public_test.go +@@ -370,7 +370,7 @@ func (s *PublishedStorageSuite) TestLinkFromPoolCache(c *C) { + + // Check only one listing request was done to the server + s.checkGetRequestsEqual(c, "/test?", []string{ +- "/test?list-type=2&max-keys=1000&prefix=lala%2Flala%2Fpool%2F", ++ "/test?list-type=2&max-keys=1000&prefix=lala%2Fpool%2F", + }) + + // Publish two packages at a prefixed storage plus a publish prefix. diff -Nru aptly-1.6.1+ds1/debian/patches/series aptly-1.6.1+ds1/debian/patches/series --- aptly-1.6.1+ds1/debian/patches/series 2025-02-24 09:04:35.000000000 +0100 +++ aptly-1.6.1+ds1/debian/patches/series 2025-04-28 15:38:43.000000000 +0200 @@ -1,3 +1,4 @@ 0001-disable-swagger.patch 0002-disable-new-azure-sdk.patch 0004-tests-no-upstream-s-etcd-install-as-it-s-arch-specif.patch +0005-Fixes-Issue-1435.patch