Compare commits
9 commits
98b3c7f2cd
...
395ee60a7f
Author | SHA1 | Date | |
---|---|---|---|
395ee60a7f | |||
1a8f2537ac | |||
0f5d935941 | |||
dbce1ee27b | |||
6e4ed4a049 | |||
87b9b385b3 | |||
acf036fa79 | |||
d9c04338f8 | |||
d0568a2b9e |
9 changed files with 1281 additions and 137 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
1.5.3 (2024-09-13)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- tidy up any zombie processes
|
||||||
|
- chrootless hurd-i386
|
||||||
|
- add --skip=cleanup/reproducible/machine-id
|
||||||
|
- m-a-b-q: replace test_installed by dpkg-checkbuilddeps
|
||||||
|
|
||||||
1.5.2 (2024-06-26)
|
1.5.2 (2024-06-26)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -430,3 +430,6 @@ Modes: root unshare
|
||||||
|
|
||||||
Test: skip-tar-in-mknod
|
Test: skip-tar-in-mknod
|
||||||
Modes: unshare
|
Modes: unshare
|
||||||
|
|
||||||
|
Test: zombie-reaping
|
||||||
|
Modes: unshare
|
||||||
|
|
|
@ -453,7 +453,7 @@ if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
trap 'kill "$PROXYPID" || :;cleanuptmpdir; cleanup_newcachedir' EXIT INT TERM
|
trap 'kill "$PROXYPID" || :;cleanuptmpdir; cleanup_newcachedir' EXIT INT TERM
|
||||||
|
|
||||||
pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-static,qemu-user,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,python3,libcap2-bin,gpg,debootstrap,distro-info-data,iproute2,ubuntu-keyring,apt-utils,squashfs-tools-ng,genext2fs,linux-image-generic,passwd,e2fsprogs,uuid-runtime
|
pkgs=perl-doc,systemd-sysv,perl,arch-test,fakechroot,fakeroot,mount,uidmap,qemu-user-binfmt,dpkg-dev,mini-httpd,libdevel-cover-perl,libtemplate-perl,debootstrap,procps,apt-cudf,aspcud,python3,libcap2-bin,gpg,debootstrap,distro-info-data,iproute2,ubuntu-keyring,apt-utils,squashfs-tools-ng,genext2fs,linux-image-generic,passwd,e2fsprogs,uuid-runtime
|
||||||
if [ ! -e ./mmdebstrap ]; then
|
if [ ! -e ./mmdebstrap ]; then
|
||||||
pkgs="$pkgs,mmdebstrap"
|
pkgs="$pkgs,mmdebstrap"
|
||||||
fi
|
fi
|
||||||
|
|
1343
mmdebstrap
1343
mmdebstrap
File diff suppressed because it is too large
Load diff
|
@ -218,8 +218,11 @@ Lastly, shift user id and group id of each entry by the value given by the
|
||||||
skip = False
|
skip = False
|
||||||
if not hasattr(args, "pathfilter"):
|
if not hasattr(args, "pathfilter"):
|
||||||
return False
|
return False
|
||||||
|
# normalize path and make it absolute by stripping off all leading
|
||||||
|
# dots and slashes and then prepending a slash
|
||||||
|
name = "/" + member.name.lstrip("./")
|
||||||
for t, r in args.pathfilter:
|
for t, r in args.pathfilter:
|
||||||
if r.match(member.name[1:]) is not None:
|
if r.match(name) is not None:
|
||||||
if t == "path_include":
|
if t == "path_include":
|
||||||
skip = False
|
skip = False
|
||||||
else:
|
else:
|
||||||
|
@ -230,7 +233,7 @@ Lastly, shift user id and group id of each entry by the value given by the
|
||||||
continue
|
continue
|
||||||
prefix = prefix_prog.sub(r"\1", r.pattern)
|
prefix = prefix_prog.sub(r"\1", r.pattern)
|
||||||
prefix = prefix.rstrip("/")
|
prefix = prefix.rstrip("/")
|
||||||
if member.name[1:].startswith(prefix):
|
if name.startswith(prefix):
|
||||||
return False
|
return False
|
||||||
return skip
|
return skip
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ if [ ! -e /mmdebstrap-testenv ]; then
|
||||||
echo "this test modifies the system and should only be run inside a container" >&2
|
echo "this test modifies the system and should only be run inside a container" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
apt-get remove --yes qemu-user-static binfmt-support qemu-user
|
apt-get remove --yes qemu-user-binfmt binfmt-support qemu-user
|
||||||
# the following is not necessary anymore since systemd-binfmt
|
# the following is not necessary anymore since systemd-binfmt
|
||||||
# successfully disables support upon removal of qemu-user with
|
# successfully disables support upon removal of qemu-user with
|
||||||
# the upload of src:systemd 251.2-4: https://bugs.debian.org/1012163
|
# the upload of src:systemd 251.2-4: https://bugs.debian.org/1012163
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -e /mmdebstrap-testenv ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# remove qemu just to be sure
|
# remove qemu just to be sure
|
||||||
apt-get remove --yes qemu-user-static binfmt-support qemu-user
|
apt-get remove --yes qemu-user-binfmt binfmt-support qemu-user
|
||||||
{{ CMD }} --mode={{ MODE }} --variant=apt --architectures=i386 {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}
|
{{ CMD }} --mode={{ MODE }} --variant=apt --architectures=i386 {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}
|
||||||
# we ignore differences between architectures by ignoring some files
|
# we ignore differences between architectures by ignoring some files
|
||||||
# and renaming others
|
# and renaming others
|
||||||
|
|
|
@ -14,7 +14,7 @@ case {{ FORMAT }} in tar|squashfs|ext2|ext4) : ;; *) exit 1;; esac
|
||||||
# https://lore.kernel.org/linux-ext4/171484520952.2626447.2160419274451668597@localhost/T/#t
|
# https://lore.kernel.org/linux-ext4/171484520952.2626447.2160419274451668597@localhost/T/#t
|
||||||
mv /tmp/mmdebstrap-{{ DIST }}-{{ VARIANT }}.{{ FORMAT }} ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.{{ FORMAT }}
|
mv /tmp/mmdebstrap-{{ DIST }}-{{ VARIANT }}.{{ FORMAT }} ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.{{ FORMAT }}
|
||||||
if [ "{{ FORMAT }}" = tar ]; then
|
if [ "{{ FORMAT }}" = tar ]; then
|
||||||
printf 'ustar ' | cmp --bytes=6 --ignore-initial=257:0 ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar -
|
printf 'ustar\0' | cmp --bytes=6 --ignore-initial=257:0 ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar -
|
||||||
elif [ "{{ FORMAT }}" = squashfs ]; then
|
elif [ "{{ FORMAT }}" = squashfs ]; then
|
||||||
printf 'hsqs' | cmp --bytes=4 ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.squashfs -
|
printf 'hsqs' | cmp --bytes=4 ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.squashfs -
|
||||||
elif [ "{{ FORMAT }}" = ext2 ]; then
|
elif [ "{{ FORMAT }}" = ext2 ]; then
|
||||||
|
|
39
tests/zombie-reaping
Normal file
39
tests/zombie-reaping
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
export LC_ALL=C.UTF-8
|
||||||
|
export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
|
||||||
|
|
||||||
|
[ {{ MODE }} = "unshare" ]
|
||||||
|
|
||||||
|
trap "rm -f /tmp/debian-chroot.tar" EXIT INT TERM
|
||||||
|
|
||||||
|
prefix=
|
||||||
|
if [ "$(id -u)" -eq 0 ] && [ "{{ MODE }}" != "root" ] && [ "{{ MODE }}" != "auto" ]; then
|
||||||
|
if ! id "${SUDO_USER:-user}" >/dev/null 2>&1; then
|
||||||
|
if [ ! -e /mmdebstrap-testenv ]; then
|
||||||
|
echo "this test modifies the system and should only be run inside a container" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
useradd --home-dir "/home/${SUDO_USER:-user}" --create-home "${SUDO_USER:-user}"
|
||||||
|
fi
|
||||||
|
prefix="runuser -u ${SUDO_USER:-user} --"
|
||||||
|
fi
|
||||||
|
|
||||||
|
MMTARFILTER=
|
||||||
|
[ -x /usr/bin/mmtarfilter ] && MMTARFILTER=/usr/bin/mmtarfilter
|
||||||
|
[ -x ./tarfilter ] && MMTARFILTER=./tarfilter
|
||||||
|
|
||||||
|
$prefix {{ CMD }} --mode={{ MODE }} --variant=apt \
|
||||||
|
--skip=output/dev \
|
||||||
|
--customize-hook='chroot "$1" sh -c "sleep 1m > /dev/null" &' \
|
||||||
|
{{ DIST }} - {{ MIRROR }} \
|
||||||
|
| "$MMTARFILTER" --path-exclude="/dev" \
|
||||||
|
> /tmp/debian-chroot.tar
|
||||||
|
|
||||||
|
origfilter() {
|
||||||
|
< ./cache/mmdebstrap-{{ DIST }}-apt.tar \
|
||||||
|
"$MMTARFILTER" --path-exclude="/dev/*" --path-exclude="/dev"
|
||||||
|
}
|
||||||
|
|
||||||
|
origfilter | cmp - /tmp/debian-chroot.tar \
|
||||||
|
|| origfilter | diffoscope - /tmp/debian-chroot.tar
|
Loading…
Reference in a new issue