Skip to content

Instantly share code, notes, and snippets.

@sepulworld
Last active September 2, 2016 00:00
Show Gist options
  • Save sepulworld/972fc36ae521b1d57dfa to your computer and use it in GitHub Desktop.
Save sepulworld/972fc36ae521b1d57dfa to your computer and use it in GitHub Desktop.
So basic Aptly publish steps
# build fpm
fpm-cook clean
fpm-cook
# upload deb file
aptly-cli file_upload --upload ./nginx-dbg_1.9.6-1-trusty_amd64.deb --directory /nginx
# import uploaded deb into repo (example repo is named stable-repo in Aptly server)
aptly-cli repo_upload --name stable-repo --dir nginx
# Here is the information on "stable-repo". Just running this command to show what information is used for next command
# The stable-repo is published for --distribution precise, --prefix stable. That is the publish point we want to update
aptly-cli publish_list
{"Architectures"=>["amd64", "i386"], "Distribution"=>"precise", "Label"=>"", "Origin"=>"", "Prefix"=>"stable", "SourceKind"=>"local", "Sources"=>[{"Component"=>"main", "Name"=>"stable-repo"}], "Storage"=>""}
# update published repo. You don't pass it the repo name. Since each publish point has to be a unique distribution / prefix pair... you pass that
aptly-cli publish_update --prefix stable --distribution precise
#$ aptly-cli repo_package_query --name stable-repo
#Pamd64 nginx-dbg 1.9.6-1~trusty cf581ef7cdb94cf
#The new package is in the repo, and if you go to the browser for that repository we will see the package there. http://127.0.0.1:8081/stable/pool/main/n/nginx/
#For testsing I use https://github.com/sepulworld/aptly-vagrant ... clone this bad boy to your laptop and you can then test stuff locally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment