Package: debootstrap
Version: 0.3.1.6
Tags: patch

Hi. I'm uploading the debootstrap with following changelog entry:

  * Added fakechroot support for etch and sid and tweaked fakechroot support
    for sarge. Now it installs the same packages like for the default variant.

The patch is included to this report.
-- 
 .''`.    Piotr Roszatycki, Netia SA
: :' :    mailto:[EMAIL PROTECTED]
`. `'     mailto:[EMAIL PROTECTED]
  `-
diff -ru debootstrap-0.3.1.6/etch debootstrap-0.3.1.6.1/etch
--- debootstrap-0.3.1.6/etch	2005-06-16 10:48:23.000000000 +0200
+++ debootstrap-0.3.1.6.1/etch	2005-09-14 19:59:46.000000000 +0200
@@ -1,6 +1,10 @@
 mirror_style release
 download_style apt
-variants - buildd
+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 () {
     add () { if [ "$ARCH" = "$1" ]; then eval "$2=\"\$$2 $3\""; fi; }
@@ -13,7 +17,7 @@
 
     required="base-files base-passwd bash bsdutils coreutils libacl1 libattr1 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 login makedev mawk mount ncurses-base ncurses-bin passwd perl-base procps sed slang1a-utf8 initscripts sysvinit sysv-rc tar util-linux libgcc1 gcc-3.3-base libstdc++5 zlib1g $LIBC6"
 
-    if doing_variant -; then 
+    if doing_variant - || doing_variant fakechroot; then 
       if [ "$ARCH" = "alpha" -o "$ARCH" = "m68k" ]; then
         IPFWTOOL="ipchains"
       elif [ "$ARCH" = "powerpc" -o "$ARCH" = sparc ]; then
@@ -61,6 +65,11 @@
     elif doing_variant buildd; then
       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"
     fi
+    
+    if doing_variant fakechroot; then 
+      # ldd.fake needs binutils
+      required="$required binutils"
+    fi
 }
 
 first_stage_install () {
@@ -76,7 +85,11 @@
         chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
     fi
 
-    setup_devices
+    if doing_variant fakechroot; then 
+        setup_devices_fakechroot
+    else
+        setup_devices
+    fi
 
     x_feign_install () {
         local pkg="$1"
@@ -109,8 +122,12 @@
 	baseprog="$(($baseprog + ${1:-1}))"
     }
 
-    setup_proc
-    in_target /sbin/ldconfig
+    if doing_variant fakechroot; then 
+	setup_proc_fakechroot
+    else
+	setup_proc
+	in_target /sbin/ldconfig
+    fi
 
     DEBIAN_FRONTEND=noninteractive
     export DEBIAN_FRONTEND
@@ -131,6 +148,10 @@
         ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
     fi
 
+    if doing_variant fakechroot; then 
+	install_fakechroot_tools
+    fi
+
     p; progress $baseprog $bases INSTBASE "Installing base system" #4
     x_core_install $LIBC6
 
diff -ru debootstrap-0.3.1.6/sarge.fakechroot debootstrap-0.3.1.6.1/sarge.fakechroot
--- debootstrap-0.3.1.6/sarge.fakechroot	2005-06-16 12:25:07.000000000 +0200
+++ debootstrap-0.3.1.6.1/sarge.fakechroot	2005-09-14 19:18:25.000000000 +0200
@@ -5,9 +5,9 @@
 
 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"
+    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="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"
+    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' ' '
@@ -16,46 +16,86 @@
         echo "$3" | tr ' ' '\n' | sed "s/^$1$/$2/" | tr '\n' ' '
     }
 
-    required="$required binutils fakechroot"
+    required="$required binutils"
     base="$(without_package "binutils" "$base")"
 
     LIBC6=libc6
+    IPFWTOOL=iptables
 
     case $ARCH in
         "alpha")
             required="$(subst_package "libc6" "libc6.1" "$required")"
-	    base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+            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")"
-	    base="$(subst_package "libc6-dev" "libc6.1-dev" "$base")"
+            required="$(subst_package "libc6" "libc6.1" "$required") libreadline4"
+            base="$base elilo efibootmgr dosfstools libparted1.6-12 parted"
             LIBC6="libc6.1"
             ;;
         "m68k")
+            required="$required libreadline4"
+            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")
+            required="$required libtext-iconv-perl zlib1g"
+            base="$base pciutils psmisc"
+	    IPFWTOOL="iptables"
+            ;;
         *)
             # who knows?
             ;;
     esac
+
+    base="$base $IPFWTOOL"
 }
 
 first_stage_install () {
@@ -136,6 +176,7 @@
     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..."
 
@@ -158,13 +199,24 @@
     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 -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  --force-confold --skip-same-version  --configure -a
 
+    rm -f "$TARGET/usr/sbin/sendmail"
+    ln -s 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"
diff -ru debootstrap-0.3.1.6/sid debootstrap-0.3.1.6.1/sid
--- debootstrap-0.3.1.6/sid	2005-06-16 10:48:23.000000000 +0200
+++ debootstrap-0.3.1.6.1/sid	2005-09-14 20:02:33.000000000 +0200
@@ -1,7 +1,11 @@
 mirror_style release
 download_style apt
 finddebs_style from-indices
-variants - buildd
+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
@@ -9,13 +13,18 @@
 
     required="$(get_debs Priority: required)"
 
-    if doing_variant -; then 
+    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 () {
@@ -31,7 +40,11 @@
         chown 0.0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
     fi
 
-    setup_devices
+    if doing_variant fakechroot; then 
+        setup_devices_fakechroot
+    else
+        setup_devices
+    fi
 
     x_feign_install () {
         local pkg="$1"
@@ -64,8 +77,12 @@
 	baseprog="$(($baseprog + ${1:-1}))"
     }
 
-    setup_proc
-    in_target /sbin/ldconfig
+    if doing_variant fakechroot; then 
+	setup_proc_fakechroot
+    else
+	setup_proc
+	in_target /sbin/ldconfig
+    fi
 
     DEBIAN_FRONTEND=noninteractive
     export DEBIAN_FRONTEND
@@ -86,6 +103,10 @@
         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
 

Reply via email to