aptly 0.5 has been released today. It is available for download as binary executables or from Debian repository:
deb http://repo.aptly.info/ squeeze main
When installing from repository, don’t forget to import key used to sign the release:
$ gpg --keyserver keys.gnupg.net --recv-keys 2A194991
$ gpg -a --export 2A194991 | sudo apt-key add -
Most important new features are:
Local repositories could be used in two ways:
For the second case, it is best to create snapshots of local repositories and publish them. However, when testing out new versions, there isn’t much sense in creating snapshot each time repository is updated. So aptly since version 0.5 supports direct publishing of repositories. Moreover, when local repository is updated, published repository could be updated as well in one step.
When local repository is created, default publishing options (distribution and component) could be specified, so that these options don’t need to be specified when publishing:
aptly repo create -distribution=wheezy testing-wheezy
aptly repo add -remove-files testing-wheezy incoming/*.deb
aptly publish repo testing-wheezy
...
aptly repo add -remove-files testing-wheezy incoming/*.deb
aptly publish update wheezy
Snapshot is a way to make package environment stable and repeatable, but from time to time new snapshots are created that contain new versions of software. To publish new version of snapshot, aptly before 0.5 required old snapshot to be unpublished and new snapshot to be published again. During this process, repository would be unusable.
New feature allows to “switch” snapshots in published repository. aptly would do its best to minimize repository downtime:
Packages
, Release
, …) are created in
temporary locationsFor example:
aptly snapshot create wheezy-7.3 from mirror wheezy-main
aptly publish snapshot wheezy-7.3
....
aptly mirror update wheezy-main
aptly snapshot create wheezy-7.4 from mirror wheezy-main
aptly publish switch wheezy wheezy-7.4
When merging snapshots
aptly would override packages with the version from the latest argument
on the command line. This works ok if you merge, for example regular
repository and backports. But sometimes this is not enough, e.g. when
merging regular repository, updates and security repository. aptly now
supports flag -latest
to change merge strategy to “latest version
wins”:
aptly snapshot merge -latest wheezy-latest wheezy-backports wheezy-main wheezy-security
Thanks to Ryan Uber and Keith Chambers for the idea and pull request.
Sometimes you need to perform bunch of actions with mirrors, snapshots or repositories. aptly 0.5 supports special “raw” listing which is easily parseable. E.g. update all Debian mirrors:
aptly mirror list -raw | grep -E '^debian-.*' | xargs -n 1 aptly mirror update
Thanks to Eric Keller for the idea.
Full list of changes in 0.5:
-distribution
and -component
to specify default publishing options in aptly repo create (#12)-raw
to display list in machine-readable format for commands aptly mirror list, aptly repo list, aptly snapshot list and aptly publish list (#27, #31)-origin
and -label
to customize fields Origin:
and Label:
in Release
files during publishing in commands aptly publish snapshot and aptly publish repo (#29)-latest
for command aptly snapshot merge changes merge strategy to "latest version wins" (#42), thanks to @ryanuber and @keithchambers