aptly
aptly copied to clipboard
[Feature Request] Publish rolling mirrors (without snapshots)
Snapshots is a top feature (if not the top feature) of Aptly but sometime, you just need to have a rolling mirror always up to date with its upstream repository.
Doing that kind of thing is complicated with Aptly since, for that, you need to :
- create a mirror
- sync it
- snapshot it
- publish the snapshot
- then, when you want to "refresh", sync the mirror again
- then drop the publish
- then drop the snapshot
- then create a new snapshot
- then re-publish the snapshot
- and do that all over again ...
Of course this can be automated and done through a cron job but :
- this is a bit overkill and prompt to fail from time to time
- this can be a problem when you that operation and there is a deployment that need the repository at one point
- this can be long and cpu expensive because publish is slow and cpu hungry
Being able to just publish a mirror directly and just have to refresh the underlying mirror from time to time would be a lot more comfortable. Of course, this could be worked around in many ways by using proxies or using other tools for that kind of mirrors but having this integrated in Aptly would make this tool more complete.
Hi,
you can use "aptly publish switch" to switch a publish snapshot to another/newer one. Example:
aptly mirror update $mirror
aptly snapshot rename $current_snapshot $temp_snapshot
aptly snapshot create $new_snapshot from mirror $mirror
aptly publish switch $distribution $prefix $new_snapshot
aptly snapshot drop $temp_snapshot
This is way faster since only new .deb's need to be resigned.
But I agree, some kind of "rolling release mirror" could simplyfy these things for the user. This rolling release mirror could for example do the above steps within the "aptly mirror update" command. This wouldn't really remove the complexity with snapshots but also wouldn't add much more complexity (in terms of source code) to aptly itself and instead adapt existing mechanics.