Installing from repo:
---------------------

    sudo sh -c 'cat >/etc/apt/sources.list.d/osso-ppa-osso.list' <<EOF
deb http://ppa.osso.nl/debian jessie osso
deb-src http://ppa.osso.nl/debian jessie osso
EOF

    sudo apt-get update
    # (yields: public key is not available: NO_PUBKEY BEAD51B6B36530F5..)

    wget -qO- https://ppa.osso.nl/support+ppa@osso.nl.gpg | sudo apt-key add -
    # (yields: OK)
    apt-key export BEAD51B6B36530F5 --no-armor | sha256sum | sed -e 's/\(......\)/\1 /g'
    # 7dfce2 892089 75df32 0d2e0a 98ab29 bb0651 725961 1ac2a7 27f06e 5e3625 0e39   -

    sudo apt-get update

    sudo apt-get install asterisk
    cd `mktemp -d`
    apt-get source asterisk


Using the new aptly:
--------------------

    aptly repo list [-raw]
    aptly repo create -comment='SIPp' -component=sipp -distribution=precise sipp/precise
    aptly repo add sipp/precise PARTIAL_PATH...
    aptly-repo-add-alldist sipp PARTIAL_PATH...

    aptly snapshot list [-raw]
    VER=3; aptly repo list -raw | while read x; do aptly snapshot create $x-$VER from repo $x || exit 1; done
    aptly-publish-version $VER

    aptly snapshot list -raw | grep -v -- '-'$VER'$' | while read x; do aptly snapshot drop $x || exit 1; done


Missing aptly features:
-----------------------

    https://github.com/aptly-dev/aptly/issues/170 -- changelog support


Setting up new repo:
--------------------

    cd /srv/reprepro
    mkdir -p debian/conf
    cat >>debian/conf/distributions <<EOF
bla bla bla, see
https://wiki.debian.org/SettingUpSignedAptRepositoryWithReprepro#Configuring_reprepro
EOF
    cat >debian/conf/options <<EOF
verbose
basedir /srv/reprepro/debian
ask-passphrase
EOF


Add changelog support to repo:
------------------------------

    cd /srv/reprepro
    wget 'https://raw.githubusercontent.com/esc/reprepro/master/docs/changelogs.example' \
      -O debian/conf/changelogs.sh
    chmod 755 debian/conf/changelogs.sh
    # edit debian/conf/changelogs.sh, and set CHANGELOGDIR= (empty)
    printf "Log:\n --type=dsc changelogs.sh\n" >>debian/conf/distributions
    # the script requires `dpkg-source` from `dpkg-dev`

    # re-run for all existing repos
    cd /srv/reprepro/debian
    reprepro rerunnotifiers


Adding to repo:
---------------

   cd /srv/reprepro/debian
   #reprepro --component osso includedeb jessie /srv/junk/*.deb
   #for x in /srv/junk/*.dsc; do
   #    reprepro --component osso includedsc jessie $x
   #done
   reprepro -C osso include jessie /srv/junk/...changes