aptly 0.5
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 Repository Publishing
Local repositories could be used in two ways:
- test new versions of software
- provide stable distribution of new versions
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
Published Snapshot Switching
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:
- first, new packages files are linked to published root
- new metadata files (Packages, Release, ...) are created in temporary locations
- new versions of metadata files are moved to final locations
- old package files are cleaned up from the pool (if required).
For 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
Merge Strategy
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.
Scripting
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.
All Changes
Full list of changes in 0.5:
- Debian packages for aptly are available
- internal DB is compacted when calling aptly db cleanup (#19)
- size is shown in human-readable format (#18)
- fixed wrong location of man page in Debian package (#22)
- new flags:
-distribution
and-component
to specify default publishing options in aptly repo create (#12) - aptly would try harder to figure out distribution & component automatically when publishing going through the tree of snapshots, mirrors and local repositories
- aptly supports publishing local repositories, without intermediate snapshot step (#10)
- new command: aptly publish repo to publish local repository directly (#10)
- new command: aptly publish edit to change defaults for the local repository (#12)
- aptly supports global & command flags placement in any position in command line (before command name, after command name) (#17)
- new command: aptly db recover to recover internal DB after crash (#25)
- new flag:
-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) - new flags:
-origin
and-label
to customize fieldsOrigin:
andLabel:
inRelease
files during publishing in commands aptly publish snapshot and aptly publish repo (#29) - bug fix: with some HTTP servers aptly might have given "size mismatch" errors due to unnecessary decompression (#33)
- new command: aptly publish update updates published repo in-place (#8)
- new command: aptly publish switch switches published snapshot in-place (#8)
- new flag:
-latest
for command aptly snapshot merge changes merge strategy to "latest version wins" (#42), thanks to @ryanuber and @keithchambers
Comments
Comments powered by Disqus