2020-03-08 18:43:06 +01:00
|
|
|
diff -uNr debootstrap-1.0.120/functions debootstrap-1.0.120.mod/functions
|
|
|
|
--- debootstrap-1.0.120/functions 2020-03-07 19:01:59.000000000 +0200
|
|
|
|
+++ debootstrap-1.0.120.mod/functions 2020-03-08 19:42:15.194564546 +0200
|
2018-08-27 21:47:42 +02:00
|
|
|
@@ -230,17 +230,7 @@
|
2018-07-10 16:46:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
detect_container () {
|
|
|
|
- if [ "$container" = lxc ]; then
|
|
|
|
- CONTAINER="lxc"
|
|
|
|
- elif grep -qs container=lxc-libvirt /proc/1/environ; then
|
|
|
|
- CONTAINER="lxc-libvirt"
|
2020-03-08 18:43:06 +01:00
|
|
|
- elif grep -qs ^systemd-nspawn$ /run/systemd/container || grep -qs systemd-nspawn /proc/1/environ || [ "$container" = "systemd-nspawn" ]; then
|
2018-07-10 16:46:43 +02:00
|
|
|
- CONTAINER="systemd-nspawn"
|
|
|
|
- elif grep -qs '[[:space:]]/docker/.*/sys/fs/cgroup' /proc/1/mountinfo; then
|
|
|
|
- CONTAINER="docker"
|
|
|
|
- else
|
|
|
|
- CONTAINER=""
|
|
|
|
- fi
|
|
|
|
+ CONTAINER=""
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################## variant handling
|
2020-03-08 18:43:06 +01:00
|
|
|
@@ -965,7 +955,7 @@
|
2017-06-06 10:20:41 +02:00
|
|
|
extract_dpkg_deb_data () {
|
|
|
|
local pkg="$1"
|
2017-08-09 23:18:25 +02:00
|
|
|
|
2018-08-27 21:47:42 +02:00
|
|
|
- dpkg-deb --fsys-tarfile "$pkg" | tar $EXTRACT_DEB_TAR_OPTIONS -xf - || error 1 FILEEXIST "Tried to extract package, but file already exists. Exit..."
|
|
|
|
+ dpkg-deb --fsys-tarfile "$pkg" | proot --link2symlink tar $EXTRACT_DEB_TAR_OPTIONS -xf - || error 1 FILEEXIST "Tried to extract package, but file already exists. Exit..."
|
2017-06-06 10:20:41 +02:00
|
|
|
}
|
2017-08-09 23:18:25 +02:00
|
|
|
|
2017-06-06 10:20:41 +02:00
|
|
|
# Raw .deb extractors
|
2020-03-08 18:43:06 +01:00
|
|
|
@@ -1005,7 +995,7 @@
|
2018-04-30 03:26:35 +02:00
|
|
|
esac
|
2017-08-09 23:18:25 +02:00
|
|
|
|
2018-04-30 03:26:35 +02:00
|
|
|
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 -
|
2017-06-06 10:20:41 +02:00
|
|
|
else
|
|
|
|
error 1 UNPACKCMDUNVL "Extracting %s requires the %s command, which is not available" "$pkg" "$cat_cmd"
|
|
|
|
fi
|
2020-03-08 18:43:06 +01:00
|
|
|
@@ -1061,7 +1051,7 @@
|
2018-07-10 16:46:43 +02:00
|
|
|
); }
|
|
|
|
|
|
|
|
in_target_nofail () {
|
|
|
|
- if ! PATH=/sbin:/usr/sbin:/bin:/usr/bin eval "$CHROOT_CMD \"\$@\"" 2>/dev/null; then
|
|
|
|
+ if ! PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin $CHROOT_CMD "$@" 2>/dev/null; then
|
|
|
|
true
|
|
|
|
fi
|
|
|
|
return 0
|
2020-03-08 18:43:06 +01:00
|
|
|
@@ -1073,7 +1063,7 @@
|
2018-07-10 16:46:43 +02:00
|
|
|
msg="$2"
|
|
|
|
arg="$3"
|
|
|
|
shift; shift; shift
|
|
|
|
- if ! PATH=/sbin:/usr/sbin:/bin:/usr/bin eval "$CHROOT_CMD \"\$@\""; then
|
|
|
|
+ if ! PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin $CHROOT_CMD "$@"; then
|
|
|
|
warning "$code" "$msg" "$arg"
|
|
|
|
# Try to point user at actual failing package.
|
|
|
|
msg="See %s for details"
|
2020-03-08 18:43:06 +01:00
|
|
|
@@ -1250,7 +1240,6 @@
|
2018-06-21 22:32:14 +02:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
2017-06-06 10:20:41 +02:00
|
|
|
- setup_devices_simple
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|