March 2011
A frozen mirror is nice if you don't want unexpected updates on your machines. Building a frozen mirror is easy with Scaramanga (see :
We want to run a script instead of the default rsync command, so we specify which script to run in /etc/scaramanga/dists.d/ubuntu-frozen-testing
:
SCRIPT=ubuntu-frozen-testing
That script is looked for relative to /etc/scaramanga/scripts.d
, so we put in /etc/scaramanga/scripts.d/ubuntu-frozen-testing
:
#! /bin/bash CONFFILE=/etc/scaramanga/scaramanga.conf [ -f ${CONFFILE} ] && . ${CONFFILE} DST=ubuntu-frozen-testing BASEDIR=${DESTPARENT}/${DST} 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 --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 is a lucid-only, amd64-only frozen mirror)
Copy /usr/share/keyrings/*
from the package ubuntu-keyring
to /var/lib/scaramanga/ubuntu-keyrings
, and in /var/lib/scaramanga/frozenmirror-keys/.gnupg/
, do: sudo ln -s ../../ubuntu-keyrings/ubuntu-archive-keyring.gpg trustedkeys.gpg
Now we start the script with
admin@server:~$ sudo -u scaramanga scaramanga -d ubuntu-frozen-testing
(The same command is used to update the mirror when we temporarily thaw the mirror.)