* remove_tree() requires the CWD to be accessible or fails with
cannot chdir to $CWD from $DIR_TO_DELETE: Permission denied, aborting.
* CWD is not always accessible -- example: run mmdebstrap from a
directory only accessible by the current user (like a tempdir) in
unshare mode
* find from findutils *also* requires CWD to be accessible but it's
easier to temporarily change CWD in a subprocess because using
there is no utility in perl core that changes CWD temporarily and
cleans up after itself
* we need to use find from findutils instead of rm in unshare mode
because the root directory itself might not be removable by the
unshared user so we only want to remove its subdirectories
There are now systems with 160 cores (debci runs on two Ampere Altra
ARMv8 Neoverse-N1), which makes xz fail with: "xz: (stdin): Cannot
allocate memory"
- use /etc/ld.so.conf from the chroot instead of the host
- parse /etc/ld.so.conf instead of blindly accessing /etc/ld.so.conf.d
- add libraries from the chroot instead of the host
- instead of throwing an error, just print a warning
- can now run as root without cap_sys_admin
- can now run without mount installed
- --skip=check/canmount is not needed anymore
- gpg will not create a trustdb when running with --update-trustdb with
--trust-model=always:
gpg: no need for a trustdb update with 'always' trust model
- subsequent gpg calls will fail because there is no trustdb in GPGHOME
- use $REAL_USER_ID from English instead of $<
- use getgrgid $REAL_GROUP_ID to get the group name instead of assuming
the group name to be equal to the user name
- also check whether /etc/subgid exists and is readable
This is fixing the error:
cannot rmdir /var/lib/apt/lists/auxfiles: Directory not empty at ./mmdebstrap/mmdebstrap line 3084.
which happens when using apt-transport-mirror.