1 diff -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
5 if [ -x /debootstrap/debootstrap ]; then
6 DEBOOTSTRAP_DIR=/debootstrap
8 - DEBOOTSTRAP_DIR=/usr/share/debootstrap
9 + DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap
16 dpkg --print-architecture >/dev/null 2>&1; then
17 - HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
18 + HOST_ARCH=$($PREFIX/bin/dpkg --print-architecture)
19 elif in_path udpkg && \
20 udpkg --print-architecture >/dev/null 2>&1; then
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")
27 if [ "$TARGET" = "/" ]; then
30 - CHROOT_CMD="chroot \"$TARGET\""
31 + PATH=$PATH:/usr/bin:/bin:/usr/sbin:/sbin
32 + CHROOT_CMD="proot -w /home -b /dev -b /proc --link2symlink -0 -r $TARGET"
35 # fakeroot cannot check /proc/1/environ
38 export ARCH SUITE TARGET CHROOT_CMD SHA_SIZE DEBOOTSTRAP_CHECKSUM_FIELD
40 -if am_doing_phase first_stage second_stage; then
41 - if in_path id && [ "$(id -u)" -ne 0 ]; then
42 - error 1 NEEDROOT "debootstrap can only run as root"
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"
50 if [ ! -e "$SCRIPT" ]; then
51 error 1 NOSCRIPT "No such script: %s" "$SCRIPT"