summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Towns <ajt@debian.org>2007-06-16 16:35:28 (GMT)
committerAnthony Towns <ajt@debian.org>2007-06-16 16:35:28 (GMT)
commitf45e6190c00065a7ad362fef955ec62b7ebf43a0 (patch)
treee7a1323455d1c635d5c4f0779d9baa4681e1e3a8
downloaddebootstrap-f45e6190c00065a7ad362fef955ec62b7ebf43a0.zip
debootstrap-f45e6190c00065a7ad362fef955ec62b7ebf43a0.tar.gz
debootstrap-f45e6190c00065a7ad362fef955ec62b7ebf43a0.tar.bz2
initial commit of debootstrap from sid (0.3.3.3)
r47260
-rw-r--r--Makefile102
-rw-r--r--TODO20
-rw-r--r--breezy162
-rw-r--r--debian/README.Debian36
-rw-r--r--debian/changelog1469
-rw-r--r--debian/compat1
-rw-r--r--debian/control30
-rw-r--r--debian/copyright32
-rw-r--r--debian/debootstrap-udeb.dirs2
-rw-r--r--debian/dirs2
-rwxr-xr-xdebian/rules91
-rw-r--r--debootstrap491
-rw-r--r--debootstrap.8133
-rw-r--r--functions1174
-rw-r--r--hoary178
-rw-r--r--hoary.buildd161
-rw-r--r--pkgdetails.c209
-rw-r--r--po/debootstrap.po50
-rw-r--r--potato105
-rw-r--r--sarge219
-rw-r--r--sarge.buildd168
-rw-r--r--sarge.fakechroot174
-rw-r--r--sid180
-rw-r--r--warty169
-rw-r--r--warty.buildd161
-rw-r--r--woody204
-rw-r--r--woody.buildd168
27 files changed, 5891 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ef963de
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,102 @@
+CC=gcc
+CFLAGS=-Wall -W -O2
+
+ARCH := $(shell dpkg --print-architecture)
+setarchdevs = $(if $(findstring $(ARCH),$(1)),$(2))
+
+DEVS := generic hde hdf hdg hdh sde sdf sdg sdh scd-all initrd input usb md lp rtc video \
+ $(call setarchdevs,i386,isdn-io eda edb sonycd mcd mcdx cdu535 \
+ optcd sjcd cm206cd gscd lmscd sbpcd \
+ aztcd bpcd dac960 ida fd0 fd1 ataraid cciss) \
+ $(call setarchdevs,sparc,hdc hdd busmice) \
+ $(call setarchdevs,m68k,fd0 fd1 adc add ade adf hdc hdd) \
+ $(call setarchdevs,powerpc,hdc hdd fd0 fd1 isdn-io m68k-mice) \
+ $(call setarchdevs,ia64,ida fd0 fd1 ataraid cciss)
+
+all: pkgdetails devices-std.tar.gz devices.tar.gz debootstrap-arch
+clean:
+ rm -f pkgdetails pkgdetails.o devices-std.tar.gz devices.tar.gz
+ rm -f debootstrap-arch
+ rm -rf dev
+
+DSDIR=$(DESTDIR)/usr/lib/debootstrap
+install:
+ mkdir -p $(DSDIR)/scripts
+ mkdir -p $(DESTDIR)/usr/sbin
+ mkdir -p $(DESTDIR)/usr/share/man/man8
+ install -o root -g root -m 0644 potato $(DSDIR)/scripts/
+ install -o root -g root -m 0644 woody $(DSDIR)/scripts/
+ install -o root -g root -m 0644 woody.buildd $(DSDIR)/scripts/
+ install -o root -g root -m 0644 sarge $(DSDIR)/scripts/
+ install -o root -g root -m 0644 sarge.buildd $(DSDIR)/scripts/
+ install -o root -g root -m 0644 sarge.fakechroot $(DSDIR)/scripts/
+ install -o root -g root -m 0644 sid $(DSDIR)/scripts/
+ install -o root -g root -m 0644 warty $(DSDIR)/scripts/
+ install -o root -g root -m 0644 warty.buildd $(DSDIR)/scripts/
+ install -o root -g root -m 0644 hoary $(DSDIR)/scripts/
+ install -o root -g root -m 0644 hoary.buildd $(DSDIR)/scripts/
+ install -o root -g root -m 0644 breezy $(DSDIR)/scripts/
+ install -o root -g root -m 0644 functions $(DSDIR)/
+
+ # no special script for etch anymore
+ ln -s sid $(DSDIR)/scripts/etch
+ ln -s sid $(DSDIR)/scripts/lenny
+
+ install -o root -g root -m 0755 debootstrap.8 $(DESTDIR)/usr/share/man/man8/
+ install -o root -g root -m 0755 debootstrap $(DESTDIR)/usr/sbin/
+
+install-allarch: install
+ install -o root -g root -m 0644 devices-std.tar.gz \
+ $(DSDIR)/devices.tar.gz
+
+install-arch: install
+ install -o root -g root -m 0755 pkgdetails $(DSDIR)/
+ install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/
+ install -o root -g root -m 0644 debootstrap-arch $(DSDIR)/arch
+
+pkgdetails: pkgdetails.o
+ $(CC) -o $@ $^
+
+debootstrap-arch:
+ echo $(ARCH) >debootstrap-arch
+
+devices-std.tar.gz:
+ rm -rf dev
+ mkdir -p dev
+ chown 0:0 dev
+ chmod 755 dev
+ (cd dev && /dev/MAKEDEV std ptmx)
+ tar cf - dev | gzip -9 >devices-std.tar.gz
+ rm -rf dev
+
+devices.tar.gz:
+ rm -rf dev
+
+ mkdir -p dev
+ chown 0:0 dev
+ chmod 755 dev
+
+ (cd dev && /dev/MAKEDEV $(DEVS))
+
+ifeq ($(ARCH),powerpc)
+# Maybe remove amiga/atari mice also? What about usbmouse?
+ rm -f dev/adbmouse
+ ln -sf input/mice dev/mouse
+ ln -sf input/js0 dev/js0
+ ln -sf input/js1 dev/js1
+endif
+
+ @if ! find dev -maxdepth 0 -perm 755 -uid 0 -gid 0 | \
+ grep -q "^dev$$"; \
+ then \
+ echo "======================================================="; \
+ echo "ERROR"; echo; \
+ echo "./dev has bad permissions! should be 755 root.root. Was:"; \
+ ls -ld ./dev; \
+ echo "======================================================="; \
+ false; \
+ fi
+
+ tar cf - dev | gzip -9 >devices.tar.gz
+ rm -rf dev
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..3975fb6
--- /dev/null
+++ b/TODO
@@ -0,0 +1,20 @@
+
+Features:
+ ++ second stage via chroot debootstrap/debootstrap
+ ++ debootstrap/deb file to record deb destinations/information
+
+ -- configuration file
+ -- versus command line
+ -- support for sources (vs mirrors)
+ -- faux-pinning for packages
+
+ ++ merge variants into single script (optionally anyway)
+ ++ makedev in second stage
+ ++ awk/perl pkgdetails
+ ++ granular dpkg progress bar
+ ++ determine required/base dynamically
+ ++ store required/base in $T/debootstrap for two-stage installs
+
+Packages format:
+ std: Priority: required + Priority: important
+ buildd: Priority: required + Build-Essential: yes
diff --git a/breezy b/breezy
new file mode 100644
index 0000000..d0955da
--- /dev/null
+++ b/breezy
@@ -0,0 +1,162 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd
+
+work_out_debs () {
+ LIBC6=libc6
+ if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi
+
+ required="$(get_debs Priority: required)"
+
+ if doing_variant -; then
+ #required="$required $(get_debs Priority: important)"
+ # ^^ should be getting debconf here somehow maybe
+ base="$(get_debs Priority: important)"
+ elif doing_variant buildd; then
+ # TODO: add Build-Essential: yes extraoverrides
+ #base="$(get_debs Build-Essential: yes)"
+
+ add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; }
+
+ base="apt binutils cpio cpp cpp-4.0 dpkg-dev g++ g++-4.0 gcc gcc-4.0 gcc-4.0-base ${LIBC6}-dev libdb4.2 libgdbm3 libstdc++6 libstdc++6-4.0-dev linux-kernel-headers make patch perl perl-modules"
+
+ add ia64 base "libunwind7-dev"
+ add sparc base "lib64gcc1"
+ add sparc base "libc6-dev-sparc64"
+ add sparc base "libc6-sparc64"
+ fi
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ DEBIAN_FRONTEND=noninteractive
+ DEBCONF_NONINTERACTIVE_SEEN=true
+ export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+ baseprog=0
+ bases=7
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+ if doing_variant -; then
+ x_core_install debconf
+ fi
+
+ baseprog=0
+ bases=$(set -- $required; echo $#)
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ smallyes '' |
+ (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \
+ dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ smallyes '' |
+ (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \
+ dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1
+
+ baseprog=0
+ bases="$(set -- $base; echo $#)"
+
+ info UNPACKBASE "Unpacking the base system..."
+
+ smallyes '' |
+ (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
+ dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1
+
+ info CONFBASE "Configuring the base system..."
+
+ smallyes '' |
+ (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" \
+ dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 |
+ dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases CONFBASE "Configuring base system"
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..a55d6f4
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,36 @@
+README for debootstrap
+======================
+
+See the manpage for (some) documentation.
+
+Future
+------
+
+ * Cross-strap support - so you can bootstrap a filesystem to the
+ point where it will successfully boot, and finish installing itself
+ without having to be running the target architecture or OS yourself.
+ This means you should be able to run
+
+ debootstrap --arch powerpc sarge ./sarge-ppc-chroot ...
+
+ on an i386 system, boot a powerpc box with sarge-ppc-chroot as its
+ root files system, and have it "work". The cross-hurd package does
+ something similar, and should be replaced by this feature.
+
+ * There should be some (better) way of telling debootstrap what "base"
+ packages you want to install -- this varies between making a chroot,
+ doing an install, and doing a buildd. Also, some installs want
+ different base packages (to setup networking, or kernels, eg)
+
+ * There should be some be some way of intuiting required/base from the
+ Packages file. Unfortunately this requires changes to apt-ftparchive
+ so we can have different packages be required or in base on different
+ architectures.
+
+NMUing
+------
+
+If you're working on boot-floppies or debian-installer or similar, and
+there's a problem with debootstrap that you need fixed, feel free to do
+an NMU to fix it. Usual rules: try not to break anything, and mail the
+patch to the BTS. Don't worry about asking first though.
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..be5f8d9
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,1469 @@
+debootstrap (0.3.3.3) unstable; urgency=low
+
+ * NMU
+ * Add support for lenny.
+
+ -- Joey Hess <joeyh@debian.org> Tue, 10 Apr 2007 15:24:15 -0400
+
+debootstrap (0.3.3.2) unstable; urgency=low
+
+ * NMU with maintainer approval
+ * Remove --force-auto-select option for 'sid' script as it is no longer
+ supported by dpkg. Closes: #409527.
+
+ -- Frans Pop <fjp@debian.org> Fri, 16 Feb 2007 20:43:36 +0100
+
+debootstrap (0.3.3.1) unstable; urgency=low
+
+ * NMU with maintainer approval
+ * functions/get_debs: build list of available packages from all specified
+ sources; this allows debootstrap to also use e.g. custom versions of base
+ packages from a source of local packages included on an installation CD.
+ Closes: #398762.
+
+ -- Frans Pop <fjp@debian.org> Thu, 16 Nov 2006 05:30:43 +0100
+
+debootstrap (0.3.3) unstable; urgency=low
+
+ * Include kFreeBSD and fakechroot support from 0.3.2.1 and 0.3.2.2 NMUs,
+ thanks to Otavio Salvador and Piotr Roszatycki. (Closes: Bug#319100,
+ Bug#328446, Bug#204652, Bug#315044, Bug#Bug#319799)
+
+ * Require target to be specified in all cases; document usage of target
+ for --print-debs. (Closes: Bug#335922, Bug#337230)
+
+ * Use ln -sf when symlinking awk for woody and sarge. (Closes: Bug#299048)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 6 Nov 2005 04:12:39 +1000
+
+debootstrap (0.3.2.2) unstable; urgency=low
+
+ * NMU
+ * Added relicensed fakechroot variant. Closes: #204652.
+
+ -- Piotr Roszatycki <dexter@debian.org> Sat, 29 Oct 2005 11:29:00 +0200
+
+debootstrap (0.3.2.1) unstable; urgency=low
+
+ * NMU with maintainer approval
+ * Applied patch from Robert Millan <rmh@aybabtu.com> to add support to
+ Debian GNU/kFreeBSD. Closes: #319799
+
+ -- Otavio Salvador <otavio@debian.org> Fri, 28 Oct 2005 16:14:57 -0200
+
+debootstrap (0.3.2) unstable; urgency=low
+
+ * Revert fakechroot NMUs (0.3.1.1, 0.3.1.3, 0.3.1.7) due to incompatible
+ license requirements (GPL) (Reopens: Bug#204652)
+
+ * Changes from 0.3.1.2 NMU, thanks to Joey Hess: (Closes: Bug#314810)
+ + Fix incorrect use of "$@" in local. Closes: #314157, #314547
+ + Fix fd redirection in download progress code. See #314373
+ + Remove md5sums file from udeb. Closes: #314378
+ + Fix debian-installer mode warning code. Closes: #314340
+
+ * Changes from 0.3.1.4 NMU, thanks to Joey Hess:
+ + Wrap eval statement in exit_function in parens, working around
+ bug #315444 in busybox sh. Closes: #314373
+
+ * Changes from 0.3.1.5 NMU, thanks to Anibal Monsalve Salazar:
+ + Fixed "--variant=buildd option does not work" for pbuilder,
+ closes: #314858. Patch by Matt Kraai <kraai@ftbfs.org>.
+
+ * Changes from 0.3.1.6 NMU, thanks to Joey Hess:
+ + Patch from Colin to redirect status messages to stderr when running
+ --print-debs. Closes: #315875
+ + Restore logging to stderr in debian-installer mode. Closes: #314160
+
+ * Changes from 0.3.1.8 NMU, thanks to Petter Reinholdtsen:
+ + [functions] Mount /sys if it exist and is supported by the kernel.
+ Patch from Cajus Pollmeier, Colin Watson and Ubuntu. (Closes: #289105)
+ + [debootstrap] Document --resolve-deps in usage info. (Closes: #328161)
+ + [etch] Replace libsigc++-1.2-5c102 with libsigc++-1.2-5c2. (Closes: #334506)
+ + [etch] Remove pppoe from base, and only install
+ ipchains on m68k. Patch from Sven Luther. (Closes: #239390)
+ + [sarge] Remove duplicate entries for m68k and amd64. Patch from
+ Frans Pop. (Workaround for bug #319777)
+ + [etch] Add support for ppc64. The patch for 'sid' did no longer
+ apply. Patch from Andreas Jochens. (Closes: #313353)
+ + [sarge,etch,sid] Set DEBCONF_NONINTERACTIVE_SEEN=true during build, to
+ avoid questions during upgrade. (Closes: #238301)
+ + Add script for breezy. Patch from Colin Watson. (Closes: #315940)
+
+ * Changes from 0.3.1.9 NMU, thanks to Joey Hess:
+ + Replace the etch script with a copy of the sid script, which pulls in
+ gnupg, so the installed etch system has a usable apt. Closes: #334521
+
+ * Create /dev/ptmx in minimal devices tarball. (Closes: Bug#317072)
+
+ * Don't create empty available files, since old dpkg and new kernels can't
+ deal with them. (Closes: Bug#308169, Bug#329468)
+
+ * Bump Standards-Version. Bump debhelper compatability level to 4.
+ * Cleanup debian/rules, thanks to Joey Hess. (Closes: Bug#314863)
+
+ * Emit error message if no pkgdetails is available. (Closes: Bug#326831)
+
+ * Turn on --resolve-deps by default. Add --no-resolve-deps as an option.
+ Combined with the previous changes to make the etch script dynamically
+ determine base, this should resolve all the "can't install <foo>"
+ bugs. (Closes: Bug#280210, Bug#308361, Bug#318281, Bug#323362,
+ Bug#318254, Bug#313292, Bug#334683, Bug#248578, Bug#289635)
+
+ * md5sum doesn't exist when coreutils is unpacked but not configured;
+ cp it across so it's available for --second-stage. (Closes: Bug#329394)
+
+ * Catch failures in "dpkg --status-fd" (Closes: Bug#317447, Bug#323661)
+
+ * Make "without" work right for duplicates (Closes: Bug#316884,
+ Bug#319777)
+
+ * Simplify and correct file descriptor handling and debootstrap.log
+ behaviour.
+
+ * Delete $TARGET with --print-debs and --make-tarball. (Closes: Bug#328369)
+
+ * Add a --make-tarball option. (Closes: Bug#152845)
+
+ * Create a default sources.list for apt. (Closes: Bug#283234, Bug#315225)
+
+ * Update manpage to talk about woody instead of sarge. (Closes: Bug#315862)
+
+ * Use partial/ directory when downloading. (Closes: Bug#109176)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 23 Oct 2005 14:49:08 +1000
+
+debootstrap (0.3.1) unstable; urgency=low
+
+ * sid script updated:
+ - Determine base dynamically (Priority: required for required packages,
+ Priority: important for base packages, Build-Essential: yes for buildd
+ variant base). (Closes: Bug#88984, Bug#193134)
+ - Use fine grained dpkg progress display, thanks again to Colin Watson.
+ (Closes: Bug#229314, Bug#231109, Bug#244563)
+
+ * dpkg output (etc) goes to /var/log/bootstrap.log in the target, rather
+ than stdout. This is probably difficult for frontends to capture
+ at present.
+
+ * Parsing of Packages file sped up. (Yay!)
+
+ * debootstrap.deb now arch: all (Closes: Bug#122465, Bug#131552)
+ - perl implementation of pkgdetails used by preference
+ - devices.tar.gz reduced to minimal set of devices; frontends should
+ setup udev or supply their own devices or similar in future
+ - /usr/lib/debootstrap/arch not shipped
+ - none of the above applies to udebs yet; though the devices.tar.gz
+ change will eventually
+
+ * Support for verifying based on Release.gpg files (--keyring). Thanks
+ to Colin Watson. (Closes: Bug#313383)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Tue, 14 Jun 2005 00:22:55 +1000
+
+debootstrap (0.3.0) unstable; urgency=low
+
+ * The Gernot Heiser release, dedicated to everyone who drinks enough to
+ lose their better judgement, and those of us who didn't have any in
+ the first place.
+
+ * Major update. New features:
+ + Use $TARGET/debootstrap directory for state info
+ (--keep-debootstrap-dir)
+ + Support for cross-strapping (--foreign / --second-stage)
+ (Closes: Bug#202529)
+ + Support for resolving dependencies (--resolve-deps)
+ + Support for Debian etch, and Ubuntu warty and hoary (Closes: Bug#312417)
+ + Support for handling variants within the main suite script
+ + Support for other versions of base packages in /v/c/apt/archives
+ + Initial support for fine-grained dpkg progress display, thanks to
+ Colin Watson (currently only for warty and hoary)
+ + Initial support for determining base system dynamically.
+ + No longer display "debootstrap.invalid" when working with
+ Release/Packages files. (Closes: Bug#241795, Bug#256255)
+ + Ignores failures for on_exit cleanup commands. (Closes: Bug#253387,
+ Bug#253468, Bug#308774)
+ + Early reporting of unavailable packages.
+ + More efficient parsing of Packages files.
+ + Generalised additions and exclusions. (Closes: Bug#191793)
+ + Handles symlinked configuration files in /etc a little better.
+ (Closes: Bug#161987, Bug#252907, Bug#272257)
+
+ * Dropped support for slink.
+
+ * Use ln -fs for mawk/awk link. (Closes: Bug#248398, Bug#258524)
+
+ * Dropped mail-transport-agent, and hence mailx and at from sid/etch base.
+ (Closes: Bug#168473)
+ * Dropped ipchains for i386 (Closes: Bug#266119)
+ * Other minor changes to meet dependencies, also. (Closes: Bug#312701)
+
+ * Minor manpage fixes. (Closes: Bug#285777)
+ * Add check for specifying no components (CloseS: Bug#283810)
+
+ * Include 0.2.45 NMUs, thanks to Steve Langasek.
+ (Closes: Bug#295571, Bug#283752, Bug#278158)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 12 Jun 2005 23:49:58 +1000
+
+debootstrap (0.2.45-0.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * [sarge, sid] Replace libparted1.6-0 with libparted1.6-12 for ia64,
+ to keep up with the ABI changes for that package. (Closes: #295571)
+ * [sarge, sid] include pciutils on hppa as well, per request of the
+ hppa folks. (Closes: #283752)
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 25 Feb 2005 22:23:30 -0800
+
+debootstrap (0.2.45-0.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * [sarge, sid] Drop libgnutls10 and libgcrypt7, since they are no
+ longer needed by exim4. (Closes: #278158).
+
+ -- Steve Langasek <vorlon@debian.org> Thu, 20 Jan 2005 21:20:22 -0800
+
+debootstrap (0.2.45) unstable; urgency=high
+
+ * Acknowledge NMUs. (Closes: #270135)
+ * [woody.buildd] Corrected ia64 special cases. Patch by Brett Johnson
+ <brett@hp.com>. (Closes: #271894)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 18 Sep 2004 13:49:23 +0200
+
+debootstrap (0.2.44.2) unstable; urgency=low
+
+ * NMU again, this time using the makedev in unstable instead of the
+ experimental so devices.tar.gz isn't empty on ia64... oops... /o\
+
+ -- Bdale Garbee <bdale@gag.com> Tue, 14 Sep 2004 20:03:56 -0600
+
+debootstrap (0.2.44.1) unstable; urgency=low
+
+ * NMU to resolve d-i inability to install sid on ia64
+ * add pciutils to the base package list for ia64, to avoid having to regress
+ efibootmgr in unstable, closes: #270315, #268490
+
+ -- Bdale Garbee <bdale@gag.com> Mon, 13 Sep 2004 15:11:11 -0500
+
+debootstrap (0.2.44) unstable; urgency=high
+
+ * [sarge] Removed "gcc-3.0-base" and "libstdc++3" for HPPA as they have been
+ removed from sarge as well on that arch. (Closes: #268917)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 30 Aug 2004 08:53:30 +0200
+
+debootstrap (0.2.43) unstable; urgency=high
+
+ * [sarge] Added back libgnutls10 in order not to break d-i testing.
+ (Closes: #268578, #268663).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 29 Aug 2004 09:08:48 +0200
+
+debootstrap (0.2.42) unstable; urgency=high
+
+ * Acknowledge NMUs. (Closes: #262137, #262165, #262178, #262375)
+ * [sarge] Switch to libgnutls11 so exim4 can switch. (Closes: #268325)
+ * [sid] Removed "gcc-3.0-base" and "libstdc++3" for HPPA as they have been
+ removed from sid. (Closes: #268049)
+ * [Makefile] Make the regular video devices on all archs. (Closes: #265081)
+ * [Makefile,debootstrap] Switched away from deprecated chown syntax;
+ switched away from XSIisms '-a' and '-o'. (Closes: #256098)
+ * [debootstrap.8] Use '\-' rather than '-' in options. (Closes: #263955)
+ Confirmed that the "exlude" typo has already been fixed. (Closes: #254108)
+ Applied patch by Javier Fernández-Sanguino Peña <jfs@computer.org>
+ for "file" URL documentation and a more complete example. (Closes: #226662)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 27 Aug 2004 15:40:02 +0200
+
+debootstrap (0.2.41-0.2) unstable; urgency=low
+
+ * Non-maintainer upload
+ * [sarge, sid] Add missing libgcrypt11 to base, needed by libgnutls11
+ in sid and needed in sarge for opencdk8 to be rebuilt against it
+ (closes: #262375, #262178).
+
+ -- Steve Langasek <vorlon@debian.org> Fri, 30 Jul 2004 20:26:57 -0700
+
+debootstrap (0.2.41-0.1) unstable; urgency=low
+
+ * Non-maintainer upload with consent of JHM.
+ * Pull libfribidi0 back out of base, it's opportunistically installed
+ by d-i now for the locales that need it (closes: #262137).
+ * Re-add bootloaders on ia64, sparc, mips, hppa, and m68k to base,
+ because debian-installer isn't ready for this change (closes: #262165).
+
+ -- Steve Langasek <vorlon@debian.org> Thu, 29 Jul 2004 14:14:33 -0700
+
+debootstrap (0.2.41) unstable; urgency=high
+
+ * High urgency upload as per tbm's request.
+ * [sarge, sid] No longer install setserial, as it causes problems on some
+ systems (e.g. #212646) and there is a consensus it is no longer needed in
+ a base environment.
+ * [sarge, sid] Removed aboot, aboot-base, elilo, efibootmgr, silo, dvhtool,
+ delo, palo, vmelilo. As per the consensus reached in the thread starting
+ with http://lists.debian.org/debian-boot/2004/04/msg00634.html, the
+ installation of boot loaders is now debian-installer's responsibility.
+ (Closes: #247906)
+ * [sarge, sid] Added libfribidi0 to base to make debconf localisation into
+ right to left languages possible. (Closes: #253229)
+ * [sarge.buildd] Drop libdb4.0 for libdb4.2 as needed by perl.
+ * [sid] Added libgnutls11 as libgnutls10 is being phased out.
+ * [Makefile] Include /dev/ida on ia64. (Closes: #258055)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 29 Jul 2004 20:37:37 +0200
+
+debootstrap (0.2.40) unstable; urgency=medium
+
+ * [woody.buildd] Ensure the on_exit umounting of /dev/pts doesn't mess up
+ an otherwise OK exit status. (Closes: #260699)
+ * Acknowledge NMUs. (Closes: #258350, #260253)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 22 Jul 2004 21:53:20 +0200
+
+debootstrap (0.2.39.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * [sarge, sid] Drop quik from powerpc, as debian-installer handles this
+ now (closes: #260253).
+
+ -- Colin Watson <cjwatson@debian.org> Thu, 22 Jul 2004 16:56:19 +0100
+
+debootstrap (0.2.39.1) unstable; urgency=low
+
+ * NMU
+ * add passwd to sid.buildd,sarge.buildd as bash depends on them
+
+ -- Junichi Uekawa <dancer@debian.org> Fri, 9 Jul 2004 09:07:28 +0900
+
+debootstrap (0.2.39) unstable; urgency=medium
+
+ * [sarge,sid] Dropped libdb2. Thanks Matt Zimmerman. (Closes: #250813)
+ * [sarge,sid] Dropped libident. Thanks LaMont Jones. (Closes: #251320)
+ * [sarge,sid] Dropped slang1. Thanks LaMont Jones. (Closes: #251328)
+ * [woody.buildd] Install libperl5.6. Thanks Rene Engelhard. (Closes: #251702)
+ * [sarge.buildd] Install libc6.1 rather than libc6 on alpha. Thanks Rene
+ Engelhard. (Closes: #251703)
+
+ Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
+ * Copy script for sarge to sid
+ * Add handling for amd64 to sarge/sid scripts
+ * Dropped gcc-3.2-base. (Closes: #250836)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 5 Jun 2004 10:02:50 +0200
+
+debootstrap (0.2.38.1) unstable; urgency=low
+
+ * NMU.
+ * [sarge] Add libdb4.2 since apt-utils (0.5.25) depends on this.
+
+ -- Otavio Salvador <otavio@debian.org> Thu, 20 May 2004 22:18:41 -0300
+
+debootstrap (0.2.38) unstable; urgency=medium
+
+ * [woody.buildd] Readd libgdbmg1 (for perl-modules).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 7 May 2004 10:55:13 +0200
+
+debootstrap (0.2.37) unstable; urgency=medium
+
+ * [debian/control] Bumped makedev build dependency so as not to get pty
+ permissions problems. (Closes: #246709)
+ * [sid, sid.buildd] Add/switch to libdb4.2 for the new perl packages.
+ * Acknowledge NMU 0.2.36.1. (Closes: #246368)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 4 May 2004 07:58:02 +0200
+
+debootstrap (0.2.36.1) unstable; urgency=low
+
+ * Non-maintainer upload with maintainer permission.
+ * [sarge, sid] Drop yaboot from powerpc, as debian-installer handles this
+ now (closes: #246368).
+
+ -- Colin Watson <cjwatson@debian.org> Fri, 30 Apr 2004 00:05:02 +0100
+
+debootstrap (0.2.36) unstable; urgency=high
+
+ Joey Hess <joeyh@debian.org>:
+ * [sid, sarge] Add a subst_package function, and use it to replace libc6
+ with libc6.1 on alpha and ia64, to avoid reordering libc in the required
+ list and work around bug #238963. (Closes: #245680)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 25 Apr 2004 18:37:42 +0200
+
+debootstrap (0.2.35) unstable; urgency=high
+
+ * [sarge, sid] Dropped syslinux. (Closes: #205379)
+ * [woody, woody.buildd] Removed libgdbmg1. (Closes: #244447)
+ * [debootstrap, functions] Sync at the end of debootstrap. (Closes: #225742)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 22 Apr 2004 16:51:49 +0200
+
+debootstrap (0.2.34) unstable; urgency=high
+
+ * [sid] Dropped libpci1 and libpci2 as the pciutils dependency change has
+ been reverted. (Closes: #244344)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 22 Apr 2004 08:14:28 +0200
+
+debootstrap (0.2.33) unstable; urgency=high
+
+ * [sid] Added libpci1 and libpci2 for all archs where pciutils is installed,
+ as pciutils now depends on them. (Closes: #244344)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 18 Apr 2004 09:41:23 +0200
+
+debootstrap (0.2.32) unstable; urgency=high
+
+ * [sarge, sid] No longer try to filter out console-tools on s390. While
+ console-tools is basically useless on s390, base-config depends on it.
+ (Closes: #241727)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 9 Apr 2004 16:26:23 +0200
+
+debootstrap (0.2.31) unstable; urgency=medium
+
+ * [sarge] Exim has changed GnuTLS dependencies. Added libgnutls10,
+ libgcrypt7, libgpg-error0, libopencdk8, libtasn1-2; dropped libgnutls7,
+ libgcrypt1, libtasn1-0.
+ * [sarge] Removed libgnutls7, libgcrypt1, libtasn1-0.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 23 Mar 2004 22:47:28 +0100
+
+debootstrap (0.2.30) unstable; urgency=medium
+
+ * [sarge, sid] aboot needs aboot-base. (Closes: #236368, #239302)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 22 Mar 2004 21:10:31 +0100
+
+debootstrap (0.2.29) unstable; urgency=low
+
+ * NMU with permission of maintainer.
+ * Added {woody,sarge,sid}.buildd scripts to create build chroots.
+ Closes: #236418.
+ * Added --variant=buildd option for convenient access to these scripts.
+
+ -- Daniel Schepler <schepler@debian.org> Wed, 10 Mar 2004 02:29:27 -0800
+
+debootstrap (0.2.28) unstable; urgency=medium
+
+ * [sid] Exim has changed GnuTLS dependencies. Added libgnutls10, libgcrypt7,
+ libgpg-error0, libopencdk8, libtasn1-2; dropped libgnutls7, libgcrypt1,
+ libtasn1-0.
+ * [sarge,sid] Dropped lilo, mbr, modconf, libdevmapper1.00 as
+ debian-installer handles the bootloader installation and modules
+ configuration. (Closes: #232667, #232672, #232673)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 24 Feb 2004 09:57:35 +0100
+
+debootstrap (0.2.27) unstable; urgency=medium
+
+ * [sarge] Lilo now needs libdevmapper1.00; Removed libopencdk8, libgcrypt7,
+ libgpg-error0.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 14 Feb 2004 01:19:48 +0100
+
+debootstrap (0.2.26) unstable; urgency=medium
+
+ * [sarge] Removed gcc-3.2-base. (Closes: #230697)
+ * [sid] Lilo now needs libdevmapper1.00 .
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 3 Feb 2004 08:27:54 +0100
+
+debootstrap (0.2.25) unstable; urgency=high
+
+ * [functions] Unmount proc/bus/usb, not proc/usb. (Closes: #229122)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 30 Jan 2004 18:01:29 +0100
+
+debootstrap (0.2.24) unstable; urgency=high
+
+ * [functions, sarge, sid] Try to unmount proc/usb, dev/shm, dev/pts on exit;
+ don't fail when there's nothing to unmount.
+ (Closes: #229122, #229901, #229907)
+ * [woody] Don't fail when there's no dev/pts to unmount.
+ * [sarge, sid] Don't install pcmcia-cs as debian-installer takes care of
+ that where needed. (Closes: #221907)
+ * [sid] Removed libopencdk8, libgcrypt7, libgpg-error0.
+ * [sarge] libopencdk8 (needed for exim4-daemon-light via libgnutls7)
+ Depends: libgcrypt7, libgpg-error0. (Closes: #229989)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 28 Jan 2004 18:48:02 +0100
+
+debootstrap (0.2.23) unstable; urgency=high
+
+ * [sarge] Dropped libopencdk4 in favour of libopencdk8 as gnutls has switched.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 1 Jan 2004 01:30:02 +0100
+
+debootstrap (0.2.22) unstable; urgency=high
+
+ * [sid] libopencdk8 Depends: libgcrypt7, libgpg-error0.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 31 Dec 2003 12:35:03 +0100
+
+debootstrap (0.2.21) unstable; urgency=high
+
+ * [sarge] Added coreutils' new predependencies libacl1 and libattr1; removed
+ libsasl2 as it is no longer needed.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 28 Dec 2003 22:54:08 +0100
+
+debootstrap (0.2.20) unstable; urgency=high
+
+ * [sarge] base-config now Depends: aptitude; aptitude Depends:
+ libsigc++-1.2-5c102.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 28 Dec 2003 15:11:31 +0100
+
+debootstrap (0.2.19) unstable; urgency=high
+
+ * [sid] base-config now Depends: aptitude; aptitude Depends:
+ libsigc++-1.2-5c102.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 24 Dec 2003 09:03:44 +0100
+
+debootstrap (0.2.18) unstable; urgency=low
+
+ * Thanks to Steinar Gunderson and Matt Kraii for the NMU fixing some
+ d-i related problems. (Closes: Bug#220150)
+ * Acknowledge that the problems really are fixed now. (Closes:
+ Bug#213669, Bug#209273, Bug#210912)
+
+ * Fix downloading of Packages files to retry if bz2 or gz isn't available
+ on the mirror. (Closes: Bug#194592)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sat, 15 Nov 2003 00:13:13 +1000
+
+debootstrap (0.2.17.1) unstable; urgency=high
+
+ * NMU
+ * [sarge,sid] Display only the package name when retrieving packages.
+ (Closes: #213669, #209273)
+ * [sarge,sid] Added progress information for downloading package
+ details. (Closes: #210912)
+
+ -- Steinar H. Gunderson <sgunderson@bigfoot.com> Mon, 10 Nov 2003 15:11:09 +0100
+
+debootstrap (0.2.17) unstable; urgency=high
+
+ * [sarge] Fixed typo: libreadlin4 -> libreadline4. (Closes: #219655)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 8 Nov 2003 23:23:37 +0100
+
+debootstrap (0.2.16) unstable; urgency=high
+
+ * [sarge,sid] libreadline4 is required for amiga-fdisk on powerpc.
+ (Closes: #218533)
+ * [sarge,sid] Put libreadline4 in required rather than base for ia64.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 5 Nov 2003 08:09:41 +0100
+
+debootstrap (0.2.15) unstable; urgency=high
+
+ * ia64 fixes by Richard Hirst <rhirst@linuxcare.com>: (Closes: #218533)
+ * [sarge, sid] Add libreadline4 to base for ia64 as parted needs it.
+ * [sarge, sid] Remove gcc-2.96-base from required for ia64.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 1 Nov 2003 12:58:34 +0100
+
+debootstrap (0.2.14) unstable; urgency=high
+
+ * [sarge] Made exim4 the default MTA. (Closes: #217657)
+ * [sarge] Removed libstdc++2.10-glibc2.2, libldap2 .
+ * [sid] Dropped libopencdk4 in favour of libopencdk8 as gnutls has switched.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 28 Oct 2003 09:56:27 +0100
+
+debootstrap (0.2.13) unstable; urgency=high
+
+ * [sarge] Added libtextwrap1 for tasksel.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 22 Oct 2003 08:10:37 +0200
+
+debootstrap (0.2.12) unstable; urgency=high
+
+ * [sarge, sid] Add libreadline4 to required for m68k as amiga-fdisk needs
+ it. (Closes: #216617)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 20 Oct 2003 10:05:09 +0200
+
+debootstrap (0.2.11) unstable; urgency=high
+
+ * [sid] Added libc6-sparc64 lib64gcc1 lib64ncurses5 to base for sparc.
+ (Closes: #215590)
+ * [sarge, sid] Dropped libreadline as bash no longer depends on it.
+ * [sid] Dropped libstdc++2.10-glibc2.2 and its associated special cases as
+ it is no longer needed.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 15 Oct 2003 19:42:58 +0200
+
+debootstrap (0.2.10) unstable; urgency=high
+
+ * [sid] Fixed /usr/sbin/sendmail symlink to point to exim4. (Closes: #213734)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 4 Oct 2003 15:47:31 +0200
+
+debootstrap (0.2.9) unstable; urgency=high
+
+ * [sarge] Added libgdbm3 for man-db.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 2 Oct 2003 23:57:09 +0200
+
+debootstrap (0.2.8) unstable; urgency=high
+
+ * [sid] Added libtextwrap1 for tasksel; removed libsasl2 as it is no longer
+ needed.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 2 Oct 2003 07:57:16 +0200
+
+debootstrap (0.2.7) unstable; urgency=high (fixes RC d-i bug)
+
+ * [sarge] Reinstated special-case for libperl5.8; it is still needed for
+ non-i386 until sarge has perl >= 5.8.0-20. (Closes: #213280)
+ * [debian/control] Updated Standards-Version; fixed removal of slink and
+ potato scripts from udeb.
+ * [debian/control] Updated priorities; debootstrap-udeb is required (for
+ debian-installer).
+ * [debian/rules] Fixed dpkg-distaddfile accordingly.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 30 Sep 2003 14:31:57 +0200
+
+debootstrap (0.2.6) unstable; urgency=low
+
+ * [sarge] Added e2fslibs, libcomerr2, libss2, libuuid1 for e2fsprogs.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 26 Sep 2003 13:50:58 +0200
+
+debootstrap (0.2.5) unstable; urgency=low
+
+ * [sid] Added libgdbm3 for man-db.
+ * [sarge, sid] Dropped special-case for libperl5.8 (Closes: #210425).
+ * [sid] Make exim4 the default MTA as it is configured through debconf.
+ (Closes: #208047)
+ * [sid] Removed libldap2 which is no longer needed.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 21 Sep 2003 13:30:49 +0200
+
+debootstrap (0.2.4) unstable; urgency=low
+
+ * [sid] Added coreutils' new predependencies libacl1 and libattr1.
+ * [debian/README.Debian] Corrected example invocation. (Closes: #206142)
+ * [debian/README.Debian] Fixed a typo.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 20 Aug 2003 10:28:49 +0200
+
+debootstrap (0.2.3) unstable; urgency=low
+
+ * [sarge] Add new dependencies of debconf: debconf-i18n
+ liblocale-gettext-perl libtext-wrapi18n-perl libtext-charwidth-perl.
+ * Acknowledge NMU. (Closes: #203370)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 16 Aug 2003 20:15:40 +0200
+
+debootstrap (0.2.2-0.1) unstable; urgency=low
+
+ * NMU.
+ * Fix typo in woody script. (Closes: #203370)
+
+ -- Petter Reinholdtsen <pere@debian.org> Tue, 29 Jul 2003 20:29:01 +0200
+
+debootstrap (0.2.2) unstable; urgency=low
+
+ * [debian/changelog] Included entries for NMUs 0.1.17.31 through .34 whose
+ changes were incorporated by aj already.
+ * [Makefile] Invoke MAKEDEV through its FHS location (noted by Matt
+ Zimmerman). (Closes: #190239)
+ * Acknowledge older NMUs whose changes have been incoporated.
+ (Closes: #135675, #161695, #191849)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 29 Jul 2003 18:31:49 +0200
+
+debootstrap (0.2.1) unstable; urgency=low
+
+ * The Day of the Daffodils release.
+
+ * Accept NMUs up to 0.1.17.30. Thanks guys! (Closes: Bug#148377,
+ Bug#150161, Bug#150492, Bug#153962, Bug#154463, Bug#155906,
+ Bug#160879, Bug#161469, Bug#161469, Bug#161722, Bug#163860,
+ Bug#172118, Bug#176221, Bug#179504, Bug#179725, Bug#185397,
+ Bug#187893, Bug#188053, Bug#189472, Bug#189551, Bug#190108,
+ Bug#191288, Bug#193794, Bug#193806, Bug#195012, Bug#195742,
+ Bug#199333, Bug#201066)
+ * JHM added to Uploaders.
+
+ * Change the info/error/warning/progress calls to include a unique word
+ for each string, a printf format string, and any arguments to the
+ printf string.
+ * Add support for debian-installer interaction
+
+ * Add some support for l10n. Gettext is used if it's available; no
+ translations are included as of yet. This support doesn't
+ affect debian-installer, which has its own stuff for i18n, nor
+ boot-floppies. (Closes: Bug#125647)
+
+ * Some initial support for cross-bootstrapping in the sid script.
+
+ * Use dpkg --print-installation-architecture instead of
+ --print-architecture. (Closes: Bug#138526, Bug#159720)
+
+ * Add new dependencies of debconf: debconf-i18n liblocale-gettext-perl
+ libtext-wrapi18n-perl libtext-charwidth-perl. (Closes: Bug#201066)
+ * Add new dependencies of libldap2: libgnutls7 libgcrypt1 liblzo1
+ libopencdk4 libtasn1-0 zlib1g. (Closes: Bug#201663)
+ * Remove libgdbmg1. (Closes: Bug#202304)
+ * Add new dependecies of e2fsprogs: e2fslibs libcomerr2 libss2 libuuid1.
+ (Closes: Bug#203033)
+ * Add wget to base. (Closes: Bug#145635)
+ * Switch from netkit-ping to iputils-ping.
+
+ * Changed the manpage a little. (Closes: Bug#126864)
+ * Updated README.Debian.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Tue, 29 Jul 2003 18:15:24 +1000
+
+debootstrap (0.1.17.34) unstable; urgency=medium
+
+ * [sid] Added e2fsprogs' new predependencies (e2fslibs, libcomerr2, libss2,
+ libuuid1).
+ * [sarge] Removed libgdbmg1 as it is no longer needed.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 27 Jul 2003 09:20:49 +0200
+
+debootstrap (0.1.17.33) unstable; urgency=medium
+
+ * [sid] Removed libgdbmg1 as it is no longer needed.
+ * [sarge] libldap2 now Depends: libgnutls7, libsasl2; added those and their
+ dependencies (libgcrypt1 liblzo1 libopencdk4 libtasn1-0 zlib1g). Dropped
+ libsasl7 in favour of libsasl2.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 21 Jul 2003 19:00:28 +0200
+
+debootstrap (0.1.17.32) unstable; urgency=medium
+
+ * [sid] libldap2 now Depends: libgnutls7; added that and its dependencies
+ (libgcrypt1 liblzo1 libopencdk4 libtasn1-0 zlib1g); dropped libssl0.9.7 .
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Thu, 17 Jul 2003 07:05:09 +0200
+
+debootstrap (0.1.17.31) unstable; urgency=medium
+
+ * [sid] Follow debconf changes. debconf now Depends: debconf-i18n |
+ debconf-english; debconf-i18n having Priority: important and
+ debconf-english having Priority: extra, so we satisfy the dependency
+ through debconf-i18n. debconf-i18n in turn pulls in three additional
+ packages: liblocale-gettext-perl, libtext-wrapi18n-perl,
+ libtext-charwidth-perl .
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 13 Jul 2003 08:52:55 +0200
+
+debootstrap (0.1.17.30) unstable; urgency=medium
+
+ * [sarge]
+ * Added sysv-rc for /usr/sbin/update-rc.d .
+ * Added initscripts to satisfy sysvinit's predependency.
+ * libparted1.6-0 has replaced libparted1.4 on ia64. (Closes: #197957)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 30 Jun 2003 07:05:22 +0200
+
+debootstrap (0.1.17.29) unstable; urgency=medium
+
+ * [sid] libconsole has replaced console-tools-libs. (Closes: #195722)
+ * [sarge] libperl5.6 has been replaced by libperl5.8 . (Closes: #195588)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 2 Jun 2003 00:40:54 +0200
+
+debootstrap (0.1.17.28) unstable; urgency=medium
+
+ * [sarge] libnewt0.51 has replaced libnewt0; it requires slang1a-utf8.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 28 May 2003 07:42:14 +0200
+
+debootstrap (0.1.17.27) unstable; urgency=medium
+
+ * urgency medium to not hold up .26 with that longer as necessary
+ * [sarge] added libtext-iconv-perl (this is the second part
+ from .22) (closes: #184539)
+
+ -- Rene Engelhard <rene@debian.org> Mon, 19 May 2003 00:08:48 +0200
+
+debootstrap (0.1.17.26) unstable; urgency=medium
+
+ * [sarge] libpcap0.7 has replaced libpcap0.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 18 May 2003 23:23:46 +0200
+
+debootstrap (0.1.17.25) unstable; urgency=medium
+
+ * [sarge] Added libblkid1 (for e2fsprogs).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 4 May 2003 12:44:00 +0200
+
+debootstrap (0.1.17.24) unstable; urgency=medium
+
+ * [sid] Updates for new whiptail:
+ * Replaced libnewt0 by libnewt0.51.
+ * Added slang1a-utf8.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 29 Apr 2003 19:04:51 +0200
+
+debootstrap (0.1.17.23) unstable; urgency=medium
+
+ * [sid]
+ * Added sysv-rc for /usr/sbin/update-rc.d .
+ * Added initscripts to satisfy sysvinit's predependency.
+ * For exim, dropped libsasl7 in favour of libsasl2.
+ * Added libssl0.9.7 for libsasl2.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 22 Apr 2003 06:56:25 +0200
+
+debootstrap (0.1.17.22) unstable; urgency=low
+
+ * [sid] added libtext-iconv-perl which is needed to display
+ localized po-debconf templates actually localized.
+ This needs a second step later for sarge but that only is possible
+ after libtext-iconv-perl 1.2-2 went into sarge.
+
+ -- Rene Engelhard <rene@debian.org> Fri, 18 Apr 2003 16:25:17 +0200
+
+debootstrap (0.1.17.21) unstable; urgency=medium
+
+ * [sarge, sid] Added gcc-3.3-base (as it is needed for current libstdc++5).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Fri, 18 Apr 2003 08:11:55 +0200
+
+debootstrap (0.1.17.20) unstable; urgency=medium
+
+ * [woody, sarge, sid] Add devfsd on s390 as that architecture uses devfs by
+ default. (Closes: #180252)
+ * [sarge] Removed the dummy fileutils package.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Mon, 7 Apr 2003 19:59:42 +0200
+
+debootstrap (0.1.17.19) unstable; urgency=medium
+
+ * [sid] Added libblkid1 (for e2fsprogs).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 6 Apr 2003 21:43:29 +0200
+
+debootstrap (0.1.17.18) unstable; urgency=medium
+
+ * [sarge] Added libgcc1, libstdc++5, gcc-3.2-base; dropped aptitude,
+ libsigc++0 .
+ * Debootstrap has depended on binutils since 0.1.17.3. (Closes: #184304)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 19 Mar 2003 06:55:56 +0100
+
+debootstrap (0.1.17.17) unstable; urgency=medium
+
+ * NMU
+ * Really drop aptitude from the sid script, not just libsigc++0.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 4 Feb 2003 06:49:36 +0100
+
+debootstrap (0.1.17.16) unstable; urgency=medium
+
+ * NMU
+ * Drop aptitude from the sid script (base-config 1.51 dropped its dependency
+ on it) and libsigc++0 (which was only needed for aptitude). This makes
+ "pbuilder create --distribution sid" work again. (Closes: #177221, #177998).
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sun, 2 Feb 2003 20:41:35 +0100
+
+debootstrap (0.1.17.15) unstable; urgency=low
+
+ * NMU
+ * For gcc-transition, libgcc1 and libstdc++5 and gcc-3.2-base
+ required by groff-base, and potentially other packages compiled with
+ gcc-3.2.
+
+ -- Junichi Uekawa <dancer@debian.org> Mon, 13 Jan 2003 15:39:55 +0900
+
+debootstrap (0.1.17.14) unstable; urgency=low
+
+ * NMU
+ * Remove debootstrap-udeb's dependency on retriever.
+
+ -- Tollef Fog Heen <tfheen@debian.org> Sat, 7 Dec 2002 14:53:52 +0100
+
+debootstrap (0.1.17.13) unstable; urgency=low
+
+ * NMU
+ * sarge: Removed shellutils, textutils and added coreutils instead.
+ Verified that the result works for "pbuilder create --distribution sarge"
+ (Closes: #163789)
+ Fileutils is still in there for now, due to sarge's debconf versioned
+ dependency on it.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Tue, 8 Oct 2002 23:17:47 +0200
+
+debootstrap (0.1.17.12) unstable; urgency=low
+
+ * NMU
+ * Fix shell variable quoting problem, to change $10 -> ${10}
+ (closes: #161468)
+
+ -- Junichi Uekawa <dancer@debian.org> Sat, 21 Sep 2002 13:39:47 +0900
+
+debootstrap (0.1.17.11) unstable; urgency=low
+
+ * NMU
+ * sarge: added libdb1-compat.
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 21 Sep 2002 00:37:36 +0200
+
+debootstrap (0.1.17.10) unstable; urgency=low
+
+ * NMU
+ * sid: Removed shellutils, fileutils, and added coreutils for required
+ target (closes: #161332)
+ * sid: change libperl5.6 to libperl5.8 (closes: #158606)
+
+ -- Junichi Uekawa <dancer@debian.org> Wed, 18 Sep 2002 21:41:36 +0900
+
+debootstrap (0.1.17.9) unstable; urgency=low
+
+ * NMU
+ * Added "libdb1-compat" to sid and verified that the resulting package is
+ usable for "pbuilder create --distribution sid".
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Sat, 14 Sep 2002 15:09:10 +0200
+
+debootstrap (0.1.17.8) unstable; urgency=low
+
+ * NMU
+ * The "it didn't change the way the installer worked" release.
+ * Makefile: create $(DESTDIR)/usr/share/man/man8 before attempting to
+ install a file to it (Closes: #139543)
+ * functions: fix race condition in smallyes() implementation; thanks to Matt
+ Zimmerman for the analysis. "Sometimes, dpkg finishes executing before
+ smallyes runs, and it loops forever while echo fails repeatedly due to the
+ broken pipe." To fix this race, we simply swap the loop condition and
+ body, so that if the echo fails, smallyes() exits cleanly. I further
+ changed "true" to ":" to save the expense of an extra process for shells
+ where "true" is not a built-in.
+ (Closes: #139529)
+
+ -- Branden Robinson <branden@progeny.com> Thu, 29 Aug 2002 12:50:08 -0500
+
+debootstrap (0.1.17.7) unstable; urgency=low
+
+ * NMU
+ * Forked "sid" target from "sarge" target, changed "libcap0" to the now
+ current "libpcap0.7" and verified that the result works with pbuilder.
+ (Closes: #156574)
+
+ -- J.H.M. Dassen (Ray) <jdassen@debian.org> Wed, 21 Aug 2002 11:01:52 +0200
+
+debootstrap (0.1.17.6) unstable; urgency=low
+
+ * NMU
+ * add dselect to required (I found out that it is actually required
+ for pbuilder create to work) (closes: #154527)
+ * change DEBIAN_FRONTEND=Noninteractive to "noninteractive" (closes: #154794)
+ * add sh* patch from Yaegashi (closes: #155142)
+
+ -- Junichi Uekawa <dancer@debian.org> Thu, 8 Aug 2002 19:23:04 +0900
+
+debootstrap (0.1.17.5) unstable; urgency=low
+
+ * NMU
+ * mistake in the last upload, sorry aj.
+ sid points to sarge, not woody. (closes: #149971)
+
+ -- Junichi Uekawa <dancer@debian.org> Sat, 27 Jul 2002 17:22:05 +0900
+
+debootstrap (0.1.17.4) unstable; urgency=low
+
+ * NMU
+ * add "sarge" target (closes: #153957)
+
+ -- Junichi Uekawa <dancer@debian.org> Tue, 23 Jul 2002 18:03:01 +0900
+
+debootstrap (0.1.17.3) unstable; urgency=low
+
+ * NMU
+ * Depend on binutils (closes: #138489)
+ * Sleep is optional (closes: #150468)
+ * POSIXify a bit more (closes: #150487)
+ * Add support for --components (closes: #116801)
+
+ -- Tollef Fog Heen <tfheen@debian.org> Thu, 20 Jun 2002 00:13:06 +0200
+
+debootstrap (0.1.17.2) unstable; urgency=low
+
+ * NMU
+ * Make sid script not a symlink from woody script
+ * add aptitude and libsigc++0 to base for sid. (closes: #149971)
+
+ -- Junichi Uekawa <dancer@debian.org> Sat, 15 Jun 2002 12:46:11 +0900
+
+debootstrap (0.1.17.1) unstable; urgency=low
+
+ * NMU
+ * Add udeb support (closes: #143874)
+
+ -- Tollef Fog Heen <tfheen@debian.org> Tue, 28 May 2002 14:15:41 +0200
+
+debootstrap (0.1.17) unstable; urgency=high
+
+ * Includes changes from NMUs. Thanks to Stefan Gybas and Eduard Bloch.
+ (Closes: Bug#130764, Bug#135676, Bug#134306, Bug#133882, Bug#131768,
+ Bug#117980, Bug#133298, Bug#130668, Bug#111175, Bug#131147, Bug#95143,
+ Bug#130482)
+
+ * Don't use PIPESTATUS to work out if wget succeeded, since that's a
+ bashism and we're seriously not allowed bashisms. Duh. This should
+ help with all those "Malformed release" problems. Thanks to Phil
+ Blundell and Chris Tillman for spotting this. (Closes: Bug#136729)
+
+ * Apply patch from Matt Zimmerman to get rid of some irritating warnings
+ that can show up sometimes due to sed getting it's output stream closed
+ on it. (Closes: Bug#131478)
+
+ * Don't use "export foo=bar" on a single line since it's a bashism.
+ (Closes: Bug#138187)
+
+ * Made the "smallyes" usage independent of --boot-floppies. Too much
+ code duplication otherwise.
+
+ * Install ipchains on arches that have 2.2.x kernels by default, and
+ iptables on arches that have 2.4.x kernels by default. Some arches
+ have both. (Closes: Bug#134478)
+
+ * Don't rm malformed Release files, rename them to something obvious
+ instead so people can have a hope at seeing what's going on. (Closes:
+ Bug#131756)
+
+ * Error out on missing entries in Release files. (Closes: Bug#136886)
+
+ * Fix basedeb creation to not bother building devices tarball. (Closes:
+ Bug#137243)
+
+ * Workaround for ldconfig no longer needed, so removed. (Closes: Bug#135819)
+ * Workaround for /dev/initctl was never needed and stupid, so removed.
+
+ * Make sure devices.tar.gz is gzip -9'ed. (Closes: Bug#136687)
+
+ * Use any "main" components found in Release file, eg "main",
+ "non-US/main", "local/main". (Closes: Bug#116801)
+
+ * Add parted to base for ia64. (Closes: Bug#138246)
+
+ * Moved the "successful!" message and sleep hack for boot-floppies from
+ the woody script to the debootstrap script itself.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Thu, 14 Mar 2002 18:28:24 +1000
+
+debootstrap (0.1.16.4) unstable; urgency=low
+
+ * NMU, needed for boot-floppies 3.0.20
+ * Added cciss and ataraid device files, closes: #135675
+ * Applied the patch from Matt Zimmermann to fix --include, closes: #134306
+ * Mail suppression fixed in previous release, closes: #133882
+
+ -- Eduard Bloch <blade@debian.org> Sun, 3 Mar 2002 12:21:19 +0100
+
+debootstrap (0.1.16.3) unstable; urgency=low
+
+ * non-maintainer-upload
+ * require newer makedev, fixes build problems on m86k and arm
+ * unsets $TMP, $TEMP and $TMPDIR in the beginning, closes: #131768, #117980
+ * added gcc-2.96-base to ia64's required packages list, closes: #133298
+
+ -- Eduard Bloch <blade@debian.org> Tue, 12 Feb 2002 19:30:47 +0100
+
+debootstrap (0.1.16.2) unstable; urgency=low
+
+ * non-maintainer-upload
+ * added modification suggested by Branden Robinson and Matt Kraai terminate
+ cat (now tail) better, closes: #130668
+ * provides options to install additional packages, or exclude some from the
+ list. May be needed in boot-floppies soon. Closes: #111175, #131147
+ * --verbose option, closes: #95143
+ * added additional devices to the device list, especially input and usb
+ needed for modern device drivers (Joysticks, USB, Scanners)
+ * added pppoeconf to the packages list, better choice for DSL users
+ * forced remove of dev/initctl, prevents breaking on re-installation
+
+ -- Eduard Bloch <blade@debian.org> Mon, 28 Jan 2002 19:14:41 +0100
+
+debootstrap (0.1.16.1) unstable; urgency=high
+
+ * non-maintainer upload for boot-floppies 3.0.19
+ * Fixed list of base and required packages for s390
+ * setup_devices(): don't fail if devices.tar.gz is not present and we
+ are using devfs
+ * disable handling of /dev/initctl for boot-floppies, closes: #130482
+
+ -- Stefan Gybas <sgybas@debian.org> Thu, 24 Jan 2002 15:17:42 +0100
+
+debootstrap (0.1.16) unstable; urgency=low
+
+ * Include NMUs 0.1.15.1 - .9, thanks to Adam di Carlo, Ethan Benson and
+ Bdale Garbee. (Closes: Bug#113265, Bug#119314, Bug#119251)
+ * Many bugs were fixed in the NMUs. Closes them properly. (Closes:
+ Bug#89673, Bug#97174, Bug#99229, Bug#105980, Bug#106062, Bug#106102,
+ Bug#106106, Bug#106134, Bug#106711, Bug#106877, Bug#107262,
+ Bug#107404, Bug#107447, Bug#109670, Bug#110312, Bug#111001,
+ Bug#111065, Bug#112778, Bug#112795, Bug#112842, Bug#113444,
+ Bug#114056, Bug#114653, Bug#115467, Bug#115481, Bug#115557,
+ Bug#115581, Bug#115699, Bug#116061, Bug#116424, Bug#119769,
+ Bug#119947, Bug#121724, Bug#123958, Bug#125954, Bug#126018,
+ Bug#126630, Bug#126799)
+
+ * Informative error for people who type `--boot-floppies' when running
+ by hand. (Closes: Bug#107548)
+ * Create dev/initctl in target, and setup a cat process to dump anything
+ sent to it to /dev/null so that if init is run in the chroot,
+ it doesn't try doing anything too clever to talk to the real
+ init. (Closes: Bug#120597)
+ * Create awk symlink since base-files insists on having it available.
+ (Closes: Bug#127934)
+
+ * Use DEBOOTSTRAP_DIR to work out where /usr/lib/debootstrap is.
+ * So, in theory, to create basedeb tarballs, you should be able to unpack
+ the source and say:
+ .
+ fakeroot debian/rules binary-basedebs SUITE=woody VERSION=3.0 \
+ MIRROR="http://ftp.debian.org/debian" ARCHES="i386 powerpc"
+ (Closes: Bug#127546)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 20 Jan 2002 21:04:37 +1000
+
+debootstrap (0.1.15.9) unstable; urgency=high
+
+ * non-maintainer upload
+ * debian/rules: new 'basedebs' target that makes basedebs.tgz and 1.44
+ split images for base per arch
+ * functions: better return value handling during wget (wgetprogress)
+ * repeat() had a useless eval, removed, which simplifies some silly
+ quoting
+ * incorrect error message in in_target_msg(), closes: #119769
+ * debian/changelog: remove obsolete "local variables"
+ * additional progress message when validating the release file after
+ download
+ * when the downloaded release file is invalid, make sure to delete it
+ closes: #119947
+ * debian/rules: minor fixes and cosmetics
+ * upgrade wget from Recommends to Depends, closes: #126799
+ * depend on binutils, for 'ar', closes: #123958
+
+ -- Adam Di Carlo <aph@debian.org> Fri, 4 Jan 2002 20:01:58 -0500
+
+debootstrap (0.1.15.8) unstable; urgency=high
+
+ * non-maintainer upload
+ * Fix progress bar hooks to enable proper progress on basedebs.tgz
+ installation as well as actual base installation and extraction.
+ * trap signals so cleanup is still performed.
+ * When in --boot-floppies mode echo a Success info message to stdout, so
+ it will show up on /dev/tty4, this is so users watching tty4 stop
+ being confused when things just stop at completion.
+ * Replace $TARGET/sbin/start-stop-daemon with a shell script instead of
+ /bin/true, this shell script announces that its a fake noop version so
+ users will know whats wrong if debootstrap aborts before completion.
+
+ -- Ethan Benson <erbenson@alaska.net> Sat, 3 Nov 2001 23:14:08 -0900
+
+debootstrap (0.1.15.7) unstable; urgency=high
+
+ * non-maintainer upload
+ * when reporting errors in 'in_target', don't chop down to the first
+ 50 characters
+ * woody: when in boot-floppies mode, provide more user-friendly warning
+ messages, using new 'in_target_msg' function
+ * woody: more info messages for the core/required/base package
+ installation part
+ * instead of 'ln -s' we should be using 'ln -sf'; this would prevent
+ running debootstrap twice in the same target dir; closes: #111065
+ * before mounting proc, umount it just in case; normally this shouldn't
+ be needed if on_exit is working all the time, but I find without this,
+ sometimes problems are caused
+ * woody/i386 needs psmisc for pcmcia-cs (critical bug!)
+ * --download-only mode can be run as non-root; closes: #116424
+ * tested some problems which I couldn't reproduce
+ closes: #115699
+
+ -- Adam Di Carlo <aph@debian.org> Wed, 24 Oct 2001 16:05:39 -0400
+
+debootstrap (0.1.15.6) unstable; urgency=medium
+
+ * non-maintainer upload
+ * smaller and wiser version of smallyes(), thanks to Herbert Xu
+ * woody base includes pcmcia-cs for i386 and powerpc (closes: #114653)
+ * wget progress bar support (closes: #116061)
+
+ -- Adam Di Carlo <aph@debian.org> Thu, 18 Oct 2001 15:14:02 -0400
+
+debootstrap (0.1.15.5) unstable; urgency=high
+
+ * From Ethan Benson:
+ * pipe yes output into dpkg runs inside install_debs() this way on_exit
+ works in --boot-floppies mode. (Closes: #112842, #115481)
+ * Add libpcap0 to base, ppp depends on it now. (Closes: #114056)
+
+ * From Adam Di Carlo:
+ * Potato installation on non-i386 was broken, need libc6
+ (closes: #112778); however, there are other ways the Potato base
+ install doesn't represent quite what Potato boot-floppies would
+ consider base
+ * apply patch from Tommi Virtanen which improves the 'smallyes'
+ function; apparently this fixes a console-tools postinst loop,
+ although I haven't seen that (closes: #115581)
+ * get rid of some line continuators in potato and woody scripts, they
+ were obscuring some problems
+
+ -- Adam Di Carlo <aph@debian.org> Mon, 15 Oct 2001 01:56:16 -0400
+
+debootstrap (0.1.15.4) unstable; urgency=high
+
+ * more fixed for the benefits of boot-floppies
+ * add telnetd on s390; yes, it's gross, but it's needed for
+ installation, to connect from the line mode console
+ closes: #112795
+
+ -- Adam Di Carlo <aph@debian.org> Sun, 23 Sep 2001 16:11:03 -0400
+
+debootstrap (0.1.15.3) unstable; urgency=high
+
+ * Fix deficient command line option parsing, optional arguments no
+ longer have to be declared in a specific order, for example before you
+ could not put --arch before --download-only, now you can.
+ * Add --help option and useful help output.
+ * Stop using dirname, basename, and yes, they are being removed from
+ busybox.
+ * Fix many many quoting bugs.
+ * Fix debootstrap man page (Closes: #107404, #109670)
+ * Add ftp support (Closes: #110312)
+ * Don't waste time downloading useless non-free/contrib (Closes: #89673)
+ * Path cleanup (Closes: #97174)
+ * Add pppconfig to woody base (Closes: #111001)
+ * Remove syslinux from base (Closes: #107447)
+ * Eliminate useless warning about creating exim.conf (Closes: #99229)
+ * Don't use "here documents" (they create tmp files in /tmp which could
+ be very well be full on boot-floppies).
+ * Don't use echo -n it is not portable.
+ * Set umask to 022.
+ * All patches from Ethan Benson, I am just the builder!
+ These have been tested with boot-floppies and work properly.
+
+ -- Adam Di Carlo <aph@debian.org> Sat, 22 Sep 2001 12:30:02 -0400
+
+debootstrap (0.1.15.2) unstable; urgency=low
+
+ * quoting required in one place for the new ash (Closes: Bug#106062)
+ * s390 support (Closes: Bug#107262)
+ * remove some packages from Woody's base that aren't needed:
+ - update (not needed with modern kernels, Closes: Bug#106877)
+ - syslinux (Closes: Bug#107477)
+ - ldso (should be pulled in by libc6, Closes: Bug#106102)
+ * kinks in mipsel base worked themselves out (Closes: Bug#106711)
+
+ -- Adam Di Carlo <aph@debian.org> Wed, 8 Aug 2001 12:04:40 -0400
+
+debootstrap (0.1.15.1) unstable; urgency=low
+
+ * add efibootmgr on ia64, as per bug 105980.
+
+ -- Bdale Garbee <bdale@gag.com> Fri, 3 Aug 2001 14:13:23 -0600
+
+debootstrap (0.1.15) unstable; urgency=low
+
+ * Do progress indications (by bytes) for Packages downloads and .deb
+ downloads. (Closes: Bug#101886)
+ * Don't use seq. Silly busybox.
+ * Add pppoe to base. (Closes: Bug#102378)
+ * No point keeping around the "sid.is-broken" file.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Wed, 27 Jun 2001 21:29:29 +1000
+
+debootstrap (0.1.14) unstable; urgency=low
+
+ * Make in_target_nofail kill stderr. No more "/dev/pts: not mounted" error.
+ Yay. :)
+
+ * Refactor woody, potato and slink scripts; do away with
+ woody.debs. Change the way the scripts work. (Now they define
+ functions which debootstrap calls. Much nicer)
+ * Support --download-only option.
+ * Support resuming downloads of Release and Packages files, even gzipped
+ ones.
+ * Support null: (Packages files assumed to be named for a debootstrap.invalid
+ host)
+ * Always use the deboostrap.invalid name, and use that in
+ /etc/apt/sources.list. Remove /etc/apt/sources.list after the base
+ system is build.
+ * All this should be enough to support basedeb.tgz installs on
+ debootstrap's behalf. Some more stuff would be useful, but isn't
+ immediately necessary. (Closes: Bug#102217)
+
+ * Add ia64 support and fix libc6 == libc6.1 problem. (Closes: Bug#101829)
+
+ * Be a little more careful with permissions on devs tarball. Hopefully.
+ (Closes: Bug#102308)
+
+ * Don't worry if md5sum from stdin adds a " -" after the md5sum. Should
+ make debootstrap more usable on non-Debian Linuxes.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Mon, 25 Jun 2001 18:38:35 +1000
+
+debootstrap (0.1.13) unstable; urgency=low
+
+ * Add symlink for sid.debs.
+ * Fix the special casing for hppa. (Closes: Bug#101604)
+ * Remove groff from base. (Closes: Bug#101173)
+ * Retry partially successful downloads a couple of times.
+ (Closes: Bug#101476)
+ * Minor wording changes wrt downloading Release file (Closes: Bug#101705)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Thu, 21 Jun 2001 12:08:10 +1000
+
+debootstrap (0.1.12) unstable; urgency=high
+
+ * Split determination of base into a separate script to enable further
+ innovation! Come on, tell me that doesn't excite you!
+
+ * Add groff-base to base. (Closes: Bug#100112, Bug#100123)
+ * Remove libstdc++2.10 and some other hopefully unnecessary debs
+ (Closes: Bug#99708)
+
+ * Remove lilo.conf special casing. Change some warnings to info messages.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 10 Jun 2001 01:22:12 +1000
+
+debootstrap (0.1.11) unstable; urgency=low
+
+ * Add dhcp-client to base. (Closes: Bug#100083)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sat, 9 Jun 2001 00:11:26 +1000
+
+debootstrap (0.1.10) unstable; urgency=low
+
+ * Don't abort build on devfs systems: the makedev we build-dep on should
+ be recent enough. (Closes: Bug#97713)
+ * Check for malformed release files. Thanks to Martin Michlmayr for the
+ patch. (Closes: Bug#97707)
+ * Use --force-confold when installing base. That is: if you want the
+ conffile from the package to be there at the end, don't create a
+ file in the first place. I'm not convinced this is right.
+ (Closes: Bug#99025)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Mon, 28 May 2001 14:43:07 +1000
+
+debootstrap (0.1.9) unstable; urgency=low
+
+ * Abort build on devfs systems (MAKEDEV fails for no good reason)
+ (Closes: Bug#97713)
+
+ * Add support for mips and mipsel (Closes: Bug#97711)
+ * Add some support for hppa (install palo in base)
+
+ * Don't install ldso (Closes: Bug#97708)
+ * Don't install libopenldap1 or libopenldap-runtime (replaced by libldap2)
+ (Closes: Bug#98050)
+ * Do install libdb3 and libcap1.
+ * Install klogd too. (But only as part of base. Move sysklogd to base too)
+
+ * Setup a dummy lilo.conf on i386 only. (Closes: Bug#97710, Bug#98052)
+
+ * Trim a trailing / for target and url.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 20 May 2001 13:33:34 +1000
+
+debootstrap (0.1.8) unstable; urgency=low
+
+ * Add adduser and base-config into base. base-config unfortunately depends
+ on perl instead of perl-base. (Closes: Bug#96439)
+ * Force LANG=C. Need to work out how i18n should be handled.
+ * Kludge potato install so it's noninteractive. Thanks to Colin Watson
+ for the patch. (Closes: Bug#94441)
+ * Get rid of dh_testversion.
+ * Make a sid script (just a symlink to the woody script).
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Wed, 9 May 2001 20:33:00 +1000
+
+debootstrap (0.1.7) unstable; urgency=low
+
+ * Don't worry if umounting /dev/pts fails.
+ * Add debootstrap(8) manpage, thanks to Matt Kraai. (Closes: Bug#86238)
+ * Add a blank line to the end of the faked /var/lib/dpkg/status. Spotted
+ by Richard Hirst.
+ * Added console-tools and console-data into the base system.
+ * Move /etc/exim.conf to /etc/exim/exim.conf so that sendmail doesn't
+ give errors, even if debconf tries to use it before exim is
+ configured. Gack.
+ * Add fdutils back into base.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Mon, 30 Apr 2001 15:49:27 +1000
+
+debootstrap (0.1.6) unstable; urgency=low
+
+ * Only create stuff in /etc if it hasn't already been created.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Mon, 23 Apr 2001 18:02:55 +1000
+
+debootstrap (0.1.5) unstable; urgency=low
+
+ * Use "head -n X" instead of "head -X" to work with busybox.
+ (Closes: Bug#94575)
+ * Use s///I instead of s///i for case insensitivity, again for busybox.
+ (Closes: Bug#94579)
+ * Fixed typo that would have stopped debootstrap from falling back to an
+ uncompressed Packages file.
+ * Added libsasl7 and libldap2 to woody base, since woody exim now depends
+ on them.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 22 Apr 2001 01:47:00 +1000
+
+debootstrap (0.1.4) unstable; urgency=low
+
+ * If we've got a Release file, check that the Packages files we download
+ have the right md5sums.
+ * Build-Depend on new makedev, and don't hax0r powerpc devices as much.
+ (Closes: Bug#93836)
+ * Hopefully support arm chroots. (Closes: Bug#92592) Declare it to be
+ Arch: any, and see what dies. There's a chance that nothing will. Not
+ a *big* chance, but a chance.
+ * Fiddled with the base system some more. Added apt-utils so
+ preconfiguration will work.
+ * Added permission to NMU to the README.Debian.
+ * Mention file:/ URLs in README.Debian. (Closes: Bug#87099)
+ * Add a --boot-floppies option that changes the way the I/O happens, in
+ a way that's hopefully useful for boot-floppies. See README.Debian for
+ details.
+ * Also added a bit more output.
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Mon, 26 Mar 2001 22:30:12 +1000
+
+debootstrap (0.1.3) unstable; urgency=high
+
+ * Switch from debconf-tiny to debconf, since that's what's now in
+ woody. (Using debconf-tiny probably makes the package unusable, hence
+ the urgency) Fixup perl, lilo and console-apt to cope with changes in
+ the base system in woody. Added ae, left nano and nvi.
+ * Add support for m68k, sparc and powerpc, based on Christian Steigies
+ patches and Adam Di Carlo's NMU (Closes: Bug#89883, Bug#91221)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 25 Mar 2001 14:29:02 +1000
+
+debootstrap (0.1.2) unstable; urgency=low
+
+ * Add support for slink.
+ * Fix support for woody (no lilo, console-*, different perl)
+ * Re-download Packages files every time (Closes: Bug#88438)
+ (Should this be changed to re-download things where the md5 doesn't match?)
+
+ -- Anthony Towns <aj@azure.humbug.org.au> Sun, 4 Mar 2001 19:42:29 +1000
+
+debootstrap (0.1.1) unstable; urgency=low
+
+ * Initial Release. (Closes: Bug#82245)
+
+ * Called it debootstrap instead of debchroot, because it's more about
+ bootstrapping a Debian environment, whether that will end up being
+ in a chroot, or as a standalone system. Blame Adam di Carlo. :)
+
+ -- Anthony Towns <ajt@debian.org> Tue, 30 Jan 2001 10:54:45 +1000
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d89e2ca
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: debootstrap
+Section: admin
+Maintainer: Anthony Towns <ajt@debian.org>
+Uploaders: J.H.M. Dassen (Ray) <jdassen@debian.org>
+Build-Depends: debhelper (>= 4.2), makedev (>= 2.3.1-69)
+Standards-Version: 3.6.2
+
+Package: debootstrap
+Priority: extra
+Architecture: all
+Depends: wget, binutils
+Description: Bootstrap a basic Debian system
+ debootstrap is used to create a Debian base system from scratch,
+ without requiring the availability of dpkg or apt. It does this by
+ downloading .deb files from a mirror site, and carefully unpacking them
+ into a directory which can eventually be chrooted into.
+
+Package: debootstrap-udeb
+Priority: required
+Section: debian-installer
+XC-Package-Type: udeb
+Architecture: any
+Depends: ${shlibs:Depends}, mounted-partitions
+Description: Bootstrap the Debian system
+ debootstrap is used to create a Debian base system from scratch,
+ without requiring the availability of dpkg or apt. It does this by
+ downloading .deb files from a mirror site, and carefully unpacking them
+ into a directory which can eventually be chrooted into.
+ .
+ debootstrap-udeb is a minimal package used by debian-installer.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..d382175
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+This package was debianized by Anthony Towns <ajt@debian.org> on
+Tue, 30 Jan 2001 10:54:45 +1000.
+
+It was written from scratch for Debian by Anthony Towns <ajt@debian.org>
+based loosely on the code for constructing base tarballs as part of the
+boot-floppies package.
+
+The upstream site is http://code.erisian.com.au/Wiki/debootstrap .
+
+Copyright:
+
+Copyright (c) 2001-2005 Anthony Towns
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/debian/debootstrap-udeb.dirs b/debian/debootstrap-udeb.dirs
new file mode 100644
index 0000000..bf290a7
--- /dev/null
+++ b/debian/debootstrap-udeb.dirs
@@ -0,0 +1,2 @@
+usr/lib/debootstrap/scripts
+usr/share/man/man8
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..b174b44
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/sbin
+usr/share/man/man8
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..19cb8e7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+configure:
+ dh_testdir
+
+clean:
+ dh_testdir
+
+ -$(MAKE) clean
+
+ dh_clean
+
+build: configure
+# need to be root to make devices, so build is done in install target
+
+real-build: build
+ dh_testdir
+ dh_testroot
+
+ $(MAKE) all
+
+install: real-build
+ dh_testdir
+ dh_testroot
+
+ dh_clean -k
+ dh_installdirs
+
+# install the package into debian/debootstrap
+ $(MAKE) install-allarch DESTDIR=$(CURDIR)/debian/debootstrap
+ $(MAKE) install-arch DESTDIR=$(CURDIR)/debian/debootstrap-udeb
+
+binary-indep: install
+# We have nothing to do by default.
+
+ARCHES="i386"
+SUITE="testing"
+VERSION=$(SUITE)
+MIRROR="http://ftp.debian.org/debian"
+
+binary-basedebs:
+ dh_testdir
+ dh_testroot
+
+ $(MAKE) pkgdetails
+
+ ln -s . scripts
+ for a in $(ARCHES); do \
+ rm -rf chroot-dir; \
+ mkdir -p chroot-dir; \
+ DEBOOTSTRAP_DIR=. ./debootstrap --arch $$a --download-only $(SUITE) chroot-dir $(MIRROR); \
+ (cd chroot-dir && tar cf ../../basedebs_$(VERSION)_$$a.tar *); \
+ rm -rf chroot-dir; \
+ done
+ rm -f scripts
+
+binary-indep: install
+ dh_testdir
+ dh_testroot
+ dh_installdocs -i
+ dh_installman -i debootstrap.8
+ dh_installchangelogs -i
+ dh_link -i
+ dh_compress -i
+ dh_fixperms -i
+ dh_installdeb -i
+ dh_shlibdeps -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary-arch: install
+ dh_testdir
+ dh_testroot
+ -rm -rf debian/debootstrap-udeb/usr/share \
+ debian/debootstrap-udeb/usr/lib/debootstrap/scripts/potato \
+ debian/debootstrap-udeb/usr/lib/debootstrap/scripts/*.buildd \
+ debian/debootstrap-udeb/usr/lib/debootstrap/scripts/*.fakechroot
+ dh_strip -s
+ dh_compress -s
+ dh_fixperms -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s
+ dh_builddeb -s
+
+binary: binary-indep binary-arch
+.PHONY: build real-build clean binary-indep binary-arch binary install configure binary-basedebs
diff --git a/debootstrap b/debootstrap
new file mode 100644
index 0000000..2156d31
--- /dev/null
+++ b/debootstrap
@@ -0,0 +1,491 @@
+#!/bin/sh -e
+
+unset TMP TEMP TMPDIR || true
+
+###########################################################################
+
+if [ "$DEBOOTSTRAP_DIR" = "" ]; then
+ if [ -x /debootstrap/debootstrap ]; then
+ DEBOOTSTRAP_DIR=/debootstrap
+ else
+ DEBOOTSTRAP_DIR=/usr/lib/debootstrap
+ fi
+fi
+
+if [ -x "/usr/bin/gettext" ]; then
+ USE_GETTEXT_INTERACTION=yes
+fi
+
+DEVICES_TARGZ=$DEBOOTSTRAP_DIR/devices.tar.gz
+
+. $DEBOOTSTRAP_DIR/functions
+exec 4>&1
+
+GETTEXT_LANG=$LANG
+LANG=C
+USE_COMPONENTS=main
+KEYRING=""
+VARIANT=""
+
+DEF_MIRROR="http://ftp.debian.org/debian"
+
+export LANG USE_COMPONENTS
+umask 022
+
+###########################################################################
+
+## phases:
+## finddebs dldebs printdebs first_stage second_stage
+
+RESOLVE_DEPS=true
+
+WHAT_TO_DO="finddebs dldebs first_stage second_stage"
+am_doing_phase () {
+ # usage: if am_doing_phase finddebs; then ...; fi
+ local x;
+ for x in "$@"; do
+ if echo " $WHAT_TO_DO " | grep -q " $1 "; then return 0; fi
+ done
+ return 1
+}
+
+###########################################################################
+
+usage_err()
+{
+ info USAGE1 "usage: [OPTION]... <suite> <target> [<mirror> [<script>]]"
+ info USAGE2 "Try \`${0##*/} --help' for more information."
+ error "$@"
+}
+
+usage()
+{
+ echo "Usage: ${0##*/} [OPTION]... <suite> <target> [<mirror> [<script>]]"
+ echo "Bootstrap Debian base system."
+ echo
+ cat <<EOF
+ --help display this help and exit
+ --verbose don't turn off the output of wget
+
+ --download-only download packages, but don't perform installation
+ --print-debs print the packages to be installed, and exit
+
+ --arch A set the target architecture (use if no dpkg)
+ [ --arch powerpc ]
+
+ --include=A,B,C adds specified names to the list of base packages
+ --exclude=A,B,C removes specified packages from the list
+ --components=A,B,C use packages from the listed components of the
+ archive
+ --variant=X use variant X of the bootstrap scripts
+ (currently supported variants: buildd, fakechroot)
+ --keyring=K check Release files against keyring K
+ --no-resolve-deps don't try to resolve dependencies automatically
+
+ --unpack-tarball T acquire .debs from a tarball instead of http
+ --make-tarball T download .debs and create a tarball (tgz format)
+
+ --boot-floppies used for internal purposes by boot-floppies
+ --debian-installer used for internal purposes by debian-installer
+EOF
+}
+
+###########################################################################
+
+if [ "$PKGDETAILS" = "" ]; then
+ error 1 NO_PKGDETAILS "No pkgdetails available; either install perl, or build pkgdetails.c from source"
+fi
+
+###########################################################################
+
+if [ $# != 0 ] ; then
+ while true ; do
+ case "$1" in
+ --help)
+ usage
+ exit 0
+ ;;
+ --boot-floppies)
+ if [ -n "$USE_DEBIANINSTALLER_INTERACTION" ] ; then
+ error 1 ARG_BFDI "Can only use one of --boot-floppies and --debian-installer"
+ fi
+ if ! (echo -n "" >&3) 2>/dev/null; then
+ error 1 ARG_BFBYHAND "If running debootstrap by hand, don't use --boot-floppies"
+ fi
+ USE_BOOTFLOPPIES_INTERACTION=yes
+ unset USE_GETTEXT_INTERACTION
+ shift
+ ;;
+ --debian-installer)
+ if [ -n "$USE_BOOTFLOPPIES_INTERACTION" ] ; then
+ error 1 ARG_BFDI "Can only use one of --boot-floppies and --debian-installer"
+ fi
+ if ! (echo -n "" >&3) 2>/dev/null; then
+ error 1 ARG_DIBYHAND "If running debootstrap by hand, don't use --debian-installer"
+ fi
+ USE_DEBIANINSTALLER_INTERACTION=yes
+ shift
+ ;;
+ --foreign)
+ WHAT_TO_DO="finddebs dldebs first_stage"
+ shift
+ ;;
+ --second-stage)
+ WHAT_TO_DO="finddebs second_stage"
+ SECOND_STAGE_ONLY=true
+ shift
+ ;;
+ --print-debs)
+ WHAT_TO_DO="finddebs printdebs kill_target"
+ shift
+ ;;
+ --download-only)
+ WHAT_TO_DO="finddebs dldebs"
+ shift
+ ;;
+ --make-tarball)
+ WHAT_TO_DO="finddebs dldebs maketarball kill_target"
+ if [ -n "$2" ] ; then
+ MAKE_TARBALL="$2"
+ shift 2
+ else
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ ;;
+ --resolve-deps)
+ # redundant, but avoids breaking compatability
+ RESOLVE_DEPS=true
+ shift
+ ;;
+ --no-resolve-deps)
+ RESOLVE_DEPS=false
+ shift
+ ;;
+ --keep-debootstrap-dir)
+ KEEP_DEBOOTSTRAP_DIR=true
+ shift
+ ;;
+ --arch)
+ if [ -n "$2" ] ; then
+ ARCH="$2"
+ shift 2
+ else
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ ;;
+ --unpack-tarball)
+ if [ -n "$2" ] ; then
+ if [ ! -f "$2" ] ; then
+ error 1 NOTARBALL "%s: No such file or directory" "$2"
+ fi
+ UNPACK_TARBALL="$2"
+ shift 2
+ else
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ ;;
+ --include*)
+ additional="$(echo $1 | cut -f2 -d"="|tr , " ")"
+ shift 1
+ ;;
+ --exclude*)
+ exclude="$(echo $1 | cut -f2 -d"="|tr , " ")"
+ shift 1
+ ;;
+ --verbose)
+ verbose=true
+ export verbose
+ shift 1
+ ;;
+ --components*)
+ USE_COMPONENTS="$(echo "$1" | cut -f2 -d"="|tr , "|")"
+ if [ "$USE_COMPONENTS" = "" ]; then
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ export USE_COMPONENTS
+ shift 1
+ ;;
+ --variant*)
+ VARIANT="$(echo "$1" | cut -f2 -d"=")"
+ shift 1
+ ;;
+ --keyring*)
+ if ! gpgv --version >/dev/null 2>&1; then
+ error 1 NEEDGPGV "gpgv not installed, but required for Release verification"
+ fi
+ KEYRING="$(echo "$1" | cut -f2 -d"=")"
+ if [ "$KEYRING" = "" ]; then
+ error 1 NEEDARG "option requires an argument %s" "$1"
+ fi
+ shift 1
+ ;;
+ *)
+ break
+ ;;
+ esac
+ done
+fi
+
+###########################################################################
+
+if [ "$SECOND_STAGE_ONLY" = "true" ]; then
+ SUITE=$(cat $DEBOOTSTRAP_DIR/suite)
+ ARCH=$(cat $DEBOOTSTRAP_DIR/arch)
+ if [ -e $DEBOOTSTRAP_DIR/variant ]; then
+ VARIANT=$(cat $DEBOOTSTRAP_DIR/variant)
+ SUPPORTED_VARIANTS="$VARIANT"
+ fi
+ TARGET=/
+ MIRRORS=null:
+ SCRIPT=$DEBOOTSTRAP_DIR/suite-script
+else
+ if [ "$1" = "" -o "$2" = "" ]; then
+ usage_err 1 NEEDSUITETARGET "You must specify a suite and a target."
+ fi
+ SUITE="$1"
+ TARGET="$2"
+ TARGET="${TARGET%/}"
+ if [ "${TARGET#/}" = "${TARGET}" ]; then
+ if [ "${TARGET%/*}" = "$TARGET" ] ; then
+ TARGET="$(echo `pwd`/$TARGET)"
+ else
+ TARGET="$(cd ${TARGET%/*}; echo `pwd`/${TARGET##*/})"
+ fi
+ fi
+
+ MIRRORS="$DEF_MIRROR"
+ SCRIPT="$DEBOOTSTRAP_DIR/scripts/$1"
+ if [ -n "$VARIANT" -a -e "${SCRIPT}.${VARIANT}" ]; then
+ SCRIPT="${SCRIPT}.${VARIANT}"
+ SUPPORTED_VARIANTS="$VARIANT"
+ fi
+ if [ "$3" != "" ]; then
+ MIRRORS="$3"
+ MIRRORS="${MIRRORS%/}"
+ if [ "$4" != "" ]; then
+ SCRIPT="$4"
+ fi
+ fi
+fi
+
+###########################################################################
+
+if [ "$ARCH" != "" ]; then
+ true
+elif [ -x /usr/bin/dpkg ] && /usr/bin/dpkg --print-installation-architecture >/dev/null 2>&1
+then
+ ARCH=`/usr/bin/dpkg --print-installation-architecture`
+elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
+ ARCH=`cat $DEBOOTSTRAP_DIR/arch`
+else
+ error 1 WHATARCH "Couldn't work out current architecture"
+fi
+
+export MIRRORS ARCH SUITE TARGET
+
+if am_doing_phase first_stage second_stage; then
+ if [ -x /usr/bin/id ] && [ `id -u` -ne 0 ]; then
+ error 1 NEEDROOT "debootstrap can only run as root"
+ fi
+fi
+
+if [ ! -e "$SCRIPT" ]; then
+ error 1 NOSCRIPT "No such script: %s" "$SCRIPT"
+fi
+
+###########################################################################
+
+if [ "$TARGET" != "" ]; then
+ mkdir -p "$TARGET/debootstrap"
+fi
+
+###########################################################################
+
+# Use of fd's by functions/scripts:
+#
+# stdin/stdout/stderr: used normally
+# fd 4: I:/W:/etc information
+# fd 5,6: spare for functions
+# fd 7,8: spare for scripts
+
+if [ "$USE_DEBIANINSTALLER_INTERACTION" = yes ]; then
+ # stdout=stderr: full log of debootstrap run
+ # fd 3: I:/W:/etc information
+ exec 4>&3
+elif [ "$USE_BOOTFLOPPIES_INTERACTION" = yes ]; then
+ # stdout=stderr: full log of debootstrap run
+ # fd 3: I:/W:/etc information
+ exec 4>&3
+elif am_doing_phase printdebs; then
+ # stderr: I:/W:/etc information
+ # stdout: debs needed
+ exec 4>&2
+else
+ # stderr: used in exceptional circumstances only
+ # stdout: I:/W:/etc information
+ # $TARGET/debootstrap/debootstrap.log: full log of debootstrap run
+ exec 4>&1
+ exec >>$TARGET/debootstrap/debootstrap.log
+ exec 2>&1
+fi
+
+###########################################################################
+
+if [ "$UNPACK_TARBALL" ]; then
+ if [ "${UNPACK_TARBALL#/}" = "$UNPACK_TARBALL" ]; then
+ error 1 TARPATH "Tarball must be given a complete path"
+ fi
+ if [ "${UNPACK_TARBALL%.tar}" != "$UNPACK_TARBALL" ]; then
+ (cd "$TARGET" && tar -xf "$UNPACK_TARBALL")
+ elif [ "${UNPACK_TARBALL%.tgz}" != "$UNPACK_TARBALL" ]; then
+ (cd "$TARGET" && zcat "$UNPACK_TARBALL" | tar -xf -)
+ else
+ error 1 NOTTAR "Unknown tarball: must be either .tar or .tgz"
+ fi
+fi
+
+###########################################################################
+
+. "$SCRIPT"
+
+ok=false
+for v in $SUPPORTED_VARIANTS; do
+ if doing_variant $v; then ok=true; fi
+done
+if ! $ok; then
+ error 1 UNSUPPVARIANT "unsupported variant"
+fi
+
+###########################################################################
+
+if am_doing_phase finddebs; then
+ if [ "$FINDDEBS_NEEDS_INDICES" = "true" -o "$RESOLVE_DEPS" = "true" ]; then
+ download_indices
+ GOT_INDICES=true
+ fi
+
+ work_out_debs
+
+ base=$(without "$base $additional" "$exclude")
+
+ if [ "$RESOLVE_DEPS" = true ]; then
+ requiredX=$(echo $(echo $required | tr ' ' '\n' | sort | uniq))
+ baseX=$(echo $(echo $base | tr ' ' '\n' | sort | uniq))
+
+ baseN=$(without "$baseX" "$requiredX")
+ baseU=$(without "$baseX" "$baseN")
+
+ if [ "$baseU" != "" ]; then
+ info REDUNDANTBASE "Found packages in base already in required: %s" "$baseU"
+ sleep 5
+ fi
+
+ info RESOLVEREQ "Resolving dependencies of required packages..."
+ required=$(resolve_deps $requiredX)
+ info RESOLVEBASE "Resolving dependencies of base packages..."
+ base=$(resolve_deps $baseX)
+ base=$(without "$base" "$required")
+
+ requiredX=$(without "$required" "$requiredX")
+ baseX=$(without "$base" "$baseX")
+ if [ "$requiredX" != "" ]; then
+ info NEWREQUIRED "Found additional required dependencies: %s" "$requiredX"
+ sleep 5
+ fi
+ if [ "$baseX" != "" ]; then
+ info NEWBASE "Found additional base dependencies: %s" "$baseX"
+ sleep 5
+ fi
+ fi
+
+ all_debs="$required $base"
+fi
+
+if am_doing_phase printdebs; then
+ echo "$all_debs"
+fi
+
+if am_doing_phase dldebs; then
+ if [ "$GOT_INDICES" != "true" ]; then
+ download_indices
+ fi
+ download $all_debs
+fi
+
+if am_doing_phase maketarball; then
+ (cd $TARGET;
+ tar czf - var/lib/apt var/cache/apt) >$MAKE_TARBALL
+fi
+
+if am_doing_phase first_stage; then
+ # first stage sets up the chroot -- no calls should be made to
+ # "chroot $TARGET" here; but they should be possible by the time it's
+ # finished
+ first_stage_install
+
+ if ! am_doing_phase second_stage; then
+ cp "$0" $TARGET/debootstrap/debootstrap
+ cp $DEBOOTSTRAP_DIR/functions $TARGET/debootstrap/functions
+ cp $SCRIPT $TARGET/debootstrap/suite-script
+ echo "$ARCH" >$TARGET/debootstrap/arch
+ echo "$SUITE" >$TARGET/debootstrap/suite
+ [ "" = "$VARIANT" ] ||
+ echo "$VARIANT" >$TARGET/debootstrap/variant
+ echo "$required" >$TARGET/debootstrap/required
+ echo "$base" >$TARGET/debootstrap/base
+
+ chmod 755 $TARGET/debootstrap/debootstrap
+ fi
+fi
+
+if am_doing_phase second_stage; then
+ if [ "$SECOND_STAGE_ONLY" = true ]; then
+ required="$(cat $DEBOOTSTRAP_DIR/required)"
+ base="$(cat $DEBOOTSTRAP_DIR/base)"
+ all_debs="$required $base"
+ fi
+
+ # second stage uses the chroot to clean itself up -- has to be able to
+ # work from entirely within the chroot (in case we've booted into it,
+ # possibly over NFS eg)
+
+ second_stage_install
+
+ # create sources.list
+ # first, kill debootstrap.invalid sources.list
+ if [ -e "$TARGET/etc/apt/sources.list" ]; then
+ rm -f "$TARGET/etc/apt/sources.list"
+ fi
+ if [ "${MIRRORS#http://}" != "$MIRRORS" ]; then
+ setup_apt_sources ${MIRRORS%% *}
+ mv_invalid_to ${MIRRORS%% *}
+ else
+ setup_apt_sources $DEF_MIRROR
+ mv_invalid_to $DEF_MIRROR
+ fi
+
+ if [ -e $TARGET/debootstrap/debootstrap.log ]; then
+ cp $TARGET/debootstrap/debootstrap.log $TARGET/var/log/bootstrap.log
+ fi
+ sync
+
+ if [ "$KEEP_DEBOOTSTRAP_DIR" = true ]; then
+ if [ -x $TARGET/debootstrap/debootstrap ]; then
+ chmod 644 "$TARGET/debootstrap/debootstrap"
+ fi
+ else
+ rm -rf "$TARGET/debootstrap"
+ fi
+fi
+
+if am_doing_phase kill_target; then
+ if [ "$KEEP_DEBOOTSTRAP_DIR" != true ]; then
+ info KILLTARGET "Deleting target directory"
+ rm -rf "$TARGET"
+ fi
+fi
+
+if [ -n "$USE_BOOTFLOPPIES_INTERACTION" ] ; then
+ echo "I: debootstrap: Successfully completed" # goes to /dev/tty4
+ sleep 1 || true # give the user a second to see the success notice.
+fi
diff --git a/debootstrap.8 b/debootstrap.8
new file mode 100644
index 0000000..b0a0729
--- /dev/null
+++ b/debootstrap.8
@@ -0,0 +1,133 @@
+.TH DEBOOTSTRAP 8 2001-04-27 "Debian Project" "Debian GNU/Linux manual"
+.SH NAME
+debootstrap \- Bootstrap a basic Debian system
+.SH SYNOPSIS
+.B debootstrap
+.RB [ OPTION\&.\&.\&. ]
+.I SUITE TARGET
+.RI [ MIRROR
+.RI [ SCRIPT ]]
+
+.B debootstrap
+.RB [ OPTION\&.\&.\&. ]
+.R --second-stage
+.SH DESCRIPTION
+.B debootstrap
+bootstraps a basic Debian system of
+.I SUITE
+(eg, sarge, etch, lenny, sid) into
+.I TARGET
+from
+.I MIRROR
+by running
+.IR SCRIPT .
+.I MIRROR
+can be an http:// URL or a file:/// URL. Notice that file:/ URLs are
+translated to file:/// (correct scheme as described in RFC1738 for local filenames),
+and file:// will \fBnot\fR work.
+.PP
+\fBDebootstrap\fR can be used to install Debian in a system without using an
+installation disk but can also be used to run a different Debian flavor in a \fBchroot\fR
+environment. This way you can create a full (minimal) Debian installation which
+can be used for testing purposes (see the \fBEXAMPLES\fR section).
+If you are looking for a chroot system to build packages please take a look at
+\fBpbuilder\fR.
+.SH "OPTIONS"
+.PP
+.IP "\fB\-\-arch ARCH\fP"
+Set the target architecture (use if dpkg isn't installed). See also \-\-foreign.
+.IP
+.IP "\fB\-\-include=alpha,beta\fP"
+Comma separated list of packages which will be added to download and extract
+lists. Don't forget to resolve the dependencies manually, otherwise the
+installation may fail.
+.IP
+.IP "\fB\-\-exclude=alpha,beta\fP"
+Comma separated list of packages which will be removed from download and
+extract lists. WARNING: you can and probably will exclude essential packages, be
+careful using this option.
+.IP
+.IP "\fB\-\-no\-resolve\-deps\fP"
+By default, debootstrap will attempt to automatically resolve any missing
+dependencies, warning if any are found. Note that this is not a complete
+dependency resolve in the sense of dpkg or apt, and that it is far better
+to specify the entire base system than rely on this option. With this
+option set, this behaviour is disabled.
+.IP
+.IP "\fB\-\-variant=buildd|fakechroot\fP"
+Name of the bootstrap script variant to use. Currently, the variant
+supported are buildd, which installs the build-essential packages into
+.IR TARGET
+and fakechroot, which installs the packages without root privileges.
+The default, with no \fB\-\-variant=X\fP argument, is to create a base
+Debian installation in
+.IR TARGET .
+.IP
+.IP "\fB\-\-verbose\fP"
+Produce more info about downloading.
+.IP
+.IP "\fB\-\-print\-debs\fP"
+Print the packages to be installed, and exit. Note that a TARGET directory
+must be specified so debootstrap can download Packages files to determine
+which packages should be installed, and to resolve dependencies. The TARGET
+directory will be deleted unless \-\-keep\-debootstrap\-dir is specified.
+.IP
+.IP "\fB\-\-download\-only\fP"
+Download packages, but don't perform installation
+.IP
+.IP "\fB\-\-foreign\fP"
+Do the initial unpack phase of bootstrapping only, for example if the
+target architecture does not match the host architecture. A copy of
+debootstrap sufficient for completing the bootstrap process will be
+installed as /deboostrap/debootstrap in the target filesystem.
+.IP
+.IP "\fB\-\-second\-stage\fP"
+Complete the bootstrapping process. Other arguments are generally not
+needed.
+.IP
+.IP "\fB\-\-keep\-debootstrap\-dir\fP"
+Don't delete the /debootstrap directory in the target after completing the
+installation.
+.IP
+.IP "\fB\-\-unpack\-tarball FILE\fP"
+Acquire .debs from tarball FILE instead of downloading via http
+.IP
+.IP "\fB\-\-boot\-floppies\fP"
+Used for internal purposes by boot-floppies
+.IP
+.IP "\fB\-\-debian\-installer\fP"
+Used for internal purposes by the debian-installer
+.IP
+.SH "EXAMPLE"
+.
+.PP
+To setup a \fIsarge\fR system:
+.PP
+# debootstrap sarge ./sarge-chroot http://ftp.debian.org/debian
+.PP
+# debootstrap sarge ./sarge-chroot file:///PATH_TO_LOCAL_MIRROR/debian
+.PP
+Full process to create a complete Debian installation of \fIsid\fR (unstable):
+.PP
+ main # cd / ; mkdir /sid-root
+ main # debootstrap sid /sid-root http://ftp.debian.org/debian/
+ [ ... watch it download the whole system ]
+ main # echo "proc /sid-root/proc proc none 0 0" >> /etc/fstab
+ main # mount proc /sid-root/proc -t proc
+ main # cp /etc/hosts /sid-root/etc/hosts
+ main # chroot /sid-root /bin/bash
+ chroot # dselect
+ [ you may use aptitude, install mc and vim ... ]
+ main # echo "8:23:respawn:/usr/sbin/chroot /sid-root " \\
+ "/sbin/getty 38400 tty8" >> /etc/inittab
+ [ define a login tty that will use this system ]
+ main # init q
+ [ reload init ]
+.PP
+Note that you will generally need a recent version of debootstrap to
+do this; the version currently in stable will generally have stopped
+working due to changes to unstable shortly after the last release.
+.SH AUTHOR
+.B debootstrap
+was written by Anthony Towns <ajt@debian.org>.
+This manpage was written by Matt Kraai <kraai@debian.org>.
diff --git a/functions b/functions
new file mode 100644
index 0000000..fc346d2
--- /dev/null
+++ b/functions
@@ -0,0 +1,1174 @@
+
+############################################################### smallutils
+
+smallyes() {
+ YES="${1-y}"
+ while echo "$YES" ; do : ; done
+}
+
+############################################################### interaction
+
+error () {
+ # <error code> <name> <string> <args>
+ local err="$1"
+ local name="$2"
+ local fmt="$3"
+ shift; shift; shift
+ if [ "$USE_DEBIANINSTALLER_INTERACTION" ]; then
+ (echo "E: $name"
+ for x in "$@"; do echo "EA: $x"; done
+ echo "EF: $fmt") >&4
+ elif [ "$USE_GETTEXT_INTERACTION" ]; then
+ (printf "E: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@") >&4
+ else
+ (printf "E: $fmt\n" "$@") >&4
+ fi
+ exit $err
+}
+
+warning () {
+ # <name> <string> <args>
+ local name="$1"
+ local fmt="$2"
+ shift; shift
+ if [ "$USE_DEBIANINSTALLER_INTERACTION" ]; then
+ (echo "W: $name"
+ for x in "$@"; do echo "WA: $x"; done
+ echo "WF: $fmt") >&4
+ elif [ "$USE_GETTEXT_INTERACTION" ]; then
+ printf "W: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@" >&4
+ else
+ printf "W: $fmt\n" "$@" >&4
+ fi
+}
+
+info () {
+ # <name> <string> <args>
+ local name="$1"
+ local fmt="$2"
+ shift; shift
+ if [ "$USE_DEBIANINSTALLER_INTERACTION" ]; then
+ (echo "I: $name"
+ for x in "$@"; do echo "IA: $x"; done
+ echo "IF: $fmt") >&4
+ elif [ "$USE_GETTEXT_INTERACTION" ]; then
+ printf "I: `LANG=$GETTEXT_LANG gettext debootstrap "$fmt"`\n" "$@" >&4
+ else
+ printf "I: $fmt\n" "$@" >&4
+ fi
+}
+
+PROGRESS_NOW=0
+PROGRESS_END=0
+PROGRESS_NEXT=""
+PROGRESS_WHAT=""
+
+progress_next () {
+ PROGRESS_NEXT="$1"
+}
+
+wgetprogress () {
+ [ ! "$verbose" ] && QSWITCH="-q"
+ local ret=0
+ if [ "$USE_DEBIANINSTALLER_INTERACTION" -a "$PROGRESS_NEXT" ]; then
+ wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END >&3
+ ret=$?
+ elif [ "$USE_BOOTFLOPPIES_INTERACTION" -a "$PROGRESS_NEXT" ]; then
+ wget "$@" 2>&1 >/dev/null | $PKGDETAILS "WGET%" $PROGRESS_NOW $PROGRESS_NEXT $PROGRESS_END "$PROGRESS_WHAT" >&3
+ ret=$?
+ else
+ wget $QSWITCH "$@"
+ ret=$?
+ fi
+ return $ret
+}
+
+progress () {
+ # <now> <end> <name> <string> <args>
+ local now="$1"
+ local end="$2"
+ local name="$3"
+ local fmt="$4"
+ shift; shift; shift; shift
+ if [ "$USE_DEBIANINSTALLER_INTERACTION" ]; then
+ PROGRESS_NOW="$now"
+ PROGRESS_END="$end"
+ PROGRESS_NEXT=""
+ (echo "P: $now $end $name"
+ for x in "$@"; do echo "PA: $x"; done
+ echo "PF: $fmt") >&3
+ elif [ "$USE_BOOTFLOPPIES_INTERACTION" ]; then
+ PROGRESS_NOW="$now"
+ PROGRESS_END="$end"
+ PROGRESS_WHAT="`printf "$fmt" "$@"`"
+ PROGRESS_NEXT=""
+ printf "P: %s %s %s\n" $now $end "$PROGRESS_WHAT" >&3
+ fi
+}
+
+dpkg_progress () {
+ # <now> <end> <name> <desc> UNPACKING|CONFIGURING
+ local now="$1"
+ local end="$2"
+ local name="$3"
+ local desc="$4"
+ local action="$5"
+ local expect=
+
+ if [ "$action" = UNPACKING ]; then
+ expect=half-installed
+ elif [ "$action" = CONFIGURING ]; then
+ expect=half-configured
+ fi
+
+ dp () {
+ now="$(($now + ${1:-1}))"
+ }
+
+ exitcode=0
+ while read status pkg qstate; do
+ if [ "$status" = "EXITCODE" ]; then
+ exitcode="$pkg"
+ continue
+ fi
+ [ "$qstate" = "$expect" ] || continue
+ case $qstate in
+ half-installed)
+ dp; progress "$now" "$end" "$name" "$desc"
+ info "$action" "Unpacking %s..." "${pkg%:}"
+ expect=unpacked
+ ;;
+ unpacked)
+ expect=half-installed
+ ;;
+ half-configured)
+ dp; progress "$now" "$end" "$name" "$desc"
+ info "$action" "Configuring %s..." "${pkg%:}"
+ expect=installed
+ ;;
+ installed)
+ expect=half-configured
+ ;;
+ esac
+ done
+ return $exitcode
+}
+
+############################################################# set variables
+
+FINDDEBS_NEEDS_INDICES=false
+finddebs_style () {
+ case "$1" in
+ "hardcoded")
+ ;;
+ "from-indices")
+ FINDDEBS_NEEDS_INDICES=true
+ ;;
+ *)
+ error 1 BADFINDDEBS "unknown finddebs style"
+ ;;
+ esac
+}
+
+mk_download_dirs () {
+ if [ $DLDEST = "apt_dest" ]; then
+ mkdir -p $TARGET/$APTSTATE/lists/partial
+ mkdir -p $TARGET/var/cache/apt/archives/partial
+ fi
+}
+
+download_style () {
+ case "$1" in
+ "apt")
+ if [ "$2" = "var-state" ]; then
+ APTSTATE=var/state/apt
+ else
+ APTSTATE=var/lib/apt
+ fi
+ DLDEST=apt_dest
+ export APTSTATE DLDEST DEBFOR
+ ;;
+ *)
+ error 1 BADDLOAD "unknown download style"
+ ;;
+ esac
+}
+
+########################################################## variant handling
+
+doing_variant () {
+ if [ "$1" = "$VARIANT" ]; then return 0; fi
+ if [ "$1" = "-" -a "$VARIANT" = "" ]; then return 0; fi
+ return 1
+}
+
+SUPPORTED_VARIANTS="-"
+variants () {
+ SUPPORTED_VARIANTS="$*"
+ for v in $*; do
+ if doing_variant "$v"; then return 0; fi
+ done
+ error 1 UNSUPPVARIANT "unsupported variant"
+}
+
+################################################# work out names for things
+
+mirror_style () {
+ case "$1" in
+ "release")
+ DOWNLOAD_INDICES=download_release_indices
+ DOWNLOAD_DEBS=download_release
+ ;;
+ "main")
+ DOWNLOAD_INDICES=download_main_indices
+ DOWNLOAD_DEBS=download_main
+ ;;
+ *)
+ error 1 BADMIRROR "unknown mirror style"
+ ;;
+ esac
+ export DOWNLOAD_INDICES
+ export DOWNLOAD_DEBS
+}
+
+check_md5 () {
+ # args: dest md5 size
+ local expmd5="$2"
+ local expsize="$3"
+ relmd5=`md5sum < "$1" | sed 's/ .*$//'`
+ relsize=`wc -c < "$1"`
+ if [ "$expsize" -ne "$relsize" -o "$expmd5" != "$relmd5" ]; then
+ return 1
+ fi
+ return 0
+}
+
+get () {
+ # args: from dest [md5sum size] [alt {md5sum size type}]
+ local displayname
+ if [ "${2%.deb}" != "$2" ]; then
+ displayname="$(echo "$2" | sed 's,^.*/,,;s,_.*$,,')"
+ else
+ displayname="$(echo "$1" | sed 's,^.*/,,')"
+ fi
+
+ if [ -e "$2" ]; then
+ if [ "$3" = "" ]; then
+ return 0
+ fi
+ info VALIDATING "Validating %s" "$displayname"
+ if check_md5 $2 $3 $4; then
+ return 0
+ else
+ rm -f "$2"
+ fi
+ fi
+ if [ "$#" -gt 5 ]; then
+ local st=3
+ if [ "$5" = "-" ]; then st=6; fi
+ local order="$(a=$st; while [ "$a" -le $# ]; do eval echo \"\${$(($a+1))}\" $a;
+ a=$(($a + 3)); done | sort -n | sed 's/.* //')"
+ else
+ local order=3
+ fi
+ for a in $order; do
+ local md5="$(eval echo \${$a})"
+ local siz="$(eval echo \${$(( $a+1 ))})"
+ local typ="$(eval echo \${$(( $a+2 ))})"
+ local from
+ local dest
+
+ case "$typ" in
+ "bz2") from="$1.bz2"; dest="$2.bz2" ;;
+ "gz") from="$1.gz"; dest="$2.gz" ;;
+ *) from="$1"; dest="$2" ;;
+ esac
+
+ if [ "${dest#/}" = "$dest" ]; then
+ dest=./$dest
+ fi
+ local dest2=$dest
+ if [ -d "${dest2%/*}/partial" ]; then
+ dest2="${dest2%/*}/partial/${dest2##*/}"
+ fi
+
+ info RETRIEVING "Retrieving %s" "$displayname"
+ if ! just_get "$from" "$dest2"; then continue; fi
+ if [ "$md5" != "" ]; then
+ info VALIDATING "Validating %s" "$displayname"
+ if check_md5 $dest2 $md5 $siz; then
+ md5=""
+ fi
+ fi
+ if [ "$md5" = "" ]; then
+ [ "$dest2" = "$dest" ] || mv "$dest2" "$dest"
+ case "$typ" in
+ "gz") gunzip "$dest" ;;
+ "bz2") bunzip2 "$dest" ;;
+ esac
+ return 0
+ else
+ warning CORRUPTFILE "%s was corrupt" "$from"
+ fi
+ done
+ return 1
+}
+
+just_get () {
+ # args: from dest
+ local from="$1"
+ local dest="$2"
+ mkdir -p "${dest%/*}"
+ if [ "${from#null:}" != "$from" ]; then
+ error 1 NOTPREDL "%s was not pre-downloaded" "${from#null:}"
+ elif [ "${from#http://}" != "$from" -o "${from#ftp://}" != "$from" ]; then
+ # http/ftp mirror
+ if wgetprogress -O "$dest" "$from"; then
+ return 0
+ elif [ -s "$dest" ]; then
+ local iters=0
+ while [ "$iters" -lt 3 ]; do
+ warning RETRYING "Retrying failed download of %s" "$from"
+ if wgetprogress -c -O "$dest" "$from"; then break; fi
+ iters="$(($iters + 1))"
+ done
+ else
+ rm -f "$dest"
+ return 1
+ fi
+ elif [ "${from#file:}" != "$from" ]; then
+ local base="${from#file:}"
+ if [ "${base#//}" != "$base" ]; then
+ base="/${from#file://*/}"
+ fi
+ if [ -e "$base" ]; then
+ cp "$base" $dest
+ return 0
+ else
+ return 1
+ fi
+ else
+ error 1 UNKNOWNLOC "unknown location %s" "$from"
+ fi
+}
+
+download () {
+ mk_download_dirs
+ "$DOWNLOAD_DEBS" $(echo "$@" | tr ' ' '\n' | sort)
+}
+
+download_indices () {
+ mk_download_dirs
+ "$DOWNLOAD_INDICES" $(echo "$@" | tr ' ' '\n' | sort)
+}
+
+debfor () {
+ (while read pkg path; do
+ for p in "$@"; do
+ [ "$p" = "$pkg" ] || continue;
+ echo $path
+ done
+ done <"$TARGET/debootstrap/debpaths"
+ )
+}
+
+apt_dest () {
+ # args:
+ # deb package version arch mirror path
+ # pkg suite component arch mirror path
+ # rel suite mirror path
+ case "$1" in
+ "deb")
+ echo "var/cache/apt/archives/${2}_${3}_${4}.deb" | sed 's/:/%3a/'
+ ;;
+ "pkg")
+ local m="$5"
+ m="debootstrap.invalid"
+ #if [ "${m#http://}" != "$m" ]; then
+ # m=${m#http://}
+ #elif [ "${m#file://}" != "$m" ]; then
+ # m="file_localhost_${m#file://*/}"
+ #elif [ "${m#file:/}" != "$m" ]; then
+ # m="file_localhost_${m#file:/}"
+ #fi
+
+ printf "%s" "$APTSTATE/lists/"
+ echo "${m}_$6" | sed 's/\//_/g'
+ ;;
+ "rel")
+ local m="$3"
+ m="debootstrap.invalid"
+ #if [ "${m#http://}" != "$m" ]; then
+ # m=${m#http://}
+ #elif [ "${m#file://}" != "$m" ]; then
+ # m="file_localhost_${m#file://*/}"
+ #elif [ "${m#file:/}" != "$m" ]; then
+ # m="file_localhost_${m#file:/}"
+ #fi
+ printf "%s" "$APTSTATE/lists/"
+ echo "${m}_$4" | sed 's/\//_/g'
+ ;;
+ esac
+}
+
+################################################################## download
+
+get_release_md5 () {
+ local reldest="$1"
+ local path="$2"
+ sed -n '/^[Mm][Dd]5[Ss][Uu][Mm]/,/^[^ ]/p' < $reldest | while read a b c; do
+ if [ "$c" = "$path" ]; then echo "$a $b"; fi
+ done | head -n 1
+}
+
+download_release_sig () {
+ local m1="$1"
+ local reldest="$2"
+ local relsigdest="$TARGET/$($DLDEST rel $SUITE $m1 dists/$SUITE/Release.gpg)"
+
+ if [ -n "$KEYRING" ]; then
+ progress 0 100 DOWNRELSIG "Downloading Release file signature"
+ progress_next 50
+ get "$m1/dists/$SUITE/Release.gpg" $relsigdest ||
+ error 1 NOGETRELSIG "Failed getting release signature file %s" \
+ "$m1/dists/$SUITE/Release.gpg"
+ progress 50 100 DOWNRELSIG "Downloading Release file signature"
+
+ info RELEASESIG "Checking Release signature"
+ # Don't worry about the exit status from gpgv; parsing the output will
+ # take care of that.
+ (gpgv --status-fd 1 --keyring "$KEYRING" --ignore-time-conflict \
+ "$relsigdest" "$reldest" || true) | read_gpg_status
+ progress 100 100 DOWNRELSIG "Downloading Release file signature"
+ fi
+}
+
+download_release_indices () {
+ local m1=${MIRRORS%% *}
+ local reldest="$TARGET/$($DLDEST rel $SUITE $m1 dists/$SUITE/Release)"
+ progress 0 100 DOWNREL "Downloading Release file"
+ progress_next 100
+ get "$m1/dists/$SUITE/Release" $reldest ||
+ error 1 NOGETREL "Failed getting release file %s" "$m1/dists/$SUITE/Release"
+
+ TMPCOMPONENTS="$(sed -n 's/Components: *//p' $reldest)"
+ for c in $TMPCOMPONENTS ; do
+ eval "
+ case \"\$c\" in
+ $USE_COMPONENTS)
+ COMPONENTS=\"\$COMPONENTS \$c\"
+ ;;
+ esac
+ "
+ done
+ COMPONENTS="$(echo $COMPONENTS)"
+
+ if [ "$COMPONENTS" = "" ]; then
+ mv $reldest "$reldest.malformed"
+ error 1 INVALIDREL "Invalid Release file, no valid components"
+ fi
+ progress 100 100 DOWNREL "Downloading Release file"
+
+ download_release_sig "$m1" "$reldest"
+
+ local totalpkgs=0
+ for c in $COMPONENTS; do
+ local subpath="$c/binary-$ARCH/Packages"
+ local normmd="`get_release_md5 $reldest ${subpath}`"
+ if [ "$normmd" = "" ]; then
+ mv $reldest "$reldest.malformed"
+ error 1 MISSINGRELENTRY "Invalid Release file, no entry for %s" "$subpath"
+ fi
+ totalpkgs="$(( $totalpkgs + ${normmd#* } ))"
+ done
+
+ local donepkgs=0
+ progress 0 $totalpkgs DOWNPKGS "Downloading Packages files"
+ for c in $COMPONENTS; do
+ local subpath="$c/binary-$ARCH/Packages"
+ local path="dists/$SUITE/$subpath"
+ local bz2md="`get_release_md5 $reldest ${subpath}.bz2`"
+ local gzmd="`get_release_md5 $reldest ${subpath}.gz`"
+ local normmd="`get_release_md5 $reldest ${subpath}`"
+ local ext="$normmd ."
+ if [ -x /usr/bin/bunzip2 -a "$bz2md" != "" ]; then
+ ext="$ext $bz2md bz2"
+ fi
+ if [ -x /bin/gunzip -a "$gzmd" != "" ]; then
+ ext="$ext $gzmd gz"
+ fi
+ progress_next "$(($donepkgs + ${normmd#* }))"
+ for m in $MIRRORS; do
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m $path)"
+ if get "$m/$path" "$pkgdest" $ext; then break; fi
+ done
+ donepkgs="$(($donepkgs + ${normmd#* }))"
+ progress $donepkgs $totalpkgs DOWNPKGS "Downloading Packages files"
+ done
+}
+
+get_package_sizes () {
+ # mirror pkgdest debs..
+ local m=$1; shift
+ local pkgdest=$1; shift
+ $PKGDETAILS PKGS $m $pkgdest "$@" | (
+ newleft=""
+ totaldebs=0
+ countdebs=0
+ while read p details; do
+ if [ "$details" = "-" ]; then
+ newleft="$newleft $p"
+ else
+ size="${details##* }";
+ totaldebs="$(($totaldebs + $size))"
+ countdebs="$(($countdebs + 1))"
+ fi
+ done
+ echo "$countdebs $totaldebs$newleft"
+ )
+}
+
+# note, leftovers come back on fd5 !!
+download_debs () {
+ local m="$1"
+ local pkgdest="$2"
+ shift; shift
+
+ $PKGDETAILS PKGS $m $pkgdest "$@" | (
+ leftover=""
+ while read p ver arc mdup fil md5 size; do
+ if [ "$ver" = "-" ]; then
+ leftover="$leftover $p"
+ else
+ progress_next "$(($dloaddebs + $size))"
+ local debdest="$($DLDEST deb $p $ver $arc $m $fil)"
+ if get "$m/$fil" "$TARGET/$debdest" $md5 $size; then
+ dloaddebs="$(($dloaddebs + $size))"
+ echo >>$TARGET/debootstrap/debpaths "$p $debdest"
+ else
+ warning COULDNTDL "Couldn't download package %s" "$p"
+ fi
+ fi
+ done
+ echo >&5 ${leftover# }
+ )
+}
+
+download_release () {
+ local m1=${MIRRORS%% *}
+
+ local numdebs="$#"
+
+ local countdebs=0
+ progress $countdebs $numdebs SIZEDEBS "Finding package sizes"
+
+ local totaldebs=0
+ local leftoverdebs="$*"
+ for c in $COMPONENTS; do
+ if [ "$countdebs" -ge "$numdebs" ]; then break; fi
+
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m1 $path)"
+ if [ ! -e "$pkgdest" ]; then continue; fi
+
+ info CHECKINGSIZES "Checking component %s on %s..." "$c" "$m1"
+
+ leftoverdebs="$(get_package_sizes $m1 $pkgdest $leftoverdebs)"
+
+ countdebs=$(($countdebs + ${leftoverdebs%% *}))
+ leftoverdebs=${leftoverdebs#* }
+
+ totaldebs=${leftoverdebs%% *}
+ leftoverdebs=${leftoverdebs#* }
+
+ progress $countdebs $numdebs SIZEDEBS "Finding package sizes"
+ done
+
+ if [ "$countdebs" -ne "$numdebs" ]; then
+ error 1 LEFTOVERDEBS "Couldn't find these debs: %s" "$leftoverdebs"
+ fi
+
+ local dloaddebs=0
+
+ progress $dloaddebs $totaldebs DOWNDEBS "Downloading packages"
+ :>$TARGET/debootstrap/debpaths
+
+ pkgs_to_get="$*"
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ for m in $MIRRORS; do
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m $path)"
+ if [ ! -e "$pkgdest" ]; then continue; fi
+ pkgs_to_get="$(download_debs "$m" "$pkgdest" $pkgs_to_get 5>&1 1>&6)"
+ if [ "$pkgs_to_get" = "" ]; then break; fi
+ done 6>&1
+ if [ "$pkgs_to_get" = "" ]; then break; fi
+ done
+ progress $dloaddebs $totaldebs DOWNDEBS "Downloading packages"
+ if [ "$pkgs_to_get" != "" ]; then
+ error 1 COULDNTDLPKGS "Couldn't download packages: %s" "$pkgs_to_get"
+ fi
+}
+
+download_main_indices () {
+ local m1=${MIRRORS%% *}
+ progress 0 100 DOWNMAINPKGS "Downloading Packages file"
+ progress_next 100
+ COMPONENTS=main
+ export COMPONENTS
+ for m in $MIRRORS; do
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m $path)"
+ if [ -x /bin/gunzip ] && get "$m/${path}.gz" "${pkgdest}.gz"; then
+ rm -f ${pkgdest}
+ gunzip ${pkgdest}.gz
+ elif get "$m/$path" "$pkgdest"; then
+ true
+ fi
+ done
+ done
+ progress 100 100 DOWNMAINPKGS "Downloading Packages file"
+}
+
+download_main () {
+ local m1=${MIRRORS%% *}
+
+ :>$TARGET/debootstrap/debpaths
+ for p in "$@"; do
+ for c in $COMPONENTS; do
+ local details=""
+ for m in $MIRRORS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m $path)"
+ if [ ! -e "$pkgdest" ]; then continue; fi
+ details="$($PKGDETAILS PKGS $m $pkgdest $p)"
+ if [ "$details" = "$p -" ]; then continue; fi
+ size="${details##* }"; details="${details% *}"
+ md5="${details##* }"; details="${details% *}"
+ local debdest="$($DLDEST deb $details)"
+ if get "$m/${details##* }" "$TARGET/$debdest" $md5 $size; then
+ echo >>$TARGET/debootstrap/debpaths "$p $debdest"
+ details="done"
+ break
+ fi
+ done
+ if [ "$details" != "" ]; then
+ break
+ fi
+ done
+ if [ "$details" != "done" ]; then
+ error 1 COULDNTDL "Couldn't download %s" "$p"
+ fi
+ done
+}
+
+###################################################### deb choosing support
+
+get_debs () {
+ local field="$1"
+ shift
+ local m1 c
+ for m1 in $MIRRORS; do
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m1 $path)"
+ echo $("$PKGDETAILS" FIELD "$field" $m1 "$pkgdest" "$@" | sed 's/ .*//')
+ done
+ done
+}
+
+################################################################ extraction
+
+extract () { (
+ cd "$TARGET"
+ local p=0
+ for pkg in $(debfor "$@"); do
+ p="$(($p + 1))"
+ progress "$p" "$#" EXTRACTPKGS "Extracting packages"
+ packagename="$(echo "$pkg" | sed 's,^.*/,,;s,_.*$,,')"
+ info EXTRACTING "Extracting %s..." "$packagename"
+ ar -p ./$pkg data.tar.gz | zcat | tar -xf -
+ done
+); }
+
+in_target_nofail () {
+ if ! eval chroot "$TARGET" "$@" 2>/dev/null; then
+ true
+ fi
+ return 0
+}
+
+in_target_failmsg () {
+ local code="$1"
+ local msg="$2"
+ local arg="$3"
+ shift; shift; shift
+ if ! eval chroot "$TARGET" "$@"; then
+ warning "$code" "$msg" "$arg"
+ return 1
+ fi
+ return 0
+}
+
+in_target () {
+ in_target_failmsg IN_TARGET_FAIL "Failure trying to run: %s" "chroot $TARGET $*" "$@"
+}
+
+###################################################### standard setup stuff
+
+conditional_cp () {
+ if [ ! -e "$2/$1" ]; then
+ if [ -L "$1" ]; then
+ cat "$1" >"$2/$1"
+ elif [ -e "$1" ]; then
+ cp -a "$1" "$2/$1"
+ fi
+ fi
+}
+
+mv_invalid_to () {
+ local m=$1
+ m=$(echo ${m#http://} | tr '/' '_' | sed 's/_*//')
+ (cd $TARGET/$APTSTATE/lists
+ for a in debootstrap.invalid_*; do
+ mv $a ${m}_${a#*_}
+ done
+ )
+}
+
+setup_apt_sources () {
+ mkdir -p "$TARGET/etc/apt"
+ for m in "$@"; do
+ local cs=""
+ for c in $COMPONENTS; do
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m $path)"
+ if [ -e "$pkgdest" ]; then cs="$cs $c"; fi
+ done
+ if [ "$cs" != "" ]; then echo "deb $m $SUITE$cs"; fi
+ done > "$TARGET/etc/apt/sources.list"
+}
+
+setup_etc () {
+ mkdir -p "$TARGET/etc"
+
+ conditional_cp /etc/resolv.conf "$TARGET"
+ conditional_cp /etc/hostname "$TARGET"
+
+ if [ "$DLDEST" = apt_dest -a ! -e "$TARGET/etc/apt/sources.list" ]; then
+ setup_apt_sources "htp://debootstrap.invalid/"
+ fi
+}
+
+setup_proc () {
+ case "$ARCH" in
+ kfreebsd-*)
+ on_exit "umount $TARGET/dev"
+ on_exit "umount $TARGET/proc"
+ umount $TARGET/proc 2>/dev/null || true
+ in_target mount -t linprocfs proc /proc
+ ;;
+ *)
+ on_exit "umount $TARGET/dev/pts"
+ on_exit "umount $TARGET/dev/shm"
+ on_exit "umount $TARGET/proc/bus/usb"
+ on_exit "umount $TARGET/proc"
+ umount $TARGET/proc 2>/dev/null || true
+ in_target mount -t proc proc /proc
+ if [ -d "$TARGET/sys" ] && grep -q '[[:space:]]sysfs' /proc/filesystems 2>/dev/null; then
+ on_exit "umount $TARGET/sys"
+ umount $TARGET/sys 2>/dev/null || true
+ in_target mount -t sysfs sysfs /sys
+ fi
+ ;;
+ esac
+}
+
+setup_proc_fakechroot () {
+ rm -rf "$TARGET/proc"
+ ln -s /proc "$TARGET"
+}
+
+setup_devices () {
+ case "$ARCH" in
+ kfreebsd-*)
+ in_target mount -t devfs devfs /dev ;;
+ *)
+ if [ -e $DEVICES_TARGZ ]; then
+ (cd "$TARGET"; zcat $DEVICES_TARGZ | tar -xf -)
+ else
+ if [ -e /dev/.devfsd ] ; then
+ in_target mount -t devfs devfs /dev
+ else
+ error 1 NODEVTGZ "no %s. cannot create devices" "$DEVICES_TARGZ"
+ fi
+ fi
+ ;;
+ esac
+}
+
+setup_devices_fakechroot () {
+ rm -rf "$TARGET/dev"
+ ln -s /dev "$TARGET"
+}
+
+setup_dselect_method () {
+ case "$1" in
+ "apt")
+ mkdir -p "$TARGET/var/lib/dpkg"
+ echo "apt apt" > "$TARGET/var/lib/dpkg/cmethopt"
+ chmod 644 "$TARGET/var/lib/dpkg/cmethopt"
+ ;;
+ *)
+ error 1 UNKNOWNDSELECT "unknown dselect method"
+ ;;
+ esac
+}
+
+################################################################ pkgdetails
+
+if [ -x /usr/bin/perl ]; then
+ PKGDETAILS=pkgdetails_perl
+
+ pkgdetails_field () {
+ # uniq field mirror Packages values...
+ perl -le '
+$unique = shift @ARGV; $field = lc(shift @ARGV); $mirror = shift @ARGV;
+$cnt = length(@ARGV);
+%fields = map { $_, 0 } @ARGV;
+while (<STDIN>) {
+ chomp;
+ next if (/^ /);
+ if (/^([^:]*:)\s*(.*)$/) {
+ $f = lc($1); $v = $2;
+ $pkg = $v if ($f eq "package:");
+ $ver = $v if ($f eq "version:");
+ $arc = $v if ($f eq "architecture:");
+ $fil = $v if ($f eq "filename:");
+ $md5 = $v if ($f eq "md5sum:");
+ $siz = $v if ($f eq "size:");
+ $val = $v if ($f eq $field);
+ } elsif (/^$/) {
+ if (defined $val && defined $fields{$val}) {
+ $cnt++;
+ printf "%s %s %s %s %s %s %s\n",
+ $pkg, $ver, $arc, $mirror, $fil, $md5, $siz;
+ if ($unique) {
+ delete $fields{$val};
+ last if (--$cnt <= 0);
+ }
+ }
+ undef $val;
+ }
+}
+for $v (keys %fields) {
+ printf ("%s -\n", $v) if ($unique);
+}
+' "$@"
+ }
+
+ pkgdetails_perl () {
+ if [ "$1" = "WGET%" ]; then
+ shift;
+ perl -e '$v = 0; while (read STDIN, $x, 1) { if ($x =~ m/\d/) { $v *= 10; $v += $x; } elsif ($x eq "%") { printf "P: %d %d%s\n", int($v / 100.0 * ($ARGV[1] - $ARGV[0]) + $ARGV[0]), $ARGV[2], ($#ARGV == 3 ? " $ARGV[3]" : ""); $v = 0; } else { $v = 0; } }' "$@"
+ elif [ "$1" = "GETDEPS" ]; then
+ local pkgdest="$2"; shift; shift
+ perl -e 'while (<STDIN>) { chomp; $in = 1 if (/^Package: (.*)$/ && grep {$_ eq $1} @ARGV); $in = 0 if (/^$/); if ($in and (/^Depends: (.*)$/ or /^Pre-Depends: (.*)$/)) { for $d (split /\s*,\s*/, $1) { $d =~ s/\s*[|].*$//; $d =~ s/\s*[(].*[)]\s*//; print "$d\n"; }}}' <"$pkgdest" "$@" | sort | uniq
+ elif [ "$1" = "PKGS" ]; then
+ local m="$2"
+ local p="$3"
+ shift; shift; shift
+ pkgdetails_field 1 Package: "$m" "$@" < "$p"
+ elif [ "$1" = "FIELD" ]; then
+ local f="$2"
+ local m="$3"
+ local p="$4"
+ shift; shift; shift; shift
+ pkgdetails_field 0 "$f" "$m" "$@" < "$p"
+ fi
+ }
+elif [ -e "$DEBOOTSTRAP_DIR/pkgdetails" ]; then
+ PKGDETAILS=$DEBOOTSTRAP_DIR/pkgdetails
+else
+ PKGDETAILS=""
+fi
+
+##################################################### dependency resolution
+
+resolve_deps () {
+ local m1=${MIRRORS%% *}
+
+ # XXX: I can't think how to deal well with dependency resolution and
+ # lots of Packages files. -- aj 2005/06/12
+
+ c="${COMPONENTS%% *}"
+ local path="dists/$SUITE/$c/binary-$ARCH/Packages"
+ local pkgdest="$TARGET/$($DLDEST pkg $SUITE $c $ARCH $m1 $path)"
+
+ local PKGS="$*"
+ local ALLPKGS="$PKGS";
+ local ALLPKGS2="";
+ while [ "$PKGS" != "" ]; do
+ PKGS=$("$PKGDETAILS" GETDEPS "$pkgdest" $PKGS)
+ PKGS=$("$PKGDETAILS" PKGS REAL "$pkgdest" $PKGS | sed -n 's/ .*REAL.*$//p')
+ ALLPKGS2=$(echo "$PKGS $ALLPKGS" | tr ' ' '\n' | sort | uniq)
+ PKGS=$(without "$ALLPKGS2" "$ALLPKGS")
+ ALLPKGS="$ALLPKGS2"
+ done
+ echo $ALLPKGS
+}
+
+################################################################### helpers
+
+read_gpg_status () {
+ badsig=
+ unkkey=
+ validsig=
+ while read prefix keyword keyid rest; do
+ [ "$prefix" = '[GNUPG:]' ] || continue
+ case $keyword in
+ BADSIG) badsig="$keyid" ;;
+ NO_PUBKEY) unkkey="$keyid" ;;
+ VALIDSIG) validsig="$keyid" ;;
+ esac
+ done
+ if [ "$validsig" ]; then
+ info VALIDRELSIG "Valid Release signature (key id %s)" "$validsig"
+ elif [ "$badsig" ]; then
+ error 1 BADRELSIG "Invalid Release signature (key id %s)" "$badsig"
+ elif [ "$unkkey" ]; then
+ error 1 UNKNOWNRELSIG "Release signed by unknown key (key id %s)" "$unkkey"
+ else
+ error 1 SIGCHECK "Error executing gpgv to check Release signature"
+ fi
+}
+
+without () {
+ # usage: without "a b c" "a d" -> "b" "c"
+ (echo $1 | tr ' ' '\n' | sort | uniq;
+ echo $2 $2 | tr ' ' '\n') | sort | uniq -u | tr '\n' ' '
+ echo
+}
+
+repeat () {
+ local n="$1"
+ shift
+ while [ "$n" -gt 0 ]; do
+ if "$@"; then
+ break
+ else
+ n="$(( $n - 1 ))"
+ sleep 1
+ fi
+ done
+ if [ "$n" -eq 0 ]; then return 1; fi
+ return 0
+}
+
+N_EXIT_THINGS=0
+exit_function () {
+ local n=0
+ while [ "$n" -lt "$N_EXIT_THINGS" ]; do
+ (eval $(eval echo \${EXIT_THING_$n}) 2>/dev/null || true)
+ n="$(( $n + 1 ))"
+ done
+ N_EXIT_THINGS=0
+}
+
+trap "exit_function" 0
+trap "exit 129" 1
+trap "error 130 INTERRUPTED \"Interrupt caught ... exiting\"" 2
+trap "exit 131" 3
+trap "exit 143" 15
+
+on_exit () {
+ eval `echo EXIT_THING_${N_EXIT_THINGS}=\"$1\"`
+ N_EXIT_THINGS="$(( $N_EXIT_THINGS + 1 ))"
+}
+
+############################################################## fakechroot tools
+
+install_fakechroot_tools () {
+ mv "$TARGET/sbin/ldconfig" "$TARGET/sbin/ldconfig.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake ldconfig called, doing nothing\"" > "$TARGET/sbin/ldconfig"
+ chmod 755 "$TARGET/sbin/ldconfig"
+
+ echo \
+"/sbin/ldconfig
+/sbin/ldconfig.REAL
+fakechroot" >> "$TARGET/var/lib/dpkg/diversions"
+
+ mv "$TARGET/usr/bin/ldd" "$TARGET/usr/bin/ldd.REAL"
+ cat << 'END' > "$TARGET/usr/bin/ldd"
+#!/usr/bin/perl
+
+# fakeldd
+#
+# Replacement for ldd with usage of objdump
+#
+# (c) 2003-2005 Piotr Roszatycki <dexter@debian.org>, BSD
+
+
+my %libs = ();
+
+my $status = 0;
+my $dynamic = 0;
+my $biarch = 0;
+
+my $ldlinuxsodir = "/lib";
+my @ld_library_path = qw(/usr/lib /lib);
+
+
+sub ldso($) {
+ my ($lib) = @_;
+ my @files = ();
+
+ if ($lib =~ /^\//) {
+ $libs{$lib} = $lib;
+ push @files, $lib;
+ } else {
+ foreach my $ld_path (@ld_library_path) {
+ next unless -f "$ld_path/$lib";
+ my $badformat = 0;
+ open OBJDUMP, "objdump -p $ld_path/$lib 2>/dev/null |";
+ while (my $line = <OBJDUMP>) {
+ if ($line =~ /file format (\S*)$/) {
+ $badformat = 1 unless $format eq $1;
+ last;
+ }
+ }
+ close OBJDUMP;
+ next if $badformat;
+ $libs{$lib} = "$ld_path/$lib";
+ push @files, "$ld_path/$lib";
+ }
+ objdump(@files);
+ }
+}
+
+
+sub objdump(@) {
+ my (@files) = @_;
+ my @libs = ();
+
+ foreach my $file (@files) {
+ open OBJDUMP, "objdump -p $file 2>/dev/null |";
+ while (my $line = <OBJDUMP>) {
+ $line =~ s/^\s+//;
+ my @f = split (/\s+/, $line);
+ if ($line =~ /file format (\S*)$/) {
+ if (not $format) {
+ $format = $1;
+ if ($unamearch eq "x86_64" and $format eq "elf32-i386") {
+ my $link = readlink "/lib/ld-linux.so.2";
+ if ($link =~ /^\/emul\/ia32-linux\//) {
+ $ld_library_path[-2] = "/emul/ia32-linux/usr/lib";
+ $ld_library_path[-1] = "/emul/ia32-linux/lib";
+ }
+ } elsif ($unamearch =~ /^(sparc|sparc64)$/ and $format eq "elf64-sparc") {
+ $ldlinuxsodir = "/lib64";
+ $ld_library_path[-2] = "/usr/lib64";
+ $ld_library_path[-1] = "/lib64";
+ }
+ } else {
+ next unless $format eq $1;
+ }
+ }
+ if (not $dynamic and $f[0] eq "Dynamic") {
+ $dynamic = 1;
+ }
+ next unless $f[0] eq "NEEDED";
+ if ($f[1] =~ /^ld-linux(\.|-)/) {
+ $f[1] = "$ldlinuxsodir/" . $f[1];
+ }
+ if (not defined $libs{$f[1]}) {
+ $libs{$f[1]} = undef;
+ push @libs, $f[1];
+ }
+ }
+ close OBJDUMP;
+ }
+
+ foreach my $lib (@libs) {
+ ldso($lib);
+ }
+}
+
+
+if ($#ARGV < 0) {
+ print STDERR "fakeldd: missing file arguments\n";
+ exit 1;
+}
+
+while ($ARGV[0] =~ /^-/) {
+ my $arg = $ARGV[0];
+ shift @ARGV;
+ last if $arg eq "--";
+}
+
+open LD_SO_CONF, "/etc/ld.so.conf";
+while ($line = <LD_SO_CONF>) {
+ chomp $line;
+ unshift @ld_library_path, $line;
+}
+close LD_SO_CONF;
+
+unshift @ld_library_path, split(/:/, $ENV{LD_LIBRARY_PATH});
+
+$unamearch = `/bin/uname -m`;
+chomp $unamearch;
+
+foreach my $file (@ARGV) {
+ my $address;
+ %libs = ();
+ $dynamic = 0;
+
+ if ($#ARGV > 0) {
+ print "$file:\n";
+ }
+
+ if (not -f $file) {
+ print STDERR "ldd: $file: No such file or directory\n";
+ $status = 1;
+ next;
+ }
+
+ objdump($file);
+
+ if ($dynamic == 0) {
+ print "\tnot a dynamic executable\n";
+ $status = 1;
+ } elsif (scalar %libs eq "0") {
+ print "\tstatically linked\n";
+ }
+
+ if ($format =~ /^elf64-/) {
+ $address = "0x0000000000000000";
+ } else {
+ $address = "0x00000000";
+ }
+
+ foreach $lib (keys %libs) {
+ if ($libs{$lib}) {
+ printf "\t%s => %s (%s)\n", $lib, $libs{$lib}, $address;
+ } else {
+ printf "\t%s => not found\n", $lib;
+ }
+ }
+
+}
+
+exit $status;
+END
+ chmod 755 "$TARGET/usr/bin/ldd"
+
+ echo \
+"/usr/bin/ldd
+/usr/bin/ldd.REAL
+fakechroot" >> "$TARGET/var/lib/dpkg/diversions"
+
+}
diff --git a/hoary b/hoary
new file mode 100644
index 0000000..e6207d5
--- /dev/null
+++ b/hoary
@@ -0,0 +1,178 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libpopt0 login makedev mawk mount ncurses-base ncurses-bin passwd perl-base procps python-minimal python2.4-minimal sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5"
+
+ base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject ethtool evms evms-ncurses fdutils file ftp gettext-base gnupg grepmap groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.5 libfribidi0 libgc1 libgcrypt11 libgdbm3 libgnutls11 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-12 libpcap0.8 libreiserfs0.3-0 libsasl2 libsasl2-modules libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lsb-release lshw lsof lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.4 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base ubuntu-keyring udev usbutils vim vim-common w3m wget wireless-tools xfsprogs"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "i386")
+ required="$required libc6 libc6-i686"
+ base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4"
+ ;;
+ "powerpc")
+ required="$required libc6 libreadline4"
+ base="$base hfsplus hfsutils libelfg0 libhfsp0 ltrace mac-fdisk pmac-fdisk powerpc-utils"
+ ;;
+ "amd64")
+ required="$required libc6"
+ base="$base dmidecode libelfg0 ltrace memtest86+ libreadline4"
+ ;;
+ "ia64")
+ required="$required libc6.1 libunwind7"
+ base="$base dmidecode libreadline4"
+ LIBC6="libc6.1"
+ ;;
+ "sparc")
+ required="$required libc6"
+ base="$base lib64gcc1 libc6-sparc64 libreadline4"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+install_debs () {
+ first_stage_install
+ second_stage_install
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ DEBIAN_FRONTEND=noninteractive
+ DEBCONF_NONINTERACTIVE_SEEN=true
+ export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+ baseprog=0
+ bases=7
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+ x_core_install debconf
+
+ baseprog=0
+ bases="$(set -- $required; echo $#)"
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1
+
+ baseprog=0
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+ #on_exit "(in_target_nofail umount /dev/pts) || true"
+
+ smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1
+
+ baseprog=0
+ bases="$(set -- $base; echo $#)"
+
+ info UNPACKBASE "Unpacking the base system..."
+
+ smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1
+
+ baseprog=0
+
+ info CONFBASE "Configuring the base system..."
+
+ mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL"
+ ln -s /bin/true "$TARGET/usr/sbin/sendmail"
+
+ smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail"
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases CONFBASE "Configuring base system"
+ info BASESUCCESS "Base system installed successfully."
+}
+
diff --git a/hoary.buildd b/hoary.buildd
new file mode 100644
index 0000000..90937b6
--- /dev/null
+++ b/hoary.buildd
@@ -0,0 +1,161 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+ required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin passwd perl-base pkgstriptranslations python-minimal python2.4-minimal sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g"
+
+ base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "amd64")
+ ;;
+ "i386")
+ ;;
+ "powerpc")
+ ;;
+ "ia64")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ base="$base libunwind7 libunwind7-dev"
+ LIBC6="libc6.1"
+ ;;
+
+ # Unsupported architectures:
+ "alpha")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+install_debs () {
+ first_stage_install
+ second_stage_install
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTCORE "Installing core packages" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+ #on_exit "in_target_nofail umount /dev/pts"
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTCORE "Installing core packages" #29
+
+ info INSTCORE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTCORE "Installing core packages" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/pkgdetails.c b/pkgdetails.c
new file mode 100644
index 0000000..8403afb
--- /dev/null
+++ b/pkgdetails.c
@@ -0,0 +1,209 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+
+#define MAX_LINE 1000
+#define MAX_PKGS 100
+
+static char *fieldcpy(char *dst, char *fld) {
+ while (*fld && *fld != ':')
+ fld++;
+ if (!*(fld++))
+ return NULL;
+ while (isspace(*fld)) fld++;
+ return strcpy(dst, fld);
+}
+
+static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) {
+ char buf[MAX_LINE];
+ char cur_pkg[MAX_LINE];
+ char cur_deps[MAX_LINE];
+ char *pkgs[MAX_PKGS];
+ int i;
+ int skip;
+ FILE *f;
+
+ cur_pkg[0] = cur_deps[0] = '\0';
+
+ for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i];
+
+ f = fopen(pkgsfile, "r");
+ if (f == NULL) {
+ perror(pkgsfile);
+ exit(1);
+ }
+
+ skip = 1;
+ while (fgets(buf, sizeof(buf), f)) {
+ if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
+ if (strncasecmp(buf, "Package:", 8) == 0) {
+ skip = 1;
+ fieldcpy(cur_pkg, buf);
+ int any = 0;
+ for (i = 0; i < pkgc; i++) {
+ if (!pkgs[i]) continue;
+ any = 1;
+ if (strcmp(cur_pkg, pkgs[i]) == 0) {
+ skip = 0;
+ pkgs[i] = NULL;
+ break;
+ }
+ }
+ if (!any) break;
+ } else if (!skip &&
+ (strncasecmp(buf, "Depends:", 8) == 0 ||
+ strncasecmp(buf, "Pre-Depends:", 12) == 0))
+ {
+ char *pch;
+ fieldcpy(cur_deps, buf);
+ pch = cur_deps;
+ while (1) {
+ while (isspace(*pch)) pch++;
+ if (!*pch) break;
+
+ while (*pch && *pch != '(' && *pch != '|' && *pch != ','
+ && !isspace(*pch))
+ {
+ fputc(*pch++, stdout);
+ }
+ fputc('\n', stdout);
+ while (*pch && *pch++ != ',') (void)NULL;
+ }
+ }
+ }
+ fclose(f);
+}
+
+static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile,
+ char *fieldname, char **in_pkgs, int pkgc)
+{
+ char buf[MAX_LINE];
+ char cur_field[MAX_LINE];
+ char cur_pkg[MAX_LINE];
+ char cur_ver[MAX_LINE];
+ char cur_arch[MAX_LINE];
+ char cur_size[MAX_LINE];
+ char cur_md5[MAX_LINE];
+ char cur_filename[MAX_LINE];
+ char *pkgs[MAX_PKGS];
+ int i;
+ FILE *f;
+
+ cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = '\0';
+
+ for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i];
+
+ f = fopen(pkgsfile, "r");
+ if (f == NULL) {
+ perror(pkgsfile);
+ exit(1);
+ }
+ while (fgets(buf, sizeof(buf), f)) {
+ if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
+ if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) {
+ fieldcpy(cur_field, buf);
+ }
+ if (strncasecmp(buf, "Package:", 8) == 0) {
+ fieldcpy(cur_pkg, buf);
+ } else if (strncasecmp(buf, "Version:", 8) == 0) {
+ fieldcpy(cur_ver, buf);
+ } else if (strncasecmp(buf, "Architecture:", 13) == 0) {
+ fieldcpy(cur_arch, buf);
+ } else if (strncasecmp(buf, "Size:", 5) == 0) {
+ fieldcpy(cur_size, buf);
+ } else if (strncasecmp(buf, "MD5sum:", 7) == 0) {
+ fieldcpy(cur_md5, buf);
+ } else if (strncasecmp(buf, "Filename:", 9) == 0) {
+ fieldcpy(cur_filename, buf);
+ } else if (!*buf) {
+ int any = 0;
+ for (i = 0; i < pkgc; i++) {
+ if (!pkgs[i]) continue;
+ any = 1;
+ if (strcmp(cur_field, pkgs[i]) == 0) {
+ printf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_md5, cur_size);
+ if (uniq) pkgs[i] = NULL;
+ break;
+ }
+ }
+ if (!any) break;
+ }
+ }
+ fclose(f);
+
+ /* any that weren't found are returned as "pkg -" */
+ if (uniq) {
+ for (i = 0; i < pkgc; i++) {
+ if (pkgs[i]) {
+ printf("%s -\n", pkgs[i]);
+ }
+ }
+ }
+}
+
+static int dotranslatewgetpercent(int low, int high, int end, char *str) {
+ int ch;
+ int val, lastval;
+
+ /* print out anything that looks like a % on its own line, appropriately
+ * scaled */
+
+ lastval = val = 0;
+ while ( (ch = getchar()) != EOF ) {
+ if (isdigit(ch)) {
+ val *= 10; val += ch - '0';
+ } else if (ch == '%') {
+ float f = (float) val / 100.0 * (high - low) + low;
+ if (str) {
+ printf("P: %d %d %s\n", (int) f, end, str);
+ } else {
+ printf("P: %d %d\n", (int) f, end);
+ }
+ lastval = val;
+ } else {
+ val = 0;
+ }
+ }
+ return lastval == 100;
+}
+
+int main(int argc, char *argv[]) {
+ if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) {
+ if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]),
+ atoi(argv[4]), argc == 6 ? argv[5] : NULL))
+ {
+ exit(0);
+ } else {
+ exit(1);
+ }
+ } else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) {
+ int i;
+ for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) {
+ dogetdeps(argv[2], argv+i, MAX_PKGS);
+ }
+ dogetdeps(argv[2], argv+i, argc-i);
+ exit(0);
+ } else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) {
+ int i;
+ for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) {
+ dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS);
+ }
+ dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i);
+ exit(0);
+ } else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) {
+ int i;
+ for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) {
+ dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS);
+ }
+ dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i);
+ exit(0);
+ } else {
+ fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]);
+ fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n",
+ argv[0]);
+ fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]);
+ fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]);
+ exit(1);
+ }
+}
diff --git a/po/debootstrap.po b/po/debootstrap.po
new file mode 100644
index 0000000..08463c5
--- /dev/null
+++ b/po/debootstrap.po
@@ -0,0 +1,50 @@
+
+# info
+
+msgid "Base system installed successfully."
+msgid "Configuring required packages..."
+msgid "Extracting %s..."
+msgid "Installing base packages..."
+msgid "Installing core packages..."
+msgid "Retrieving %s"
+msgid "Unpacking required packages..."
+msgid "Validating %s"
+
+msgid "usage: [OPTION]... <suite> <target> [<mirror> [<script>]]"
+msgid "Try \`${0##*/} --help' for more information."
+
+# warnings
+
+msgid "%s was corrupt"
+msgid "Retrying failed download of %s"
+
+msgid "Failure trying to run: %s"
+msgid "Failure while configuring base packages. This will be attempted 5 times."
+msgid "Failure while configuring required packages."
+msgid "Failure while installing base packages. This will be re-attempted up to five times."
+msgid "Failure while unpacking required packages. This will be attempted up to five times."
+
+# errors
+
+msgid "%s was not pre-downloaded"
+msgid "%s: No such file or directory"
+msgid "Can only use one of --boot-floppies and --debian-installer"
+msgid "Couldn't download %s"
+msgid "Couldn't work out current architecture"
+msgid "Failed getting release file %s"
+msgid "If running debootstrap by hand, don't use --boot-floppies"
+msgid "If running debootstrap by hand, don't use --debian-installer"
+msgid "Interrupt caught ... exiting"
+msgid "Invalid Release file, no entry for %s"
+msgid "Invalid Release file, no valid components"
+msgid "No such script: %s"
+msgid "Tarball must be given a complete path"
+msgid "Unknown tarball: must be either .tar or .tgz"
+msgid "You must specify a suite and a target."
+msgid "debootstrap can only run as root"
+msgid "no %s. cannot create devices"
+msgid "option requires an argument %s"
+msgid "unknown download style"
+msgid "unknown dselect method"
+msgid "unknown location %s"
+msgid "unknown mirror style"
diff --git a/potato b/potato
new file mode 100644
index 0000000..f579ee2
--- /dev/null
+++ b/potato
@@ -0,0 +1,105 @@
+mirror_style release
+download_style apt var-state
+
+work_out_debs () {
+ required="base-files base-passwd bash bsdutils debconf-tiny debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname ldso libc6 libdb2 libgdbmg1 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libpopt0 libreadline4 libstdc++2.10 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-5.005-base perl-base procps sed shellutils slang1 sysklogd sysvinit tar textutils update util-linux whiptail"
+
+ base="adduser ae apt base-config elvis-tiny fbset fdutils gettext-base console-data console-tools console-tools-libs libdb2 libwrap0 locales modconf netbase ftp ppp pppconfig pump tasksel tcpd textutils telnet xviddetect"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "alpha")
+ required="$(without_package "libc6" "$required") libc6.1"
+ LIBC6="libc6.1"
+ ;;
+ "i386")
+ base="$base fdflush isapnptools lilo mbr pciutils pcmcia-cs psmisc setserial syslinux"
+ ;;
+ *)
+ # other arches may have special needs not yet represented here
+ # oh well, Potato is old
+ esac
+}
+
+first_stage_install () {
+ extract $required
+
+ :> "$TARGET/var/lib/dpkg/status"
+ echo > "$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg=$1
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p $TARGET/$deb control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+
+ if [ -e "$TARGET/usr/bin/perl-5.005.dist" ]; then
+ mv "$TARGET/usr/bin/perl-5.005.dist" "$TARGET/usr/bin/perl-5.005"
+ fi
+ if [ ! -e "$TARGET/usr/bin/perl" ]; then
+ ln -sf perl-5.005 "$TARGET/usr/bin/perl"
+ fi
+}
+
+second_stage_install () {
+ x_core_install () {
+ in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ export DEBIAN_FRONTEND=Noninteractive
+
+ setup_proc
+ ln "$TARGET/sbin/ldconfig.new" "$TARGET/sbin/ldconfig"
+ in_target /sbin/ldconfig
+
+ x_core_install base-files base-passwd ldso
+ x_core_install dpkg
+
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ x_core_install $LIBC6
+
+ smallyes '' | x_core_install perl-5.005-base
+ x_core_install mawk
+ x_core_install debconf-tiny
+
+ in_target dpkg-preconfigure $(debfor $required $base)
+
+ repeat 5 in_target dpkg --force-depends --unpack $(debfor $required)
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ cp "$TARGET/bin/true" "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ in_target dpkg --configure --pending --force-configure-any --force-depends
+
+ smallyes '' | repeat 5 in_target dpkg --force-auto-select --force-overwrite --skip-same-version --install $(debfor $base)
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+}
diff --git a/sarge b/sarge
new file mode 100644
index 0000000..e6d77e3
--- /dev/null
+++ b/sarge
@@ -0,0 +1,219 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libc6 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libperl5.8 libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 initscripts sysvinit sysv-rc tar util-linux whiptail libgcc1 gcc-3.3-base libstdc++5"
+
+ base="adduser apt apt-utils libdb4.2 at base-config aptitude libsigc++-1.2-5c102 bsdmainutils console-common console-tools libconsole console-data cpio cron dhcp-client ed exim4 exim4-base exim4-config exim4-daemon-light libgcrypt11 libgnutls11 libgpg-error0 libopencdk8 libtasn1-2 fdutils gettext-base groff-base ifupdown info klogd libssl0.9.7 liblzo1 zlib1g liblockfile1 libpcre3 libwrap0 logrotate mailx man-db libgdbm3 manpages nano net-tools netbase netkit-inetd iputils-ping nvi ppp pppconfig pppoe pppoeconf libpcap0.7 sysklogd tasksel libtextwrap1 tcpd telnet libtext-iconv-perl wget"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+ IPFWTOOL=iptables
+
+ case $ARCH in
+ "alpha")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$base pciutils"
+ LIBC6="libc6.1"
+ IPFWTOOL="ipchains"
+ ;;
+ "arm")
+ base="$base libgpmg1"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "i386")
+ required="$(without_package "libperl5.8" "$required")"
+ base="$base pciutils psmisc"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "ia64")
+ required="$(subst_package "libc6" "libc6.1" "$required") libreadline4"
+ base="$base elilo efibootmgr dosfstools libparted1.6-12 parted"
+ LIBC6="libc6.1"
+ ;;
+ "m68k")
+ required="$required libreadline4"
+ base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross vmelilo"
+ IPFWTOOL="ipchains"
+ ;;
+ "powerpc")
+ required="$required libreadline4"
+ base="$base mac-fdisk amiga-fdisk psmisc powerpc-utils pciutils hfsutils"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "sparc")
+ base="$base silo eject pciutils sparc-utils"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "mips")
+ base="$base dvhtool pciutils"
+ ;;
+ "mipsel")
+ base="$base pciutils"
+ ;;
+ "hppa")
+ base="$base palo pciutils"
+ required="$(without_package "libstdc++2.10-glibc2.2" "$required")"
+ ;;
+ s390|s390x)
+ # base-config depends on console-tools and console-data
+ # so we can't exclude them although they are useless on s390
+ base="$base s390-tools telnetd devfsd"
+ base="$(without_package "console-tools-libs" "$base")"
+ base="$(without_package "fdutils" "$base")"
+ base="$(without_package "ppp" "$base")"
+ base="$(without_package "pppconfig" "$base")"
+ base="$(without_package "pppoe" "$base")"
+ base="$(without_package "pppoeconf" "$base")"
+ ;;
+ sh*)
+ base="$base libstdc++3 gcc-3.0-base"
+ base="$(without_package "fdutils" "$base")"
+ required="$required libgcc1"
+ required="$(without_package "libstdc++2.10-glibc2.2" "$required")"
+ ;;
+ "amd64")
+ base="$base pciutils psmisc"
+ IPFWTOOL="iptables"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+
+ base="$base $IPFWTOOL"
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ DEBIAN_FRONTEND=noninteractive
+ DEBCONF_NONINTERACTIVE_SEEN=true
+ export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+ baseprog=0
+ bases=40
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTBASE "Installing base system" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTBASE "Installing base system" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTBASE "Installing base system" #7
+ x_core_install debconf
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
+
+# if [ ! -e "$TARGET/etc/exim/exim.conf" ]; then
+# mkdir -p "$TARGET/etc/exim"
+# touch "$TARGET/etc/exim/exim.conf"
+# fi
+
+ info INSTBASE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ ln -sf /bin/true "$TARGET/usr/sbin/sendmail"
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ ln -sf exim4 "$TARGET/usr/sbin/sendmail"
+
+ p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTBASE "Installing base system" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/sarge.buildd b/sarge.buildd
new file mode 100644
index 0000000..ead74ca
--- /dev/null
+++ b/sarge.buildd
@@ -0,0 +1,168 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g"
+
+ base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "alpha")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ "arm")
+ ;;
+ "i386")
+ ;;
+ "ia64")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ "m68k")
+ ;;
+ "powerpc")
+ ;;
+ "sparc")
+ ;;
+ "mips")
+ ;;
+ "mipsel")
+ ;;
+ "hppa")
+ ;;
+ s390|s390x)
+ ;;
+ sh*)
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTBASE "Installing base system" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTBASE "Installing base system" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTBASE "Installing base system" #7
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
+
+ info INSTBASE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTBASE "Installing base system" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/sarge.fakechroot b/sarge.fakechroot
new file mode 100644
index 0000000..1001253
--- /dev/null
+++ b/sarge.fakechroot
@@ -0,0 +1,174 @@
+test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started"
+
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login mawk mount ncurses-base ncurses-bin passwd perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g"
+
+ base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ required="$required binutils fakechroot"
+ base="$(without_package "binutils" "$base")"
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "alpha")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ "arm")
+ ;;
+ "i386")
+ ;;
+ "ia64")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ "m68k")
+ ;;
+ "powerpc")
+ ;;
+ "sparc")
+ ;;
+ "mips")
+ ;;
+ "mipsel")
+ ;;
+ "hppa")
+ ;;
+ s390|s390x)
+ ;;
+ sh*)
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ : >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices_fakechroot
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc_fakechroot
+
+ DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTBASE "Installing base system" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ install_fakechroot_tools
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTBASE "Installing base system" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTBASE "Installing base system" #7
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
+
+ info INSTBASE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTBASE "Installing base system" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/sid b/sid
new file mode 100644
index 0000000..76cca38
--- /dev/null
+++ b/sid
@@ -0,0 +1,180 @@
+mirror_style release
+download_style apt
+finddebs_style from-indices
+variants - buildd fakechroot
+
+if doing_variant fakechroot; then
+ test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started"
+fi
+
+work_out_debs () {
+ LIBC6=libc6
+ if [ "$ARCH" = "alpha" -o "$ARCH" = "ia64" ]; then LIBC6="libc6.1"; fi
+
+ required="$(get_debs Priority: required)"
+
+ if doing_variant - || doing_variant fakechroot; then
+ #required="$required $(get_debs Priority: important)"
+ # ^^ should be getting debconf here somehow maybe
+ base="$(get_debs Priority: important)"
+ elif doing_variant buildd; then
+ base="$(get_debs Build-Essential: yes)"
+ fi
+
+ if doing_variant fakechroot; then
+ # ldd.fake needs binutils
+ required="$required binutils"
+ fi
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ if [ -x $TARGET/usr/bin/md5sum.textutils -a \! -e $TARGET/usr/bin/md5sum ]; then
+ cp $TARGET/usr/bin/md5sum.textutils $TARGET/usr/bin/md5sum
+ fi
+
+ if doing_variant fakechroot; then
+ setup_devices_fakechroot
+ else
+ setup_devices
+ fi
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ if doing_variant fakechroot; then
+ setup_proc_fakechroot
+ else
+ setup_proc
+ in_target /sbin/ldconfig
+ fi
+
+ DEBIAN_FRONTEND=noninteractive
+ DEBCONF_NONINTERACTIVE_SEEN=true
+ export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+ baseprog=0
+ bases=7
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ if doing_variant fakechroot; then
+ install_fakechroot_tools
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+ if doing_variant -; then
+ x_core_install debconf
+ fi
+
+ baseprog=0
+ bases=$(set -- $required; echo $#)
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ exec 7>&1
+
+ smallyes '' |
+ (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \
+ dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ smallyes '' |
+ (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \
+ dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING
+
+ baseprog=0
+ bases="$(set -- $base; echo $#)"
+
+ info UNPACKBASE "Unpacking the base system..."
+
+ smallyes '' |
+ (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \
+ dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING
+
+ info CONFBASE "Configuring the base system..."
+
+ smallyes '' |
+ (repeat 5 \
+ in_target_failmsg CONF_BASE_FAIL "Failure while configuring base packages." "" \
+ dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 || echo EXITCODE $?) |
+ dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases CONFBASE "Configuring base system"
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/warty b/warty
new file mode 100644
index 0000000..6842589
--- /dev/null
+++ b/warty
@@ -0,0 +1,169 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 debconf debconf-i18n liblocale-gettext-perl libtext-iconv-perl libtext-wrapi18n-perl libtext-charwidth-perl debianutils diff dpkg dselect libblkid1 e2fsprogs e2fslibs libcomerr2 libss2 libuuid1 findutils grep gzip hostname libcap1 libc6 libdb1-compat libdb3 libncurses5 libnewt0.51 libpam-modules libpam-runtime libpam0g libpopt0 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 lsb-base initscripts sysvinit sysv-rc tar util-linux zlib1g whiptail libgcc1 gcc-3.3-base libstdc++5"
+
+ base="adduser alsa-base alsa-utils apt apt-utils aptitude at base-config bind9-host bsdmainutils bzip2 console-common console-data console-tools cpio cramfsprogs cron dash dbus-1 dhcp3-client dhcp3-common discover1 discover1-data dmsetup dnsutils dosfstools ed eject evms evms-ncurses fdutils file ftp gettext-base gnupg groff-base hdparm hotplug ifrename ifupdown info initrd-tools iproute iptables iputils-arping iputils-ping iputils-tracepath jfsutils klogd less libasound2 libatm1 libbz2-1.0 libconsole libdb4.2 libdevmapper1.00 libdiscover1 libdns16 libevms-2.3 libexpat1 libfribidi0 libgc1 libgcrypt7 libgdbm3 libgnutls10 libgpg-error0 libgpmg1 libidn11 libisc7 libiw27 libldap2 liblockfile1 liblwres1 liblzo1 libmagic1 libncursesw5 libopencdk8 libparted1.6-0 libpcap0.7 libpcap0.8 libreiserfs0.3-0 libsasl2 libsigc++-1.2-5c102 libssl0.9.7 libtasn1-2 libusb-0.1-4 libwrap0 locales logrotate lshw lsof ltrace lvm-common lvm10 lvm2 mailx man-db manpages mdadm mii-diag mime-support module-init-tools mtr-tiny mutt nano net-tools netbase netcat netkit-inetd ntp ntpdate openssh-client parted pciutils popularity-contest postfix postfix-tls ppp pppconfig pppoeconf psmisc python python2.3 reiser4progs reiserfsprogs reportbug rsync strace sudo sysklogd tcpd tcpdump telnet time ubuntu-base udev usbutils vim vim-common w3m wget wireless-tools xfsprogs"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "i386")
+ required="$required libc6-i686"
+ base="$base dmidecode memtest86+ libreadline4"
+ ;;
+ "powerpc")
+ required="$required libreadline4"
+ base="$base hfsplus hfsutils libhfsp0 mac-fdisk pmac-fdisk powerpc-utils"
+ ;;
+ "amd64")
+ base="$base dmidecode libreadline4"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+install_debs () {
+ first_stage_install
+ second_stage_install
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ DEBIAN_FRONTEND=noninteractive
+ DEBCONF_NONINTERACTIVE_SEEN=true
+ export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ baseprog=0
+ bases=7
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+ x_core_install debconf
+
+ baseprog=0
+ bases="$(set -- $required; echo $#)"
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ smallyes '' | (repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1
+
+ baseprog=0
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+ #on_exit "(in_target_nofail umount /dev/pts) || true"
+
+ smallyes '' | (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1
+
+ baseprog=0
+ bases="$(set -- $base; echo $#)"
+
+ info UNPACKBASE "Unpacking the base system..."
+
+ smallyes '' | (repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --status-fd 8 --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1
+
+ baseprog=0
+
+ info CONFBASE "Configuring the base system..."
+
+ mv "$TARGET/usr/sbin/sendmail" "$TARGET/usr/sbin/sendmail.REAL"
+ ln -s /bin/true "$TARGET/usr/sbin/sendmail"
+
+ smallyes '' | (repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ mv "$TARGET/usr/sbin/sendmail.REAL" "$TARGET/usr/sbin/sendmail"
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases CONFBASE "Configuring base system"
+ info BASESUCCESS "Base system installed successfully."
+}
+
diff --git a/warty.buildd b/warty.buildd
new file mode 100644
index 0000000..9019d8d
--- /dev/null
+++ b/warty.buildd
@@ -0,0 +1,161 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils build-essential coreutils debianutils diff dpkg dselect e2fslibs e2fsprogs fakeroot findutils gcc-3.3-base grep gzip hostname initscripts libacl1 libattr1 libblkid1 libc6 libcap1 libcomerr2 libdb1-compat libdb3 libgcc1 libncurses5 libpam-modules libpam-runtime libpam0g libss2 libstdc++5 libuuid1 login lsb-base mawk mount ncurses-base ncurses-bin perl-base sed slang1a-utf8 sysv-rc sysvinit tar util-linux zlib1g"
+
+ base="apt binutils cpio cpp cpp-3.3 dpkg-dev g++ g++-3.3 gcc gcc-3.3 libc6-dev libdb4.2 libgdbm3 libstdc++5-3.3-dev linux-kernel-headers make patch perl perl-modules"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+ subst_package () {
+ echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "amd64")
+ ;;
+ "i386")
+ ;;
+ "powerpc")
+ ;;
+
+ # Unsupported architectures:
+ "alpha")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ "ia64")
+ required="$(subst_package "libc6" "libc6.1" "$required")"
+ base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+ LIBC6="libc6.1"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+install_debs () {
+ first_stage_install
+ second_stage_install
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #7
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTCORE "Installing core packages" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+ #on_exit "in_target_nofail umount /dev/pts"
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTCORE "Installing core packages" #29
+
+ info INSTCORE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTCORE "Installing core packages" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ p 9; progress $baseprog $bases INSTCORE "Installing core packages" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTCORE "Installing core packages" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/woody b/woody
new file mode 100644
index 0000000..49da1f8
--- /dev/null
+++ b/woody
@@ -0,0 +1,204 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils debconf debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname libcap1 libc6 libdb2 libdb3 libncurses5 libnewt0 libpam-modules libpam-runtime libpam0g libperl5.6 libpopt0 libreadline4 libstdc++2.10-glibc2.2 login makedev mawk modutils mount ncurses-base ncurses-bin passwd perl-base procps sed shellutils slang1 sysvinit tar textutils util-linux whiptail"
+
+ base="adduser apt apt-utils at base-config bsdmainutils console-common console-tools console-tools-libs console-data cpio cron dhcp-client ed exim fdutils gettext-base groff-base ifupdown info klogd libident libldap2 liblockfile1 libpcre3 libsasl7 libwrap0 logrotate mailx man-db manpages modconf nano net-tools netbase netkit-inetd netkit-ping nvi ppp pppconfig pppoe pppoeconf libpcap0 sysklogd tasksel tcpd telnet"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+ IPFWTOOL=iptables
+
+ case $ARCH in
+ "alpha")
+ required="$(without_package "libc6" "$required") libc6.1"
+ base="$base setserial aboot pciutils"
+ LIBC6="libc6.1"
+ IPFWTOOL="ipchains"
+ ;;
+ "arm")
+ base="$base setserial libgpmg1"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "i386")
+ required="$(without_package "libperl5.6" "$required") mbr"
+ base="$base lilo pciutils setserial syslinux psmisc pcmcia-cs"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "ia64")
+ required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base"
+ base="$base elilo efibootmgr dosfstools libparted1.4 parted"
+ LIBC6="libc6.1"
+ ;;
+ "m68k")
+ base="$base atari-bootstrap atari-fdisk amiga-fdisk eject mac-fdisk pmac-fdisk-cross setserial vmelilo"
+ IPFWTOOL="ipchains"
+ ;;
+ "powerpc")
+ base="$base quik mac-fdisk amiga-fdisk psmisc powerpc-utils setserial pciutils hfsutils yaboot pcmcia-cs"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "sparc")
+ base="$base silo eject pciutils sparc-utils"
+ IPFWTOOL="ipchains iptables"
+ ;;
+ "mips")
+ base="$base dvhtool pciutils setserial" # pcmcia-cs
+ ;;
+ "mipsel")
+ base="$base delo pciutils setserial" # pcmcia-cs
+ ;;
+ "hppa")
+ base="$base palo libstdc++3 gcc-3.0-base"
+ required="$(without_package "libstdc++2.10-glibc2.2" "$required")"
+ ;;
+ s390|s390x)
+ # base-config depends on console-data and console-common
+ # so we can't exclude them although they are useless on s390
+ base="$base s390-tools telnetd devfsd"
+ base="$(without_package "console-tools" "$base")"
+ base="$(without_package "console-tools-libs" "$base")"
+ base="$(without_package "fdutils" "$base")"
+ base="$(without_package "ppp" "$base")"
+ base="$(without_package "pppconfig" "$base")"
+ base="$(without_package "pppoe" "$base")"
+ base="$(without_package "pppoeconf" "$base")"
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+
+ base="$base $IPFWTOOL"
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ DEBIAN_FRONTEND=Noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTBASE "Installing base system" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTBASE "Installing base system" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTBASE "Installing base system" #7
+ x_core_install debconf
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
+
+ if [ ! -e "$TARGET/etc/exim/exim.conf" ]; then
+ mkdir -p "$TARGET/etc/exim"
+ touch "$TARGET/etc/exim/exim.conf"
+ fi
+
+ info INSTBASE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ ln -sf /bin/true "$TARGET/usr/sbin/sendmail"
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ rm -f "$TARGET/usr/sbin/sendmail"
+ ln -sf exim "$TARGET/usr/sbin/sendmail"
+
+ p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTBASE "Installing base system" #40
+ info BASESUCCESS "Base system installed successfully."
+}
diff --git a/woody.buildd b/woody.buildd
new file mode 100644
index 0000000..21867de
--- /dev/null
+++ b/woody.buildd
@@ -0,0 +1,168 @@
+mirror_style release
+download_style apt
+
+work_out_debs () {
+
+ required="base-files base-passwd bash bsdutils debianutils diff dpkg e2fsprogs fileutils findutils grep gzip hostname libc6 libcap1 libdb3 libgdbmg1 libncurses5 libpam-modules libpam-runtime libpam0g libperl5.6 libstdc++2.10-glibc2.2 login mawk mount ncurses-base ncurses-bin perl-base sed shellutils slang1 sysvinit tar textutils util-linux"
+
+ base="apt binutils cpio cpp cpp-2.95 debconf dpkg-dev g++ g++-2.95 gcc gcc-2.95 libc6-dev libdb2 libstdc++2.10-dev make patch perl perl-modules"
+
+ without_package () {
+ echo "$2" | tr ' ' '\n' | grep -v "^$1$" | tr '\n' ' '
+ }
+
+ LIBC6=libc6
+
+ case $ARCH in
+ "alpha")
+ required="$(without_package "libc6" "$required") libc6.1"
+ base="$(without_package "libc6-dev" "$base") libc6.1-dev"
+ LIBC6="libc6.1"
+ ;;
+ "arm")
+ ;;
+ "i386")
+ ;;
+ "ia64")
+ required="$(without_package "libc6" "$required") libc6.1 gcc-2.96-base libreadline4"
+ base="$(without_package "cpp-2.95" "$base") cpp-2.96"
+ base="$(without_package "gcc-2.95" "$base") gcc-2.96"
+ base="$(without_package "g++-2.95" "$base") g++-2.96"
+ base="$(without_package "libc6-dev" "$base") libc6.1-dev elilo efibootmgr dosfstools libparted1.4 parted"
+ LIBC6="libc6.1"
+ ;;
+ "m68k")
+ ;;
+ "powerpc")
+ ;;
+ "sparc")
+ ;;
+ "mips")
+ ;;
+ "mipsel")
+ ;;
+ "hppa")
+ ;;
+ s390|s390x)
+ ;;
+ sh*)
+ ;;
+ *)
+ # who knows?
+ ;;
+ esac
+}
+
+first_stage_install () {
+ extract $required
+
+ mkdir -p "$TARGET/var/lib/dpkg"
+ : >"$TARGET/var/lib/dpkg/status"
+ echo >"$TARGET/var/lib/dpkg/available"
+
+ setup_etc
+ if [ ! -e "$TARGET/etc/fstab" ]; then
+ echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
+ chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ fi
+
+ setup_devices
+
+ x_feign_install () {
+ local pkg="$1"
+ local deb="$(debfor $pkg)"
+ local ver="$(
+ ar -p "$TARGET/$deb" control.tar.gz | zcat |
+ tar -O -xf - control ./control 2>/dev/null |
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ )"
+
+ mkdir -p "$TARGET/var/lib/dpkg/info"
+
+ echo \
+"Package: $pkg
+Version: $ver
+Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+
+ touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
+ }
+
+ x_feign_install dpkg
+}
+
+second_stage_install () {
+ x_core_install () {
+ smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")
+ }
+
+ p () {
+ baseprog="$(($baseprog + ${1:-1}))"
+ }
+
+ setup_proc
+ in_target /sbin/ldconfig
+
+ DEBIAN_FRONTEND=noninteractive
+ export DEBIAN_FRONTEND
+
+ baseprog=0
+ bases=40
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #1
+ info INSTCORE "Installing core packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #2
+ ln -sf mawk $TARGET/usr/bin/awk
+ x_core_install base-files base-passwd
+ p; progress $baseprog $bases INSTBASE "Installing base system" #3
+ x_core_install dpkg
+
+ if [ ! -e "$TARGET/etc/localtime" ]; then
+ ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+ fi
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #4
+ x_core_install $LIBC6
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #5
+ x_core_install perl-base
+ p; progress $baseprog $bases INSTBASE "Installing base system" #6
+ rm $TARGET/usr/bin/awk
+ x_core_install mawk
+ p; progress $baseprog $bases INSTBASE "Installing base system" #7
+
+ info UNPACKREQ "Unpacking required packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #8
+ smallyes '' | repeat 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" dpkg --force-depends --unpack $(debfor $required)
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #18
+
+ info CONFREQ "Configuring required packages..."
+
+ mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
+ echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
+ chmod 755 "$TARGET/sbin/start-stop-daemon"
+
+ setup_dselect_method apt
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #19
+ smallyes '' | in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" dpkg --configure --pending --force-configure-any --force-depends
+ p 10; progress $baseprog $bases INSTBASE "Installing base system" #29
+
+ info INSTBASE "Installing base packages..."
+
+ p; progress $baseprog $bases INSTBASE "Installing base system" #30
+ smallyes '' | repeat 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" dpkg --force-auto-select --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base)
+
+ smallyes '' | repeat 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be attempted 5 times." "" dpkg --force-confold --skip-same-version --configure -a
+
+ p 9; progress $baseprog $bases INSTBASE "Installing base system" #39
+
+ mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon"
+
+ progress $bases $bases INSTBASE "Installing base system" #40
+ info BASESUCCESS "Base system installed successfully."
+}