Simple gist to show the aptly magic :)
$ echo 'deb http://repo.aptly.info/ squeeze main' > /etc/apt/sources.list.d/aptly.list && wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
$ apt-get update && apt-get install -y -f aptly
Example to build a grml-repo with extras.
$ wget -qO- http://deb.foilo.de/repo-key.asc | sudo apt-key add --
$ echo 'deb http://deb.foilo.de/ ubuntu main ' > /etc/apt/sources.list.d/foilo.lis
$ apt-get update
first install gpg & create new key with gpg --gen-key
Edit all your needed arch's to ~/.aptly.conf
. Example:
{
"rootDir": "/var/www/aptly",
"downloadConcurrency": 4,
"architectures": ["amd64","armhf"],
"dependencyFollowSuggests": false,
"dependencyFollowRecommends": false,
"dependencyFollowAllVariants": true,
"dependencyFollowSource": false,
"gpgDisableSign": false,
"gpgDisableVerify": false,
"downloadSourcePackages": false,
"ppaDistributorID": "ubuntu",
"ppaCodename": ""
}
Now make http config or use aptly serve
to listen on port 8080 & serve your repo's
Example lighttp config:
$HTTP["url"] =~ "^/apt($|/)" {
server.dir-listing = "enable"
server.document-root = "/var/www/aptly/public/"
}
Create a a new repo with aptly repo create <testing>
or use a mirror
aptly repo add testing pac-4.5.4-all.deb
aptly -dep-follow-all-variants=true mirror create grml-testing http://deb.grml.org/ grml-testing
aptly mirror update grml-testing
Now we copy grml-autoconfig
from grml-testing
to our repo
aptly -dep-follow-all-variants=true repo import grml-testing testing grml-autoconfig
Add package from ppa
aptly -architectures="amd64" mirror create scribes http://ppa.launchpad.net/mystilleef/scribes-daily/ubuntu quantal main
Create snapshot from mirror
aptly snapshot create grml-snap from mirror grml-test
Your should have gnugpg keys!!! You will need it for sign & publish
aptly -architectures="amd64" mirror create grml-test http://deb.grml.org/ grml-testing
Your should beginn with
aptly mirror create jdownloader-latest http://ppa.launchpad.net/jd-team/jdownloader/ubuntu trusty
aptly mirror update jdownloader-latest
jdownloader-latest
to our repo testing and main
aptly repo import jdownloader-latest testing main
aptly publish update testing
Create local repo, for your own shit ( local debs )
aptly repo create local-repo
aptly repo add testing node_0.10.29-1_amd64.deb
Publish
aptly publish update ubuntu
Lighttpd.conf ( Bsp: /etc/lighttpd/conf-enabled/20-main.conf )
$HTTP["host"] =~ "^(?i:deb\.foilo\.de(?::\d+)?)$" {
server.dir-listing = "enable"
server.document-root = "/var/www/aptly/public/"
}