debootstrap: Update from 1.0.93 to 1.0.97
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 30 Apr 2018 01:26:35 +0000 (03:26 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 30 Apr 2018 01:26:35 +0000 (03:26 +0200)
packages/debootstrap/build.sh
packages/debootstrap/debootstrap.patch
packages/debootstrap/functions.patch
packages/debootstrap/scripts-debian-common.patch [moved from packages/debootstrap/scripts.patch with 78% similarity]

index e00e1a8..3809a59 100644 (file)
@@ -1,7 +1,7 @@
 TERMUX_PKG_HOMEPAGE=https://wiki.debian.org/Debootstrap
 TERMUX_PKG_DESCRIPTION="Bootstrap a basic Debian system"
-TERMUX_PKG_VERSION=1.0.93
-TERMUX_PKG_SHA256=cdad4d2be155bd933acbe4f3479e1765e5f4447fb50564e30e33f7b3b84bd7db
+TERMUX_PKG_VERSION=1.0.97
+TERMUX_PKG_SHA256=d3e6bef403dbabade11d098214030d5063c6b238d3751b159f727af7556c5cf0
 TERMUX_PKG_SRCURL=http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${TERMUX_PKG_VERSION}.tar.gz
 TERMUX_PKG_BUILD_IN_SRC=yes
 TERMUX_PKG_DEPENDS="wget, proot, perl"
index 4451783..ca99a08 100644 (file)
@@ -1,8 +1,7 @@
-diff --git a/debootstrap b/debootstrap
-index 4658e0f..1672990 100755
---- a/debootstrap
-+++ b/debootstrap
-@@ -14,7 +14,7 @@ if [ -z "$DEBOOTSTRAP_DIR" ]; then
+diff -u -r ../debootstrap-1.0.97/debootstrap ./debootstrap
+--- ../debootstrap-1.0.97/debootstrap  2018-04-17 04:06:32.000000000 +0200
++++ ./debootstrap      2018-04-30 03:14:32.764728670 +0200
+@@ -14,7 +14,7 @@
        if [ -x /debootstrap/debootstrap ]; then
                DEBOOTSTRAP_DIR=/debootstrap
        else
@@ -10,36 +9,36 @@ index 4658e0f..1672990 100755
 +              DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap
        fi
  fi
-
-@@ -421,10 +421,10 @@ fi
-
+@@ -468,10 +468,10 @@
  if in_path dpkg && \
       dpkg --print-architecture >/dev/null 2>&1; then
--      HOST_ARCH=`/usr/bin/dpkg --print-architecture`
-+      HOST_ARCH=`$PREFIX/bin/dpkg --print-architecture`
+-      HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
++      HOST_ARCH=$($PREFIX/bin/dpkg --print-architecture)
  elif in_path udpkg && \
       udpkg --print-architecture >/dev/null 2>&1; then
--      HOST_ARCH=`/usr/bin/udpkg --print-architecture`
-+      HOST_ARCH=`$PREFIX/bin/udpkg --print-architecture`
- elif [ -e $DEBOOTSTRAP_DIR/arch ]; then
-       HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch`
+-      HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
++      HOST_ARCH=$($PREFIX/bin/udpkg --print-architecture)
+ elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
+       HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
  fi
-@@ -465,7 +465,8 @@ fi
+@@ -512,7 +512,8 @@
  if [ "$TARGET" = "/" ]; then
        CHROOT_CMD=""
  else
--      CHROOT_CMD="chroot $TARGET"
+-      CHROOT_CMD="chroot \"$TARGET\""
 +      PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin
 +      CHROOT_CMD="proot -w /home -b /dev -b /proc --link2symlink -0 -r $TARGET"
  fi
-
if [ -z "$SHA_SIZE" ]; then
-@@ -478,16 +479,6 @@ DEBOOTSTRAP_CHECKSUM_FIELD="SHA$SHA_SIZE"
-
# fakeroot cannot check /proc/1/environ
+@@ -532,16 +533,6 @@
  export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD
-
 -if am_doing_phase first_stage second_stage; then
--      if in_path id && [ `id -u` -ne 0 ]; then
+-      if in_path id && [ "$(id -u)" -ne 0 ]; then
 -              error 1 NEEDROOT "debootstrap can only run as root"
 -      fi
 -      # Ensure that we can create working devices and executables on the target.
index 67c7a99..4f91e63 100644 (file)
@@ -1,7 +1,7 @@
-diff -u -r ../debootstrap-1.0.91/functions ./functions
---- ../debootstrap-1.0.91/functions    2017-07-25 05:02:27.000000000 +0200
-+++ ./functions        2017-08-09 23:16:36.589942373 +0200
-@@ -883,7 +883,7 @@
+diff -u -r ../debootstrap-1.0.97/functions ./functions
+--- ../debootstrap-1.0.97/functions    2018-04-17 04:06:32.000000000 +0200
++++ ./functions        2018-04-30 03:18:01.010494588 +0200
+@@ -906,7 +906,7 @@
  extract_dpkg_deb_data () {
        local pkg="$1"
  
@@ -10,15 +10,16 @@ diff -u -r ../debootstrap-1.0.91/functions ./functions
  }
  
  # Raw .deb extractors
-@@ -922,6 +922,7 @@
+@@ -946,7 +946,7 @@
+       esac
  
-       if in_path $cat_cmd; then
-               ar -p "$pkg" "$tarball" | $cat_cmd | tar $EXTRACT_DEB_TAR_OPTIONS -xf -
-+              ar -p "$pkg" "$tarball" | $cat_cmd | proot --link2symlink tar $EXTRACT_DEB_TAR_OPTIONS -xf -
+       if in_path "$cat_cmd"; then
+-              ar -p "$pkg" "$tarball" | "$cat_cmd" | tar $EXTRACT_DEB_TAR_OPTIONS -xf -
++              ar -p "$pkg" "$tarball" | "$cat_cmd" | proot --link2symlink tar $EXTRACT_DEB_TAR_OPTIONS -xf -
        else
                error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
        fi
-@@ -1139,7 +1140,6 @@
+@@ -1171,7 +1171,6 @@
            hurd*)
                ;;
            *)
similarity index 78%
rename from packages/debootstrap/scripts.patch
rename to packages/debootstrap/scripts-debian-common.patch
index d12d30e..252ef73 100644 (file)
@@ -1,28 +1,27 @@
-diff --git a/scripts/sid b/scripts/sid
-index 1d96477..e899d42 100644
---- a/scripts/sid
-+++ b/scripts/sid
-@@ -58,7 +58,7 @@ first_stage_install () {
+diff -u -r ../debootstrap-1.0.97/scripts/debian-common ./scripts/debian-common
+--- ../debootstrap-1.0.97/scripts/debian-common        2018-04-17 04:06:32.000000000 +0200
++++ ./scripts/debian-common    2018-04-30 03:21:24.616305825 +0200
+@@ -52,7 +52,7 @@
        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"
 +              chmod 644 "$TARGET/etc/fstab"
        fi
-
        setup_devices
-@@ -96,7 +96,6 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
+@@ -92,7 +92,6 @@
        if doing_variant fakechroot; then
                setup_proc_fakechroot
        else
 -              setup_proc
                in_target /sbin/ldconfig
        fi
-
-@@ -166,6 +165,20 @@ echo
+@@ -162,6 +161,20 @@
  echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
        chmod 755 "$TARGET/sbin/start-stop-daemon"
-
 +      # Replace problematic binaries with a stub
 +      echo "" > "$TARGET/bin/chown"
 +      echo "" > "$TARGET/usr/sbin/groupadd"
@@ -38,5 +37,5 @@ index 1d96477..e899d42 100644
 +      echo "nameserver 8.8.8.8\nnameserver 8.8.4.4" > "$TARGET/etc/resolv.conf"
 +
        setup_dselect_method apt
-
        smallyes '' |