From f3d0d49711385af0759c6b7a64d565d01c37fa7e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 26 Feb 2013 07:28:03 +0100 Subject: [PATCH] drop pbuilder, makechroot, dchroot, move to sbuild and schroot --- makechroot | 63 -------------------------------------------------- postinst-setup | 13 ++++++----- update-chroots | 12 ---------- 3 files changed, 7 insertions(+), 81 deletions(-) delete mode 100755 makechroot delete mode 100755 update-chroots diff --git a/makechroot b/makechroot deleted file mode 100755 index b255b7b..0000000 --- a/makechroot +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -e -DIST="$1" -DIR="$2" -MIRROR="$3" - -[ "$DIST" ] && [ "$DIR" ] && [ "$MIRROR" ] || { - echo "Usage: $0 " >&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 <> /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 < $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 - diff --git a/postinst-setup b/postinst-setup index 7dac672..6bc4f03 100755 --- a/postinst-setup +++ b/postinst-setup @@ -20,7 +20,7 @@ fi # 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 @@ -34,10 +34,6 @@ if [ ! -d /etc/.bzr ]; then 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 @@ -69,10 +65,15 @@ apt-get purge -y --auto-remove hplip hplip-data printer-driver-hpijs printer-dri 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 - </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 -- 2.39.5