debootstrap: Update from 1.0.93 to 1.0.97

This commit is contained in:
Fredrik Fornwall 2018-04-30 03:26:35 +02:00
parent babd466009
commit e63f7399e1
4 changed files with 43 additions and 44 deletions

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://wiki.debian.org/Debootstrap TERMUX_PKG_HOMEPAGE=https://wiki.debian.org/Debootstrap
TERMUX_PKG_DESCRIPTION="Bootstrap a basic Debian system" TERMUX_PKG_DESCRIPTION="Bootstrap a basic Debian system"
TERMUX_PKG_VERSION=1.0.93 TERMUX_PKG_VERSION=1.0.97
TERMUX_PKG_SHA256=cdad4d2be155bd933acbe4f3479e1765e5f4447fb50564e30e33f7b3b84bd7db TERMUX_PKG_SHA256=d3e6bef403dbabade11d098214030d5063c6b238d3751b159f727af7556c5cf0
TERMUX_PKG_SRCURL=http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${TERMUX_PKG_VERSION}.tar.gz 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_BUILD_IN_SRC=yes
TERMUX_PKG_DEPENDS="wget, proot, perl" TERMUX_PKG_DEPENDS="wget, proot, perl"

View File

@ -1,8 +1,7 @@
diff --git a/debootstrap b/debootstrap diff -u -r ../debootstrap-1.0.97/debootstrap ./debootstrap
index 4658e0f..1672990 100755 --- ../debootstrap-1.0.97/debootstrap 2018-04-17 04:06:32.000000000 +0200
--- a/debootstrap +++ ./debootstrap 2018-04-30 03:14:32.764728670 +0200
+++ b/debootstrap @@ -14,7 +14,7 @@
@@ -14,7 +14,7 @@ if [ -z "$DEBOOTSTRAP_DIR" ]; then
if [ -x /debootstrap/debootstrap ]; then if [ -x /debootstrap/debootstrap ]; then
DEBOOTSTRAP_DIR=/debootstrap DEBOOTSTRAP_DIR=/debootstrap
else else
@ -10,36 +9,36 @@ index 4658e0f..1672990 100755
+ DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap + DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap
fi fi
fi fi
@@ -421,10 +421,10 @@ fi @@ -468,10 +468,10 @@
if in_path dpkg && \ if in_path dpkg && \
dpkg --print-architecture >/dev/null 2>&1; then dpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=`/usr/bin/dpkg --print-architecture` - HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
+ HOST_ARCH=`$PREFIX/bin/dpkg --print-architecture` + HOST_ARCH=$($PREFIX/bin/dpkg --print-architecture)
elif in_path udpkg && \ elif in_path udpkg && \
udpkg --print-architecture >/dev/null 2>&1; then udpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=`/usr/bin/udpkg --print-architecture` - HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
+ HOST_ARCH=`$PREFIX/bin/udpkg --print-architecture` + HOST_ARCH=$($PREFIX/bin/udpkg --print-architecture)
elif [ -e $DEBOOTSTRAP_DIR/arch ]; then elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
HOST_ARCH=`cat $DEBOOTSTRAP_DIR/arch` HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
fi fi
@@ -465,7 +465,8 @@ fi @@ -512,7 +512,8 @@
if [ "$TARGET" = "/" ]; then if [ "$TARGET" = "/" ]; then
CHROOT_CMD="" CHROOT_CMD=""
else else
- CHROOT_CMD="chroot $TARGET" - CHROOT_CMD="chroot \"$TARGET\""
+ PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin + PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin
+ CHROOT_CMD="proot -w /home -b /dev -b /proc --link2symlink -0 -r $TARGET" + CHROOT_CMD="proot -w /home -b /dev -b /proc --link2symlink -0 -r $TARGET"
fi fi
if [ -z "$SHA_SIZE" ]; then # fakeroot cannot check /proc/1/environ
@@ -478,16 +479,6 @@ DEBOOTSTRAP_CHECKSUM_FIELD="SHA$SHA_SIZE" @@ -532,16 +533,6 @@
export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD
-if am_doing_phase first_stage second_stage; then -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" - error 1 NEEDROOT "debootstrap can only run as root"
- fi - fi
- # Ensure that we can create working devices and executables on the target. - # Ensure that we can create working devices and executables on the target.

View File

@ -1,7 +1,7 @@
diff -u -r ../debootstrap-1.0.91/functions ./functions diff -u -r ../debootstrap-1.0.97/functions ./functions
--- ../debootstrap-1.0.91/functions 2017-07-25 05:02:27.000000000 +0200 --- ../debootstrap-1.0.97/functions 2018-04-17 04:06:32.000000000 +0200
+++ ./functions 2017-08-09 23:16:36.589942373 +0200 +++ ./functions 2018-04-30 03:18:01.010494588 +0200
@@ -883,7 +883,7 @@ @@ -906,7 +906,7 @@
extract_dpkg_deb_data () { extract_dpkg_deb_data () {
local pkg="$1" local pkg="$1"
@ -10,15 +10,16 @@ diff -u -r ../debootstrap-1.0.91/functions ./functions
} }
# Raw .deb extractors # Raw .deb extractors
@@ -922,6 +922,7 @@ @@ -946,7 +946,7 @@
esac
if in_path $cat_cmd; then if in_path "$cat_cmd"; then
ar -p "$pkg" "$tarball" | $cat_cmd | tar $EXTRACT_DEB_TAR_OPTIONS -xf - - 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 - + ar -p "$pkg" "$tarball" | "$cat_cmd" | proot --link2symlink tar $EXTRACT_DEB_TAR_OPTIONS -xf -
else else
error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd" error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
fi fi
@@ -1139,7 +1140,6 @@ @@ -1171,7 +1171,6 @@
hurd*) hurd*)
;; ;;
*) *)

View File

@ -1,28 +1,27 @@
diff --git a/scripts/sid b/scripts/sid diff -u -r ../debootstrap-1.0.97/scripts/debian-common ./scripts/debian-common
index 1d96477..e899d42 100644 --- ../debootstrap-1.0.97/scripts/debian-common 2018-04-17 04:06:32.000000000 +0200
--- a/scripts/sid +++ ./scripts/debian-common 2018-04-30 03:21:24.616305825 +0200
+++ b/scripts/sid @@ -52,7 +52,7 @@
@@ -58,7 +58,7 @@ first_stage_install () {
setup_etc setup_etc
if [ ! -e "$TARGET/etc/fstab" ]; then if [ ! -e "$TARGET/etc/fstab" ]; then
echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab"
- chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" - chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab"
+ chmod 644 "$TARGET/etc/fstab" + chmod 644 "$TARGET/etc/fstab"
fi fi
setup_devices setup_devices
@@ -96,7 +96,6 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" @@ -92,7 +92,6 @@
if doing_variant fakechroot; then if doing_variant fakechroot; then
setup_proc_fakechroot setup_proc_fakechroot
else else
- setup_proc - setup_proc
in_target /sbin/ldconfig in_target /sbin/ldconfig
fi fi
@@ -166,6 +165,20 @@ echo @@ -162,6 +161,20 @@
echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon" echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
chmod 755 "$TARGET/sbin/start-stop-daemon" chmod 755 "$TARGET/sbin/start-stop-daemon"
+ # Replace problematic binaries with a stub + # Replace problematic binaries with a stub
+ echo "" > "$TARGET/bin/chown" + echo "" > "$TARGET/bin/chown"
+ echo "" > "$TARGET/usr/sbin/groupadd" + 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" + echo "nameserver 8.8.8.8\nnameserver 8.8.4.4" > "$TARGET/etc/resolv.conf"
+ +
setup_dselect_method apt setup_dselect_method apt
smallyes '' | smallyes '' |