From 4ae501cde4b0ef8fe0b616f0fc86f6bb196e4222 Mon Sep 17 00:00:00 2001 From: Christoph Fiehe Date: Fri, 11 Oct 2024 23:09:30 +0200 Subject: [PATCH] Fixing tests and fix cleanup. Signed-off-by: Christoph Fiehe --- api/publish.go | 10 +- cmd/mirror_update.go | 2 +- cmd/publish_switch.go | 3 +- cmd/publish_update.go | 7 +- deb/publish.go | 107 +++++++++++++----- deb/publish_test.go | 25 ++++ system/t04_mirror/UpdateMirror10Test_gold | 2 +- system/t04_mirror/UpdateMirror11FTPTest_gold | 2 +- system/t04_mirror/UpdateMirror12Test_gold | 2 +- system/t04_mirror/UpdateMirror13Test_gold | 2 +- system/t04_mirror/UpdateMirror14Test_gold | 2 +- system/t04_mirror/UpdateMirror15Test_gold | 2 +- system/t04_mirror/UpdateMirror16Test_gold | 2 +- system/t04_mirror/UpdateMirror17Test_gold | 2 +- system/t04_mirror/UpdateMirror18Test_gold | 2 +- system/t04_mirror/UpdateMirror19Test_gold | 2 +- system/t04_mirror/UpdateMirror1Test_gold | 2 +- system/t04_mirror/UpdateMirror20Test_gold | 2 +- system/t04_mirror/UpdateMirror21Test_gold | 2 +- system/t04_mirror/UpdateMirror22Test_gold | 2 +- system/t04_mirror/UpdateMirror23Test_gold | 2 +- system/t04_mirror/UpdateMirror24Test_gold | 2 +- system/t04_mirror/UpdateMirror26Test_gold | 2 +- system/t04_mirror/UpdateMirror6Test_gold | 2 +- system/t04_mirror/UpdateMirror7Test_gold | 2 +- system/t04_mirror/UpdateMirror8Test_gold | 2 +- system/t04_mirror/UpdateMirror9Test_gold | 2 +- system/t06_publish/AzurePublish2Test_gold | 5 +- system/t06_publish/AzurePublish3Test_gold | 3 +- system/t06_publish/AzurePublish5Test_gold | 3 +- system/t06_publish/PublishDrop3Test_gold | 3 +- system/t06_publish/PublishDrop5Test_gold | 3 +- system/t06_publish/PublishDrop9Test_gold | 3 +- system/t06_publish/PublishSnapshot42Test_gold | 13 +++ system/t06_publish/PublishSwitch11Test_gold | 3 +- system/t06_publish/PublishSwitch13Test_gold | 3 +- system/t06_publish/PublishSwitch15Test_gold | 3 +- system/t06_publish/PublishSwitch16Test_gold | 3 +- system/t06_publish/PublishSwitch1Test_gold | 3 +- system/t06_publish/PublishSwitch2Test_gold | 3 +- system/t06_publish/PublishSwitch3Test_gold | 3 +- system/t06_publish/PublishSwitch4Test_gold | 3 +- system/t06_publish/PublishSwitch8Test_gold | 4 +- system/t06_publish/PublishUpdate10Test_gold | 5 +- system/t06_publish/PublishUpdate11Test_gold | 5 +- system/t06_publish/PublishUpdate12Test_gold | 2 +- system/t06_publish/PublishUpdate13Test_gold | 5 +- system/t06_publish/PublishUpdate14Test_gold | 5 +- system/t06_publish/PublishUpdate15Test_gold | 4 +- system/t06_publish/PublishUpdate16Test_gold | 10 +- system/t06_publish/PublishUpdate17Test_gold | 6 +- system/t06_publish/PublishUpdate18Test_gold | 8 +- system/t06_publish/PublishUpdate1Test_gold | 5 +- system/t06_publish/PublishUpdate2Test_gold | 5 +- system/t06_publish/PublishUpdate3Test_gold | 5 +- system/t06_publish/PublishUpdate4Test_gold | 4 +- system/t06_publish/PublishUpdate7Test_gold | 6 +- system/t06_publish/PublishUpdate8Test_gold | 6 +- system/t06_publish/S3Publish2Test_gold | 5 +- system/t06_publish/S3Publish3Test_gold | 3 +- system/t06_publish/S3Publish5Test_gold | 3 +- system/t06_publish/S3Publish6Test_gold | 5 +- system/t06_publish/SwiftPublish2Test_gold | 2 +- system/t06_publish/snapshot.py | 20 ++++ system/t08_db/CleanupDB9Test_publish_drop | 3 +- system/t12_api/publish.py | 52 +++++++++ 66 files changed, 320 insertions(+), 111 deletions(-) create mode 100644 system/t06_publish/PublishSnapshot42Test_gold diff --git a/api/publish.go b/api/publish.go index 9039fd43b..9fdfe8866 100644 --- a/api/publish.go +++ b/api/publish.go @@ -438,8 +438,9 @@ func apiPublishUpdateSwitch(c *gin.Context) { } if b.SkipCleanup == nil || !*b.SkipCleanup { - err = collection.CleanupPrefixComponentFiles(context, published, result.AddedComponents(), result.UpdatedComponents(), result.RemovedComponents(), - collectionFactory, out) + cleanComponents := make([]string, 0, len(result.UpdatedSources)+len(result.RemovedSources)) + cleanComponents = append(append(cleanComponents, result.UpdatedComponents()...), result.RemovedComponents()...) + err = collection.CleanupPrefixComponentFiles(context, published, cleanComponents, collectionFactory, out) if err != nil { return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, fmt.Errorf("unable to update: %s", err) } @@ -846,8 +847,9 @@ func apiPublishUpdate(c *gin.Context) { } if b.SkipCleanup == nil || !*b.SkipCleanup { - err = collection.CleanupPrefixComponentFiles(context, published, - result.AddedComponents(), result.UpdatedComponents(), result.RemovedComponents(), collectionFactory, out) + cleanComponents := make([]string, 0, len(result.UpdatedSources)+len(result.RemovedSources)) + cleanComponents = append(append(cleanComponents, result.UpdatedComponents()...), result.RemovedComponents()...) + err = collection.CleanupPrefixComponentFiles(context, published, cleanComponents, collectionFactory, out) if err != nil { return &task.ProcessReturnValue{Code: http.StatusInternalServerError, Value: nil}, fmt.Errorf("unable to update: %s", err) } diff --git a/cmd/mirror_update.go b/cmd/mirror_update.go index 2e6df4397..2aad8c533 100644 --- a/cmd/mirror_update.go +++ b/cmd/mirror_update.go @@ -267,7 +267,7 @@ func aptlyMirrorUpdate(cmd *commander.Command, args []string) error { return fmt.Errorf("unable to update: %s", err) } - context.Progress().Printf("\nMirror `%s` has been successfully updated.\n", repo.Name) + context.Progress().Printf("\nMirror `%s` has been updated successfully.\n", repo.Name) return err } diff --git a/cmd/publish_switch.go b/cmd/publish_switch.go index eedb42d8b..12d73f086 100644 --- a/cmd/publish_switch.go +++ b/cmd/publish_switch.go @@ -115,8 +115,7 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error { skipCleanup := context.Flags().Lookup("skip-cleanup").Value.Get().(bool) if !skipCleanup { - err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(context, published, - []string{}, components, []string{}, collectionFactory, context.Progress()) + err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(context, published, components, collectionFactory, context.Progress()) if err != nil { return fmt.Errorf("unable to switch: %s", err) } diff --git a/cmd/publish_update.go b/cmd/publish_update.go index f43378659..589e35bf7 100644 --- a/cmd/publish_update.go +++ b/cmd/publish_update.go @@ -76,14 +76,15 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error { skipCleanup := context.Flags().Lookup("skip-cleanup").Value.Get().(bool) if !skipCleanup { - err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(context, published, - result.AddedComponents(), result.UpdatedComponents(), result.RemovedComponents(), collectionFactory, context.Progress()) + cleanComponents := make([]string, 0, len(result.UpdatedSources)+len(result.RemovedSources)) + cleanComponents = append(append(cleanComponents, result.UpdatedComponents()...), result.RemovedComponents()...) + err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(context, published, cleanComponents, collectionFactory, context.Progress()) if err != nil { return fmt.Errorf("unable to update: %s", err) } } - context.Progress().Printf("\nPublished %s repository %s has been successfully updated.\n", published.SourceKind, published.String()) + context.Progress().Printf("\nPublished %s repository %s has been updated successfully.\n", published.SourceKind, published.String()) return err } diff --git a/deb/publish.go b/deb/publish.go index 0cd481a95..877102ecd 100644 --- a/deb/publish.go +++ b/deb/publish.go @@ -1462,73 +1462,127 @@ func (collection *PublishedRepoCollection) listReferencedFilesByComponent(prefix // CleanupPrefixComponentFiles removes all unreferenced files in published storage under prefix/component pair func (collection *PublishedRepoCollection) CleanupPrefixComponentFiles(publishedStorageProvider aptly.PublishedStorageProvider, - published *PublishedRepo, addedComponents, updatedComponents, removedComponents []string, - collectionFactory *CollectionFactory, progress aptly.Progress) error { + published *PublishedRepo, cleanComponents []string, collectionFactory *CollectionFactory, progress aptly.Progress) error { + + var err error collection.loadList() + storage := published.Storage prefix := published.Prefix distribution := published.Distribution - multiDist := published.MultiDist + + rootPath := filepath.Join(prefix, "dists", distribution) publishedStorage := publishedStorageProvider.GetPublishedStorage(published.Storage) - components := make([]string, 0, len(addedComponents)+len(updatedComponents)+len(removedComponents)) - components = append(append(append(components, addedComponents...), updatedComponents...), removedComponents...) - sort.Strings(components) + sort.Strings(cleanComponents) + publishedComponents := published.Components() + removedComponents := utils.StrSlicesSubstract(cleanComponents, publishedComponents) + updatedComponents := utils.StrSlicesSubstract(cleanComponents, removedComponents) + + if progress != nil { + progress.Printf("Cleaning up published repository %s/%s...\n", published.StoragePrefix(), distribution) + } for _, component := range removedComponents { if progress != nil { - progress.Printf("Removing component %q from prefix %q...\n", component, prefix) + progress.Printf("Removing component %q...\n", component) } - err := publishedStorage.RemoveDirs(filepath.Join(prefix, "dists", distribution, component), progress) + err = publishedStorage.RemoveDirs(filepath.Join(rootPath, component), progress) if err != nil { return err } - if multiDist { - for _, component := range removedComponents { - err = publishedStorage.RemoveDirs(filepath.Join(prefix, "pool", distribution, component), progress) + // Ensure that component does not exist in multi distribution pool + err = publishedStorage.RemoveDirs(filepath.Join(prefix, "pool", distribution, component), nil) + if err != nil { + return err + } + } + + referencedFiles := map[string][]string{} + + if published.MultiDist { + rootPath = filepath.Join(prefix, "pool", distribution) + + // Get all referenced files by component for determining orphaned pool files. + for _, component := range publishedComponents { + packageList, err := NewPackageListFromRefList(published.RefList(component), collectionFactory.PackageCollection(), progress) + if err != nil { + return err + } + + packageList.ForEach(func(p *Package) error { + poolDir, err := p.PoolDirectory() if err != nil { return err } + + for _, file := range p.Files() { + referencedFiles[component] = append(referencedFiles[component], filepath.Join(poolDir, file.Filename)) + } + + return nil + }) + } + } else { + rootPath = filepath.Join(prefix, "pool") + + // In case of a shared component pool directory, we must check, if a component is no longer referenced by any other + // published repository within the same prefix. + referencedComponents := map[string]struct{}{} + for _, p := range collection.list { + if p.Prefix == prefix && p.Storage == storage && !p.MultiDist { + for _, component := range p.Components() { + referencedComponents[component] = struct{}{} + } } } - } - components = make([]string, 0, len(updatedComponents)+len(removedComponents)) - components = append(append(components, addedComponents...), updatedComponents...) + // Remove orphaned component pool directories in the prefix. + for _, component := range removedComponents { + _, exists := referencedComponents[component] + if !exists { + err := publishedStorage.RemoveDirs(filepath.Join(rootPath, component), progress) + if err != nil { + return err + } + } + } - referencedFiles, err := collection.listReferencedFilesByComponent(prefix, components, collectionFactory, progress) - if err != nil { - return err + // Get all referenced files by component for determining orphaned pool files. + referencedFiles, err = collection.listReferencedFilesByComponent(prefix, publishedComponents, collectionFactory, progress) + if err != nil { + return err + } } - for _, component := range components { + for _, component := range updatedComponents { if progress != nil { - progress.Printf("Cleaning up component %q in prefix %q...\n", component, prefix) + progress.Printf("Cleaning up component %q...\n", component) } sort.Strings(referencedFiles[component]) - rootPath := filepath.Join(prefix, "pool", component) - existingFiles, err := publishedStorage.Filelist(rootPath) + path := filepath.Join(rootPath, component) + existingFiles, err := publishedStorage.Filelist(path) if err != nil { return err } sort.Strings(existingFiles) - filesToDelete := utils.StrSlicesSubstract(existingFiles, referencedFiles[component]) + orphanedFiles := utils.StrSlicesSubstract(existingFiles, referencedFiles[component]) - for _, file := range filesToDelete { - err = publishedStorage.Remove(filepath.Join(rootPath, file)) + for _, file := range orphanedFiles { + err = publishedStorage.Remove(filepath.Join(path, file)) if err != nil { return err } } } - return nil + return err } // Remove removes published repository, cleaning up directories, files @@ -1579,8 +1633,7 @@ func (collection *PublishedRepoCollection) Remove(publishedStorageProvider aptly nil, collection.list[len(collection.list)-1], collection.list[:len(collection.list)-1] if !skipCleanup && len(cleanComponents) > 0 { - err = collection.CleanupPrefixComponentFiles(publishedStorageProvider, repo, []string{}, cleanComponents, []string{}, - collectionFactory, progress) + err = collection.CleanupPrefixComponentFiles(publishedStorageProvider, repo, cleanComponents, collectionFactory, progress) if err != nil { if !force { return fmt.Errorf("cleanup failed, use -force-drop to override: %s", err) diff --git a/deb/publish_test.go b/deb/publish_test.go index 5243a41a6..aace830f0 100644 --- a/deb/publish_test.go +++ b/deb/publish_test.go @@ -2,6 +2,7 @@ package deb import ( "bytes" + "encoding/json" "errors" "fmt" "io/ioutil" @@ -489,6 +490,30 @@ func (s *PublishedRepoSuite) TestEncodeDecode(c *C) { c.Assert(repo2, DeepEquals, s.repo2) } +func (s *PublishedRepoSuite) TestPublishedRepoRevision(c *C) { + revision := s.repo2.ObtainRevision() + c.Assert(revision, NotNil) + + sources := revision.Sources + c.Assert(sources, NotNil) + c.Assert(sources, DeepEquals, map[string]string{"main": "local1"}) + + sources["test1"] = "snap1" + sources["test2"] = "snap2" + + c.Assert(revision.Components(), DeepEquals, []string{"main", "test1", "test2"}) + c.Assert(revision.SourceNames(), DeepEquals, []string{"local1", "snap1", "snap2"}) + + bytes, err := json.Marshal(revision) + c.Assert(err, IsNil) + + json_expected := `{"Sources":[{"Component":"main","Name":"local1"},{"Component":"test1","Name":"snap1"},{"Component":"test2","Name":"snap2"}]}` + c.Assert(string(bytes), Equals, json_expected) + + c.Assert(s.repo2.DropRevision(), DeepEquals, revision) + c.Assert(s.repo2.Revision, IsNil) +} + type PublishedRepoCollectionSuite struct { PackageListMixinSuite db database.Storage diff --git a/system/t04_mirror/UpdateMirror10Test_gold b/system/t04_mirror/UpdateMirror10Test_gold index fa0f41f27..54251a64e 100644 --- a/system/t04_mirror/UpdateMirror10Test_gold +++ b/system/t04_mirror/UpdateMirror10Test_gold @@ -18,7 +18,7 @@ Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/d Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward-dbgsym_0.7.5-1~bullseyecran.0_i386.deb Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward_0.7.5-1~bullseyecran.0_amd64.deb Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward_0.7.5-1~bullseyecran.0_i386.deb -Mirror `flat-src` has been successfully updated. +Mirror `flat-src` has been updated successfully. Packages filtered: 110 -> 11. gpgv: using RSA key 7BA040A510E4E66ED3743EC1B8F25A8A73EACF41 gpgv: Good signature from "Johannes Ranke " diff --git a/system/t04_mirror/UpdateMirror11FTPTest_gold b/system/t04_mirror/UpdateMirror11FTPTest_gold index 24f615525..dc4bab13b 100644 --- a/system/t04_mirror/UpdateMirror11FTPTest_gold +++ b/system/t04_mirror/UpdateMirror11FTPTest_gold @@ -13,7 +13,7 @@ Downloading: http://repo.aptly.info/system-tests/snapshot.debian.org/archive/deb Downloading: http://repo.aptly.info/system-tests/snapshot.debian.org/archive/debian/20220201T025006Z/pool/main/s/sensible-utils/sensible-utils_0.0.9+deb9u1_all.deb Downloading: http://repo.aptly.info/system-tests/snapshot.debian.org/archive/debian/20220201T025006Z/pool/main/s/sysvinit/sysvinit-utils_2.88dsf-59.9_i386.deb Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/snapshot.debian.org/archive/debian/20220201T025006Z/dists/stretch/InRelease -Mirror `stretch-main` has been successfully updated. +Mirror `stretch-main` has been updated successfully. Packages filtered: 50604 -> 3. Retrying 0 http://repo.aptly.info/system-tests/snapshot.debian.org/archive/debian/20220201T025006Z/dists/stretch/InRelease... gpgv: issuer "debian-release@lists.debian.org" diff --git a/system/t04_mirror/UpdateMirror12Test_gold b/system/t04_mirror/UpdateMirror12Test_gold index eff42e76f..f9ad32d5a 100644 --- a/system/t04_mirror/UpdateMirror12Test_gold +++ b/system/t04_mirror/UpdateMirror12Test_gold @@ -37,7 +37,7 @@ Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archi Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/pool/main/g/gnupg2/scdaemon_2.1.18-8~deb9u4_amd64.deb Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/pool/main/g/gnupg2/scdaemon_2.1.18-8~deb9u4_i386.deb Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease -Mirror `stretch` has been successfully updated. +Mirror `stretch` has been updated successfully. Packages filtered: 78248 -> 20. Retrying 0 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease... gpgv: issuer "debian-release@lists.debian.org" diff --git a/system/t04_mirror/UpdateMirror13Test_gold b/system/t04_mirror/UpdateMirror13Test_gold index 63c166c8a..b00c4ce3b 100644 --- a/system/t04_mirror/UpdateMirror13Test_gold +++ b/system/t04_mirror/UpdateMirror13Test_gold @@ -58,4 +58,4 @@ Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/va Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish-dbg_3.0.3-1~wheezy_i386.deb Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish_3.0.3-1~wheezy_amd64.deb Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish_3.0.3-1~wheezy_i386.deb -Mirror `varnish` has been successfully updated. \ No newline at end of file +Mirror `varnish` has been updated successfully. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror14Test_gold b/system/t04_mirror/UpdateMirror14Test_gold index 0c1b5c596..edcc3695f 100644 --- a/system/t04_mirror/UpdateMirror14Test_gold +++ b/system/t04_mirror/UpdateMirror14Test_gold @@ -6,4 +6,4 @@ Downloading & parsing package files... Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/dists/wheezy/Release Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/dists/wheezy/main/binary-amd64/Packages.bz2 Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/dists/wheezy/main/binary-i386/Packages.bz2 -Mirror `varnish` has been successfully updated. \ No newline at end of file +Mirror `varnish` has been updated successfully. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror15Test_gold b/system/t04_mirror/UpdateMirror15Test_gold index 3c11f1ffd..d218085c8 100644 --- a/system/t04_mirror/UpdateMirror15Test_gold +++ b/system/t04_mirror/UpdateMirror15Test_gold @@ -6,4 +6,4 @@ Downloading & parsing package files... Downloading https://dl.bintray.com/smira/deb/Packages.bz2... Downloading https://dl.bintray.com/smira/deb/Release... Downloading https://dl.bintray.com/smira/deb/libboost-program-options-dev_1.49.0.1_i386.deb... -Mirror `bintray` has been successfully updated. \ No newline at end of file +Mirror `bintray` has been updated successfully. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror16Test_gold b/system/t04_mirror/UpdateMirror16Test_gold index 3c11f1ffd..d218085c8 100644 --- a/system/t04_mirror/UpdateMirror16Test_gold +++ b/system/t04_mirror/UpdateMirror16Test_gold @@ -6,4 +6,4 @@ Downloading & parsing package files... Downloading https://dl.bintray.com/smira/deb/Packages.bz2... Downloading https://dl.bintray.com/smira/deb/Release... Downloading https://dl.bintray.com/smira/deb/libboost-program-options-dev_1.49.0.1_i386.deb... -Mirror `bintray` has been successfully updated. \ No newline at end of file +Mirror `bintray` has been updated successfully. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror17Test_gold b/system/t04_mirror/UpdateMirror17Test_gold index 6341c1de1..cddc0d3eb 100644 --- a/system/t04_mirror/UpdateMirror17Test_gold +++ b/system/t04_mirror/UpdateMirror17Test_gold @@ -6,5 +6,5 @@ Download queue: 0 items (0 B) Downloading & parsing package files... Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/Release Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/main/binary-i386/Packages.gz -Mirror `stretch` has been successfully updated. +Mirror `stretch` has been updated successfully. Packages filtered: 50604 -> 1. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror18Test_gold b/system/t04_mirror/UpdateMirror18Test_gold index 0e0deb88f..30dfc1844 100644 --- a/system/t04_mirror/UpdateMirror18Test_gold +++ b/system/t04_mirror/UpdateMirror18Test_gold @@ -7,5 +7,5 @@ Downloading & parsing package files... Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/Release Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/main/binary-i386/Packages.gz Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/pool/main/b/boost-defaults/libboost-program-options-dev_1.62.0.1_i386.deb -Mirror `stretch` has been successfully updated. +Mirror `stretch` has been updated successfully. Packages filtered: 50604 -> 1. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror19Test_gold b/system/t04_mirror/UpdateMirror19Test_gold index fcf7c33cc..ef4a86340 100644 --- a/system/t04_mirror/UpdateMirror19Test_gold +++ b/system/t04_mirror/UpdateMirror19Test_gold @@ -12,4 +12,4 @@ Downloading: http://repo.aptly.info/system-tests/packages.pagerduty.com/pdagent/ Building download queue... Download queue: 23 items (3.46 MiB) -Mirror `pagerduty` has been successfully updated. +Mirror `pagerduty` has been updated successfully. diff --git a/system/t04_mirror/UpdateMirror1Test_gold b/system/t04_mirror/UpdateMirror1Test_gold index 63c166c8a..b00c4ce3b 100644 --- a/system/t04_mirror/UpdateMirror1Test_gold +++ b/system/t04_mirror/UpdateMirror1Test_gold @@ -58,4 +58,4 @@ Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/va Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish-dbg_3.0.3-1~wheezy_i386.deb Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish_3.0.3-1~wheezy_amd64.deb Downloading: http://repo.aptly.info/system-tests/packagecloud.io/varnishcache/varnish30/debian/pool/wheezy/main/v/varnish/varnish_3.0.3-1~wheezy_i386.deb -Mirror `varnish` has been successfully updated. \ No newline at end of file +Mirror `varnish` has been updated successfully. \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror20Test_gold b/system/t04_mirror/UpdateMirror20Test_gold index 3353fc5ba..726afd93c 100644 --- a/system/t04_mirror/UpdateMirror20Test_gold +++ b/system/t04_mirror/UpdateMirror20Test_gold @@ -8,7 +8,7 @@ Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/d Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/Packages.bz2 Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/r-cran-class_7.3-22-2~bullseyecran.0_amd64.deb Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/r-cran-class_7.3-22-2~bullseyecran.0_i386.deb -Mirror `flat` has been successfully updated. +Mirror `flat` has been updated successfully. Packages filtered: 89 -> 2. openpgp: Good signature from "Johannes Ranke " openpgp: RSA key ID B8F25A8A73EACF41 \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror21Test_gold b/system/t04_mirror/UpdateMirror21Test_gold index 869ec65ba..e864bf91b 100644 --- a/system/t04_mirror/UpdateMirror21Test_gold +++ b/system/t04_mirror/UpdateMirror21Test_gold @@ -11,4 +11,4 @@ Downloading: http://repo.aptly.info/system-tests/packages.pagerduty.com/pdagent/ Building download queue... Download queue: 23 items (3.46 MiB) -Mirror `pagerduty` has been successfully updated. +Mirror `pagerduty` has been updated successfully. diff --git a/system/t04_mirror/UpdateMirror22Test_gold b/system/t04_mirror/UpdateMirror22Test_gold index 6724bab16..9c76ac64f 100644 --- a/system/t04_mirror/UpdateMirror22Test_gold +++ b/system/t04_mirror/UpdateMirror22Test_gold @@ -8,4 +8,4 @@ Applying filter... Building download queue... Download queue: 0 items (0 B) -Mirror `libnvidia-container` has been successfully updated. +Mirror `libnvidia-container` has been updated successfully. diff --git a/system/t04_mirror/UpdateMirror23Test_gold b/system/t04_mirror/UpdateMirror23Test_gold index 5e6157c78..5b172366b 100644 --- a/system/t04_mirror/UpdateMirror23Test_gold +++ b/system/t04_mirror/UpdateMirror23Test_gold @@ -23,7 +23,7 @@ Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archi Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/non-free/installer-s390x/current/images/SHA256SUMS Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/non-free/installer-s390x/current/images/SHA256SUMS -Mirror `stretch` has been successfully updated. +Mirror `stretch` has been updated successfully. Packages filtered: 49256 -> 1. Retrying 0 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease... Retrying 0 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/non-free/installer-s390x/current/images/SHA256SUMS... diff --git a/system/t04_mirror/UpdateMirror24Test_gold b/system/t04_mirror/UpdateMirror24Test_gold index e8ec96b93..dcc276312 100644 --- a/system/t04_mirror/UpdateMirror24Test_gold +++ b/system/t04_mirror/UpdateMirror24Test_gold @@ -53,7 +53,7 @@ Downloading: http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/di Downloading: http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/dists/trusty/restricted/installer-amd64/current/images/SHA256SUMS Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease Error (retrying): HTTP code 404 while fetching http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/dists/trusty/restricted/installer-amd64/current/images/SHA256SUMS -Mirror `trusty` has been successfully updated. +Mirror `trusty` has been updated successfully. Packages filtered: 8616 -> 1. Retrying 0 http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/dists/trusty/InRelease... Retrying 0 http://repo.aptly.info/system-tests/us.archive.ubuntu.com/ubuntu/dists/trusty/restricted/installer-amd64/current/images/SHA256SUMS... diff --git a/system/t04_mirror/UpdateMirror26Test_gold b/system/t04_mirror/UpdateMirror26Test_gold index aa6d212ed..b460083f7 100644 --- a/system/t04_mirror/UpdateMirror26Test_gold +++ b/system/t04_mirror/UpdateMirror26Test_gold @@ -14,7 +14,7 @@ Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archi Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/main/binary-i386/Packages.gz Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/pool/main/b/boost-defaults/libboost-program-options-dev_1.62.0.1_i386.deb Downloading: http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/pool/main/b/boost-defaults/libboost-program-options-dev_1.62.0.1_i386.deb -Mirror `grab` has been successfully updated. +Mirror `grab` has been updated successfully. Packages filtered: 50604 -> 1. Retrying 0 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease Retrying 0 http://repo.aptly.info/system-tests/archive.debian.org/debian-archive/debian/dists/stretch/InRelease diff --git a/system/t04_mirror/UpdateMirror6Test_gold b/system/t04_mirror/UpdateMirror6Test_gold index 84cb9694f..000a38aa1 100644 --- a/system/t04_mirror/UpdateMirror6Test_gold +++ b/system/t04_mirror/UpdateMirror6Test_gold @@ -18,4 +18,4 @@ Download queue: 1 items (30 B) Downloading: ${url}pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb WARNING: ${url}pool/main/a/amanda/amanda-client_3.3.1-3~bpo60+1_amd64.deb: sha1 hash mismatch "8d3a014000038725d6daf8771b42a0784253688f" != "66b27417d37e024c46526c2f6d358a754fc552f3" -Mirror `failure` has been successfully updated. +Mirror `failure` has been updated successfully. diff --git a/system/t04_mirror/UpdateMirror7Test_gold b/system/t04_mirror/UpdateMirror7Test_gold index 140908530..bc1279d80 100644 --- a/system/t04_mirror/UpdateMirror7Test_gold +++ b/system/t04_mirror/UpdateMirror7Test_gold @@ -94,7 +94,7 @@ Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/d Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward-dbgsym_0.7.5-1~bullseyecran.0_i386.deb Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward_0.7.5-1~bullseyecran.0_amd64.deb Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/rkward_0.7.5-1~bullseyecran.0_i386.deb -Mirror `flat` has been successfully updated. +Mirror `flat` has been updated successfully. gpgv: using RSA key 7BA040A510E4E66ED3743EC1B8F25A8A73EACF41 gpgv: Good signature from "Johannes Ranke " gpgv: Signature made Thu Nov 2 07:43:52 2023 UTC \ No newline at end of file diff --git a/system/t04_mirror/UpdateMirror8Test_gold b/system/t04_mirror/UpdateMirror8Test_gold index 30dbccb9d..382b15e28 100644 --- a/system/t04_mirror/UpdateMirror8Test_gold +++ b/system/t04_mirror/UpdateMirror8Test_gold @@ -15,4 +15,4 @@ Downloading: http://repo.aptly.info/system-tests/ppa.launchpad.net/gladky-anton/ Building download queue... Download queue: 0 items (0 B) -Mirror `gnuplot-maverick-src` has been successfully updated. +Mirror `gnuplot-maverick-src` has been updated successfully. diff --git a/system/t04_mirror/UpdateMirror9Test_gold b/system/t04_mirror/UpdateMirror9Test_gold index 1d8988749..2c2dba876 100644 --- a/system/t04_mirror/UpdateMirror9Test_gold +++ b/system/t04_mirror/UpdateMirror9Test_gold @@ -157,7 +157,7 @@ Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/d Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/survival_3.5-7-1~bullseyecran.0.debian.tar.xz Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/survival_3.5-7-1~bullseyecran.0.dsc Downloading: http://repo.aptly.info/system-tests/cloud.r-project.org/bin/linux/debian/bullseye-cran40/survival_3.5-7.orig.tar.gz -Mirror `flat-src` has been successfully updated. +Mirror `flat-src` has been updated successfully. gpgv: using RSA key 7BA040A510E4E66ED3743EC1B8F25A8A73EACF41 gpgv: Good signature from "Johannes Ranke " gpgv: Signature made Thu Nov 2 07:43:52 2023 UTC \ No newline at end of file diff --git a/system/t06_publish/AzurePublish2Test_gold b/system/t06_publish/AzurePublish2Test_gold index ea8cafb98..da6f56e98 100644 --- a/system/t06_publish/AzurePublish2Test_gold +++ b/system/t06_publish/AzurePublish2Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository azure:test1:./maverick... +Cleaning up component "main"... -Published local repository azure:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository azure:test1:./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/AzurePublish3Test_gold b/system/t06_publish/AzurePublish3Test_gold index c18551698..58df51dce 100644 --- a/system/t06_publish/AzurePublish3Test_gold +++ b/system/t06_publish/AzurePublish3Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository azure:test1:./maverick... +Cleaning up component "main"... Published snapshot repository azure:test1:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/AzurePublish5Test_gold b/system/t06_publish/AzurePublish5Test_gold index cadce02c5..da28d10a4 100644 --- a/system/t06_publish/AzurePublish5Test_gold +++ b/system/t06_publish/AzurePublish5Test_gold @@ -1,3 +1,4 @@ -Cleaning up prefix "." components main... +Cleaning up published repository azure:test1:./sq2... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t06_publish/PublishDrop3Test_gold b/system/t06_publish/PublishDrop3Test_gold index eb8ce9c0d..148d2179a 100644 --- a/system/t06_publish/PublishDrop3Test_gold +++ b/system/t06_publish/PublishDrop3Test_gold @@ -1,4 +1,5 @@ Removing ${HOME}/.aptly/public/dists/sq1... -Cleaning up prefix "." components main... +Cleaning up published repository ./sq1... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t06_publish/PublishDrop5Test_gold b/system/t06_publish/PublishDrop5Test_gold index 79be1a166..a7de38365 100644 --- a/system/t06_publish/PublishDrop5Test_gold +++ b/system/t06_publish/PublishDrop5Test_gold @@ -1,4 +1,5 @@ Removing ${HOME}/.aptly/public/dists/sq2... -Cleaning up prefix "." components main... +Cleaning up published repository ./sq2... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t06_publish/PublishDrop9Test_gold b/system/t06_publish/PublishDrop9Test_gold index eb8ce9c0d..148d2179a 100644 --- a/system/t06_publish/PublishDrop9Test_gold +++ b/system/t06_publish/PublishDrop9Test_gold @@ -1,4 +1,5 @@ Removing ${HOME}/.aptly/public/dists/sq1... -Cleaning up prefix "." components main... +Cleaning up published repository ./sq1... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t06_publish/PublishSnapshot42Test_gold b/system/t06_publish/PublishSnapshot42Test_gold new file mode 100644 index 000000000..8cf10f194 --- /dev/null +++ b/system/t06_publish/PublishSnapshot42Test_gold @@ -0,0 +1,13 @@ +Loading packages... +Generating metadata files and linking package files... +Finalizing metadata files... +Signing file 'Release' with gpg, please enter your passphrase when prompted: +Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: + +Snapshot snap1 has been successfully published. +Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing. +Now you can add following line to apt sources: + deb http://your-server/ maverick main +Don't forget to add your GPG key to apt with apt-key. + +You can also use `aptly serve` to publish your repositories over HTTP quickly. diff --git a/system/t06_publish/PublishSwitch11Test_gold b/system/t06_publish/PublishSwitch11Test_gold index 9d87127b4..f25a565cc 100644 --- a/system/t06_publish/PublishSwitch11Test_gold +++ b/system/t06_publish/PublishSwitch11Test_gold @@ -5,6 +5,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... Published snapshot repository ./maverick [i386, source] publishes {main: [snap2]: Snapshot from local repo [local-repo2]} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch13Test_gold b/system/t06_publish/PublishSwitch13Test_gold index 271997f33..5eb34a1a3 100644 --- a/system/t06_publish/PublishSwitch13Test_gold +++ b/system/t06_publish/PublishSwitch13Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch15Test_gold b/system/t06_publish/PublishSwitch15Test_gold index 271997f33..5eb34a1a3 100644 --- a/system/t06_publish/PublishSwitch15Test_gold +++ b/system/t06_publish/PublishSwitch15Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch16Test_gold b/system/t06_publish/PublishSwitch16Test_gold index d3d1cd5b5..c585f3961 100644 --- a/system/t06_publish/PublishSwitch16Test_gold +++ b/system/t06_publish/PublishSwitch16Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./bookworm... +Cleaning up component "main"... Published snapshot repository ./bookworm (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch1Test_gold b/system/t06_publish/PublishSwitch1Test_gold index 271997f33..5eb34a1a3 100644 --- a/system/t06_publish/PublishSwitch1Test_gold +++ b/system/t06_publish/PublishSwitch1Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch2Test_gold b/system/t06_publish/PublishSwitch2Test_gold index 7cc00d448..154024ddc 100644 --- a/system/t06_publish/PublishSwitch2Test_gold +++ b/system/t06_publish/PublishSwitch2Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "ppa" components main... +Cleaning up published repository ppa/maverick... +Cleaning up component "main"... Published snapshot repository ppa/maverick [amd64, i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch3Test_gold b/system/t06_publish/PublishSwitch3Test_gold index 271997f33..5eb34a1a3 100644 --- a/system/t06_publish/PublishSwitch3Test_gold +++ b/system/t06_publish/PublishSwitch3Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch4Test_gold b/system/t06_publish/PublishSwitch4Test_gold index 899c3d536..ca8471d49 100644 --- a/system/t06_publish/PublishSwitch4Test_gold +++ b/system/t06_publish/PublishSwitch4Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "ppa" components main... +Cleaning up published repository ppa/maverick... +Cleaning up component "main"... Published snapshot repository ppa/maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully switched to new source. diff --git a/system/t06_publish/PublishSwitch8Test_gold b/system/t06_publish/PublishSwitch8Test_gold index a10e335fe..7b744040e 100644 --- a/system/t06_publish/PublishSwitch8Test_gold +++ b/system/t06_publish/PublishSwitch8Test_gold @@ -3,6 +3,8 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components b, c... +Cleaning up published repository ./maverick... +Cleaning up component "b"... +Cleaning up component "c"... Published snapshot repository ./maverick [amd64, i386, source] publishes {a: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {b: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'}, {c: [local2]: Snapshot from local repo [local-repo]} has been successfully switched to new source. diff --git a/system/t06_publish/PublishUpdate10Test_gold b/system/t06_publish/PublishUpdate10Test_gold index 082275a34..5f867a719 100644 --- a/system/t06_publish/PublishUpdate10Test_gold +++ b/system/t06_publish/PublishUpdate10Test_gold @@ -5,6 +5,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate11Test_gold b/system/t06_publish/PublishUpdate11Test_gold index 05b56b2a2..2c3b70a11 100644 --- a/system/t06_publish/PublishUpdate11Test_gold +++ b/system/t06_publish/PublishUpdate11Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate12Test_gold b/system/t06_publish/PublishUpdate12Test_gold index 7488eec4e..d3a202dff 100644 --- a/system/t06_publish/PublishUpdate12Test_gold +++ b/system/t06_publish/PublishUpdate12Test_gold @@ -4,4 +4,4 @@ Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate13Test_gold b/system/t06_publish/PublishUpdate13Test_gold index 05b56b2a2..2c3b70a11 100644 --- a/system/t06_publish/PublishUpdate13Test_gold +++ b/system/t06_publish/PublishUpdate13Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate14Test_gold b/system/t06_publish/PublishUpdate14Test_gold index e0d3ab8c7..661e9bc1d 100644 --- a/system/t06_publish/PublishUpdate14Test_gold +++ b/system/t06_publish/PublishUpdate14Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./bookworm... +Cleaning up component "main"... -Published local repository ./bookworm [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./bookworm [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate15Test_gold b/system/t06_publish/PublishUpdate15Test_gold index ebd8ad244..a0624c8eb 100644 --- a/system/t06_publish/PublishUpdate15Test_gold +++ b/system/t06_publish/PublishUpdate15Test_gold @@ -3,6 +3,6 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components ... +Cleaning up published repository ./maverick... -Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {other-test: [snap3]: Created as empty}, {test: [snap2]: Created as empty} has been successfully updated. +Published snapshot repository ./maverick (origin: LP-PPA-gladky-anton-gnuplot) [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {other-test: [snap3]: Created as empty}, {test: [snap2]: Created as empty} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate16Test_gold b/system/t06_publish/PublishUpdate16Test_gold index e989f2167..d16cf8f33 100644 --- a/system/t06_publish/PublishUpdate16Test_gold +++ b/system/t06_publish/PublishUpdate16Test_gold @@ -3,6 +3,12 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components ... +Cleaning up published repository ./maverick... +Removing component "other-test"... +Removing ${HOME}/.aptly/public/dists/maverick/other-test... +Removing component "test"... +Removing ${HOME}/.aptly/public/dists/maverick/test... +Removing ${HOME}/.aptly/public/pool/other-test... +Removing ${HOME}/.aptly/public/pool/test... -Published snapshot repository ./maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully updated. +Published snapshot repository ./maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate17Test_gold b/system/t06_publish/PublishUpdate17Test_gold index 9ad845772..d05bdce55 100644 --- a/system/t06_publish/PublishUpdate17Test_gold +++ b/system/t06_publish/PublishUpdate17Test_gold @@ -3,6 +3,8 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components other-test, test... +Cleaning up published repository ./maverick... +Cleaning up component "other-test"... +Cleaning up component "test"... -Published snapshot repository ./maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {other-test: [snap5]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {test: [snap4]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully updated. +Published snapshot repository ./maverick [i386] publishes {main: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {other-test: [snap5]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {test: [snap4]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate18Test_gold b/system/t06_publish/PublishUpdate18Test_gold index 2e37b7026..2e4823a6f 100644 --- a/system/t06_publish/PublishUpdate18Test_gold +++ b/system/t06_publish/PublishUpdate18Test_gold @@ -3,6 +3,10 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components test... +Cleaning up published repository ./maverick... +Removing component "main"... +Removing ${HOME}/.aptly/public/dists/maverick/main... +Removing ${HOME}/.aptly/public/pool/main... +Cleaning up component "test"... -Published snapshot repository ./maverick [i386] publishes {other-test: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {test: [snap3]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been successfully updated. +Published snapshot repository ./maverick [i386] publishes {other-test: [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick}, {test: [snap3]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate1Test_gold b/system/t06_publish/PublishUpdate1Test_gold index 05b56b2a2..2c3b70a11 100644 --- a/system/t06_publish/PublishUpdate1Test_gold +++ b/system/t06_publish/PublishUpdate1Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate2Test_gold b/system/t06_publish/PublishUpdate2Test_gold index 05b56b2a2..2c3b70a11 100644 --- a/system/t06_publish/PublishUpdate2Test_gold +++ b/system/t06_publish/PublishUpdate2Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate3Test_gold b/system/t06_publish/PublishUpdate3Test_gold index 05b56b2a2..2c3b70a11 100644 --- a/system/t06_publish/PublishUpdate3Test_gold +++ b/system/t06_publish/PublishUpdate3Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository ./maverick... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate4Test_gold b/system/t06_publish/PublishUpdate4Test_gold index 29502a022..44b0c987d 100644 --- a/system/t06_publish/PublishUpdate4Test_gold +++ b/system/t06_publish/PublishUpdate4Test_gold @@ -3,6 +3,6 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up component "main" in prefix "."... -Published local repository ./maverick [source] publishes {main: [local-repo]} has been successfully updated. +Published local repository ./maverick [source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate7Test_gold b/system/t06_publish/PublishUpdate7Test_gold index a13b260ca..32e572f56 100644 --- a/system/t06_publish/PublishUpdate7Test_gold +++ b/system/t06_publish/PublishUpdate7Test_gold @@ -3,6 +3,8 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components contrib, main... +Cleaning up published repository ./maverick... +Cleaning up component "contrib"... +Cleaning up component "main"... -Published local repository ./maverick [i386, source] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. +Published local repository ./maverick [i386, source] publishes {contrib: [repo2]}, {main: [repo1]} has been updated successfully. diff --git a/system/t06_publish/PublishUpdate8Test_gold b/system/t06_publish/PublishUpdate8Test_gold index 1a6ebd262..f67dc2aaf 100644 --- a/system/t06_publish/PublishUpdate8Test_gold +++ b/system/t06_publish/PublishUpdate8Test_gold @@ -1,6 +1,8 @@ Loading packages... Generating metadata files and linking package files... Finalizing metadata files... -Cleaning up prefix "." components contrib, main... +Cleaning up published repository ./squeeze... +Cleaning up component "contrib"... +Cleaning up component "main"... -Published local repository ./squeeze [i386] publishes {contrib: [repo2]}, {main: [repo1]} has been successfully updated. +Published local repository ./squeeze [i386] publishes {contrib: [repo2]}, {main: [repo1]} has been updated successfully. diff --git a/system/t06_publish/S3Publish2Test_gold b/system/t06_publish/S3Publish2Test_gold index d6ffd382f..4a859355d 100644 --- a/system/t06_publish/S3Publish2Test_gold +++ b/system/t06_publish/S3Publish2Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository s3:test1:./maverick... +Cleaning up component "main"... -Published local repository s3:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository s3:test1:./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/S3Publish3Test_gold b/system/t06_publish/S3Publish3Test_gold index 54c8a83e1..ddd116df9 100644 --- a/system/t06_publish/S3Publish3Test_gold +++ b/system/t06_publish/S3Publish3Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository s3:test1:./maverick... +Cleaning up component "main"... Published snapshot repository s3:test1:./maverick (origin: LP-PPA-gladky-anton-gnuplot) [amd64, i386] publishes {main: [snap3]: Pulled into 'snap2' with 'snap1' as source, pull request was: 'gnuplot-x11'} has been successfully switched to new source. diff --git a/system/t06_publish/S3Publish5Test_gold b/system/t06_publish/S3Publish5Test_gold index cadce02c5..f1ab75621 100644 --- a/system/t06_publish/S3Publish5Test_gold +++ b/system/t06_publish/S3Publish5Test_gold @@ -1,3 +1,4 @@ -Cleaning up prefix "." components main... +Cleaning up published repository s3:test1:./sq2... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t06_publish/S3Publish6Test_gold b/system/t06_publish/S3Publish6Test_gold index d6ffd382f..4a859355d 100644 --- a/system/t06_publish/S3Publish6Test_gold +++ b/system/t06_publish/S3Publish6Test_gold @@ -3,6 +3,7 @@ Generating metadata files and linking package files... Finalizing metadata files... Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: -Cleaning up prefix "." components main... +Cleaning up published repository s3:test1:./maverick... +Cleaning up component "main"... -Published local repository s3:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository s3:test1:./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/SwiftPublish2Test_gold b/system/t06_publish/SwiftPublish2Test_gold index 1ec018b61..0e3aa2d12 100644 --- a/system/t06_publish/SwiftPublish2Test_gold +++ b/system/t06_publish/SwiftPublish2Test_gold @@ -5,4 +5,4 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: Cleaning up prefix "." components main... -Published local repository swift:test1:./maverick [i386, source] publishes {main: [local-repo]} has been successfully updated. +Published local repository swift:test1:./maverick [i386, source] publishes {main: [local-repo]} has been updated successfully. diff --git a/system/t06_publish/snapshot.py b/system/t06_publish/snapshot.py index 4514571d4..aa3fb54ee 100644 --- a/system/t06_publish/snapshot.py +++ b/system/t06_publish/snapshot.py @@ -1344,3 +1344,23 @@ def check(self): self.check_exists('public/pool/main/libx/libxslt/libxslt1.1_1.1.32-2.2~deb10u2_i386.deb') self.check_exists('public/pool/main/libz/libzstd/libzstd1_1.3.8+dfsg-3+deb10u2_i386.deb') self.check_exists('public/pool/main/z/zlib/zlib1g_1.2.11.dfsg-1+deb10u2_i386.deb') + + +class PublishSnapshot42Test(BaseTest): + """ + publish snapshot: mirror with multi-dist + """ + fixtureDB = True + fixturePool = True + fixtureCmds = [ + "aptly snapshot create snap1 from mirror gnuplot-maverick", + ] + runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -multi-dist snap1" + gold_processor = BaseTest.expand_environ + + def check(self): + super(PublishSnapshot42Test, self).check() + self.check_not_exists( + 'public/pool/main/g/gnuplot/gnuplot-doc_4.6.1-1~maverick2_all.deb') + self.check_exists( + 'public/pool/maverick/main/g/gnuplot/gnuplot-doc_4.6.1-1~maverick2_all.deb') diff --git a/system/t08_db/CleanupDB9Test_publish_drop b/system/t08_db/CleanupDB9Test_publish_drop index c93038092..f9d5008f8 100644 --- a/system/t08_db/CleanupDB9Test_publish_drop +++ b/system/t08_db/CleanupDB9Test_publish_drop @@ -1,4 +1,5 @@ Removing ${HOME}/.aptly/public/dists/def... -Cleaning up prefix "." components main... +Cleaning up published repository ./def... +Cleaning up component "main"... Published repository has been removed successfully. diff --git a/system/t12_api/publish.py b/system/t12_api/publish.py index 4fe3f6f01..827515796 100644 --- a/system/t12_api/publish.py +++ b/system/t12_api/publish.py @@ -1402,6 +1402,58 @@ def check(self): self.check_equal(sources_expected, sources.json()) +class PublishSourceReplaceAPITestRepo(APITest): + """ + PUT /publish/:prefix/:distribution/sources/main + """ + fixtureGpg = True + + def check(self): + repo1_name = self.random_name() + self.check_equal(self.post( + "/api/repos", json={"Name": repo1_name, "DefaultDistribution": "wheezy"}).status_code, 201) + + d = self.random_name() + self.check_equal(self.upload("/api/files/" + d, + "libboost-program-options-dev_1.49.0.1_i386.deb", "pyspi_0.6.1-1.3.dsc", + "pyspi_0.6.1-1.3.diff.gz", "pyspi_0.6.1.orig.tar.gz", + "pyspi-0.6.1-1.3.stripped.dsc").status_code, 200) + + self.check_equal(self.post("/api/repos/" + repo1_name + "/file/" + d).status_code, 200) + + repo2_name = self.random_name() + self.check_equal(self.post( + "/api/repos", json={"Name": repo2_name, "DefaultDistribution": "wheezy"}).status_code, 201) + + d = self.random_name() + self.check_equal(self.upload("/api/files/" + d, + "libboost-program-options-dev_1.49.0.1_i386.deb").status_code, 200) + + self.check_equal(self.post("/api/repos/" + repo2_name + "/file/" + d).status_code, 200) + + # publishing under prefix, default distribution + prefix = self.random_name() + self.check_equal(self.post( + "/api/publish/" + prefix, + json={ + "SourceKind": "local", + "Sources": [{"Component": "main", "Name": repo1_name}], + "Signing": DefaultSigningOptions, + } + ).status_code, 201) + + # Actual test + self.check_equal(self.put( + "/api/publish/" + prefix + "/wheezy/sources/main", + json={"Component": "test", "Name": repo2_name} + ).status_code, 200) + + sources_expected = [{"Component": "test", "Name": repo2_name}] + sources = self.get("/api/publish/" + prefix + "/wheezy/sources") + self.check_equal(sources.status_code, 200) + self.check_equal(sources_expected, sources.json()) + + class PublishUpdateSourcesAPITestRepo(APITest): """ POST /publish/:prefix/:distribution/update