+++ /dev/null
-#!/bin/sh -e
-DIST="$1"
-DIR="$2"
-MIRROR="$3"
-
-[ "$DIST" ] && [ "$DIR" ] && [ "$MIRROR" ] || {
- echo "Usage: $0 <dist> <directory> <mirror>" >&2
- exit 1
-}
-
-mkdir -p "$DIR"
-debootstrap "$DIST" "$DIR" "$MIRROR"
-chroot $DIR apt-get install locales
-
-# debian_chroot
-echo $DIST > $DIR/etc/debian_chroot
-
-# hosts
-echo "127.0.0.1 localhost.localdomain localhost" > $DIR/etc/hosts
-
-# users
-perl -naF: -e 'print if $F[2] >= 1000 and $F[2] < 2000' /etc/passwd >> $DIR/etc/passwd
-
-# locale
-chroot $DIR locale-gen $LANG
-
-# bind mounts
-if ! grep -q $DIR /etc/fstab; then
- cat <<EOF >> /etc/fstab
-
-# $DIST chroot
-/home/martin $DIR/home/martin none bind 0 0
-/proc $DIR/proc none bind 0 0
-/sys $DIR/sys none bind 0 0
-/tmp $DIR/tmp none bind 0 0
-EOF
- mount $DIR/home
- mount $DIR/proc
- mount $DIR/sys
- mount $DIR/tmp
-fi
-
-# apt sources
-if [ "$MIRROR" != "${MIRROR%file://}" ]; then
- MIRROR=http://archive.ubuntu.com/ubuntu
-fi
-
-cat <<EOF > $DIR/etc/apt/sources.list
-deb $MIRROR $DIST main restricted universe multiverse
-deb-src $MIRROR $DIST main restricted universe multiverse
-deb $MIRROR $DIST-updates main restricted universe multiverse
-deb-src $MIRROR $DIST-updates main restricted universe multiverse
-deb $MIRROR $DIST-proposed main restricted universe multiverse
-deb-src $MIRROR $DIST-proposed main restricted universe multiverse
-deb $MIRROR $DIST-security main restricted universe multiverse
-deb-src $MIRROR $DIST-security main restricted universe multiverse
-EOF
-
-chroot $DIR apt-get update
-
-# common packages for development
-chroot $DIR apt-get install -y build-essential fakeroot
-
# completely
cd /etc
if [ ! -d /etc/.bzr ]; then
- for i in passwd group shadow fstab; do
+ for i in passwd group shadow; do
[ -e $i.originst ] || cp $i $i.originst
done
[ -e /backup-etc ] || bzr branch bzr+ssh://martin@piware.de/home/martin/backup/`hostname`-etc /backup-etc
chmod 640 /etc/ssl/private/ssl-cert-*
chown root:ssl-cert /etc/ssl/private/ssl-cert*
- # only restore dchroot part into fstab
- grep -A 200 "^#.*chroot" fstab >> fstab.originst || true
- mv fstab.originst fstab
-
# only restore the human users from passwd/group
for i in passwd group; do
perl -naF: -e 'print if $F[2] > 1000 && $F[2] < 60000' $i >> $i.originst
killall apt-get || true
apt-get update
-DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt mutt editmoin lintian fakechroot ubuntu-dev-tools dput dchroot easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm bzr-buildpackage git-core build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin pbuilder svn-buildpackage pastebinit lptools openvpn pdfjam
+DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y --force-yes vim patchutils offlineimap diffstat gtimelog libtool devhelp python3-doc manpages-dev weechat weechat-plugins weechat-scripts dpatch wdiff ccache listadmin quilt mutt editmoin lintian fakechroot ubuntu-dev-tools dput easytag rsnapshot texlive-lang-german texlive-latex-extra powertop qemu-kvm bzr-buildpackage git-core build-essential fakeroot devscripts libglib2.0-doc libgtk-3-doc git-buildpackage d-feet debootstrap wmctrl mumble libnotify-bin svn-buildpackage pastebinit lptools openvpn pdfjam sbuild schroot
apt-get -y --no-install-recommends build-dep postgresql-9.1 apport calibre gvfs udisks2 upower gnome-disk-utility udev pygobject
+# have schroot use tmpfs
+rmdir /var/lib/schroot/unpack /var/lib/schroot/union/overlay/
+ln -s /tmp /var/lib/schroot/unpack
+ln -s /tmp /var/lib/schroot/union/overlay
+
# crontabs
crontab -u martin - <<EOF
# m h dom mon dow command
+++ /dev/null
-#!/bin/sh
-for f in /home/dchroot/*/etc/resolv.conf; do
- cp /etc/resolv.conf $f;
-done
-if type eatmydata >/dev/null 2>/dev/null; then
- E=eatmydata
-fi
-dchroot -a -- 'apt-get update'
-$E dchroot -a -- 'apt-get -u -y dist-upgrade'
-dchroot -a -- 'apt-get clean'
-$E pbuilder --update --basetgz /home/martin-scratch/images/quantal.tar.gz
-$E pbuilder clean