Two-stage frozen mirror

If you want to test the frozen mirror before making it 'production', then you want a two-stage frozen mirror:

  1. Edit /etc/rsyncd.conf:

    path = /srv/mirror/ubuntu-frozen-testing
    comment = Ubuntu mirror
    transfer logging = true
    read only = true
    timeout = 120
    dont compress = *

  2. Put this in /etc/scaramanga/dists.d/ubuntu-frozen-production:


    ... and this in /etc/scaramanga/scripts.d/ubuntu-frozen-production:

    #! /bin/bash
    [ -f ${CONFFILE} ] && . ${CONFFILE}
    export GNUPGHOME=/var/lib/scaramanga/frozenmirror-keys/.gnupg
    # From the debmirror docs:
    #default rsync options are "-aIL --partial"
    debmirror --verbose --source --host=localhost --method=rsync --root=:Ubuntu-frozen-testing --dist=lucid,lucid-updates,lucid-backports --section=main,restricted,universe,multiverse  --arch=amd64 --diff=use --rsync-options="-aIL --partial --no-motd" ${BASEDIR}

    (As you can see, this mirror updates from rsync://localhost:/Ubuntu-frozen-testing.)

  3. Now when you are satisfied about your ubuntu-frozen-testing, you copy its contents to ubuntu-frozen-production with:

    admin@server;~$ sudo -u scaramanga scaramanga -d ubuntu-frozen-production