Commit graph

126 commits

Author SHA1 Message Date
c82fc7e261
format shell scripts with shfmt --binary-next-line --case-indent --indent 2 --simplify 2024-10-11 18:32:57 +02:00
eca6cb314c
tests/tarfilter-idshift: use a fabricated tarball instead of real chroot
iputils-ping does not ship /bin/ping with xattrs anymore.
2024-10-11 11:16:14 +02:00
acf036fa79
qemu-user now includes the static binary and qemu-user-static will be dropped in the long-term 2024-09-13 01:13:04 +02:00
d9c04338f8
support chrootless hurd-i386
$ mmdebstrap --variant=apt --include=passwd,debian-ports-archive-keyring,mmdebstrap,sysvinit-core,sysv-rc \
    --customize-hook='chroot "$1" mmdebstrap --mode=chrootless --arch=hurd-i386 --include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,gnumach-image-1-486 --customize-hook="passwd --root=\"\$1\" --delete root" --variant=apt unstable /tmp/chroot.tar "deb http://ftp.ports.debian.org/debian-ports/ unstable main" "deb http://ftp.ports.debian.org/debian-ports/ unreleased main"' \
    --customize-hook='copy-out /tmp/chroot.tar .' unstable /dev/null
$ /sbin/mkfs.ext2 -q -F -o hurd -I 128 -b 4096 -d chroot.tar hurd.ext2 204800
$ qemu-system-i386 -nographic -net user,hostfwd=tcp:127.0.0.1:2222-:22 \
    -net nic,model=e1000 -m 1G -kernel gnumach-1.8-486-up \
    -append 'root=device:hd0 console=com0' --initrd './ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume),./exec.static $(exec-task=task-create)' \
    -drive file=hurd.ext2,format=raw
2024-08-27 01:15:00 +02:00
d0568a2b9e
Wait for (reap) potential zombies and otherwise long-running background processes
Otherwise they might hog resources like /dev/null which can then not be
unmounted resulting in their mountpoints (the regular files) not being
removable and then the removal of device nodes in run_cleanup (if
mmdebstrap is run with --skip=output/dev) will fail.

Another potential solution would be to run each hook and apt invocation
in its own process namespace but this would require to remount /proc and
this in turn would require a new mount namespace as well but we'd like
to keep the mount namespace across multiple hooks...
2024-08-18 22:07:52 +02:00
6262c1921c
tests/check-against-debootstrap-dist: allow for different installation order of passwd and systemd 2024-06-26 07:35:26 +02:00
Chris Hofstaedtler
37678c4fb5
tests/check-against-debootstrap-dist: allow /var/log/{faillog,lastlog} to be absent 2024-06-26 07:35:19 +02:00
d0c30c70bd
tests/debootstrap: dump $tmpdir/debootstrap/debootstrap.log on failure 2024-06-12 11:41:17 +02:00
dfeb21cfe5
tests/empty-sources.list: only write out /etc/apt/sources.list if it doesn't exist yet
In the mmdebstrap autpkgtest, debian/tests/sourcesfilter will write out
/etc/apt/sources.list before the test's setup-hook is run. Thus, the
test's setup-hook will overwrite the contents of the sources.list that
debian/tests/sourcesfilter set up, which will end up pulling in the
wrong packages.

Thus, only write out our own /etc/apt/sources.list if it does not yet
exist. If it does exist, nothing needs to be done.
2024-06-11 15:49:48 +02:00
61509691a8
tests: base-files now ships merged-/usr symlinks 2024-06-11 15:49:48 +02:00
3969727cc0
tests: bug #1031276 got fixed 2024-06-11 15:49:48 +02:00
9f8172bbc0
Switch variant apt from 'apt-get dist-upgrade' to apt patterns
The dist-upgrade method will fail to install essential packages but
still exit successfully without reporting an error, see #1072218
2024-06-03 08:04:03 +02:00
84f80673f4
Revert "attempt diagnosing skip-tar-in-mknod failure 'file changed as we read it' using auditd"
This reverts commit 726fc38d1d.
2024-05-15 00:23:56 +02:00
4ad8245a14
tests/missing-dev-sys-proc-inside-the-chroot: work around for bug #1071078 2024-05-14 07:31:27 +02:00
409686048b
add --format=ext4 2024-05-12 18:38:47 +02:00
1e68ffd2c4
tests: changelog.Debian.$foreign_arch.gz files are not always present 2024-03-27 05:50:51 +01:00
726fc38d1d
attempt diagnosing skip-tar-in-mknod failure 'file changed as we read it' using auditd 2024-03-27 05:49:46 +01:00
4bcd6fa015
rename install-libmagic-mgc-on-arm64 test and allow running it on both amd64 and arm64 2024-01-30 07:08:22 +01:00
79ef2e3437
tests/remove-start-stop-daemon-and-policy-rc-d-in-hook: remove /usr/sbin/start-stop-daemon and not /sbin/start-stop-daemon 2024-01-26 09:30:28 +01:00
366d2ffbec
rename create-arm64-tarball test and allow running it on both amd64 and arm64 2024-01-25 10:52:52 +01:00
134fc15634
rename include-libmagic-mgc-arm64 tests and allow running them on both amd64 and arm64 2024-01-25 09:49:03 +01:00
1c669e8f86
tests/chrootless-fakeroot: exclude /var/log/journal and /etc/credstore* from tarballs instead of trying to fix them up 2024-01-24 00:27:51 +01:00
014a9c30a5
tests/check-against-debootstrap-dist: systemd 255 dropped split-/usr support 2024-01-08 22:54:43 +01:00
90fe7941bb
tests/check-against-debootstrap-dist: debootstrap installs prio:required packages in oldstable and stable for the buildd profile 2024-01-08 22:53:36 +01:00
428ee78121
disallow running chrootless as root without fakeroot unless --skip=check/chrootless is used 2024-01-08 22:37:13 +01:00
ae6dcc001d
tests/install-busybox-based-sub-essential-system: busybox 1:1.36.1-6 moved to /usr 2024-01-08 22:36:07 +01:00
69954515e7
tests/chrootless-fakeroot: also fix permissions and extended attributes for /etc/credstore 2024-01-08 22:27:35 +01:00
fd33bd2a40 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-10-28 13:26:04 +00:00
cb500ef6ba
add --skip=tar-in/mknod,copy-in/mknod,sync-in/mknod 2023-10-23 11:47:27 +02:00
84c53fc120
hook-helper: repurpose third arg for skip options now that qemu-user info does not need to be propagated anymore (was only needed for proot) 2023-10-23 10:41:46 +02:00
27d1bad2a5
since debootstrap 1.0.133, the buildd variant only installs apt and not priority:required anymore 2023-10-23 10:38:10 +02:00
bf41b91e6f
Properly implement --skip=output/dev and add --skip=output/mknod
- the first implementation of --skip=output/dev was broken in root mode
 - add tests
 - add documentation
2023-09-28 07:53:43 +02:00
c23727e136
export container=mmdebstrap-unshare environment variable in unshare-mode hooks 2023-09-27 07:56:49 +02:00
44cf2f94a6
tests/ascii-armored-keys: convert key to armored using gpg instead of sed 2023-08-20 08:02:11 +02:00
5a9123aa11
testsuite changes for bookworm release 2023-06-16 07:01:12 +02:00
14f13c6309
tests/{eatmydata-via-hook-dir,jessie-or-older}: dash 0.5.12-3 dropped diversions 2023-05-11 14:49:25 +02:00
e27a8d3472
tests: doc-debian 11.0 changed the doc-base paths 2023-05-06 08:33:15 +02:00
71a9a2e7a9
tests/include-deb-file: run in all modes 2023-03-19 09:03:19 +01:00
846662276f
tests/multiple-include: be more liberal with packages adding or dropping maintainer scripts 2023-03-18 15:10:28 +01:00
9a19801095
debian-archive-keyring now puts *.asc keys into /etc/apt/trusted.gpg.d 2023-03-18 04:53:28 +01:00
055e1719b9
try unsharing before automatically choosing unshare mode 2023-03-15 17:08:12 +01:00
901d017099
tests: do not run debug and verbose tests with variant standards for arches affected by #1031276 2023-03-13 13:21:18 +01:00
034698f8d3
tests/check-for-bit-by-bit-identical-format-output: use the default user check 2023-03-05 19:26:13 +01:00
a184cc003c
tests: run verbose and debug tests with --variant=standard for maximum output 2023-03-05 19:25:13 +01:00
dd774b4f20
tests: skip debootstrap tests variant - on oldstable because of #917773 2023-03-05 15:26:37 +01:00
db2be70f88
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
5885291213
Use an caching apt proxy instead of copying /var/cache/apt/archives/*.deb
- only download Release files once and not by apt as well as with curl
   and thus avoid a mirror push happening between both downloads
 - no heuristic needed to place the file in their correct mirror
   location
 - no manual checksum checking
 - only throttle download speed when actually downloading and not when
   retrieving files from the cache
 - no translation of filenames between how the epoch colon is stored in
   files in /var/cache/apt/archives versus how it is stored in files on
   the mirrors
 - no special handling of stable update and security mirrors
 - implemented in Python instead of shell and thus an order of magnitude
   faster
2023-03-03 08:34:39 +01:00
b90f1196e5
tests/root-mode-inside-chroot: run test script with -x 2023-02-19 09:17:57 +01:00
2f337767ea
tests/multiple-include: tzdata is producing /etc/timezone again 2023-02-18 23:18:01 +01:00
55f376d04a
tests: more cleanup traps 2023-02-18 23:06:13 +01:00