debootstrap: Update from 1.0.93 to 1.0.97
[termux-packages] / packages / debootstrap / debootstrap.patch
CommitLineData
8c2c059b
FF
1diff -u -r ../debootstrap-1.0.97/debootstrap ./debootstrap
2--- ../debootstrap-1.0.97/debootstrap 2018-04-17 04:06:32.000000000 +0200
3+++ ./debootstrap 2018-04-30 03:14:32.764728670 +0200
4@@ -14,7 +14,7 @@
ecb00a9a
PR
5 if [ -x /debootstrap/debootstrap ]; then
6 DEBOOTSTRAP_DIR=/debootstrap
7 else
8- DEBOOTSTRAP_DIR=/usr/share/debootstrap
9+ DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap
10 fi
11 fi
8c2c059b
FF
12
13@@ -468,10 +468,10 @@
14
ecb00a9a
PR
15 if in_path dpkg && \
16 dpkg --print-architecture >/dev/null 2>&1; then
8c2c059b
FF
17- HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
18+ HOST_ARCH=$($PREFIX/bin/dpkg --print-architecture)
ecb00a9a
PR
19 elif in_path udpkg && \
20 udpkg --print-architecture >/dev/null 2>&1; then
8c2c059b
FF
21- HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
22+ HOST_ARCH=$($PREFIX/bin/udpkg --print-architecture)
23 elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
24 HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
ecb00a9a 25 fi
8c2c059b 26@@ -512,7 +512,8 @@
ecb00a9a
PR
27 if [ "$TARGET" = "/" ]; then
28 CHROOT_CMD=""
29 else
8c2c059b 30- CHROOT_CMD="chroot \"$TARGET\""
ecb00a9a
PR
31+ PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin
32+ CHROOT_CMD="proot -w /home -b /dev -b /proc --link2symlink -0 -r $TARGET"
33 fi
8c2c059b
FF
34
35 # fakeroot cannot check /proc/1/environ
36@@ -532,16 +533,6 @@
37
ecb00a9a 38 export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD
8c2c059b 39
ecb00a9a 40-if am_doing_phase first_stage second_stage; then
8c2c059b 41- if in_path id && [ "$(id -u)" -ne 0 ]; then
ecb00a9a
PR
42- error 1 NEEDROOT "debootstrap can only run as root"
43- fi
44- # Ensure that we can create working devices and executables on the target.
45- if ! check_sane_mount "$TARGET"; then
46- error 1 NOEXEC "Cannot install into target '$TARGET' mounted with noexec or nodev"
47- fi
48-fi
49-
50 if [ ! -e "$SCRIPT" ]; then
51 error 1 NOSCRIPT "No such script: %s" "$SCRIPT"
52 fi