Commit Graph

1113 Commits (main)
 

Author SHA1 Message Date
Johannes Schauer Marin Rodrigues 821c2e1328
In unshare mode, make all mounts private recursively
This emulates what unshare(1) does by default or by passing
--propagation=private explicitly. Mounting and unmounting filesystems
will affect mounts outside the namespace which are marked as shared (see
last column of `findmnt -o+PROPAGATION`). Since mmdebstrap's goal is to
isolate the mounts in the new namespace, we perform the equivalent of

    mount(NULL, "/", MS_REC | MS_PRIVATE, NULL);

from util-linux/sys-utils/unshare.c:set_propagation() which is in shell:

    mount --make-rprivate /

See mount_namespaces(7) for details. Without setting this, unmounting
/sys (and its sub-mounts) in unshare mode as root user will also unmount
the sub-mounts of /sys on the outside of the namespace. This breaks
tests/unshare-as-root-user which will fail to shut down with the following
errors in the log:

[FAILED] Failed unmounting mnt.mount - /mnt.
[FAILED] Failed unmounting run-lock.mount - Legacy Locks Directory /run/lock.
[...]
[  OK  ] Reached target poweroff.target - System Power Off.

Afterwards it will stall indefinitely. Stopping mmdebstrap from messing
with the /sys mounts on the outside stops this behaviour and allows to
cleanly shut down the virtual machine.

Thanks: Helmut Grohne
11 hours ago
Johannes Schauer Marin Rodrigues 84f80673f4
Revert "attempt diagnosing skip-tar-in-mknod failure 'file changed as we read it' using auditd"
This reverts commit 726fc38d1d.
3 weeks ago
Johannes Schauer Marin Rodrigues e3eafd0009
release 1.5.0 3 weeks ago
Johannes Schauer Marin Rodrigues eed6a86480
mmdebstrap-autopkgtest-build-qemu: document https://github.com/util-linux/util-linux/issues/2981 3 weeks ago
Johannes Schauer Marin Rodrigues 5a06c67aaa
document that --cache-dir is also not a supported debootstrap option 3 weeks ago
Johannes Schauer Marin Rodrigues d26afd110f
add more docs to the tar-out special hook 3 weeks ago
Johannes Schauer Marin Rodrigues 4ad8245a14
tests/missing-dev-sys-proc-inside-the-chroot: work around for bug #1071078 3 weeks ago
Johannes Schauer Marin Rodrigues 409686048b
add --format=ext4 3 weeks ago
Jochen Sprickerhof 4a294f05bd
Add test if dpkg-dev is installed
Needed for dpkg-architecture.
2 months ago
Jochen Sprickerhof 8c0ddc3266
mmdebstrap-autopkgtest-build-qemu: use mount --no-mtab
Otherwise it fails with:

umount: /tmp/mmdebstrap.Tw9G7ZLL4J/mnt: filesystem was unmounted, but failed to update userspace mount table.
E: setup failed: E: command failed: umount --lazy "$1/mnt"

Also umount mnt/dev.
2 months ago
Johannes Schauer Marin Rodrigues 1e68ffd2c4
tests: changelog.Debian.$foreign_arch.gz files are not always present 2 months ago
Johannes Schauer Marin Rodrigues 726fc38d1d
attempt diagnosing skip-tar-in-mknod failure 'file changed as we read it' using auditd 2 months ago
Johannes Schauer Marin Rodrigues ae09a50f9d
document unshare --map-auto --map-user=65536 --map-group=65536 --keep-caps trick 2 months ago
Johannes Schauer Marin Rodrigues 9726836ac4
mmdebstrap-autopkgtest-build-qemu: add documentation of some unshare magic 2 months ago
Johannes Schauer Marin Rodrigues cdf6959a41
make_mirror.sh: retry apt with verbose output 2 months ago
Johannes Schauer Marin Rodrigues 1cf0d87a60
hooks/file-mirror-automount/setup00.sh: prefix warning with W: 2 months ago
Johannes Schauer Marin Rodrigues 0973de1530
hooks/copy-host-apt-sources-and-preferences/setup00.sh: document with comment on top 2 months ago
Johannes Schauer Marin Rodrigues d883fa13bb
hooks/maybe-merged-usr: prepare for the time when usr-is-merged exists only as a virtual package 3 months ago
Max-Julian Pogner 286cecc21b
follow adduser's changes in example: --gecos => --comment
Considered References:
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#adduser-changes
/usr/share/doc/adduser/NEWS.Debian.gz (from adduser v3.134)
https://manpages.debian.org/bookworm/adduser/adduser.8.en.html
4 months ago
Johannes Schauer Marin Rodrigues 113532b3e1
refactor worker function to remove code duplication
Thanks: Guillem Jover <guillem@debian.org>
4 months ago
Johannes Schauer Marin Rodrigues d244f4f1de
release 1.4.3 4 months ago
Johannes Schauer Marin Rodrigues 81589889f9
check for dpkg-dev being installed for dpkg-architecture when doing foreign fakechroot 4 months ago
Johannes Schauer Marin Rodrigues 35cd477fea
Take hard links into account when computing disk usage based on dpkg-gencontrol.pl
Thanks: Guillem Jover <guillem@debian.org>, Sven Joachim <svenjoac@gmx.de>
4 months ago
Johannes Schauer Marin Rodrigues a7586e55d1
coverage.txt: exclude create-foreign-tarball from arm64 in fakechroot mode because usrmerge postinst under fakechroot wants to copy /lib/ld-linux-x86-64.so.2 (which does not exist) instead of /lib64/ld-linux-x86-64.so.2 4 months ago
Johannes Schauer Marin Rodrigues 65c27a55b3
cleanup start-stop-daemon without root prefix when performing a pivot-root 4 months ago
Johannes Schauer Marin Rodrigues 59c9c399c6
remove leftover debugging output 4 months ago
Johannes Schauer Marin Rodrigues e661b79749
mmdebstrap-autopkgtest-build-qemu: add reasons for image being raw and not qcow2 4 months ago
Johannes Schauer Marin Rodrigues 4bcd6fa015
rename install-libmagic-mgc-on-arm64 test and allow running it on both amd64 and arm64 4 months ago
Johannes Schauer Marin Rodrigues b54564a84d
release 1.4.2 4 months ago
Johannes Schauer Marin Rodrigues ba6e9af9a2
README.md: update list of contributors 4 months ago
Francesco Poli 8410dc6636
mmdebstrap-autopkgtest-build-qemu: fix octal mode computation 4 months ago
Johannes Schauer Marin Rodrigues 3e233e10df
mmdebstrap-autopkgtest-build-qemu: make the hostname 'host' as it is done by autopkgtest-build-qemu as it is expected by sbuild-qemu-update and sbuild-qemu-boot 4 months ago
Johannes Schauer Marin Rodrigues 79ef2e3437
tests/remove-start-stop-daemon-and-policy-rc-d-in-hook: remove /usr/sbin/start-stop-daemon and not /sbin/start-stop-daemon 4 months ago
Johannes Schauer Marin Rodrigues 2e7a3ae8b7
remove docs concerning qemu-user-static 4 months ago
Johannes Schauer Marin Rodrigues cc831fc276
remove clean-up of qemu-user-static as it is not copied into the chroot anymore 4 months ago
Johannes Schauer Marin Rodrigues 366d2ffbec
rename create-arm64-tarball test and allow running it on both amd64 and arm64 4 months ago
Johannes Schauer Marin Rodrigues a8583eb39b
fix documentation of buildd variant to only include essential, apt and build-essential 4 months ago
Johannes Schauer Marin Rodrigues ac2aba5074
fix spelling enviroment -> environment 4 months ago
Johannes Schauer Marin Rodrigues 134fc15634
rename include-libmagic-mgc-arm64 tests and allow running them on both amd64 and arm64 4 months ago
Johannes Schauer Marin Rodrigues 4d72f617d9
dpkg 1.22.3 moved start-stop-daemon from /sbin to /usr/sbin, see #1059982 4 months ago
Johannes Schauer Marin Rodrigues ae5bddb2aa
coverage.sh: anticipate more variations for CMD 4 months ago
Johannes Schauer Marin Rodrigues 1c669e8f86
tests/chrootless-fakeroot: exclude /var/log/journal and /etc/credstore* from tarballs instead of trying to fix them up 4 months ago
Johannes Schauer Marin Rodrigues 4c87024356
release 1.4.1 4 months ago
Johannes Schauer Marin Rodrigues 2f768b07dc
coverage.sh: check for pod2man errors 4 months ago
Johannes Schauer Marin Rodrigues 4ca0556cd2
mmdebstrap-autopkgtest-build-qemu: usability and man page improvements
- explicitly instruct to add --boot=efi to autopkgtest-virt-qemu
 - add example how to run autopkgtest with --boot=efi
 - document image location requirements giving unshare restrictions
 - check if foreign arch is configured
 - instruct how to add a foreign architecture
 - check that the unshared user is able to access the image location
 - suggest to install qemu-system-* packages if they are missing
 - suggest to install packages containing EDK II OVMF UEFI firmware
4 months ago
Johannes Schauer Marin Rodrigues d9f9c64ac2
do not fail during cleanup if /etc/apt/apt.conf.d/00mmdebstrap got removed, only warn 4 months ago
Johannes Schauer Marin Rodrigues dd94ee3b84
read files passed as --aptopt and --dpkgopt outside the unshared namespace to avoid permission issues 4 months ago
Johannes Schauer Marin Rodrigues 99d2579e0b
document that the required and minbase variants do not explicitly install apt 4 months ago
Johannes Schauer Marin Rodrigues 610058d105
document how SUITE influences the selection of essential packages 4 months ago
Johannes Schauer Marin Rodrigues 2ff8f6142d
document how to run chrootless mode wrapped inside mmdebstrap 4 months ago