mmdebstrap/tests
Johannes Schauer Marin Rodrigues 9cea818727
set DPkg::Chroot-Directory in APT_CONFIG
This is so that users calling apt-get install from a hook only need to
have APT_CONFIG=$MMDEBSTRAP_APT_CONFIG set and do not also have to pass
-oDPkg::Chroot-Directory="$1".

This breaks users running apt-get with
DPkg::Options::=--force-script-chrootless or with Dpkg::Pre-Install-Pkgs
from within a hook with APT_CONFIG=$MMDEBSTRAP_APT_CONFIG.

In those situations, DPkg::Chroot-Directory has to be set to the empty
string explicitly with -o to overwrite the APT_CONFIG setting.

Thanks: Helmut Grohne
2023-03-22 09:37:07 +01:00
..
apt-patterns Do not split --include values again in run_download and run_install 2023-01-16 12:13:21 +01:00
apt-patterns-custom Do not split --include values again in run_download and run_install 2023-01-16 12:13:21 +01:00
aptopt rewrite coverage.sh 2022-05-28 17:49:05 +02:00
arm64-without-qemu-support tests/arm64-without-qemu-support: removing qemu-user disables binfmt support again since src:systemd 251.2-4 2022-07-13 11:01:44 +02:00
as-debootstrap-unshare-wrapper tests: skip debootstrap tests variant - on oldstable because of #917773 2023-03-05 15:26:37 +01:00
ascii-armored-keys debian-archive-keyring now puts *.asc keys into /etc/apt/trusted.gpg.d 2023-03-18 04:53:28 +01:00
aspcud-apt-solver shellcheck everything 2022-11-16 13:59:38 +01:00
auto-mode-as-normal-user add tests/auto-mode-as-normal-user 2023-02-10 04:00:11 +01:00
auto-mode-without-unshare-capabilities tests: do not run sysctl -w kernel.unprivileged_userns_clone=1 as its the default value since linux 5.10.1 (Dec 2020) 2023-02-01 18:39:27 +01:00
automatic-mirror-from-suite rewrite coverage.sh 2022-05-28 17:49:05 +02:00
check-against-debootstrap-dist tests: skip debootstrap tests variant - on oldstable because of #917773 2023-03-05 15:26:37 +01:00
check-for-bit-by-bit-identical-format-output tests/check-for-bit-by-bit-identical-format-output: use the default user check 2023-03-05 19:26:13 +01:00
chroot-directory-not-accessible-by-apt-user rewrite coverage.sh 2022-05-28 17:49:05 +02:00
chrootless tests: fall back to diffoscope if cmp failed 2023-02-10 13:00:13 +01:00
chrootless-fakeroot tests: fall back to diffoscope if cmp failed 2023-02-10 13:00:13 +01:00
chrootless-foreign tests: fall back to diffoscope if cmp failed 2023-02-10 13:00:13 +01:00
compare-output-with-pre-seeded-var-cache-apt-archives shellcheck everything 2022-11-16 13:59:38 +01:00
copy-mirror rewrite coverage.sh 2022-05-28 17:49:05 +02:00
create-arm64-tarball tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
create-directory tests: more cleanup traps 2023-02-18 23:06:13 +01:00
create-directory-dry-run adjust tests as /var/lib/dpkg/arch is now created unconditionally 2022-10-16 15:20:02 +02:00
create-gzip-compressed-tarball tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
create-tarball-dry-run tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
create-tarball-with-tmp-mounted-nodev tests/create-tarball-with-tmp-mounted-nodev: increase tmpfs size 2022-10-16 21:58:41 +02:00
custom-tmpdir tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
customize-hook rewrite coverage.sh 2022-05-28 17:49:05 +02:00
cwd-directory-not-accessible-by-unshared-user tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
deb822-1-2 rewrite coverage.sh 2022-05-28 17:49:05 +02:00
deb822-2-2 rewrite coverage.sh 2022-05-28 17:49:05 +02:00
debootstrap move running debootstrap from make_mirror.sh to a test case 2023-02-12 14:05:09 +01:00
debootstrap-no-op-options rewrite coverage.sh 2022-05-28 17:49:05 +02:00
debug tests: do not run debug and verbose tests with variant standards for arches affected by #1031276 2023-03-13 13:21:18 +01:00
debug-output-on-fake-tty rewrite coverage.sh 2022-05-28 17:49:05 +02:00
dev-ptmx Assume that we can always run unshare 2023-02-12 14:05:08 +01:00
directory-ending-in-tar rewrite coverage.sh 2022-05-28 17:49:05 +02:00
dist-using-codename Use an caching apt proxy instead of copying /var/cache/apt/archives/*.deb 2023-03-03 08:34:39 +01:00
dpkgopt rewrite coverage.sh 2022-05-28 17:49:05 +02:00
eatmydata-via-hook-dir rewrite coverage.sh 2022-05-28 17:49:05 +02:00
empty-sources.list allow empty sources.list entries 2023-01-16 15:19:50 +01:00
error-if-stdout-is-tty error out if stdout is a tty 2022-07-28 17:20:57 +02:00
essential-hook tests: tzdata dropped /etc/timezone 2023-02-10 04:00:10 +01:00
existing-directory-with-lost-found rewrite coverage.sh 2022-05-28 17:49:05 +02:00
existing-empty-directory rewrite coverage.sh 2022-05-28 17:49:05 +02:00
fail-installing-to-existing-file tests: more cleanup traps 2023-02-18 23:06:13 +01:00
fail-installing-to-non-empty-lost-found rewrite coverage.sh 2022-05-28 17:49:05 +02:00
fail-installing-to-non-empty-target-directory rewrite coverage.sh 2022-05-28 17:49:05 +02:00
fail-installing-to-root rewrite coverage.sh 2022-05-28 17:49:05 +02:00
fail-with-missing-lz4 rewrite coverage.sh 2022-05-28 17:49:05 +02:00
fail-with-path-with-quotes tests: more cleanup traps 2023-02-18 23:06:13 +01:00
fail-without-etc-subuid try unsharing before automatically choosing unshare mode 2023-03-15 17:08:12 +01:00
fail-without-username-in-etc-subuid try unsharing before automatically choosing unshare mode 2023-03-15 17:08:12 +01:00
failing-customize-hook rewrite coverage.sh 2022-05-28 17:49:05 +02:00
file-mirror tests/file-mirror: wrap lines 2022-12-23 10:06:27 +01:00
file-mirror-automount-hook tests: replace adduser with useradd 2023-02-01 18:03:38 +01:00
help rewrite coverage.sh 2022-05-28 17:49:05 +02:00
hook-directory rewrite coverage.sh 2022-05-28 17:49:05 +02:00
i386-which-can-be-executed-without-qemu tests/i386-which-can-be-executed-without-qemu: fixup spurious merged-/usr problem 2022-12-23 10:06:27 +01:00
include rewrite coverage.sh 2022-05-28 17:49:05 +02:00
include-deb-file tests/include-deb-file: run in all modes 2023-03-19 09:03:19 +01:00
include-libmagic-mgc-arm64 adjust tests as /var/lib/dpkg/arch is now created unconditionally 2022-10-16 15:20:02 +02:00
include-libmagic-mgc-arm64-with-multiple-arch-options adjust tests as /var/lib/dpkg/arch is now created unconditionally 2022-10-16 15:20:02 +02:00
include-with-multiple-apt-sources rewrite coverage.sh 2022-05-28 17:49:05 +02:00
install-busybox-based-sub-essential-system tests: more cleanup traps 2023-02-18 23:06:13 +01:00
install-doc-debian tests: more cleanup traps 2023-02-18 23:06:13 +01:00
install-doc-debian-and-output-tarball tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
install-doc-debian-and-test-hooks tests: more cleanup traps 2023-02-18 23:06:13 +01:00
install-libmagic-mgc-on-arm64 tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
invalid-mirror rewrite coverage.sh 2022-05-28 17:49:05 +02:00
jessie-or-older tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
keyring debian-archive-keyring now puts *.asc keys into /etc/apt/trusted.gpg.d 2023-03-18 04:53:28 +01:00
keyring-overwrites rewrite coverage.sh 2022-05-28 17:49:05 +02:00
logfile tests: more cleanup traps 2023-02-18 23:06:13 +01:00
man rewrite coverage.sh 2022-05-28 17:49:05 +02:00
merged-fakechroot-inside-unmerged-chroot tests: fall back to diffoscope if cmp failed 2023-02-10 13:00:13 +01:00
mirror-is-deb rewrite coverage.sh 2022-05-28 17:49:05 +02:00
mirror-is-real-file rewrite coverage.sh 2022-05-28 17:49:05 +02:00
mirror-is-stdin rewrite coverage.sh 2022-05-28 17:49:05 +02:00
missing-dev-sys-proc-inside-the-chroot tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
missing-device-nodes-outside-the-chroot tests: do not run sysctl -w kernel.unprivileged_userns_clone=1 as its the default value since linux 5.10.1 (Dec 2020) 2023-02-01 18:39:27 +01:00
mmdebstrap tests: split out creation of mmdebstrap chroot into its own test to avoid running the same thing multiple times and speed up tests 2023-03-05 15:23:26 +01:00
mount-is-missing rewrite coverage.sh 2022-05-28 17:49:05 +02:00
multiple-include tests/multiple-include: be more liberal with packages adding or dropping maintainer scripts 2023-03-18 15:10:28 +01:00
no-sbin-in-path tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
not-having-to-install-apt-in-include-because-a-hook-did-it-before set DPkg::Chroot-Directory in APT_CONFIG 2023-03-22 09:37:07 +01:00
pass-distribution-but-implicitly-write-to-stdout rewrite coverage.sh 2022-05-28 17:49:05 +02:00
pivot_root Assume that we can always run unshare 2023-02-12 14:05:08 +01:00
preserve-mode-of-etc-resolv-conf-and-etc-hostname adjust tests as /var/lib/dpkg/arch is now created unconditionally 2022-10-16 15:20:02 +02:00
progress-bars-on-fake-tty run script with -e to catch exit code 2023-01-20 07:09:17 +01:00
quiet rewrite coverage.sh 2022-05-28 17:49:05 +02:00
read-from-stdin-write-to-stdout rewrite coverage.sh 2022-05-28 17:49:05 +02:00
remove-start-stop-daemon-and-policy-rc-d-in-hook rewrite coverage.sh 2022-05-28 17:49:05 +02:00
root-mode-inside-chroot tests/root-mode-inside-chroot: run test script with -x 2023-02-19 09:17:57 +01:00
root-mode-inside-unshare-chroot tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
root-without-cap-sys-admin rewrite coverage.sh 2022-05-28 17:49:05 +02:00
sigint-during-customize-hook shellcheck everything 2022-11-16 13:59:38 +01:00
signed-by-with-host-keys rewrite coverage.sh 2022-05-28 17:49:05 +02:00
signed-by-without-host-keys debian-archive-keyring now puts *.asc keys into /etc/apt/trusted.gpg.d 2023-03-18 04:53:28 +01:00
skip-mount add --skip=chroot/mount and --skip=chroot/mount/dev, --skip=chroot/mount/proc, --skip=chroot/mount/sys 2022-09-02 23:27:27 +02:00
skip-start-stop-daemon-policy-rc add --skip=chroot/start-stop-daemon and --skip=chroot/policy-rc.d 2022-09-02 23:25:48 +02:00
special-hooks-using-helpers shellcheck everything 2022-11-16 13:59:38 +01:00
special-hooks-using-helpers-and-env-vars rewrite coverage.sh 2022-05-28 17:49:05 +02:00
special-hooks-with-mode-mode tests: redirect all id output to /dev/null 2023-02-09 10:53:09 +01:00
stable-default-mirror rewrite coverage.sh 2022-05-28 17:49:05 +02:00
supply-components-manually rewrite coverage.sh 2022-05-28 17:49:05 +02:00
tarfilter-idshift tests: do not run sysctl -w kernel.unprivileged_userns_clone=1 as its the default value since linux 5.10.1 (Dec 2020) 2023-02-01 18:39:27 +01:00
unpack-doc-debian tests: more cleanup traps 2023-02-18 23:06:13 +01:00
unshare-as-root-user rewrite coverage.sh 2022-05-28 17:49:05 +02:00
unshare-as-root-user-inside-chroot rewrite coverage.sh 2022-05-28 17:49:05 +02:00
unshare-include-deb tests: more cleanup traps 2023-02-18 23:06:13 +01:00
variant-custom-timeout fix mmdebstrap hanging if apt in download step failed (closes: #1017795) 2022-08-30 21:55:57 +02:00
verbose tests: do not run debug and verbose tests with variant standards for arches affected by #1031276 2023-03-13 13:21:18 +01:00
version shellcheck everything 2022-11-16 13:59:38 +01:00
without-etc-resolv-conf-and-etc-hostname rewrite coverage.sh 2022-05-28 17:49:05 +02:00
xz-compressed-tarball rewrite coverage.sh 2022-05-28 17:49:05 +02:00