|
@ -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 |
|
@ -11,35 +10,35 @@ index 4658e0f..1672990 100755 |
|
|
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.
|
|
|