Merge pull request #1366 from cfiehe/feature/allow_component_management

Allow adding, removing and replacing of published repository components
This commit is contained in:
André Roth
2024-11-01 20:45:23 +01:00
committed by GitHub
110 changed files with 3379 additions and 503 deletions

View File

@@ -60,7 +60,8 @@ List of contributors, in chronological order:
* Nic Waller (https://github.com/sf-nwaller)
* iofq (https://github.com/iofq)
* Noa Resare (https://github.com/nresare)
* Ramón N.Rodriguez (https://github.com/runitonmetal)
* Ramon N.Rodriguez (https://github.com/runitonmetal)
* Golf Hu (https://github.com/hudeng-go)
* Cookie Fei (https://github.com/wuhuang26)
* Andrey Loukhnov (https://github.com/aol-nnov)
* Christoph Fiehe (https://github.com/cfiehe)

View File

@@ -59,7 +59,7 @@ flake8: ## run flake8 on system test python files
lint:
# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
@test -f $(BINPATH)/golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
# Running lint
@PATH=$(BINPATH)/:$(PATH) golangci-lint run
@@ -100,7 +100,7 @@ serve: prepare swagger-install ## Run development server (auto recompiling)
test -f $(BINPATH)/air || go install github.com/air-verse/air@v1.52.3
cp debian/aptly.conf ~/.aptly.conf
sed -i /enableSwaggerEndpoint/s/false/true/ ~/.aptly.conf
PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q --markdownFiles docs' -build.exclude_dir docs,system,debian,pgp/keyrings,pgp/test-bins,completion.d,man,deb/testdata,console,_man,cmd,systemd -- api serve -listen 0.0.0.0:3142
PATH=$(BINPATH):$$PATH air -build.pre_cmd 'swag init -q --markdownFiles docs' -build.exclude_dir docs,system,debian,pgp/keyrings,pgp/test-bins,completion.d,man,deb/testdata,console,_man,cmd,systemd,obj-x86_64-linux-gnu -- api serve -listen 0.0.0.0:3142
dpkg: prepare swagger ## Build debian packages
@test -n "$(DEBARCH)" || (echo "please define DEBARCH"; exit 1)

File diff suppressed because it is too large Load Diff

View File

@@ -185,12 +185,19 @@ func Router(c *ctx.AptlyContext) http.Handler {
}
{
api.GET("/publish", apiPublishList)
api.GET("/publish/:prefix/:distribution", apiPublishShow)
api.POST("/publish", apiPublishRepoOrSnapshot)
api.POST("/publish/:prefix", apiPublishRepoOrSnapshot)
api.PUT("/publish/:prefix/:distribution", apiPublishUpdateSwitch)
api.DELETE("/publish/:prefix/:distribution", apiPublishDrop)
api.POST("/publish/:prefix/:distribution/sources", apiPublishAddSource)
api.GET("/publish/:prefix/:distribution/sources", apiPublishListChanges)
api.PUT("/publish/:prefix/:distribution/sources", apiPublishSetSources)
api.DELETE("/publish/:prefix/:distribution/sources", apiPublishDropChanges)
api.PUT("/publish/:prefix/:distribution/sources/:component", apiPublishUpdateSource)
api.DELETE("/publish/:prefix/:distribution/sources/:component", apiPublishRemoveSource)
api.POST("/publish/:prefix/:distribution/update", apiPublishUpdate)
}
{

View File

@@ -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
}

View File

@@ -34,10 +34,26 @@ func makeCmdPublish() *commander.Command {
makeCmdPublishDrop(),
makeCmdPublishList(),
makeCmdPublishRepo(),
makeCmdPublishShow(),
makeCmdPublishSnapshot(),
makeCmdPublishSource(),
makeCmdPublishSwitch(),
makeCmdPublishUpdate(),
makeCmdPublishShow(),
},
}
}
func makeCmdPublishSource() *commander.Command {
return &commander.Command{
UsageLine: "source",
Short: "manage sources of published repository",
Subcommands: []*commander.Command{
makeCmdPublishSourceAdd(),
makeCmdPublishSourceDrop(),
makeCmdPublishSourceList(),
makeCmdPublishSourceRemove(),
makeCmdPublishSourceReplace(),
makeCmdPublishSourceUpdate(),
},
}
}

View File

@@ -52,7 +52,8 @@ func aptlyPublishShowTxt(_ *commander.Command, args []string) error {
fmt.Printf("Architectures: %s\n", strings.Join(repo.Architectures, " "))
fmt.Printf("Sources:\n")
for component, sourceID := range repo.Sources {
for _, component := range repo.Components() {
sourceID := repo.Sources[component]
var name string
if repo.SourceKind == deb.SourceSnapshot {
source, e := collectionFactory.SnapshotCollection().ByUUID(sourceID)

View File

@@ -150,6 +150,10 @@ func aptlyPublishSnapshotOrRepo(cmd *commander.Command, args []string) error {
published.AcquireByHash = context.Flags().Lookup("acquire-by-hash").Value.Get().(bool)
}
if context.Flags().IsSet("multi-dist") {
published.MultiDist = context.Flags().Lookup("multi-dist").Value.Get().(bool)
}
duplicate := collectionFactory.PublishedRepoCollection().CheckDuplicate(published)
if duplicate != nil {
collectionFactory.PublishedRepoCollection().LoadComplete(duplicate, collectionFactory)

94
cmd/publish_source_add.go Normal file
View File

@@ -0,0 +1,94 @@
package cmd
import (
"fmt"
"strings"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceAdd(cmd *commander.Command, args []string) error {
if len(args) < 2 {
cmd.Usage()
return commander.ErrCommandError
}
distribution := args[0]
names := args[1:]
components := strings.Split(context.Flags().Lookup("component").Value.String(), ",")
if len(names) != len(components) {
return fmt.Errorf("mismatch in number of components (%d) and sources (%d)", len(components), len(names))
}
prefix := context.Flags().Lookup("prefix").Value.String()
storage, prefix := deb.ParsePrefix(prefix)
collectionFactory := context.NewCollectionFactory()
published, err := collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to add: %s", err)
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to add: %s", err)
}
revision := published.ObtainRevision()
sources := revision.Sources
for i, component := range components {
name := names[i]
_, exists := sources[component]
if exists {
return fmt.Errorf("unable to add: component '%s' has already been added", component)
}
context.Progress().Printf("Adding component '%s' with source '%s' [%s]...\n", component, name, published.SourceKind)
sources[component] = name
}
err = collectionFactory.PublishedRepoCollection().Update(published)
if err != nil {
return fmt.Errorf("unable to save to DB: %s", err)
}
context.Progress().Printf("\nYou can run 'aptly publish update %s %s' to update the content of the published repository.\n",
distribution, published.StoragePrefix())
return err
}
func makeCmdPublishSourceAdd() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceAdd,
UsageLine: "add <distribution> <source>",
Short: "add source components to a published repo",
Long: `
The command adds components of a snapshot or local repository to be published.
This does not publish the changes directly, but rather schedules them for a subsequent 'aptly publish update'.
The flag -component is mandatory. Use a comma-separated list of components, if
multiple components should be modified. The number of given components must be
equal to the number of given sources, e.g.:
aptly publish source add -component=main,contrib wheezy wheezy-main wheezy-contrib
Example:
$ aptly publish source add -component=contrib wheezy ppa wheezy-contrib
This command assigns the snapshot wheezy-contrib to the component contrib and
adds it to published repository revision of ppa/wheezy.
`,
Flag: *flag.NewFlagSet("aptly-publish-source-add", flag.ExitOnError),
}
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to add (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -0,0 +1,62 @@
package cmd
import (
"fmt"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceDrop(cmd *commander.Command, args []string) error {
if len(args) != 1 {
cmd.Usage()
return commander.ErrCommandError
}
prefix := context.Flags().Lookup("prefix").Value.String()
distribution := args[0]
storage, prefix := deb.ParsePrefix(prefix)
collectionFactory := context.NewCollectionFactory()
published, err := collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to drop: %s", err)
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to drop: %s", err)
}
published.DropRevision()
err = collectionFactory.PublishedRepoCollection().Update(published)
if err != nil {
return fmt.Errorf("unable to save to DB: %s", err)
}
context.Progress().Printf("Source changes have been removed successfully.\n")
return err
}
func makeCmdPublishSourceDrop() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceDrop,
UsageLine: "drop <distribution>",
Short: "drop pending source component changes of a published repository",
Long: `
Remove all pending changes what would be applied with a subsequent 'aptly publish update'.
Example:
$ aptly publish source drop wheezy
`,
Flag: *flag.NewFlagSet("aptly-publish-source-drop", flag.ExitOnError),
}
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to add (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -0,0 +1,89 @@
package cmd
import (
"encoding/json"
"fmt"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceList(cmd *commander.Command, args []string) error {
if len(args) != 1 {
cmd.Usage()
return commander.ErrCommandError
}
prefix := context.Flags().Lookup("prefix").Value.String()
distribution := args[0]
storage, prefix := deb.ParsePrefix(prefix)
published, err := context.NewCollectionFactory().PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to list: %s", err)
}
err = context.NewCollectionFactory().PublishedRepoCollection().LoadComplete(published, context.NewCollectionFactory())
if err != nil {
return err
}
if published.Revision == nil {
return fmt.Errorf("unable to list: no source changes exist")
}
jsonFlag := cmd.Flag.Lookup("json").Value.Get().(bool)
if jsonFlag {
return aptlyPublishSourceListJSON(published)
}
return aptlyPublishSourceListTxt(published)
}
func aptlyPublishSourceListTxt(published *deb.PublishedRepo) error {
revision := published.Revision
fmt.Printf("Sources:\n")
for _, component := range revision.Components() {
name := revision.Sources[component]
fmt.Printf(" %s: %s [%s]\n", component, name, published.SourceKind)
}
return nil
}
func aptlyPublishSourceListJSON(published *deb.PublishedRepo) error {
revision := published.Revision
output, err := json.MarshalIndent(revision.SourceList(), "", " ")
if err != nil {
return fmt.Errorf("unable to list: %s", err)
}
fmt.Println(string(output))
return nil
}
func makeCmdPublishSourceList() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceList,
UsageLine: "list <distribution>",
Short: "lists revision of published repository",
Long: `
Command lists sources of a published repository.
Example:
$ aptly publish source list wheezy
`,
Flag: *flag.NewFlagSet("aptly-publish-source-list", flag.ExitOnError),
}
cmd.Flag.Bool("json", false, "display record in JSON format")
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to add (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -0,0 +1,86 @@
package cmd
import (
"fmt"
"strings"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceRemove(cmd *commander.Command, args []string) error {
if len(args) < 1 {
cmd.Usage()
return commander.ErrCommandError
}
distribution := args[0]
components := strings.Split(context.Flags().Lookup("component").Value.String(), ",")
if len(components) == 0 {
return fmt.Errorf("unable to remove: missing components, specify at least one component")
}
prefix := context.Flags().Lookup("prefix").Value.String()
storage, prefix := deb.ParsePrefix(prefix)
collectionFactory := context.NewCollectionFactory()
published, err := collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to remove: %s", err)
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to remove: %s", err)
}
revision := published.ObtainRevision()
sources := revision.Sources
for _, component := range components {
name, exists := sources[component]
if !exists {
return fmt.Errorf("unable to remove: component '%s' does not exist", component)
}
context.Progress().Printf("Removing component '%s' with source '%s' [%s]...\n", component, name, published.SourceKind)
delete(sources, component)
}
err = collectionFactory.PublishedRepoCollection().Update(published)
if err != nil {
return fmt.Errorf("unable to save to DB: %s", err)
}
context.Progress().Printf("\nYou can run 'aptly publish update %s %s' to update the content of the published repository.\n",
distribution, published.StoragePrefix())
return err
}
func makeCmdPublishSourceRemove() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceRemove,
UsageLine: "remove <distribution> [[<endpoint>:]<prefix>] <source>",
Short: "remove source components from a published repo",
Long: `
The command removes source components (snapshot / local repo) from a published repository.
This does not publish the changes directly, but rather schedules them for a subsequent 'aptly publish update'.
The flag -component is mandatory. Use a comma-separated list of components, if
multiple components should be removed, e.g.:
Example:
$ aptly publish source remove -component=contrib,non-free wheezy filesystem:symlink:debian
`,
Flag: *flag.NewFlagSet("aptly-publish-source-remove", flag.ExitOnError),
}
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to remove (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -0,0 +1,89 @@
package cmd
import (
"fmt"
"strings"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceReplace(cmd *commander.Command, args []string) error {
if len(args) < 2 {
cmd.Usage()
return commander.ErrCommandError
}
distribution := args[0]
names := args[1:]
components := strings.Split(context.Flags().Lookup("component").Value.String(), ",")
if len(names) != len(components) {
return fmt.Errorf("mismatch in number of components (%d) and sources (%d)", len(components), len(names))
}
prefix := context.Flags().Lookup("prefix").Value.String()
storage, prefix := deb.ParsePrefix(prefix)
collectionFactory := context.NewCollectionFactory()
published, err := collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to add: %s", err)
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to add: %s", err)
}
revision := published.ObtainRevision()
sources := revision.Sources
context.Progress().Printf("Replacing source list...\n")
clear(sources)
for i, component := range components {
name := names[i]
context.Progress().Printf("Adding component '%s' with source '%s' [%s]...\n", component, name, published.SourceKind)
sources[component] = name
}
err = collectionFactory.PublishedRepoCollection().Update(published)
if err != nil {
return fmt.Errorf("unable to save to DB: %s", err)
}
context.Progress().Printf("\nYou can run 'aptly publish update %s %s' to update the content of the published repository.\n",
distribution, published.StoragePrefix())
return err
}
func makeCmdPublishSourceReplace() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceReplace,
UsageLine: "replace <distribution> <source>",
Short: "replace the source components of a published repository",
Long: `
The command replaces the source components of a snapshot or local repository to be published.
This does not publish the changes directly, but rather schedules them for a subsequent 'aptly publish update'.
The flag -component is mandatory. Use a comma-separated list of components, if
multiple components should be modified. The number of given components must be
equal to the number of given sources, e.g.:
aptly publish source replace -component=main,contrib wheezy wheezy-main wheezy-contrib
Example:
$ aptly publish source replace -component=contrib wheezy ppa wheezy-contrib
`,
Flag: *flag.NewFlagSet("aptly-publish-source-add", flag.ExitOnError),
}
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to add (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -0,0 +1,91 @@
package cmd
import (
"fmt"
"strings"
"github.com/aptly-dev/aptly/deb"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSourceUpdate(cmd *commander.Command, args []string) error {
if len(args) < 2 {
cmd.Usage()
return commander.ErrCommandError
}
distribution := args[0]
names := args[1:]
components := strings.Split(context.Flags().Lookup("component").Value.String(), ",")
if len(names) != len(components) {
return fmt.Errorf("mismatch in number of components (%d) and sources (%d)", len(components), len(names))
}
prefix := context.Flags().Lookup("prefix").Value.String()
storage, prefix := deb.ParsePrefix(prefix)
collectionFactory := context.NewCollectionFactory()
published, err := collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
revision := published.ObtainRevision()
sources := revision.Sources
for i, component := range components {
name := names[i]
_, exists := sources[component]
if !exists {
return fmt.Errorf("unable to update: component '%s' does not exist", component)
}
context.Progress().Printf("Updating component '%s' with source '%s' [%s]...\n", component, name, published.SourceKind)
sources[component] = name
}
err = collectionFactory.PublishedRepoCollection().Update(published)
if err != nil {
return fmt.Errorf("unable to save to DB: %s", err)
}
context.Progress().Printf("\nYou can run 'aptly publish update %s %s' to update the content of the published repository.\n",
distribution, published.StoragePrefix())
return err
}
func makeCmdPublishSourceUpdate() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSourceUpdate,
UsageLine: "update <distribution> <source>",
Short: "update the source components of a published repository",
Long: `
The command updates the source components of a snapshot or local repository to be published.
This does not publish the changes directly, but rather schedules them for a subsequent 'aptly publish update'.
The flag -component is mandatory. Use a comma-separated list of components, if
multiple components should be modified. The number of given components must be
equal to the number of given sources, e.g.:
aptly publish source update -component=main,contrib wheezy wheezy-main wheezy-contrib
Example:
$ aptly publish source update -component=contrib wheezy ppa wheezy-contrib
`,
Flag: *flag.NewFlagSet("aptly-publish-source-update", flag.ExitOnError),
}
cmd.Flag.String("prefix", ".", "publishing prefix in the form of [<endpoint>:]<prefix>")
cmd.Flag.String("component", "", "component names to add (for multi-component publishing, separate components with commas)")
return cmd
}

View File

@@ -5,12 +5,16 @@ import (
"strings"
"github.com/aptly-dev/aptly/deb"
"github.com/aptly-dev/aptly/utils"
"github.com/smira/commander"
"github.com/smira/flag"
)
func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
var err error
var (
err error
names []string
)
components := strings.Split(context.Flags().Lookup("component").Value.String(), ",")
@@ -22,11 +26,6 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
distribution := args[0]
param := "."
var (
names []string
snapshot *deb.Snapshot
)
if len(args) == len(components)+2 {
param = args[1]
names = args[2:]
@@ -41,16 +40,16 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
collectionFactory := context.NewCollectionFactory()
published, err = collectionFactory.PublishedRepoCollection().ByStoragePrefixDistribution(storage, prefix, distribution)
if err != nil {
return fmt.Errorf("unable to update: %s", err)
return fmt.Errorf("unable to switch: %s", err)
}
if published.SourceKind != deb.SourceSnapshot {
return fmt.Errorf("unable to update: not a snapshot publish")
return fmt.Errorf("unable to switch: not a published snapshot repository")
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to update: %s", err)
return fmt.Errorf("unable to switch: %s", err)
}
publishedComponents := published.Components()
@@ -62,13 +61,18 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
return fmt.Errorf("mismatch in number of components (%d) and snapshots (%d)", len(components), len(names))
}
snapshotCollection := collectionFactory.SnapshotCollection()
for i, component := range components {
snapshot, err = collectionFactory.SnapshotCollection().ByName(names[i])
if !utils.StrSliceHasItem(publishedComponents, component) {
return fmt.Errorf("unable to switch: component %s does not exist in published repository", component)
}
snapshot, err := snapshotCollection.ByName(names[i])
if err != nil {
return fmt.Errorf("unable to switch: %s", err)
}
err = collectionFactory.SnapshotCollection().LoadComplete(snapshot)
err = snapshotCollection.LoadComplete(snapshot)
if err != nil {
return fmt.Errorf("unable to switch: %s", err)
}
@@ -111,14 +115,13 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
skipCleanup := context.Flags().Lookup("skip-cleanup").Value.Get().(bool)
if !skipCleanup {
err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(published.Prefix, components,
context.GetPublishedStorage(storage), collectionFactory, context.Progress())
err = collectionFactory.PublishedRepoCollection().CleanupPrefixComponentFiles(context, published, components, collectionFactory, context.Progress())
if err != nil {
return fmt.Errorf("unable to update: %s", err)
return fmt.Errorf("unable to switch: %s", err)
}
}
context.Progress().Printf("\nPublish for snapshot %s has been successfully switched to new snapshot.\n", published.String())
context.Progress().Printf("\nPublished %s repository %s has been successfully switched to new source.\n", published.SourceKind, published.String())
return err
}
@@ -126,15 +129,15 @@ func aptlyPublishSwitch(cmd *commander.Command, args []string) error {
func makeCmdPublishSwitch() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishSwitch,
UsageLine: "switch <distribution> [[<endpoint>:]<prefix>] <new-snapshot>",
Short: "update published repository by switching to new snapshot",
UsageLine: "switch <distribution> [[<endpoint>:]<prefix>] <new-source>",
Short: "update published repository by switching to new source",
Long: `
Command switches in-place published snapshots with new snapshot contents. All
Command switches in-place published snapshots with new source contents. All
publishing parameters are preserved (architecture list, distribution,
component).
For multiple component repositories, flag -component should be given with
list of components to update. Corresponding snapshots should be given in the
list of components to update. Corresponding sources should be given in the
same order, e.g.:
aptly publish switch -component=main,contrib wheezy wh-main wh-contrib

View File

@@ -31,18 +31,14 @@ func aptlyPublishUpdate(cmd *commander.Command, args []string) error {
return fmt.Errorf("unable to update: %s", err)
}
if published.SourceKind != deb.SourceLocalRepo {
return fmt.Errorf("unable to update: not a local repository publish")
}
err = collectionFactory.PublishedRepoCollection().LoadComplete(published, collectionFactory)
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
components := published.Components()
for _, component := range components {
published.UpdateLocalRepo(component)
result, err := published.Update(collectionFactory, context.Progress())
if err != nil {
return fmt.Errorf("unable to update: %s", err)
}
signer, err := getSigner(context.Flags())
@@ -80,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(published.Prefix, components,
context.GetPublishedStorage(storage), 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("\nPublish for local repo %s has been successfully updated.\n", published.String())
context.Progress().Printf("\nPublished %s repository %s has been updated successfully.\n", published.SourceKind, published.String())
return err
}
@@ -96,15 +93,21 @@ func makeCmdPublishUpdate() *commander.Command {
cmd := &commander.Command{
Run: aptlyPublishUpdate,
UsageLine: "update <distribution> [[<endpoint>:]<prefix>]",
Short: "update published local repository",
Short: "update published repository",
Long: `
Command re-publishes (updates) published local repository. <distribution>
and <prefix> should be occupied with local repository published
using command aptly publish repo. Update happens in-place with
minimum possible downtime for published repository.
The command updates updates a published repository after applying pending changes to the sources.
For multiple component published repositories, all local repositories
are updated.
For published local repositories:
* update to match local repository contents
For published snapshots:
* switch components to new snapshot
The update happens in-place with minimum possible downtime for published repository.
For multiple component published repositories, all local repositories are updated.
Example:

View File

@@ -54,12 +54,14 @@ _aptly()
{
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
prevprev="${COMP_WORDS[COMP_CWORD-2]}"
commands="api config db graph mirror package publish repo serve snapshot task version"
options="-architectures= -config= -db-open-attempts= -dep-follow-all-variants -dep-follow-recommends -dep-follow-source -dep-follow-suggests -dep-verbose-resolve -gpg-provider="
db_subcommands="cleanup recover"
mirror_subcommands="create drop edit show list rename search update"
publish_subcommands="drop list repo snapshot switch update"
publish_subcommands="drop list repo snapshot switch update source"
publish_source_subcommands="drop list add remove update replace"
snapshot_subcommands="create diff drop filter list merge pull rename search show verify"
repo_subcommands="add copy create drop edit import include list move remove rename search show"
package_subcommands="search show"
@@ -148,6 +150,17 @@ _aptly()
esac
fi
case "$prevprev" in
"publish")
case "$prev" in
"source")
COMPREPLY=($(compgen -W "${publish_source_subcommands}" -- ${cur}))
return 0
;;
esac
;;
esac
case "$cmd" in
"mirror")
case "$subcmd" in
@@ -575,6 +588,19 @@ _aptly()
;;
esac
;;
"source")
case "$subcmd" in
"add")
return 0
;;
"list")
if [[ $numargs -eq 0 ]]; then
COMPREPLY=($(compgen -W "-raw" -- ${cur}))
return 0
fi
;;
esac
;;
"package")
case "$subcmd" in
"search")

View File

@@ -21,6 +21,16 @@ import (
"github.com/aptly-dev/aptly/utils"
)
type SourceEntry struct {
Component, Name string
}
type PublishedRepoUpdateResult struct {
AddedSources map[string]string
UpdatedSources map[string]string
RemovedSources map[string]string
}
type repoSourceItem struct {
// Pointer to snapshot if SourceKind == "snapshot"
snapshot *Snapshot
@@ -73,6 +83,192 @@ type PublishedRepo struct {
// Support multiple distributions
MultiDist bool
// Revision
Revision *PublishedRepoRevision
}
type PublishedRepoRevision struct {
// Map of sources: component name -> snapshot name/local repo Name
Sources map[string]string
}
func (result *PublishedRepoUpdateResult) AddedComponents() []string {
components := make([]string, 0, len(result.AddedSources))
for component := range result.AddedSources {
components = append(components, component)
}
sort.Strings(components)
return components
}
func (result *PublishedRepoUpdateResult) UpdatedComponents() []string {
components := make([]string, 0, len(result.UpdatedSources))
for component := range result.UpdatedSources {
components = append(components, component)
}
sort.Strings(components)
return components
}
func (result *PublishedRepoUpdateResult) RemovedComponents() []string {
components := make([]string, 0, len(result.RemovedSources))
for component := range result.RemovedSources {
components = append(components, component)
}
sort.Strings(components)
return components
}
func (revision *PublishedRepoRevision) Components() []string {
components := make([]string, 0, len(revision.Sources))
for component := range revision.Sources {
components = append(components, component)
}
sort.Strings(components)
return components
}
func (revision *PublishedRepoRevision) SourceList() []SourceEntry {
sources := revision.Sources
components := revision.Components()
sourceList := make([]SourceEntry, 0, len(sources))
for _, component := range components {
name := sources[component]
sourceList = append(sourceList, SourceEntry{
Component: component,
Name: name,
})
}
return sourceList
}
func (revision *PublishedRepoRevision) SourceNames() []string {
sources := revision.Sources
names := make([]string, 0, len(sources))
for _, component := range revision.Components() {
names = append(names, sources[component])
}
return names
}
func (p *PublishedRepo) DropRevision() *PublishedRepoRevision {
revision := p.Revision
p.Revision = nil
return revision
}
func (p *PublishedRepo) ObtainRevision() *PublishedRepoRevision {
revision := p.Revision
if revision == nil {
sources := make(map[string]string, len(p.Sources))
for _, component := range p.Components() {
item := p.sourceItems[component]
if item.snapshot != nil {
sources[component] = item.snapshot.Name
} else if item.localRepo != nil {
sources[component] = item.localRepo.Name
} else {
panic("no snapshot/localRepo")
}
}
revision = &PublishedRepoRevision{
Sources: sources,
}
p.Revision = revision
}
return revision
}
func (p *PublishedRepo) Update(collectionFactory *CollectionFactory, _ aptly.Progress) (*PublishedRepoUpdateResult, error) {
result := &PublishedRepoUpdateResult{
AddedSources: map[string]string{},
UpdatedSources: map[string]string{},
RemovedSources: map[string]string{},
}
revision := p.DropRevision()
if revision == nil {
if p.SourceKind == SourceLocalRepo {
// Re-fetch packages from local repository
for component, item := range p.sourceItems {
localRepo := item.localRepo
if localRepo != nil {
p.UpdateLocalRepo(component, localRepo)
result.UpdatedSources[component] = localRepo.Name
}
}
}
} else {
for _, component := range p.Components() {
name, exists := revision.Sources[component]
if !exists {
p.RemoveComponent(component)
result.RemovedSources[component] = name
}
}
if p.SourceKind == SourceLocalRepo {
localRepoCollection := collectionFactory.LocalRepoCollection()
for component, name := range revision.Sources {
localRepo, err := localRepoCollection.ByName(name)
if err != nil {
return result, fmt.Errorf("unable to update: %s", err)
}
err = localRepoCollection.LoadComplete(localRepo)
if err != nil {
return result, fmt.Errorf("unable to update: %s", err)
}
_, exists := p.Sources[component]
if exists {
// Even in the case, when the local repository has not been changed as package source,
// it may contain a modified set of packages that requires (re-)publication.
p.UpdateLocalRepo(component, localRepo)
result.UpdatedSources[component] = name
} else {
p.UpdateLocalRepo(component, localRepo)
result.AddedSources[component] = name
}
}
} else if p.SourceKind == SourceSnapshot {
snapshotCollection := collectionFactory.SnapshotCollection()
for component, name := range revision.Sources {
snapshot, err := snapshotCollection.ByName(name)
if err != nil {
return result, fmt.Errorf("unable to update: %s", err)
}
err = snapshotCollection.LoadComplete(snapshot)
if err != nil {
return result, fmt.Errorf("unable to update: %s", err)
}
sourceUUID, exists := p.Sources[component]
if exists {
if snapshot.UUID != sourceUUID {
p.UpdateSnapshot(component, snapshot)
result.UpdatedSources[component] = name
}
} else {
p.UpdateSnapshot(component, snapshot)
result.AddedSources[component] = name
}
}
} else {
return result, fmt.Errorf("unknown published repository type")
}
}
return result, nil
}
// ParsePrefix splits [storage:]prefix into components
@@ -281,14 +477,28 @@ func NewPublishedRepo(storage, prefix, distribution string, architectures []stri
return result, nil
}
// MarshalJSON requires object to filled by "LoadShallow" or "LoadComplete"
func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
type sourceInfo struct {
Component, Name string
func (revision *PublishedRepoRevision) MarshalJSON() ([]byte, error) {
sources := revision.Sources
components := revision.Components()
sourceList := make([]SourceEntry, 0, len(sources))
for _, component := range components {
name := sources[component]
sourceList = append(sourceList, SourceEntry{
Component: component,
Name: name,
})
}
sources := []sourceInfo{}
for component, item := range p.sourceItems {
return json.Marshal(map[string]interface{}{
"Sources": sourceList,
})
}
// MarshalJSON requires object to filled by "LoadShallow" or "LoadComplete"
func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
sources := []SourceEntry{}
for _, component := range p.Components() {
item := p.sourceItems[component]
name := ""
if item.snapshot != nil {
name = item.snapshot.Name
@@ -297,7 +507,7 @@ func (p *PublishedRepo) MarshalJSON() ([]byte, error) {
} else {
panic("no snapshot/local repo")
}
sources = append(sources, sourceInfo{
sources = append(sources, SourceEntry{
Component: component,
Name: name,
})
@@ -444,20 +654,25 @@ func (p *PublishedRepo) SourceNames() []string {
return sources
}
// UpdateLocalRepo updates content from local repo in component
func (p *PublishedRepo) UpdateLocalRepo(component string) {
// UpdateLocalRepo inserts/updates local repository source for component
func (p *PublishedRepo) UpdateLocalRepo(component string, localRepo *LocalRepo) {
if p.SourceKind != SourceLocalRepo {
panic("not local repo publish")
}
item := p.sourceItems[component]
item.packageRefs = item.localRepo.RefList()
item, exists := p.sourceItems[component]
if !exists {
item = repoSourceItem{}
}
item.localRepo = localRepo
item.packageRefs = localRepo.RefList()
p.sourceItems[component] = item
p.Sources[component] = localRepo.UUID
p.rePublishing = true
}
// UpdateSnapshot switches snapshot for component
// UpdateSnapshot inserts/updates snapshot source for component
func (p *PublishedRepo) UpdateSnapshot(component string, snapshot *Snapshot) {
if p.SourceKind != SourceSnapshot {
panic("not snapshot publish")
@@ -474,6 +689,14 @@ func (p *PublishedRepo) UpdateSnapshot(component string, snapshot *Snapshot) {
p.rePublishing = true
}
// RemoveComponent removes component from published repository
func (p *PublishedRepo) RemoveComponent(component string) {
delete(p.Sources, component)
delete(p.sourceItems, component)
p.rePublishing = true
}
// Encode does msgpack encoding of PublishedRepo
func (p *PublishedRepo) Encode() []byte {
var buf bytes.Buffer
@@ -1177,7 +1400,7 @@ func (collection *PublishedRepoCollection) listReferencedFilesByComponent(prefix
processedComponentRefs := map[string]*PackageRefList{}
for _, r := range collection.list {
if r.Prefix == prefix {
if r.Prefix == prefix && !r.MultiDist {
matches := false
repoComponents := r.Components()
@@ -1238,42 +1461,128 @@ func (collection *PublishedRepoCollection) listReferencedFilesByComponent(prefix
}
// CleanupPrefixComponentFiles removes all unreferenced files in published storage under prefix/component pair
func (collection *PublishedRepoCollection) CleanupPrefixComponentFiles(prefix string, components []string,
publishedStorage aptly.PublishedStorage, collectionFactory *CollectionFactory, progress aptly.Progress) error {
func (collection *PublishedRepoCollection) CleanupPrefixComponentFiles(publishedStorageProvider aptly.PublishedStorageProvider,
published *PublishedRepo, cleanComponents []string, collectionFactory *CollectionFactory, progress aptly.Progress) error {
var err error
collection.loadList()
storage := published.Storage
prefix := published.Prefix
distribution := published.Distribution
rootPath := filepath.Join(prefix, "dists", distribution)
publishedStorage := publishedStorageProvider.GetPublishedStorage(published.Storage)
sort.Strings(cleanComponents)
publishedComponents := published.Components()
removedComponents := utils.StrSlicesSubstract(cleanComponents, publishedComponents)
updatedComponents := utils.StrSlicesSubstract(cleanComponents, removedComponents)
if progress != nil {
progress.Printf("Cleaning up prefix %#v components %s...\n", prefix, strings.Join(components, ", "))
progress.Printf("Cleaning up published repository %s/%s...\n", published.StoragePrefix(), distribution)
}
referencedFiles, err := collection.listReferencedFilesByComponent(prefix, components, collectionFactory, progress)
if err != nil {
return err
for _, component := range removedComponents {
if progress != nil {
progress.Printf("Removing component '%s'...\n", component)
}
err = publishedStorage.RemoveDirs(filepath.Join(rootPath, component), progress)
if err != nil {
return err
}
// 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
}
}
for _, component := range components {
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{}{}
}
}
}
// 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
}
}
}
// 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 updatedComponents {
if progress != nil {
progress.Printf("Cleaning up component '%s'...\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
@@ -1324,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(repo.Prefix, cleanComponents,
publishedStorageProvider.GetPublishedStorage(storage), 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)

View File

@@ -2,6 +2,7 @@ package deb
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
@@ -359,6 +360,25 @@ func (s *PublishedRepoSuite) TestDistributionComponentGuessing(c *C) {
c.Check(err, ErrorMatches, "duplicate component name: main")
}
func (s *PublishedRepoSuite) TestUpdate(c *C) {
revision := s.repo2.ObtainRevision()
sources := revision.Sources
sources["test"] = "local1"
result, err := s.repo2.Update(s.factory, nil)
c.Assert(err, IsNil)
c.Assert(result, NotNil)
c.Assert(s.repo2.Revision, IsNil)
c.Assert(result.AddedSources, DeepEquals, map[string]string{"test": "local1"})
c.Assert(result.UpdatedSources, DeepEquals, map[string]string{"main": "local1"})
c.Assert(result.RemovedSources, DeepEquals, map[string]string{})
c.Assert(result.AddedComponents(), DeepEquals, []string{"test"})
c.Assert(result.UpdatedComponents(), DeepEquals, []string{"main"})
c.Assert(result.RemovedComponents(), DeepEquals, []string{})
}
func (s *PublishedRepoSuite) TestPublish(c *C) {
err := s.repo.Publish(s.packagePool, s.provider, s.factory, &NullSigner{}, nil, false)
c.Assert(err, IsNil)
@@ -489,6 +509,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

View File

@@ -1 +1,3 @@
package docs
import _ "github.com/swaggo/swag" // make sure swag is in go.mod

View File

@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "APTLY" "1" "January 2022" "" ""
.TH "APTLY" "1" "October 2024" "" ""
.
.SH "NAME"
\fBaptly\fR \- Debian repository management tool
@@ -25,7 +25,7 @@ aptly is a tool to create partial and full mirrors of remote repositories, manag
aptly\(cqs goal is to establish repeatability and controlled changes in a package\-centric environment\. aptly allows one to fix a set of packages in a repository, so that package installation and upgrade becomes deterministic\. At the same time aptly allows one to perform controlled, fine\-grained changes in repository contents to transition your package environment to new version\.
.
.SH "CONFIGURATION"
aptly looks for configuration file first in \fB~/\.aptly\.conf\fR then in \fB/etc/aptly\.conf\fR and, if no config file found, new one is created in home directory\. If \fB\-config=\fR flag is specified, aptly would use config file at specified location\. Also aptly needs root directory for database, package and published repository storage\. If not specified, directory defaults to \fB~/\.aptly\fR, it will be created if missing\.
aptly looks for configuration file first in \fB~/\.aptly\.conf\fR then in \fB/usr/local/etc/aptly\.conf\fR and \fB/etc/aptly\.conf\fR\. If no config file found (or they are not readable), a new one is created in the home directory\. If \fB\-config=\fR flag is specified, aptly would use config file at specified location\. Also aptly needs root directory for database, package and published repository storage\. If not specified, directory defaults to \fB~/\.aptly/\fR, it will be created if missing\.
.
.P
Configuration file is stored in JSON format (default values shown below):
@@ -36,6 +36,10 @@ Configuration file is stored in JSON format (default values shown below):
{
"rootDir": "$HOME/\.aptly",
"databaseBackend": {
"type": "",
"url": ""
},
"downloadConcurrency": 4,
"downloadSpeedLimit": 0,
"downloadRetries": 0,
@@ -51,6 +55,16 @@ Configuration file is stored in JSON format (default values shown below):
"gpgDisableVerify": false,
"gpgProvider": "gpg",
"downloadSourcePackages": false,
"packagePoolStorage": {
"path": "$ROOTDIR/pool",
"azure": {
"accountName": "",
"accountKey": "",
"container": "repo",
"prefix": "",
"endpoint": ""
}
},
"skipLegacyPool": true,
"ppaDistributorID": "ubuntu",
"ppaCodename": "",
@@ -84,7 +98,7 @@ Configuration file is stored in JSON format (default values shown below):
"plusWorkaround": false,
"disableMultiDel": false,
"forceSigV2": false,
"forceVirtualHostedStyle": false,
"forceVirtualHostedStyle": true,
"debug": false
}
},
@@ -104,8 +118,8 @@ Configuration file is stored in JSON format (default values shown below):
"accountName": "",
"accountKey": "",
"container": "repo",
"prefix": ""
"endpoint": "blob.core.windows.net"
"prefix": "",
"endpoint": "blob\.core\.windows\.net"
}
}
}
@@ -117,85 +131,96 @@ Configuration file is stored in JSON format (default values shown below):
.P
Options:
.
.TP
\fBrootDir\fR
is root of directory storage to store database (\fBrootDir\fR/db), downloaded packages (\fBrootDir\fR/pool) and the default for published repositories (\fBrootDir\fR/public)
.IP "\[ci]" 4
\fBrootDir\fR: is root of directory storage to store database (\fBrootDir\fR/db), the default for downloaded packages (\fBrootDir\fR/pool) and the default for published repositories (\fBrootDir\fR/public)
.
.TP
\fBdownloadConcurrency\fR
is a number of parallel download threads to use when downloading packages
.IP "\[ci]" 4
\fBdatabaseBackend\fR: the database config; if this config is empty, use levledb backend by default
.
.TP
\fBdownloadSpeedLimit\fR
limit in kbytes/sec on download speed while mirroring remote repositories
.IP "\[ci]" 4
\fBdownloadConcurrency\fR: is a number of parallel download threads to use when downloading packages
.
.TP
\fBdownloadRetries\fR
number of retries for download attempts
.IP "\[ci]" 4
\fBdownloadSpeedLimit\fR: limit in kbytes/sec on download speed while mirroring remote repositories
.
.TP
\fBdatabaseOpenAttempts\fR
number of attempts to open DB if it\(cqs locked by other instance; could be overridden with option \fB\-db\-open\-attempts\fR
.IP "\[ci]" 4
\fBdownloadRetries\fR: number of retries for download attempts
.
.TP
\fBarchitectures\fR
is a list of architectures to process; if left empty defaults to all available architectures; could be overridden with option \fB\-architectures\fR
.IP "\[ci]" 4
\fBdatabaseOpenAttempts\fR: number of attempts to open DB if it\(cqs locked by other instance; could be overridden with option \fB\-db\-open\-attempts\fR
.
.TP
\fBdependencyFollowSuggests\fR
follow contents of \fBSuggests:\fR field when processing dependencies for the package
.IP "\[ci]" 4
\fBarchitectures\fR: is a list of architectures to process; if left empty defaults to all available architectures; could be overridden with option \fB\-architectures\fR
.
.TP
\fBdependencyFollowRecommends\fR
follow contents of \fBRecommends:\fR field when processing dependencies for the package
.IP "\[ci]" 4
\fBdependencyFollowSuggests\fR: follow contents of \fBSuggests:\fR field when processing dependencies for the package
.
.TP
\fBdependencyFollowAllVariants\fR
when dependency looks like \fBpackage\-a | package\-b\fR, follow both variants always
.IP "\[ci]" 4
\fBdependencyFollowRecommends\fR: follow contents of \fBRecommends:\fR field when processing dependencies for the package
.
.TP
\fBdependencyFollowSource\fR
follow dependency from binary package to source package
.IP "\[ci]" 4
\fBdependencyFollowAllVariants\fR: when dependency looks like \fBpackage\-a | package\-b\fR, follow both variants always
.
.TP
\fBdependencyVerboseResolve\fR
print additional details while resolving dependencies (useful for debugging)
.IP "\[ci]" 4
\fBdependencyFollowSource\fR: follow dependency from binary package to source package
.
.TP
\fBgpgDisableSign\fR
don\(cqt sign published repositories with gpg(1), also can be disabled on per\-repo basis using \fB\-skip\-signing\fR flag when publishing
.IP "\[ci]" 4
\fBdependencyVerboseResolve\fR: print additional details while resolving dependencies (useful for debugging)
.
.TP
\fBgpgDisableVerify\fR
don\(cqt verify remote mirrors with gpg(1), also can be disabled on per\-mirror basis using \fB\-ignore\-signatures\fR flag when creating and updating mirrors
.IP "\[ci]" 4
\fBgpgDisableSign\fR: don\(cqt sign published repositories with gpg(1), also can be disabled on per\-repo basis using \fB\-skip\-signing\fR flag when publishing
.
.TP
\fBgpgProvider\fR
implementation of PGP signing/validation \- \fBgpg\fR for external \fBgpg\fR utility or \fBinternal\fR to use Go internal implementation; \fBgpg1\fR might be used to force use of GnuPG 1\.x, \fBgpg2\fR enables GnuPG 2\.x only; default is to use GnuPG 1\.x if available and GnuPG 2\.x otherwise
.IP "\[ci]" 4
\fBgpgDisableVerify\fR: don\(cqt verify remote mirrors with gpg(1), also can be disabled on per\-mirror basis using \fB\-ignore\-signatures\fR flag when creating and updating mirrors
.
.TP
\fBdownloadSourcePackages\fR
if enabled, all mirrors created would have flag set to download source packages; this setting could be controlled on per\-mirror basis with \fB\-with\-sources\fR flag
.IP "\[ci]" 4
\fBgpgProvider\fR: implementation of PGP signing/validation \- \fBgpg\fR for external \fBgpg\fR utility or \fBinternal\fR to use Go internal implementation; \fBgpg1\fR might be used to force use of GnuPG 1\.x, \fBgpg2\fR enables GnuPG 2\.x only; default is to use GnuPG 1\.x if available and GnuPG 2\.x otherwise
.
.TP
\fBskipLegacyPool\fR
in aptly up to version 1\.0\.0, package files were stored in internal package pool with MD5\-dervied path, since 1\.1\.0 package pool layout was changed; if option is enabled, aptly stops checking for legacy paths; by default option is enabled for new aptly installations and disabled when upgrading from older versions
.IP "\[ci]" 4
\fBdownloadSourcePackages\fR: if enabled, all mirrors created would have flag set to download source packages; this setting could be controlled on per\-mirror basis with \fB\-with\-sources\fR flag
.
.TP
\fBppaDistributorID\fR, \fBppaCodename\fR
specifies paramaters for short PPA url expansion, if left blank they default to output of \fBlsb_release\fR command
.IP "\[ci]" 4
\fBpackagePoolStorage\fR: configures the location to store downloaded packages (defaults to the path \fB$ROOTDIR/pool\fR), by setting the value of the \fBtype\fR:
.
.TP
\fBFileSystemPublishEndpoints\fR
configuration of local filesystem publishing endpoints (see below)
.IP "\[ci]" 4
\fBpath\fR: store the packages in the given path
.
.TP
\fBS3PublishEndpoints\fR
configuration of Amazon S3 publishing endpoints (see below)
.IP "\[ci]" 4
\fBazure\fR: store the packages in the given Azure Blob Storage container (see the section on Azure publishing below for information on the configuration)
.
.TP
\fBSwiftPublishEndpoints\fR
configuration of OpenStack Swift publishing endpoints (see below)
.IP "" 0
.
.IP "\[ci]" 4
\fBskipLegacyPool\fR: in aptly up to version 1\.0\.0, package files were stored in internal package pool with MD5\-dervied path, since 1\.1\.0 package pool layout was changed; if option is enabled, aptly stops checking for legacy paths; by default option is enabled for new aptly installations and disabled when upgrading from older versions
.
.IP "\[ci]" 4
\fBppaDistributorID\fR, \fBppaCodename\fR: specifies paramaters for short PPA url expansion, if left blank they default to output of \fBlsb_release\fR command
.
.IP "\[ci]" 4
\fBFileSystemPublishEndpoints\fR: configuration of local filesystem publishing endpoints (see below)
.
.IP "\[ci]" 4
\fBS3PublishEndpoints\fR: configuration of Amazon S3 publishing endpoints (see below)
.
.IP "\[ci]" 4
\fBSwiftPublishEndpoints\fR: configuration of OpenStack Swift publishing endpoints (see below)
.
.IP "\[ci]" 4
\fBAzurePublishEndpoints\fR: configuration of Azure publishing endpoints (see below)
.
.IP "" 0
.
.SH "CUSTOM PACKAGE POOLS"
aptly defaults to storing downloaded packages at \fBrootDir/\fRpool\. In order to change this, you can set the \fBtype\fR key within \fBpackagePoolStorage\fR to one of two values:
.
.IP "\[ci]" 4
\fBlocal\fR: Store the package pool locally (the default)\. In order to change the path, additionally set the \fBpath\fR key within \fBpackagePoolStorage\fR to the desired location\.
.
.IP "\[ci]" 4
\fBazure\fR: Store the package pool in an Azure Blob Storage container\. Any keys in the below section on Azure publishing may be set on the \fBpackagePoolStorage\fR object in order to configure the Azure connection\.
.
.IP "" 0
.
.SH "FILESYSTEM PUBLISHING ENDPOINTS"
aptly defaults to publish to a single publish directory under \fBrootDir\fR/public\. For a more advanced publishing strategy, you can define one or more filesystem endpoints in the \fBFileSystemPublishEndpoints\fR list of the aptly configuration file\. Each endpoint has a name and the following associated settings:
@@ -308,6 +333,25 @@ In order to publish to Swift, specify endpoint as \fBswift:endpoint\-name:\fR be
.P
\fBaptly publish snapshot jessie\-main swift:test:\fR
.
.SH "AZURE PUBLISHING ENDPOINTS"
aptly can be configured to publish repositories directly to Microsoft Azure Blob Storage\. First, publishing endpoints should be described in the aptly configuration file\. Each endpoint has its name and associated settings:
.
.TP
\fBcontainer\fR
container name
.
.TP
\fBprefix\fR
(optional) do publishing under specified prefix in the container, defaults to no prefix (container root)
.
.TP
\fBaccountName\fR, \fBaccountKey\fR
Azure storage account access key to access blob storage
.
.TP
\fBendpoint\fR
endpoint URL to connect to, as described in the Azure documentation \fIhttps://docs\.microsoft\.com/en\-us/azure/storage/common/storage\-configure\-connection\-string\fR; defaults to \fBhttps://$accountName\.blob\.core\.windows\.net\fR
.
.SH "PACKAGE QUERY"
Some commands accept package queries to identify list of packages to process\. Package query syntax almost matches \fBreprepro\fR query language\. Query consists of the following simple terms:
.
@@ -431,7 +475,7 @@ list of architectures to consider during (comma\-separated), default to all avai
.
.TP
\-\fBconfig\fR=
location of configuration file (default locations are /etc/aptly\.conf, ~/\.aptly\.conf)
location of configuration file (default locations in order: ~/\.aptly\.conf, /usr/local/etc/aptly\.conf, /etc/aptly\.conf)
.
.TP
\-\fBdb\-open\-attempts\fR=10
@@ -507,6 +551,10 @@ disable verification of Release file signatures
gpg keyring to use when verifying Release file (could be specified multiple times)
.
.TP
\-\fBmax\-tries\fR=1
max download tries till process fails with download error
.
.TP
\-\fBwith\-installer\fR
download additional not packaged installer files
.
@@ -1009,13 +1057,13 @@ custom format for result printing
include dependencies into search results
.
.SH "ADD PACKAGES TO LOCAL REPOSITORIES BASED ON \.CHANGES FILES"
\fBaptly\fR \fBrepo\fR \fBinclude\fR <file\.changes>|\fIdirectory\fR \fB\|\.\|\.\|\.\fR
\fBaptly\fR \fBrepo\fR \fBinclude\fR
.
.P
Command include looks for \.changes files in list of arguments or specified directories\. Each \.changes file is verified, parsed, referenced files are put into separate temporary directory and added into local repository\. Successfully imported files are removed by default\.
.
.P
Additionally uploads could be restricted with <uploaders\.json> file\. Rules in this file control uploads based on GPG key ID of \.changes file signature and queries on \.changes file fields\.
Additionally uploads could be restricted with
.
.P
Example:
@@ -1450,6 +1498,10 @@ run GPG with detached tty
set value for ButAutomaticUpgrades field
.
.TP
\-\fBcodename\fR=
codename to publish (defaults to distribution)
.
.TP
\-\fBcomponent\fR=
component name to publish (for multi\-component publishing, separate components with commas)
.
@@ -1474,6 +1526,10 @@ GPG keyring to use (instead of default)
label to publish
.
.TP
\-\fBmulti\-dist\fR
enable multiple packages with the same filename in different distributions
.
.TP
\-\fBnotautomatic\fR=
set value for NotAutomatic field
.
@@ -1494,6 +1550,10 @@ GPG passphrase\-file for the key (warning: could be insecure)
GPG secret keyring to use (instead of default)
.
.TP
\-\fBskip\-bz2\fR
don\(cqt generate bzipped indexes
.
.TP
\-\fBskip\-contents\fR
don\(cqt generate Contents indexes
.
@@ -1505,9 +1565,31 @@ don\(cqt sign Release files with GPG
\-\fBsuite\fR=
suite to publish (defaults to distribution)
.
.SH "SHOWS DETAILS OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBshow\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR]
.
.P
Command show displays full information of a published repository\.
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish show wheezy
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBcodename\fR=
codename to publish (defaults to distribution)
\-\fBjson\fR
display record in JSON format
.
.SH "PUBLISH SNAPSHOT"
\fBaptly\fR \fBpublish\fR \fBsnapshot\fR \fIname\fR [[\fIendpoint\fR:]\fIprefix\fR]
@@ -1557,6 +1639,10 @@ run GPG with detached tty
overwrite value for ButAutomaticUpgrades field
.
.TP
\-\fBcodename\fR=
codename to publish (defaults to distribution)
.
.TP
\-\fBcomponent\fR=
component name to publish (for multi\-component publishing, separate components with commas)
.
@@ -1581,6 +1667,10 @@ GPG keyring to use (instead of default)
label to publish
.
.TP
\-\fBmulti\-dist\fR
enable multiple packages with the same filename in different distributions
.
.TP
\-\fBnotautomatic\fR=
overwrite value for NotAutomatic field
.
@@ -1601,6 +1691,10 @@ GPG passphrase\-file for the key (warning: could be insecure)
GPG secret keyring to use (instead of default)
.
.TP
\-\fBskip\-bz2\fR
don\(cqt generate bzipped indexes
.
.TP
\-\fBskip\-contents\fR
don\(cqt generate Contents indexes
.
@@ -1612,18 +1706,200 @@ don\(cqt sign Release files with GPG
\-\fBsuite\fR=
suite to publish (defaults to distribution)
.
.SH "ADD SOURCE TO STAGED SOURCE LIST OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBsource\fR \fBadd\fR \fIdistribution\fR \fIsource\fR
.
.P
The command adds sources to the staged source list of the published repository\.
.
.P
The flag \-component is mandatory\. Use a comma\-separated list of components, if multiple components should be modified\. The number of given components must be equal to the number of given sources, e\.g\.:
.
.IP "" 4
.
.nf
aptly publish add \-component=main,contrib wheezy wheezy\-main wheezy\-contrib
.
.fi
.
.IP "" 0
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish add \-component=contrib wheezy ppa wheezy\-contrib
.
.fi
.
.IP "" 0
.
.P
This command assigns the snapshot wheezy\-contrib to the component contrib and adds it to published repository revision of ppa/wheezy\.
.
.P
Options:
.
.TP
\-\fBcodename\fR=
codename to publish (defaults to distribution)
\-\fBcomponent\fR=
component names to add (for multi\-component publishing, separate components with commas)
.
.SH "UPDATE PUBLISHED REPOSITORY BY SWITCHING TO NEW SNAPSHOT"
\fBaptly\fR \fBpublish\fR \fBswitch\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fInew\-snapshot\fR
.TP
\-\fBprefix\fR=\.
publishing prefix in the form of [\fIendpoint\fR:]\fIprefix\fR
.
.SH "DROPS STAGED SOURCE CHANGES OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBsource\fR \fBdrop\fR \fIdistribution\fR
.
.P
Command switches in\-place published snapshots with new snapshot contents\. All publishing parameters are preserved (architecture list, distribution, component)\.
Command drops the staged source changes of the published repository\.
.
.P
For multiple component repositories, flag \-component should be given with list of components to update\. Corresponding snapshots should be given in the same order, e\.g\.:
Example:
.
.IP "" 4
.
.nf
$ aptly publish source drop wheezy
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBcomponent\fR=
component names to add (for multi\-component publishing, separate components with commas)
.
.TP
\-\fBprefix\fR=\.
publishing prefix in the form of [\fIendpoint\fR:]\fIprefix\fR
.
.SH "LISTS REVISION OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBsource\fR \fBlist\fR \fIdistribution\fR
.
.P
Command lists sources of a published repository\.
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish source list wheezy
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBcomponent\fR=
component names to add (for multi\-component publishing, separate components with commas)
.
.TP
\-\fBjson\fR
display record in JSON format
.
.TP
\-\fBprefix\fR=\.
publishing prefix in the form of [\fIendpoint\fR:]\fIprefix\fR
.
.SH "REMOVE SOURCE FROM STAGED SOURCE LIST OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBsource\fR \fBremove\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fIsource\fR
.
.P
The command removes sources from the staged source list of the published repository\.
.
.P
The flag \-component is mandatory\. Use a comma\-separated list of components, if multiple components should be removed, e\.g\.:
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish remove \-component=contrib,non\-free wheezy filesystem:symlink:debian
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBcomponent\fR=
component names to remove (for multi\-component publishing, separate components with commas)
.
.TP
\-\fBprefix\fR=\.
publishing prefix in the form of [\fIendpoint\fR:]\fIprefix\fR
.
.SH "UPDATE SOURCE IN STAGED SOURCE LIST OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBsource\fR \fBupdate\fR \fIdistribution\fR \fIsource\fR
.
.P
The command updates sources in the staged source list of the published repository\.
.
.P
The flag \-component is mandatory\. Use a comma\-separated list of components, if multiple components should be modified\. The number of given components must be equal to the number of given sources, e\.g\.:
.
.IP "" 4
.
.nf
aptly publish update \-component=main,contrib wheezy wheezy\-main wheezy\-contrib
.
.fi
.
.IP "" 0
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish update \-component=contrib wheezy ppa wheezy\-contrib
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBcomponent\fR=
component names to add (for multi\-component publishing, separate components with commas)
.
.TP
\-\fBprefix\fR=\.
publishing prefix in the form of [\fIendpoint\fR:]\fIprefix\fR
.
.SH "UPDATE PUBLISHED REPOSITORY BY SWITCHING TO NEW SOURCE"
\fBaptly\fR \fBpublish\fR \fBswitch\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR] \fInew\-source\fR
.
.P
Command switches in\-place published snapshots with new source contents\. All publishing parameters are preserved (architecture list, distribution, component)\.
.
.P
For multiple component repositories, flag \-component should be given with list of components to update\. Corresponding sources should be given in the same order, e\.g\.:
.
.IP "" 4
.
@@ -1675,6 +1951,10 @@ GPG key ID to use when signing the release
GPG keyring to use (instead of default)
.
.TP
\-\fBmulti\-dist\fR
enable multiple packages with the same filename in different distributions
.
.TP
\-\fBpassphrase\fR=
GPG passphrase for the key (warning: could be insecure)
.
@@ -1687,6 +1967,10 @@ GPG passphrase\-file for the key (warning: could be insecure)
GPG secret keyring to use (instead of default)
.
.TP
\-\fBskip\-bz2\fR
don\(cqt generate bzipped indexes
.
.TP
\-\fBskip\-cleanup\fR
don\(cqt remove unreferenced files in prefix/component
.
@@ -1740,6 +2024,10 @@ GPG key ID to use when signing the release
GPG keyring to use (instead of default)
.
.TP
\-\fBmulti\-dist\fR
enable multiple packages with the same filename in different distributions
.
.TP
\-\fBpassphrase\fR=
GPG passphrase for the key (warning: could be insecure)
.
@@ -1752,6 +2040,10 @@ GPG passphrase\-file for the key (warning: could be insecure)
GPG secret keyring to use (instead of default)
.
.TP
\-\fBskip\-bz2\fR
don\(cqt generate bzipped indexes
.
.TP
\-\fBskip\-cleanup\fR
don\(cqt remove unreferenced files in prefix/component
.
@@ -1763,32 +2055,6 @@ don\(cqt generate Contents indexes
\-\fBskip\-signing\fR
don\(cqt sign Release files with GPG
.
.SH "SHOWS DETAILS OF PUBLISHED REPOSITORY"
\fBaptly\fR \fBpublish\fR \fBshow\fR \fIdistribution\fR [[\fIendpoint\fR:]\fIprefix\fR]
.
.P
Command show displays full information of a published repository\.
.
.P
Example:
.
.IP "" 4
.
.nf
$ aptly publish show wheezy
.
.fi
.
.IP "" 0
.
.P
Options:
.
.TP
\-\fBjson\fR
display record in JSON format
.
.SH "SEARCH FOR PACKAGES MATCHING QUERY"
\fBaptly\fR \fBpackage\fR \fBsearch\fR [\fIpackage\-query\fR]
.
@@ -2160,5 +2426,65 @@ Lorenzo Bolla (https://github\.com/lbolla)
.IP "\[ci]" 4
Benj Fassbind (https://github\.com/randombenj)
.
.IP "\[ci]" 4
Markus Muellner (https://github\.com/mmianl)
.
.IP "\[ci]" 4
Chuan Liu (https://github\.com/chuan)
.
.IP "\[ci]" 4
Samuel Mutel (https://github\.com/smutel)
.
.IP "\[ci]" 4
Russell Greene (https://github\.com/russelltg)
.
.IP "\[ci]" 4
Wade Simmons (https://github\.com/wadey)
.
.IP "\[ci]" 4
Steven Stone (https://github\.com/smstone)
.
.IP "\[ci]" 4
Josh Bayfield (https://github\.com/jbayfield)
.
.IP "\[ci]" 4
Boxjan (https://github\.com/boxjan)
.
.IP "\[ci]" 4
Mauro Regli (https://github\.com/reglim)
.
.IP "\[ci]" 4
Alexander Zubarev (https://github\.com/strike)
.
.IP "\[ci]" 4
Nicolas Dostert (https://github\.com/acdn\-ndostert)
.
.IP "\[ci]" 4
Ryan Gonzalez (https://github\.com/refi64)
.
.IP "\[ci]" 4
Paul Cacheux (https://github\.com/paulcacheux)
.
.IP "\[ci]" 4
Nic Waller (https://github\.com/sf\-nwaller)
.
.IP "\[ci]" 4
iofq (https://github\.com/iofq)
.
.IP "\[ci]" 4
Noa Resare (https://github\.com/nresare)
.
.IP "\[ci]" 4
Ramon N\.Rodriguez (https://github\.com/runitonmetal)
.
.IP "\[ci]" 4
Golf Hu (https://github\.com/hudeng\-go)
.
.IP "\[ci]" 4
Cookie Fei (https://github\.com/wuhuang26)
.
.IP "\[ci]" 4
Christoph Fiehe (https://github\.com/cfiehe)
.
.IP "" 0

View File

@@ -111,7 +111,7 @@ Configuration file is stored in JSON format (default values shown below):
"accountKey": "",
"container": "repo",
"prefix": "",
"endpoint": ""
"endpoint": "blob.core.windows.net"
}
}
}

View File

@@ -1,18 +0,0 @@
#!/bin/sh -e
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
su aptly -c 'set -e; cd /work/src;
GOPATH=$PWD/.go go generate -v
# install and initialize swagger
GOPATH=$PWD/.go go install github.com/swaggo/swag/cmd/swag@latest
PATH=$PWD/.go/bin:$PATH swag init -q --markdownFiles docs
git checkout debian/changelog
DEBEMAIL="CI <runner@github>" dch -v `make version` "CI build"
dpkg-buildpackage -us -uc -b -d
mkdir -p build && mv ../*.deb build/
rm -rf obj-*-linux-gnu*
git checkout debian/changelog
cd build && ls -l *.deb
'

View File

@@ -1,11 +1,14 @@
#!/bin/sh -e
# make sure files are written with correct user ownership
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
if [ `stat -c %u /work/src` -ne 0 ]; then
usermod -u `stat -c %u /work/src` aptly >/dev/null
chown -R `stat -c %u /work/src` /var/lib/aptly
fi
args="$@"
if [ -z "$args" ]; then
cp /work/src/completion.d/aptly /usr/share/bash-completion/completions/
cmd="bash"
else
cmd="make $@"

View File

@@ -319,40 +319,36 @@ class BaseTest(object):
return subprocess.Popen(command, stderr=stderr, stdout=stdout, env=environ)
def run_cmd(self, command, expected_code=0):
try:
proc = self._start_process(command, stdout=subprocess.PIPE)
raw_output, _ = proc.communicate()
proc = self._start_process(command, stdout=subprocess.PIPE)
raw_output, _ = proc.communicate()
raw_output = raw_output.decode("utf-8", errors='replace')
raw_output = raw_output.decode("utf-8", errors='replace')
returncodes = [proc.returncode]
is_aptly_command = False
if isinstance(command, str):
is_aptly_command = command.startswith("aptly")
returncodes = [proc.returncode]
is_aptly_command = False
if isinstance(command, str):
is_aptly_command = command.startswith("aptly")
if isinstance(command, list):
is_aptly_command = command[0] == "aptly"
if isinstance(command, list):
is_aptly_command = command[0] == "aptly"
if is_aptly_command:
# remove the last two rows as go tests always print PASS/FAIL and coverage in those
# two lines. This would otherwise fail the tests as they would not match gold
matches = re.findall(r"((.|\n)*)EXIT: (\d)\n.*\ncoverage: .*", raw_output)
if not matches:
raise Exception("no matches found in output '%s'" % raw_output)
if is_aptly_command:
# remove the last two rows as go tests always print PASS/FAIL and coverage in those
# two lines. This would otherwise fail the tests as they would not match gold
matches = re.findall(r"((.|\n)*)EXIT: (\d)\n.*\ncoverage: .*", raw_output)
if not matches:
raise Exception("no matches found in command output '%s'" % raw_output)
output, _, returncode = matches[0]
returncodes.append(int(returncode))
else:
output = raw_output
output, _, returncode = matches[0]
returncodes.append(int(returncode))
else:
output = raw_output
if expected_code is not None:
if expected_code not in returncodes:
raise Exception("exit code %d != %d (output: %s)" % (
proc.returncode, expected_code, raw_output))
return output
except Exception as e:
raise Exception("Running command '%s' failed: %s" %
(command, str(e)))
if expected_code is not None:
if expected_code not in returncodes:
raise Exception("command expected to return %d, but returned %d: \n%s" % (
expected_code, proc.returncode, raw_output))
return output
def gold_processor(self, gold):
return gold
@@ -379,6 +375,8 @@ class BaseTest(object):
return s
def check_output(self):
gold_file = self.get_gold_filename()
print(f"Verifying gold file: {gold_file}")
try:
self.verify_match(self.get_gold(), self.output,
match_prepare=self.outputMatchPrepare)
@@ -464,11 +462,11 @@ class BaseTest(object):
def check_in(self, item, l):
if item not in l:
raise Exception("item %r not in %r", item, l)
raise Exception("expected item: %r\nnot found in: %r" % (item, l))
def check_not_in(self, item, l):
if item in l:
raise Exception("item %r in %r", item, l)
raise Exception("unexpected item: %r\n found in: %r" % (item, l))
def check_subset(self, a, b):
diff = ''

View File

@@ -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 <johannes.ranke@jrwb.de>"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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.
Mirror `varnish` has been updated successfully.

View File

@@ -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.
Mirror `varnish` has been updated successfully.

View File

@@ -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.
Mirror `bintray` has been updated successfully.

View File

@@ -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.
Mirror `bintray` has been updated successfully.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.
Mirror `varnish` has been updated successfully.

View File

@@ -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 <johannes.ranke@jrwb.de>"
openpgp: RSA key ID B8F25A8A73EACF41

View File

@@ -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.

View File

@@ -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.

View File

@@ -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...

View File

@@ -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...

View File

@@ -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

View File

@@ -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.

View File

@@ -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 <johannes.ranke@jrwb.de>"
gpgv: Signature made Thu Nov 2 07:43:52 2023 UTC

View File

@@ -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.

View File

@@ -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 <johannes.ranke@jrwb.de>"
gpgv: Signature made Thu Nov 2 07:43:52 2023 UTC

View File

@@ -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'...
Publish for local repo 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.

View File

@@ -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'...
Publish for snapshot 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 snapshot.
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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -0,0 +1,5 @@
Prefix: .
Distribution: wheezy
Architectures: i386
Sources:
main: local-repo [local]

View File

@@ -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.

View File

@@ -0,0 +1,3 @@
Adding component 'test' with source 'snap2' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1,4 @@
Adding component 'test' with source 'snap2' [snapshot]...
Adding component 'other-test' with source 'snap3' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1 @@
ERROR: unable to add: component 'main' has already been added

View File

@@ -0,0 +1 @@
Source changes have been removed successfully.

View File

@@ -0,0 +1,3 @@
Sources:
main: snap1 [snapshot]
test: snap2 [snapshot]

View File

@@ -0,0 +1,10 @@
[
{
"Component": "main",
"Name": "snap1"
},
{
"Component": "test",
"Name": "snap2"
}
]

View File

@@ -0,0 +1 @@
ERROR: unable to list: no source changes exist

View File

@@ -0,0 +1,3 @@
Removing component 'test' with source 'snap2' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1,4 @@
Removing component 'test' with source 'snap2' [snapshot]...
Removing component 'other-test' with source 'snap3' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1 @@
ERROR: unable to remove: component 'not-existent' does not exist

View File

@@ -0,0 +1,5 @@
Replacing source list...
Adding component 'main-new' with source 'snap2' [snapshot]...
Adding component 'test-new' with source 'snap3' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1,3 @@
Updating component 'main' with source 'snap2' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1,4 @@
Updating component 'main' with source 'snap2' [snapshot]...
Updating component 'test' with source 'snap3' [snapshot]...
You can run 'aptly publish update maverick .' to update the content of the published repository.

View File

@@ -0,0 +1 @@
ERROR: unable to update: component 'not-existent' does not exist

View File

@@ -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'...
Publish for snapshot ./maverick [i386, source] publishes {main: [snap2]: Snapshot from local repo [local-repo2]} has been successfully switched to new snapshot.
Published snapshot repository ./maverick [i386, source] publishes {main: [snap2]: Snapshot from local repo [local-repo2]} has been successfully switched to new source.

View File

@@ -1,8 +1 @@
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:
Cleaning up prefix "." components a, c...
Publish for snapshot ./maverick [i386] publishes {a: [snap2]: Created as empty}, {b: [snap2]: Created as empty}, {c: [snap3]: Created as empty} has been successfully switched to new snapshot.
ERROR: unable to switch: component c does not exist in published repository

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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:
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot 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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for snapshot 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 snapshot.
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.

View File

@@ -1 +1 @@
ERROR: unable to update: published repo with storage:prefix/distribution ppa/maverick not found
ERROR: unable to switch: published repo with storage:prefix/distribution ppa/maverick not found

View File

@@ -1 +1 @@
ERROR: unable to update: not a snapshot publish
ERROR: unable to switch: not a published snapshot repository

View File

@@ -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'...
Publish for snapshot ./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 snapshot.
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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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:
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -0,0 +1,8 @@
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:
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 updated successfully.

View File

@@ -0,0 +1,14 @@
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:
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 updated successfully.

View File

@@ -0,0 +1,10 @@
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:
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 updated successfully.

View File

@@ -0,0 +1,12 @@
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:
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 updated successfully.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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 '.'...
Publish for local repo ./maverick [source] publishes {main: [local-repo]} has been successfully updated.
Published local repository ./maverick [source] publishes {main: [local-repo]} has been updated successfully.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo ./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.

View File

@@ -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'...
Publish for local repo 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.

View File

@@ -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'...
Publish for snapshot 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 snapshot.
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.

View File

@@ -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.

View File

@@ -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'...
Publish for local repo 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.

Some files were not shown because too many files have changed in this diff Show More