Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7809ed7c08
Fetching contributors…

Cannot retrieve contributors at this time

executable file 61 lines (50 sloc) 2.723 kb
#!/usr/bin/env bash
set -e
set -o nounset
set -o pipefail
usage () { echo "usage: `basename $0` chrootdir [udeb,udeb...]" ; return 0 ; }
usageerr () { usage >&2 ; return 1 ; }
[ $# -ge 1 ] || usageerr
DI="$1"
shift
# clean up any old chroot
[ ! -d "$DI/proc" ] || sudo umount "$DI"/proc || true
[ ! -d "$DI/sys" ] || sudo umount "$DI"/sys || true
[ ! -d "$DI" ] || sudo rm -rf "$DI"
sudo debootstrap --include=locales,dh-di,less,git,subversion,mr,rsync,vim-nox,udev,autoconf,automake,uuid-dev,zlib1g-dev,debian-keyring,aptitude,dialog,procps,kernel-wedge,xmlto,openssh-client,devscripts,ca-certificates,fakeroot,libdebconfclient0-dev,libdebian-installer4-dev,libtool,unzip,iasl,libncursesw5-dev,libklibc-dev,autoconf-archive,makedev,autopoint,links2,gnupg-agent,pinentry-curses \
--exclude=pinentry-x11,pinentry-gtk2 \
--unpack-tarball=`pwd`/packages.tgz --variant=buildd unstable "$DI"
sudo chroot "$DI" /bin/sh -c "echo set locales/locales_to_be_generated en_US.UTF-8 UTF-8 | debconf-communicate"
sudo chroot "$DI" /bin/sh -c "echo set locales/default_environment_locale en_US.UTF-8 | debconf-communicate"
echo "en_US.UTF-8 UTF-8" | sudo tee -a "$DI/etc/locale.gen"
sudo chroot "$DI" locale-gen
sudo chroot "$DI" mount -t proc procfs /proc
sudo chroot "$DI" mount -t devpts devpts /dev/pts
sudo chroot "$DI" aptitude remove pinentry-gtk2
sudo tee -a "$DI/etc/apt/sources.list" <<APT
deb http://www.sprezzatech.com/apt unstable main non-free contrib
deb-src http://www.sprezzatech.com/apt unstable main non-free contrib
deb-src http://ftp.us.debian.org/debian/ unstable main non-free contrib
APT
sudo cp 99translations "$DI"/etc/apt/apt.conf.d/
wget http://www.sprezzatech.com/sprezzakey.txt -O- | sudo chroot "$DI" apt-key add -
sudo chroot "$DI" apt-get -y update
sudo chroot "$DI" apt-get -y build-dep debian-installer linux fbterm
sudo chroot "$DI" svn co svn://svn.debian.org/svn/d-i/trunk d-i
sudo chroot "$DI" /bin/sh -c "cd /d-i && ./scripts/git-setup"
sudo chroot "$DI" /bin/sh -c "cd /d-i && mr -p checkout"
sudo cp -v local "$DI/d-i/installer/build/pkg-lists/"
for i in "$@" ; do
sudo cp -v "$i" "$DI/d-i/installer/build/localudebs"
done
sudo cp -vr d-i "$DI/d-i-patches"
sudo cp profiles/SprezzOS.preseed "$DI/d-i/installer/build"
sudo chroot "$DI" /bin/sh -c "cd /d-i/installer && patch -p1 < /d-i-patches/installer.diff"
sudo cp -vr ~/.gnupg/ "$DI"/root/ # FIXME ughghghghghghghghg
sudo chroot "$DI" umount /proc
sudo chroot "$DI" umount devpts
sudo chown -R $USER:$USER "$DI"
sudo chroot "$DI" mount -t proc procfs /proc
sudo chroot "$DI" mount -t sysfs sysfs /sys
sudo chroot "$DI" mount -t devpts devpts /dev/pts
echo "Now run 'sudo chroot \"$DI\" /innerbuild' to perform inner building..."
Jump to Line
Something went wrong with that request. Please try again.