From dc7d04ea63d15b48ce8bf60549446579d46025e0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 16:14:40 +0200 Subject: Adding debian version 1.4.3-6. Signed-off-by: Daniel Baumann --- debian/README.Debian | 56 ++ debian/changelog | 901 +++++++++++++++++++++ debian/compute_pkgset.py | 147 ++++ debian/control | 79 ++ debian/copyright | 32 + debian/mmdebstrap.examples | 1 + debian/mmdebstrap.install | 4 + debian/mmdebstrap.lintian-overrides | 8 + ...-merged-usr-prepare-for-the-time-when-usr.patch | 94 +++ debian/patches/series | 1 + debian/rules | 30 + debian/salsa-ci.yml | 15 + debian/source/format | 1 + debian/tests/control | 143 ++++ debian/tests/sourcesfilter | 98 +++ debian/tests/testsuite | 219 +++++ debian/upstream/metadata | 5 + debian/watch | 4 + 18 files changed, 1838 insertions(+) create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100755 debian/compute_pkgset.py create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/mmdebstrap.examples create mode 100644 debian/mmdebstrap.install create mode 100644 debian/mmdebstrap.lintian-overrides create mode 100644 debian/patches/0001-hooks-maybe-merged-usr-prepare-for-the-time-when-usr.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/salsa-ci.yml create mode 100644 debian/source/format create mode 100644 debian/tests/control create mode 100755 debian/tests/sourcesfilter create mode 100644 debian/tests/testsuite create mode 100644 debian/upstream/metadata create mode 100644 debian/watch diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 0000000..9cfe96f --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,56 @@ +Recommends +---------- + + arch-test Building chroots for arches that cannot be executed on + the current platform. + + fakechroot, fakeroot For --mode=fakechroot. + + gpg To figure out the right signed-by value for distributions + that apt doesn't know the right keyring for. + + libdistro-info-perl To figure out whether a distro is EOL or not and to + figure out which security mirror to use because Debian + bullseye and later use suite-security instead of + suite/updates. + + libdpkg-perl To find out keyring paths. + + mount Needed in cases mknod is not permitted and device nodes + have to be bind-mounted instead. It is also needed in + root and unshare mode to mount /sys and /proc but is not + needed in fakechroot mode. + + uidmap For --mode=unshare. + +Suggests +-------- + + apt-transport-tor If using apt sources.list with tor+ (Tor network). + + apt-utils To have /usr/lib/apt/solvers/apt for the + /usr/lib/apt/solvers/mmdebstrap-dump-solution executable. + + binfmt-support Chroots for architectures that cannot be executed by the + host CPU unless in chrootless mode. + + ca-certificates If using apt sources.list with https. + + debootstrap For using /usr/share/debootstrap/scripts/ to infer distro + names from the symlinks and + /usr/share/debootstrap/scripts/gutsy to figure out the + default mirror URL. + + distro-info-data To get better data about new distros or EOL distros. + + dpkg-dev For the dpkg-architecture binary to turn a Debian + architecture into the DEB_HOST_MULTIARCH value. + + genext2fs For --format=ext2. + + perl-doc Generation of man page from source code with --help. + + qemu-user-static For cross platform builds such as building arm64 on + amd64. + + squashfs-tools-ng For --format=squashfs. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f3b80c1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,901 @@ +mmdebstrap (1.4.3-6) unstable; urgency=medium + + * fixup maybe-merged-usr patch + + -- Johannes Schauer Marin Rodrigues Tue, 27 Feb 2024 00:34:12 +0100 + +mmdebstrap (1.4.3-5) unstable; urgency=medium + + * cherry-pick patch from upstream fixing maybe-merged-usr for the time when + usr-is-merged becomes a virtual package + + -- Johannes Schauer Marin Rodrigues Mon, 26 Feb 2024 14:57:26 +0100 + +mmdebstrap (1.4.3-4) unstable; urgency=medium + + * debian/tests/sourcesfilter: append instead of replacing + + -- Johannes Schauer Marin Rodrigues Tue, 20 Feb 2024 13:18:32 +0100 + +mmdebstrap (1.4.3-3) unstable; urgency=medium + + * debian/tests: replace copy_host_apt_config with python-apt script + + -- Johannes Schauer Marin Rodrigues Sun, 18 Feb 2024 12:06:59 +0100 + +mmdebstrap (1.4.3-2) unstable; urgency=medium + + * debian/tests/copy_host_apt_config: anticipate components being configured + multiple times + + -- Johannes Schauer Marin Rodrigues Sat, 17 Feb 2024 08:11:49 +0100 + +mmdebstrap (1.4.3-1) unstable; urgency=medium + + * New upstream version 1.4.3 + + -- Johannes Schauer Marin Rodrigues Thu, 01 Feb 2024 08:29:34 +0100 + +mmdebstrap (1.4.2-1) unstable; urgency=medium + + * New upstream version 1.4.2 + - mmdebstrap-autopkgtest-build-qemu: fix octal mode computation (closes: + #1061634) + - mmdebstrap-autopkgtest-build-qemu: choose 'host' as hostname (closes: + #1061636) + * debian/tests/control: add dpkg as test trigger because of #1059982 + + -- Johannes Schauer Marin Rodrigues Mon, 29 Jan 2024 14:28:43 +0100 + +mmdebstrap (1.4.1-1) unstable; urgency=medium + + * New upstream version 1.4.1 + - improvements to mmdebstrap-autopkgtest-build-qemu (closes: #1060416) + * debian/tests/control: add #1053671 + * debian/salsa-ci.yml: add explicit 3h timeout for .test-autopkgtest + * debian/patches: cherry-pick two patches from upstream + + -- Johannes Schauer Marin Rodrigues Wed, 24 Jan 2024 02:58:17 +0100 + +mmdebstrap (1.4.0-1) unstable; urgency=medium + + * New upstream version 1.4.0 + * drop ./debian/patches + * debian/tests/control: add debianutils and usrmerge + * debian/rules: install mmdebstrap-autopkgtest-build-qemu + * debian/rules: generate man page for mmdebstrap-autopkgtest-build-qemu + * debian/tests/copy_host_apt_config: mkdir -p the dirname + + -- Johannes Schauer Marin Rodrigues Tue, 24 Oct 2023 07:59:16 +0200 + +mmdebstrap (1.3.8-3) unstable; urgency=medium + + * set RUN_MA_SAME_TESTS=no for the second test run + + -- Johannes Schauer Marin Rodrigues Wed, 23 Aug 2023 09:25:52 +0200 + +mmdebstrap (1.3.8-2) unstable; urgency=medium + + * make_mirror.sh: force update to avoid usage of curl + * debootstrap 1.0.128+nmu3 fixed #1031222 + + -- Johannes Schauer Marin Rodrigues Mon, 21 Aug 2023 20:19:31 +0200 + +mmdebstrap (1.3.8-1) unstable; urgency=medium + + * debian/tests/control: drop curl, dash and doc-debian as direct test + dependencies + * add patch to also allow wget in addition to curl + * debian/tests/control: improve formatting of manual test comment + * New upstream version 1.3.8 + + -- Johannes Schauer Marin Rodrigues Sun, 20 Aug 2023 14:05:04 +0200 + +mmdebstrap (1.3.7-2) unstable; urgency=medium + + * debian/tests/control: remove copy-host-apt-config test + + -- Johannes Schauer Marin Rodrigues Wed, 21 Jun 2023 13:03:31 +0200 + +mmdebstrap (1.3.7-1) unstable; urgency=medium + + * New upstream version 1.3.7 + + -- Johannes Schauer Marin Rodrigues Wed, 21 Jun 2023 07:57:57 +0200 + +mmdebstrap (1.3.6-4) unstable; urgency=medium + + * run copy-host-arch-config hook as an autopkgtest + + -- Johannes Schauer Marin Rodrigues Sat, 17 Jun 2023 19:14:44 +0200 + +mmdebstrap (1.3.6-3) unstable; urgency=medium + + * cherry-pick hooks/copy-host-apt-config + + -- Johannes Schauer Marin Rodrigues Sat, 17 Jun 2023 13:49:29 +0200 + +mmdebstrap (1.3.6-2) unstable; urgency=medium + + * debian/tests/control: require dash 0.5.12-4 + + -- Johannes Schauer Marin Rodrigues Sat, 17 Jun 2023 10:52:49 +0200 + +mmdebstrap (1.3.6-1) unstable; urgency=medium + + * New upstream version 1.3.6 + + -- Johannes Schauer Marin Rodrigues Fri, 16 Jun 2023 08:30:58 +0200 + +mmdebstrap (1.3.5-7) unstable; urgency=medium + + * work with doc-debian from unstable as well as from testing + + -- Johannes Schauer Marin Rodrigues Thu, 25 May 2023 07:11:41 +0200 + +mmdebstrap (1.3.5-6) unstable; urgency=medium + + * tests/eatmydata-via-hook-dir: allow to work with dash with and without + diversions + + -- Johannes Schauer Marin Rodrigues Wed, 24 May 2023 18:11:22 +0200 + +mmdebstrap (1.3.5-5) unstable; urgency=medium + + * tests/jessie-or-older: dash 0.5.12-3 dropped diversions + + -- Johannes Schauer Marin Rodrigues Thu, 11 May 2023 14:53:04 +0200 + +mmdebstrap (1.3.5-4) unstable; urgency=medium + + * tests/eatmydata-via-hook-dir: dash 0.5.12-3 dropped diversions + + -- Johannes Schauer Marin Rodrigues Thu, 11 May 2023 06:57:42 +0200 + +mmdebstrap (1.3.5-3) unstable; urgency=medium + + * fix regex in debian/tests/copy_host_apt_config to first remove + non-free-firmware and then non-free or otherwise components like + "main-firmware" will be the result + + -- Johannes Schauer Marin Rodrigues Wed, 10 May 2023 22:41:17 +0200 + +mmdebstrap (1.3.5-2) unstable; urgency=medium + + * fix for doc-debian 11.0 changing the doc-base paths + + -- Johannes Schauer Marin Rodrigues Sat, 06 May 2023 19:15:48 +0200 + +mmdebstrap (1.3.5-1) unstable; urgency=medium + + * New upstream version 1.3.5 + + -- Johannes Schauer Marin Rodrigues Mon, 20 Mar 2023 08:05:19 +0100 + +mmdebstrap (1.3.4-1) unstable; urgency=medium + + * New upstream version 1.3.4 + - more safeguards before automatically choosing unshare mode (closes: + #1027429, #1032489) + + -- Johannes Schauer Marin Rodrigues Sat, 18 Mar 2023 00:33:00 +0100 + +mmdebstrap (1.3.3-6.1) unstable; urgency=medium + + * Non-maintainer upload. + * Disable autopkgtest trigger on essential packages to reduce stress on + debci infrastructure. + + -- Helmut Grohne Thu, 09 Mar 2023 20:02:05 +0100 + +mmdebstrap (1.3.3-6) unstable; urgency=medium + + * add Needs-APT-Config to more tests + + -- Johannes Schauer Marin Rodrigues Tue, 21 Feb 2023 07:19:51 +0100 + +mmdebstrap (1.3.3-5) unstable; urgency=medium + + * autopkgtest: + - replace deb.debian.org/debian with 127.0.0.1/debian + - filter out debian-debug, contrib, non-free, deb-src + + -- Johannes Schauer Marin Rodrigues Mon, 20 Feb 2023 20:14:25 +0100 + +mmdebstrap (1.3.3-4) unstable; urgency=medium + + * try out another hack to fix the tzdata /etc/timezone situation + + -- Johannes Schauer Marin Rodrigues Mon, 20 Feb 2023 07:33:04 +0100 + +mmdebstrap (1.3.3-3) unstable; urgency=medium + + * debian/tests/testsuite: do not manually install foreign fakeroot and + fakechroot + + -- Johannes Schauer Marin Rodrigues Sun, 19 Feb 2023 23:57:19 +0100 + +mmdebstrap (1.3.3-2) unstable; urgency=medium + + * debian/tests/control: rely on tzdata creating /etc/timezone... again... + + -- Johannes Schauer Marin Rodrigues Sun, 19 Feb 2023 19:42:11 +0100 + +mmdebstrap (1.3.3-1) unstable; urgency=medium + + * New upstream version 1.3.3 (only testsuite improvements) + * autopkgtest: take pinned packages into account via USE_HOST_APT_CONFIG=yes + + -- Johannes Schauer Marin Rodrigues Sun, 19 Feb 2023 13:13:10 +0100 + +mmdebstrap (1.3.2-1) unstable; urgency=medium + + * new upstream release + - ldconfig.fakechroot doesn't ignore -r anymore (closes: #1029483) + + -- Johannes Schauer Marin Rodrigues Thu, 16 Feb 2023 10:56:26 +0100 + +mmdebstrap (1.3.1-4) unstable; urgency=medium + + * make autopkgtest work with black 23.1.0 + + -- Johannes Schauer Marin Rodrigues Tue, 14 Feb 2023 00:37:00 +0100 + +mmdebstrap (1.3.1-3) unstable; urgency=medium + + * adjust tests because tzdata does not create /etc/timezone anymore + + -- Johannes Schauer Marin Rodrigues Fri, 10 Feb 2023 13:35:55 +0100 + +mmdebstrap (1.3.1-2) unstable; urgency=medium + + * remove references to apt-transport-https + + -- Johannes Schauer Marin Rodrigues Fri, 20 Jan 2023 08:37:34 +0100 + +mmdebstrap (1.3.1-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Fri, 20 Jan 2023 07:13:00 +0100 + +mmdebstrap (1.3.0-1) unstable; urgency=medium + + * new upstream release + - Do not split --include values again in run_download and run_install + (Closes: #1028977) + * add debian/patches/run_null.patch + + -- Johannes Schauer Marin Rodrigues Mon, 16 Jan 2023 23:13:27 +0100 + +mmdebstrap (1.2.5-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Wed, 04 Jan 2023 13:06:59 +0100 + +mmdebstrap (1.2.4-1) unstable; urgency=medium + + * new upstream release + - add jessie-or-older hook (closes: #1026765) + * debian/tests/testsuite: skip test immediately upon network failure + * compute autopkgtest triggers for all architectures + * add debian/patches/0001-make-shellcheck-0.9.0-1-happy.patch + + -- Johannes Schauer Marin Rodrigues Fri, 23 Dec 2022 13:38:44 +0100 + +mmdebstrap (1.2.3-2) unstable; urgency=medium + + * debian/tests/control: use hint-testsuite-triggers to trigger the mmdebstrap + autopkgtest on all Essential:yes packages plus apt and usrmerge + + -- Johannes Schauer Marin Rodrigues Mon, 12 Dec 2022 12:24:01 +0100 + +mmdebstrap (1.2.3-1) unstable; urgency=medium + + * new upstream release + * drop patches + * debian/tests/control: add dependency on shellcheck + * debian/tests/testsuite: also link coverage.sh and gpgvnoexpkeysig for + shellcheck + + -- Johannes Schauer Marin Rodrigues Wed, 16 Nov 2022 20:03:13 +0100 + +mmdebstrap (1.2.2-2) unstable; urgency=medium + + * fix autopkgtest via patch + + -- Johannes Schauer Marin Rodrigues Sat, 29 Oct 2022 05:16:20 +0200 + +mmdebstrap (1.2.2-1) unstable; urgency=medium + + * new upstream release + * write an empty /etc/machine-id instead of writing 'uninitialized' (Closes: + #1021478) + + -- Johannes Schauer Marin Rodrigues Thu, 27 Oct 2022 17:50:11 +0200 + +mmdebstrap (1.2.1-2) unstable; urgency=medium + + * debian/control: depend on python3 (>= 3.10) for the match syntax + * debian/mmdebstrap.install: sort + + -- Johannes Schauer Marin Rodrigues Thu, 15 Sep 2022 15:46:53 +0200 + +mmdebstrap (1.2.1-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Thu, 08 Sep 2022 04:45:40 +0200 + +mmdebstrap (1.2.0-1) unstable; urgency=medium + + * new upstream release + - fix mmdebstrap hanging if apt in download step failed (closes: #1017795) + - remove proot mode (closes: #1018957) + * fix autopkgtests (closes: #1017592) + + -- Johannes Schauer Marin Rodrigues Mon, 05 Sep 2022 07:48:37 +0200 + +mmdebstrap (1.1.0-1) unstable; urgency=medium + + * new upstream release + - relax regex for apt versions like 2.5.0devuan1 (closes: #1012630) + * debian/salsa-ci.yml: restore pipeline from salsa-ci-team + * debian/mmdebstrap.lintian-overrides: adjust overrides + * debian/tests/testsuite: bump timeout from 35m to 50m + + -- Johannes Schauer Marin Rodrigues Tue, 26 Jul 2022 23:22:30 +0200 + +mmdebstrap (1.0.1-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Sun, 29 May 2022 10:12:31 +0200 + +mmdebstrap (1.0.0-1) unstable; urgency=medium + + * new upstream release + * drop patches + * debian/tests/control: add dependency on python3-debian + * debian/tests/testsuite: copy over coverage.py, coverage.txt and tests + directory + + -- Johannes Schauer Marin Rodrigues Sat, 28 May 2022 19:06:01 +0200 + +mmdebstrap (0.8.6-2) unstable; urgency=medium + + * debug s390x autopkgtest failure on ci.debian.net + + -- Johannes Schauer Marin Rodrigues Mon, 04 Apr 2022 07:47:56 +0200 + +mmdebstrap (0.8.6-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Fri, 25 Mar 2022 15:37:25 +0100 + +mmdebstrap (0.8.5-1) unstable; urgency=medium + + * new upstream release + - Run File::Find::find with no_chdir=>1 (closes: #1005857) + + -- Johannes Schauer Marin Rodrigues Tue, 08 Mar 2022 07:21:10 +0100 + +mmdebstrap (0.8.4-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Fri, 11 Feb 2022 23:48:42 +0100 + +mmdebstrap (0.8.3-1) unstable; urgency=medium + + * new upstream release + - allow identifying a suite by codename again (closes: #1003191) + * debian/control: bump apt version constraint to 2.3.14 + * debian/control: add libdpkg-perl to Recommends (closes: #1000823) + * debian/copyright: add disclaimer of warranty and limitation of liability + (closes: #1003237) + * add debian/README.Debian + * debian/copyright: fixup my name + + -- Johannes Schauer Marin Rodrigues Sat, 08 Jan 2022 13:13:04 +0100 + +mmdebstrap (0.8.2-1) unstable; urgency=medium + + * new upstream release + + -- Johannes Schauer Marin Rodrigues Wed, 15 Dec 2021 07:52:41 +0100 + +mmdebstrap (0.8.1-1) unstable; urgency=medium + + * new upstream release + * drop patches + + -- Johannes Schauer Marin Rodrigues Thu, 07 Oct 2021 14:42:12 +0200 + +mmdebstrap (0.8.0-5) unstable; urgency=medium + + * add patch to run xz and zstd without --threads=0 to avoid ENOMEM errors + on systems with hundreds of cores (like debci uses) + + -- Johannes Schauer Marin Rodrigues Fri, 24 Sep 2021 22:14:02 +0200 + +mmdebstrap (0.8.0-4) unstable; urgency=medium + + * add patch for ldconfig.fakechroot to support DPKG_ROOT + + -- Johannes Schauer Marin Rodrigues Thu, 23 Sep 2021 06:27:35 +0200 + +mmdebstrap (0.8.0-3) unstable; urgency=medium + + * add patch for bit-by-bit identical output in chrootless mode + + -- Johannes Schauer Marin Rodrigues Wed, 22 Sep 2021 15:23:59 +0200 + +mmdebstrap (0.8.0-2) unstable; urgency=medium + + * fix autopkgtest + + -- Johannes Schauer Marin Rodrigues Wed, 22 Sep 2021 09:11:34 +0200 + +mmdebstrap (0.8.0-1) unstable; urgency=medium + + * new upstream release + - document how to setup merged /usr via symlinks (closes: #914915) + - fix testsuite (closes: #983293) + - fix chrootless mode (closes: #983301) + - add mmtarfilter --pax-exclude (closes: #989487) + - fix busybox-based chroot example (closes: #989302) + - optimize /dev/null output (closes: #985830) + - use all cores when compressing with zstd (closes: #988271) + - move /usr/share/mmdebstrap/hooks/setup00-merged-usr.sh to + /usr/share/mmdebstrap/hooks/merged-usr/setup00.sh + * drop patches + * debian/rules: install gpgvnoexpkeysig and ldconfig.fakechroot + * debian/watch: fix for gitea + * debian/control: document dependencies + + -- Johannes Schauer Marin Rodrigues Tue, 21 Sep 2021 18:44:07 +0200 + +mmdebstrap (0.7.5-2.2) unstable; urgency=medium + + * Non-maintainer upload. + * Do not pass unsupported system attributes to tar2sqfs (Closes: #988100) + + -- Benjamin Drung Fri, 07 May 2021 17:30:39 +0200 + +mmdebstrap (0.7.5-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Pass extended attributes to tar2sqfs (Closes: #988100) + + -- Benjamin Drung Thu, 06 May 2021 15:06:07 +0200 + +mmdebstrap (0.7.5-2) unstable; urgency=medium + + * add patch to call unshare with --propagation unchanged + + -- Johannes 'josch' Schauer Fri, 19 Feb 2021 13:07:21 +0100 + +mmdebstrap (0.7.5-1) unstable; urgency=medium + + * new upstream release + - check/qemu is skipped for the extract variant (closes: #981709) + * drop patches + * add debian/mmdebstrap.examples + * debian/copyright: add Trent W. Buck + * debian/upstream/metadata: add Bug-Database and Bug-Submit fields + * debian/control: bump Standards-Version to 4.5.1 + + -- Johannes 'josch' Schauer Sat, 06 Feb 2021 22:19:05 +0100 + +mmdebstrap (0.7.4-1) unstable; urgency=medium + + * new upstream release + - Optimize mmtarfilter to handle many path exclusions (closes: #978742) + - Do not run an additional env command inside the chroot (closes: #978733) + + -- Johannes 'josch' Schauer Sat, 16 Jan 2021 14:28:29 +0100 + +mmdebstrap (0.7.3-1) unstable; urgency=medium + + * new upstream release + - don't ignore --include with multiple apt indices (closes: #976166) + * drop patches + + -- Johannes 'josch' Schauer Wed, 02 Dec 2020 07:58:12 +0100 + +mmdebstrap (0.7.2-3) unstable; urgency=medium + + * Add more patches to make debci on i386 and armhf happy + + -- Johannes 'josch' Schauer Mon, 30 Nov 2020 00:02:22 +0100 + +mmdebstrap (0.7.2-2) unstable; urgency=medium + + * Add two more patches from upstream to fix autopkgtest + + -- Johannes 'josch' Schauer Sun, 29 Nov 2020 12:35:25 +0100 + +mmdebstrap (0.7.2-1) unstable; urgency=medium + + * new upstream release + - allow dropping deb archives into /var/cache/apt/archives + (closes: #971001) + - use packages from SUITE if multiple apt indices are configured + (closes: #972234) + - use libdistro-info-perl if available and fall back to distro-info-data + if available (closes: #972739) + * add patches from upstream: + - 0001-coverage.sh-test-using-mnt-requires-qemu.patch + - 0001-coverage.sh-fix-total-number-of-tests.patch + - 0001-name-solver-mmdebstrap-dump-solution-in-official-apt.patch + * create and install man pages for mmtarfilter and mmtaridshift, adding a + build-depends on help2man and python3 + * add Recommends on libdistro-info-perl (see #972739) + * add Suggests on apt-utils (for /usr/lib/apt/solvers/apt) + * install mmdebstrap-dump-solution into /usr/lib/apt/solvers + + -- Johannes 'josch' Schauer Sun, 29 Nov 2020 02:34:03 +0100 + +mmdebstrap (0.7.1-3) unstable; urgency=medium + + * add patch 0001-create-temporary-test-ext2-image-in-TMPDIR-and-not-i.patch + + -- Johannes 'josch' Schauer Thu, 12 Nov 2020 15:51:37 +0100 + +mmdebstrap (0.7.1-2) unstable; urgency=medium + + * debian/tests/testsuite: make sure that HOSTARCH version of libfakeroot and + libfakechroot do not get removed when installing foreign architecture + versions + * add patch defining link_dir until debootstrap merge request 48 gets merged + * disable black until https://bugs.debian.org/970901 is fixed + + -- Johannes 'josch' Schauer Sun, 04 Oct 2020 09:35:22 +0200 + +mmdebstrap (0.7.1-1) unstable; urgency=medium + + * new upstream release + * drop patches (all included upstream) + + -- Johannes 'josch' Schauer Fri, 18 Sep 2020 14:46:00 +0200 + +mmdebstrap (0.7.0-1) unstable; urgency=medium + + * new upstream release + - skip the emulation check in chrootless mode (closes: #956714) + - check whether arch-test is available (closes: #965129) + - hooks are documented (closes: #942761) + * drop existing patches and add new patches from upstream: + - 0001-coverage.sh-send-adios-to-hook-listener.patch + - 0002-coverage.sh-two-tests-need-qemu-isolation.patch + * Set upstream metadata fields: Repository + * rename debian/gitlab-ci.yml -> debian/salsa-ci.yml and disable blhc and + arch:any builds + * debian/control: add depends on python and suggests for debootstrap and + distro-info-data + * debian/control: bump dh compat to 13 + * install taridshift, tarfilter and hooks + + -- Johannes 'josch' Schauer Fri, 28 Aug 2020 16:05:26 +0200 + +mmdebstrap (0.6.1-7) unstable; urgency=medium + + * debian/tests/control: mark test as skippable (exit 77 will skip it) + + -- Johannes 'josch' Schauer Thu, 14 May 2020 22:46:37 +0200 + +mmdebstrap (0.6.1-6) unstable; urgency=medium + + * debian/tests/testsuite: add 20 minute timout and reduce number of retries + to 3 + + -- Johannes 'josch' Schauer Sat, 11 Apr 2020 21:45:13 +0200 + +mmdebstrap (0.6.1-5) unstable; urgency=medium + + * add patch as workaround for squashfs-tools-ng/issues/42 + * add Suggests for tor and https mirrors + + -- Johannes 'josch' Schauer Thu, 09 Apr 2020 11:35:26 +0200 + +mmdebstrap (0.6.1-4) unstable; urgency=medium + + * since apt doesn't consider libgcc1 necessary (but debootstrap does) we + have to obtain it ourselves (see bug #953861) + + -- Johannes 'josch' Schauer Sun, 15 Mar 2020 14:03:23 +0100 + +mmdebstrap (0.6.1-3) unstable; urgency=medium + + * debootstrap changes got reverted -- deleting patch + * add patch to work around debootstrap ignoring versioned provides + see #953861 + + -- Johannes 'josch' Schauer Sun, 15 Mar 2020 11:28:06 +0100 + +mmdebstrap (0.6.1-2) unstable; urgency=medium + + * modify patch to make it also work with debootstrap 0.119 to + allow testing migration + + -- Johannes 'josch' Schauer Thu, 12 Mar 2020 10:52:18 +0100 + +mmdebstrap (0.6.1-1) unstable; urgency=medium + + * new upstream release + - documentation about default variant fixed (closes: #949457) + - TMPDIR is not used by unshared process or by anything executed inside + the chroot (closes: #949584) + - support for deb822 sources (closes: #949354) + - one more example in manpage -- still commented out though + (closes: #951112) + * suggest squashfs-tools-ng (closes: #950200) + * run wrap-and-sort -asbt + * drop patches + * add patch working around debootstrap bug #953588 and debootstrap adding + security mirror to /etc/apt/sources.list -- also see #953592 + + -- Johannes 'josch' Schauer Wed, 11 Mar 2020 12:25:57 +0100 + +mmdebstrap (0.6.0-4) unstable; urgency=medium + + * mount /sys and /proc read-only in root-mode to make autopkgtest happy on + ppc64el + + -- Johannes 'josch' Schauer Fri, 24 Jan 2020 09:46:08 +0100 + +mmdebstrap (0.6.0-3) unstable; urgency=medium + + * debian/tests/testsuite: + - use base-files package to determine the current archive + - pkgfile.archive should never raise AttributeError + - neutral exit when make_mirror fails too often + * debian/patches/autopkgtest: use variable hostarch in --logfile test + * bump debhelper compat to 12 + * debian/control: add Rules-Requires-Root: no + * bump standards-version to 4.5.0 + * override the uses-dpkg-database-directly lintian warning + + -- Johannes 'josch' Schauer Thu, 23 Jan 2020 09:52:40 +0100 + +mmdebstrap (0.6.0-2) unstable; urgency=medium + + * fix autopkgtest on gitlab CI + + -- Johannes 'josch' Schauer Mon, 20 Jan 2020 18:24:34 +0100 + +mmdebstrap (0.6.0-1) unstable; urgency=medium + + * new upstream release + - support running tests on non-amd64 architectures (closes: #948302) + - only attempt unlinking policy-rc.d if it exists (closes: #943323) + - add disclaimer of warranty and limitations of liability (closes: #944571) + - also remove apt sources that were given via /etc/apt/sources.list.d/ + (closes: #944684) + - also install essential packages with /dev, /proc and /sys mounted + (closes: #945119) + - support for extended attributes (closes: #947012) + - clean any remaining files in /tmp in the chroot (closes: #947239) + - also clean /var/log/apt/eipp.log.xz (closes: #944677) + - add --keyring option (closes: #943325) + - run xz with --threads=0 (closes: #943327) + - add --dry-run option (closes: #948481) + * drop dependency on perl-doc because --help doesn't need it anymore (closes: + #944923) + + -- Johannes 'josch' Schauer Sun, 19 Jan 2020 22:53:49 +0100 + +mmdebstrap (0.5.1-4) unstable; urgency=medium + + * make busybox test less sensitive to changes in unstable (closes: #948159) + + -- Johannes 'josch' Schauer Sun, 05 Jan 2020 21:12:05 +0100 + +mmdebstrap (0.5.1-3) unstable; urgency=medium + + * add patch to fix busybox sub-essential test + + -- Johannes 'josch' Schauer Mon, 16 Dec 2019 10:10:49 +0100 + +mmdebstrap (0.5.1-2) unstable; urgency=medium + + * add patch to fix /etc/shadow SOURCE_DATE_EPOCH workaround + + -- Johannes 'josch' Schauer Sat, 02 Nov 2019 23:32:32 +0100 + +mmdebstrap (0.5.1-1) unstable; urgency=medium + + * new upstream release + - allow apt to be already installed (closes: #942586) + - fix and improve --components (closes: #942588) + * drop patches + * autopkgtest: re-run ./make_mirror.sh if it should fail + + -- Johannes 'josch' Schauer Sun, 20 Oct 2019 01:49:40 +0200 + +mmdebstrap (0.5.0-2) unstable; urgency=medium + + * debian/tests/testsuite: don't install foreign architecture packages if + RUN_MA_SAME_TESTS != yes + + -- Johannes 'josch' Schauer Thu, 10 Oct 2019 09:10:21 +0200 + +mmdebstrap (0.5.0-1) unstable; urgency=medium + + * new upstream release + - rework CLI interface to use explicit "-" for stdin where ambiguous + instead of unconditionally reading stdin (closes: #934199) + - also create /var/lib/dpkg/arch in chrootless mode (closes: #935258) + - don't cleanup qemu-user in chrootless mode (closes: #935260) + - allow hooks to remove start-stop-daemon (closes: #940173) + - fix tarball permissions in chrootless mode (closes: #935266) + - only report binfmt_misc errors if needed (closes: #940162) + * run testsuite with distribution of the autopkgtest environment + * drop patches that were applied upstream + * apply two new patches to accommodate for salsa CI + + -- Johannes 'josch' Schauer Sun, 06 Oct 2019 23:20:58 +0200 + +mmdebstrap (0.4.1-8) unstable; urgency=medium + + * Detect distro tests are run on in autopkgtest + + -- Johannes 'josch' Schauer Thu, 03 Oct 2019 18:14:00 +0200 + +mmdebstrap (0.4.1-7) unstable; urgency=medium + + * Botched dgit commit + + -- Johannes 'josch' Schauer Thu, 26 Sep 2019 14:16:00 +0200 + +mmdebstrap (0.4.1-6) unstable; urgency=medium + + * Print apt-cache policy during autopkgtest + + -- Johannes 'josch' Schauer Thu, 26 Sep 2019 14:11:41 +0200 + +mmdebstrap (0.4.1-5) unstable; urgency=medium + + * Print environment variables during autopkgtest + + -- Johannes 'josch' Schauer Thu, 25 Jul 2019 12:32:18 +0200 + +mmdebstrap (0.4.1-4) unstable; urgency=medium + + * Backport another patch from upstream: + - fix docs: fakechroot is tried before proot in auto mode (closes: + #929489) + - updates for release of Debian buster + - make_mirror.sh: security.d.o dropped the MD5sum field for SHA256 in + Packages.gz + + -- Johannes 'josch' Schauer Thu, 25 Jul 2019 00:31:08 +0200 + +mmdebstrap (0.4.1-3) unstable; urgency=medium + + * Backport patches from upstream: + - cleanup auxfiles *after* running apt-get update (closes: #927151) + - chdir() before 'apt-get update' for apt (<< 1.5) + - chdir() before remove_tree() + - add Dir::State::Status to apt config for apt (<< 1.3) + - chmod 0755 on qemu-user-static binary for Ubuntu + - Only error out on W: and Err: lines (closes: #928079) + + -- Johannes 'josch' Schauer Sat, 04 May 2019 23:48:19 +0200 + +mmdebstrap (0.4.1-2) unstable; urgency=medium + + * Mark autopkgtest as flaky (closes: #924854) + + -- Johannes 'josch' Schauer Mon, 18 Mar 2019 14:46:01 +0100 + +mmdebstrap (0.4.1-1) unstable; urgency=medium + + * new upstream release + - re-enable fakechroot testing (closes: #909637) + - disable apt sandboxing if necessary (closes: #923374) + + -- Johannes 'josch' Schauer Fri, 01 Mar 2019 14:53:42 +0100 + +mmdebstrap (0.4.0-1) unstable; urgency=medium + + * new upstream release (closes: #920332) + - cleanup /var/lib/apt/lists/auxfiles (closes: #916769) + - disable merged-usr (closes: #914915) + + -- Johannes 'josch' Schauer Sun, 24 Feb 2019 09:09:50 +0100 + +mmdebstrap (0.3.0-10) unstable; urgency=medium + + * add debian/gitlab-ci.yml + * autopkgtest: run without qemu-kvm, without unshare, without proot and + without binfmt because neither is supported on Salsa CI (Docker) nor on + Debian CI (LXC) + + -- Johannes 'josch' Schauer Wed, 05 Dec 2018 07:47:53 +0100 + +mmdebstrap (0.3.0-9) unstable; urgency=medium + + * kvm is not available on ci.debian.net + + -- Johannes 'josch' Schauer Wed, 28 Nov 2018 09:08:41 +0100 + +mmdebstrap (0.3.0-8) unstable; urgency=medium + + * try enabling kvm + + -- Johannes 'josch' Schauer Wed, 28 Nov 2018 00:53:36 +0100 + +mmdebstrap (0.3.0-7) unstable; urgency=medium + + * set XDG_RUNTIME_DIR in autopkgtest to /home/AUTOPKGTEST_NORMAL_USER/run + + -- Johannes 'josch' Schauer Tue, 27 Nov 2018 08:21:53 +0100 + +mmdebstrap (0.3.0-6) unstable; urgency=medium + + * set XDG_RUNTIME_DIR in autopkgtest to AUTOPKGTEST_TMP + + -- Johannes 'josch' Schauer Tue, 27 Nov 2018 00:28:55 +0100 + +mmdebstrap (0.3.0-5) unstable; urgency=medium + + * set XDG_RUNTIME_DIR in autopkgtest to /run/user/$(id -u ...) + + -- Johannes 'josch' Schauer Mon, 26 Nov 2018 08:35:03 +0100 + +mmdebstrap (0.3.0-4) unstable; urgency=medium + + * set XDG_RUNTIME_DIR in autopkgtest + + -- Johannes 'josch' Schauer Sun, 25 Nov 2018 23:59:27 +0100 + +mmdebstrap (0.3.0-3) unstable; urgency=medium + + * add libc6-dev to autopkgtest dependencies + + -- Johannes 'josch' Schauer Sat, 24 Nov 2018 07:33:22 +0100 + +mmdebstrap (0.3.0-2) unstable; urgency=medium + + * add gcc to autopkgtest dependencies + + -- Johannes 'josch' Schauer Fri, 23 Nov 2018 22:37:09 +0100 + +mmdebstrap (0.3.0-1) unstable; urgency=medium + + * new upstream version + * update autopkgtest + * add Recommends on fakeroot + * add Suggests on qemu-user, binfmt-support and dpkg-dev + + -- Johannes 'josch' Schauer Fri, 23 Nov 2018 12:58:18 +0100 + +mmdebstrap (0.2.0-1) unstable; urgency=medium + + * new upstream version + - don't change permissions of bind mount targets and don't recursively + mount sysfs (closes: #909942) + - use data from standard input if no mirror is given and fix problem + with "deb"-style mirror lines (closes: #910044) + * add source package priority (closes: #909723) + + -- Johannes 'josch' Schauer Wed, 03 Oct 2018 10:48:50 +0200 + +mmdebstrap (0.1.0-2) unstable; urgency=medium + + * debian/control: add Vcs-Browser and Vcs-Git fields + * run wrap-and-sort -asbt + * add missing Depends on apt (closes: #909642) + * debian/control: add Recommends and Suggests + + -- Johannes 'josch' Schauer Wed, 26 Sep 2018 21:33:17 +0200 + +mmdebstrap (0.1.0-1) unstable; urgency=medium + + * Initial release. (Closes: #909264) + + -- Johannes 'josch' Schauer Mon, 24 Sep 2018 08:38:53 +0200 diff --git a/debian/compute_pkgset.py b/debian/compute_pkgset.py new file mode 100755 index 0000000..3404cb0 --- /dev/null +++ b/debian/compute_pkgset.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python3 + +import tempfile +import pathlib +import subprocess +import debian.deb822 +from collections import defaultdict + + +def main(): + pkglist = defaultdict(lambda: defaultdict(set)) + apttrusted = subprocess.check_output( + "eval $(apt-config shell v Dir::Etc::Trusted/f); printf $v", shell=True + ).decode() + apttrustedparts = subprocess.check_output( + "eval $(apt-config shell v Dir::Etc::TrustedParts/f); printf $v", shell=True + ).decode() + debci_arches = set( + ["amd64", "arm64", "armel", "armhf", "i386", "ppc64el", "riscv64", "s390x"] + ) + # debci_arches = set(["amd64", "i386"]) + for arch in list(debci_arches): + with tempfile.TemporaryDirectory() as tmpdir: + tmpdir = pathlib.Path(tmpdir) + (tmpdir / "etc" / "apt").mkdir(parents=True) + (tmpdir / "var" / "cache").mkdir(parents=True) + (tmpdir / "var" / "lib").mkdir(parents=True) + (tmpdir / "apt.conf").write_text( + f""" + Apt::Architecture "{arch}"; + Apt::Architectures "{arch}"; + Dir "{tmpdir}"; + Dir::Etc::Trusted "{apttrusted}"; + Dir::Etc::TrustedParts "{apttrustedparts}"; + """ + ) + (tmpdir / "etc" / "apt" / "sources.list").write_text( + "deb http://deb.debian.org/debian/ unstable main" + ) + subprocess.check_call( + ["apt-get", "update"], env={"APT_CONFIG": tmpdir / "apt.conf"} + ) + indextargets = subprocess.check_output( + [ + "apt-get", + "indextargets", + "--format", + "$(FILENAME)", + "Created-By: Packages", + f"Architecture: {arch}", + ], + env={"APT_CONFIG": tmpdir / "apt.conf"}, + ).decode() + if not indextargets.strip(): + print(f"skipping {arch}") + debci_arches.remove(arch) + continue + (tmpdir / "Packages").write_bytes( + subprocess.check_output( + ["/usr/lib/apt/apt-helper", "cat-file", *indextargets.splitlines()] + ) + ) + pkgset = ( + subprocess.check_output( + [ + "grep-dctrl", + "--no-field-names", + "--show-field=Package", + "--exact-match", + "(", + "--field=Essential", + "yes", + "--or", + "--field=Priority", + "required", + "--or", + "--field=Priority", + "important", + "--or", + "--field=Priority", + "standard", + ")", + (tmpdir / "Packages"), + ] + ) + .decode() + .splitlines() + ) + pkgset.extend( + [ + "build-essential", + "busybox", + "gpg", + "eatmydata", + "usr-is-merged", + "usrmerge", + ] + ) + ceve = subprocess.check_output( + [ + "dose-ceve", + f"--deb-native-arch={arch}", + "-c", + ",".join(pkgset), + "-t", + "deb", + "-G", + "pkg", + "-T", + "deb", + (tmpdir / "Packages"), + ] + ) + for pkg in debian.deb822.Packages.iter_paragraphs(ceve): + src = pkg.get("Source") + if src is None: + src = pkg["Package"] + elif " " in src: + src = src.split()[0] + pkglist[src][pkg["Package"]].add(arch) + result = [] + for src in pkglist: + srcarches = set() + for pkg in pkglist[src]: + srcarches |= pkglist[src][pkg] + representers = [pkg for pkg in pkglist[src] if pkglist[src][pkg] == srcarches] + if not representers: + print(f"nothing represents {src}:", pkglist[src]) + continue + pkg = sorted(representers)[0] + if pkglist[src][pkg] == debci_arches: + result.append(pkg) + else: + result.append(f"{pkg} [{' '.join(sorted(pkglist[src][pkg]))}]") + line = "Depends: " + for dep in sorted(result): + newline = line + f"{dep}, " + if len(newline) > 79: + print(line.removesuffix(" ")) + line = f" {dep}, " + else: + line = newline + print(line.removesuffix(", ")) + + +if __name__ == "__main__": + main() diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..c82cdb3 --- /dev/null +++ b/debian/control @@ -0,0 +1,79 @@ +Source: mmdebstrap +Maintainer: Johannes Schauer Marin Rodrigues +Standards-Version: 4.6.1 +Build-Depends: + debhelper-compat (= 13), + help2man, + python3, +Homepage: https://gitlab.mister-muffin.de/josch/mmdebstrap/ +Section: admin +Priority: optional +Vcs-Browser: https://salsa.debian.org/debian/mmdebstrap +Vcs-Git: https://salsa.debian.org/debian/mmdebstrap.git +Rules-Requires-Root: no + +Package: mmdebstrap +Architecture: all +Depends: + apt (>= 2.3.14), + python3 (>= 3.10), + ${misc:Depends}, + ${perl:Depends}, +Recommends: +# building chroots for arches that cannot be executed on the current platform + arch-test, +# --mode=fakechroot + fakechroot, + fakeroot, +# figure out the right signed-by value for distributions that apt doesn't know +# the right keyring for + gpg (>= 2.2.8), +# To figure out whether a distro is EOL or not and to figure out which security +# mirror to use because Debian bullseye and later use suite-security instead of +# suite/updates. + libdistro-info-perl, +# to find out keyring paths + libdpkg-perl, +# needed in cases mknod is not permitted and device nodes have to be +# bind-mounted instead. It is also needed in root and unshare mode to mount +# /sys and /proc but is not needed in fakechroot mode + mount, +# - --mode=unshare + uidmap, +Suggests: +# If using apt sources.list with tor+ (Tor network) + apt-transport-tor, +# to have /usr/lib/apt/solvers/apt for the +# /usr/lib/apt/solvers/mmdebstrap-dump-solution executable to function + apt-utils, +# chroots for architectures that cannot be executed by the host CPU unless in +# chrootless mode + binfmt-support | systemd (>= 251.2-1), +# If using apt sources.list with https + ca-certificates, +# /usr/share/debootstrap/scripts/ to infer distro names from the symlinks and +# /usr/share/debootstrap/scripts/gutsy to figure out the default mirror URL + debootstrap, +# get better data about new distros or EOL distros + distro-info-data, +# the dpkg-architecture binary to turn a Debian architecture into the +# DEB_HOST_MULTIARCH value + dpkg-dev, +# --format=ext2 + genext2fs, +# Generation of man page from source code + perl-doc, +# for cross platform builds such as building arm64 on amd64 + qemu-user, + qemu-user-static, +# --format=squashfs + squashfs-tools-ng, +Description: create a Debian chroot + Downloads, unpacks and installs Debian packages to either directly create a + directory which can be chrooted into, or a tarball of it. In contrast to + debootstrap it uses apt, supports more than one mirror, automatically uses + security and updates mirrors for Debian stable chroots, is 3-6 times faster, + produces smaller output by removing unnecessary cruft, is bit-by-bit + reproducible if $SOURCE_DATE_EPOCH is set, allows unprivileged operation using + Linux user namespaces or fakechroot and can setup foreign architecture + chroots using qemu-user. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b9c2dd9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,32 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: mmdebstrap +Upstream-Contact: Johannes Schauer Marin Rodrigues +Source: https://gitlab.mister-muffin.de/josch/mmdebstrap/ + +Files: * +Copyright: 2018-2022 Johannes Schauer Marin Rodrigues +License: Expat + +Files: examples/twb/* +Copyright: 2021 Trent W. Buck +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + The software is provided "as is", without warranty of any kind, express or + implied, including but not limited to the warranties of merchantability, + fitness for a particular purpose and noninfringement. In no event shall the + authors or copyright holders be liable for any claim, damages or other + liability, whether in an action of contract, tort or otherwise, arising + from, out of or in connection with the software or the use or other dealings + in the software. diff --git a/debian/mmdebstrap.examples b/debian/mmdebstrap.examples new file mode 100644 index 0000000..e39721e --- /dev/null +++ b/debian/mmdebstrap.examples @@ -0,0 +1 @@ +examples/* diff --git a/debian/mmdebstrap.install b/debian/mmdebstrap.install new file mode 100644 index 0000000..3939ba3 --- /dev/null +++ b/debian/mmdebstrap.install @@ -0,0 +1,4 @@ +usr/bin +usr/lib/apt/solvers +usr/libexec/mmdebstrap +usr/share/mmdebstrap diff --git a/debian/mmdebstrap.lintian-overrides b/debian/mmdebstrap.lintian-overrides new file mode 100644 index 0000000..c6c2345 --- /dev/null +++ b/debian/mmdebstrap.lintian-overrides @@ -0,0 +1,8 @@ +# mmdebstrap has to create dpkg files and directories itself because dpkg only +# started doing that itself with commit +# 2896dae700d8aaff73b4a05f07c0c138a20c784c from 2020-01-20 +# mmdebstrap can stop doing this once dpkg with this feature is in +# old-old-stable +mmdebstrap: uses-dpkg-database-directly [usr/bin/mmdebstrap] +mmdebstrap: uses-dpkg-database-directly [usr/share/mmdebstrap/hooks/eatmydata/customize.sh] +mmdebstrap: uses-dpkg-database-directly [usr/share/mmdebstrap/hooks/eatmydata/extract.sh] diff --git a/debian/patches/0001-hooks-maybe-merged-usr-prepare-for-the-time-when-usr.patch b/debian/patches/0001-hooks-maybe-merged-usr-prepare-for-the-time-when-usr.patch new file mode 100644 index 0000000..ec32f84 --- /dev/null +++ b/debian/patches/0001-hooks-maybe-merged-usr-prepare-for-the-time-when-usr.patch @@ -0,0 +1,94 @@ +From d883fa13bbb9ac78cc3e16511fc7359314ae256d Mon Sep 17 00:00:00 2001 +From: Johannes Schauer Marin Rodrigues +Date: Mon, 26 Feb 2024 14:52:43 +0100 +Subject: [PATCH] hooks/maybe-merged-usr: prepare for the time when + usr-is-merged exists only as a virtual package + +--- + hooks/maybe-merged-usr/essential00.sh | 4 ++++ + hooks/maybe-merged-usr/extract00.sh | 20 +++++++++++++++----- + hooks/maybe-merged-usr/setup00.sh | 20 +++++++++++++++----- + 3 files changed, 34 insertions(+), 10 deletions(-) + +diff --git a/hooks/maybe-merged-usr/essential00.sh b/hooks/maybe-merged-usr/essential00.sh +index a23f2f7..656057e 100755 +--- a/hooks/maybe-merged-usr/essential00.sh ++++ b/hooks/maybe-merged-usr/essential00.sh +@@ -15,6 +15,10 @@ case "$ver" in + echo "usr-is-merged package from src:usrmerge installed -- not running merged-usr essential hook" >&2 + exit 0 + ;; ++ 'not-installed ') ++ echo "usr-is-merged was not installed in a previous hook -- not running merged-usr essential hook" >&2 ++ exit 0 ++ ;; + *) + echo "unexpected situation for package usr-is-merged: $ver" >&2 + exit 1 +diff --git a/hooks/maybe-merged-usr/extract00.sh b/hooks/maybe-merged-usr/extract00.sh +index dc88450..00bb037 100755 +--- a/hooks/maybe-merged-usr/extract00.sh ++++ b/hooks/maybe-merged-usr/extract00.sh +@@ -4,12 +4,22 @@ set -eu + + env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-get update --error-on=any + +-# if the usr-is-merged package cannot be installed with apt, do nothing +-if ! env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged > /dev/null 2>&1; then +- echo "no package called usr-is-merged found -- not running merged-usr extract hook" >&2 +- exit 0 ++if env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged > /dev/null 2>&1; then ++ # if apt-cache exited successfully, then usr-is-merged exists either as ++ # a real or virtual package ++ if env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged 2>/dev/null | grep -q "Package: usr-is-merged"; then ++ echo "usr-is-merged found -- running merged-usr extract hook" >&2 ++ else ++ # The usr-is-merged must be virtual, so assume that nothing ++ # has to be done. This is the case with Debian Trixie or later ++ # or with Ubuntu Lunar or later ++ echo "usr-is-merged found but not real -- not running merged-usr extract hook" >&2 ++ exit 0 ++ fi + else +- echo "package usr-is-merged found -- running merged-usr extract hook" >&2 ++ # if the usr-is-merged package cannot be installed with apt, do nothing ++ echo "no package providing usr-is-merged found -- not running merged-usr extract hook" >&2 ++ exit 0 + fi + + # resolve the script path using several methods in order: +diff --git a/hooks/maybe-merged-usr/setup00.sh b/hooks/maybe-merged-usr/setup00.sh +index a6bd712..6568af2 100755 +--- a/hooks/maybe-merged-usr/setup00.sh ++++ b/hooks/maybe-merged-usr/setup00.sh +@@ -4,12 +4,22 @@ set -eu + + env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-get update --error-on=any + +-# if the usr-is-merged package cannot be installed with apt, do nothing +-if ! env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged > /dev/null 2>&1; then +- echo "no package called usr-is-merged found -- not running merged-usr setup hook" >&2 +- exit 0 ++if env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged > /dev/null 2>&1; then ++ # if apt-cache exited successfully, then usr-is-merged exists either as ++ # a real or virtual package ++ if env --chdir="$1" APT_CONFIG="$MMDEBSTRAP_APT_CONFIG" apt-cache show --no-all-versions usr-is-merged 2>/dev/null | grep -q "Package: usr-is-merged"; then ++ echo "usr-is-merged found -- running merged-usr setup hook" >&2 ++ else ++ # The usr-is-merged must be virtual, so assume that nothing ++ # has to be done. This is the case with Debian Trixie or later ++ # or with Ubuntu Lunar or later ++ echo "usr-is-merged found but not real -- not running merged-usr setup hook" >&2 ++ exit 0 ++ fi + else +- echo "package usr-is-merged found -- running merged-usr setup hook" >&2 ++ # if the usr-is-merged package cannot be installed with apt, do nothing ++ echo "no package providing usr-is-merged found -- not running merged-usr setup hook" >&2 ++ exit 0 + fi + + # resolve the script path using several methods in order: +-- +2.39.2 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..af95d70 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-hooks-maybe-merged-usr-prepare-for-the-time-when-usr.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..dc165e4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,30 @@ +#!/usr/bin/make -f + +# for DEB_VERSION_UPSTREAM +include /usr/share/dpkg/pkg-info.mk + +%: + dh $@ + +override_dh_installman: + pod2man debian/tmp/usr/bin/mmdebstrap > ./mmdebstrap.1 + pod2man debian/tmp/usr/bin/mmdebstrap-autopkgtest-build-qemu > ./mmdebstrap-autopkgtest-build-qemu.1 + help2man --no-info --name "filter a tarball like dpkg does" --version-string="$(DEB_VERSION_UPSTREAM)" debian/tmp/usr/bin/mmtarfilter > ./mmtarfilter.1 + dh_installman ./mmdebstrap.1 ./mmtarfilter.1 ./mmdebstrap-autopkgtest-build-qemu.1 + rm ./mmdebstrap.1 ./mmtarfilter.1 ./mmdebstrap-autopkgtest-build-qemu.1 + +# override dh_install instead of using debian/mmdebstrap.install because +# dh_install cannot rename files and dh-exec cannot copy directories +override_dh_install: + mkdir -p debian/tmp/usr/bin + cp -a mmdebstrap debian/tmp/usr/bin/mmdebstrap + cp -a tarfilter debian/tmp/usr/bin/mmtarfilter + cp -a mmdebstrap-autopkgtest-build-qemu debian/tmp/usr/bin/mmdebstrap-autopkgtest-build-qemu + mkdir -p debian/tmp/usr/lib/apt/solvers + cp -a proxysolver debian/tmp/usr/lib/apt/solvers/mmdebstrap-dump-solution + mkdir -p debian/tmp/usr/share/mmdebstrap + cp -a hooks debian/tmp/usr/share/mmdebstrap + mkdir -p debian/tmp/usr/libexec/mmdebstrap + cp -a gpgvnoexpkeysig debian/tmp/usr/libexec/mmdebstrap + cp -a ldconfig.fakechroot debian/tmp/usr/libexec/mmdebstrap + dh_install diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml new file mode 100644 index 0000000..37eadfb --- /dev/null +++ b/debian/salsa-ci.yml @@ -0,0 +1,15 @@ +--- +# remounting /dev with rw because fuse's postinst needs to be able to chmod(1) /dev/cuse +before_script: + - mount -o remount,rw /dev + +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +.test-autopkgtest: + timeout: 3h + +variables: + SALSA_CI_DISABLE_BLHC: 1 + SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..69f90a0 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,143 @@ +Tests: testsuite +Depends: + apt-cudf, + arch-test, + aspcud, + black, + debian-archive-keyring, + debootstrap (>= 1.0.128), + diffoscope, + dpkg-dev, + fakechroot, + fakeroot, + genext2fs, + gpg, + grep-dctrl, + libcap2-bin, + libperl-critic-perl, + mmdebstrap, + mount, + perl-doc, + perltidy, + python3, + python3-apt, + python3-debian, + shellcheck, + squashfs-tools-ng, + sudo, + uidmap, +Restrictions: needs-root, allow-stderr, skippable + +# add a manual trigger on those packages that in the past broke this test +# +# YEAR | SOURCE PACKAGE BUG NUMBERS FAILED TESTS +# -----+----------------------------------------------------------------------- +# | passwd #1004710 +# | python3 #1010368, #1010366 +# | man-db #1010957 +# 2022 | libc-bin #1017590 +# | cron #1012622, #1020603 +# | kmod #1020605 +# | ifupdown #1020604 +# | procps #1020602 +# -----+----------------------------------------------------------------------- +# | fakeroot #1030638, #1023286 +# | debootstrap #1031222, #1031105, #1049898, #837060 check-against-debootstrap-dist, as-debootstrap-unshare-wrapper, chrootless +# | libgdbm-compat4 #1031276 check-for-bit-by-bit-identical-format-output +# | tzdata #1031395 essential-hook, multiple-include +# 2023 | debian-archive-keyring #1019922 ascii-armored-keys, keyring, signed-by-without-host-keys +# | doc-debian #1035913 include, install-doc-debian, install-doc-debian-and-test-hooks, multiple-include, unpack-doc-debian +# | dash #989632 +# | adduser #1039709 check-against-debootstrap-dist +# | debianutils #1050752 chrootless +# | usrmerge #1050755, #1053671 chrootless-foreign, merged-fakechroot-inside-unmerged-chroot +# -----+----------------------------------------------------------------------- +# 2024 | dpkg #1059982 remove-start-stop-daemon-and-policy-rc-d-in-hook +# +Features: test-name=hint-testsuite-triggers +Test-Command: false +Depends: + adduser, + cron, + dash, + debian-archive-keyring, + debianutils, + debootstrap, + doc-debian, + dpkg, + fakeroot, + ifupdown, + kmod, + libc-bin, + libgdbm-compat4, + man-db, + passwd, + procps, + python3, + tzdata, + usrmerge, +Restrictions: hint-testsuite-triggers + +# FIXME: in an ideal world, debci would have enough computational resources +# to run this autopkgtest for all the packages in essential and +# build-essential and priority:standard that trigger it. But we are +# not there yet, so we must live with the situation that even if a +# package upload breaks the mmdebstrap autopkgtest, we will only notice +# either because another unrelated package triggers the autopkgtest +# or because this failed: +# https://jenkins.debian.net/job/mmdebstrap-jenkins-worker/ +## Using the hint-testsuite-triggers restriction we make all packages that are +## put into the local archive by ./make_mirror.sh a trigger for the mmdebstrap +## autopkgtest. This is essential, priority:required, priority:important, +## priority:standard, build-essential, busybox, gpg, eatmydata, usr-is-merged +## and usrmerge plus their dependency closure. The set is different depending +## on the native architecture. Since we cannot depend on source packages and +## to reduce the binary package set, only one binary package per source +## package is listed here. If there are multiple choices, the binary packages +## available on more architectures are preferred and then sorted by name. +## Since library binary package names change frequently, this list has to be +## updated regularly. Use the debian/compute_pkgset.py script to update the +## list of dependencies. +#Features: test-name=hint-testsuite-triggers +#Test-Command: false +#Depends: acl, adduser, anacron, apt, apt-listchanges, base-files, base-passwd, +# bash, bash-completion, bc [ppc64el], bcron, bind9-dnsutils, binutils, +# bsdextrautils, build-essential, busybox, bzip2, ca-certificates, cdebconf, +# coreutils, cpio, cpp, cpp-12, cron, daemon, dash, dbus, dbus-broker, debconf, +# debian-archive-keyring, debian-faq, debianutils, diffutils, distro-info-data, +# dmidecode [amd64 arm64 armhf i386], dmsetup, doc-debian, dpkg, e2fsprogs, +# eatmydata, file, findutils, gawk, gettext-base, gpg, gpgv1, grep, groff-base, +# guile-3.0-libs, gzip, hostname, ifupdown, inetutils-telnet, init, +# initscripts, insserv, install-info, iproute2, iputils-ping, isc-dhcp-client, +# kmod, krb5-locales, less, libapparmor1, libargon2-1, libassuan0, libattr1, +# libaudit-common, libbg2, libbpf1, libbrotli1, libbsd0, libc-bin, libcap-ng0, +# libcap2, libcbor0.8, libcrypt-dev, libcryptsetup12, libcurl3-gnutls, +# libdb5.3, libdebian-installer4, libedit2, libeinfo1, libelf1, libelogind0, +# libexpat1, libffi8, libfido2-1, libfile-find-rule-perl, libfstrm0, +# libfuse2 [s390x], libgc1, libgcrypt20, libgdbm-compat4, libgmp10, +# libgnutls30, libgpg-error0, libhogweed6, libicu72, libidn2-0, libip4tc2, +# libisl23, libjansson4, libjemalloc2, libjson-c5, libkeyutils1, libldap-2.5-0, +# liblmdb0, liblocale-gettext-perl, liblockfile-bin, liblz4-1, liblzma5, +# libmaxminddb0, libmd0, libmnl0, libmpc3, libmpfr6, libncursesw6, libnewt0.52, +# libnftables1, libnftnl11, libnghttp2-14, libnsl-dev, libnss-systemd, +# libnuma1 [ppc64el], libnumber-compare-perl, libp11-kit0, libpam-modules, +# libpci3, libpcre2-8-0, libperl5.36, libpipeline1, libpopt0, libproc2-0, +# libprotobuf-c1, libpsl5, libpython3-stdlib, libpython3.11-minimal, +# libreadline8, librtas2 [ppc64el], librtmp1, libsasl2-2, libseccomp2, +# libselinux1, libsemanage-common, libsepol2, libsigsegv2, libslang2, +# libsqlite3-0, libssh2-1, libssl3, libtasn1-6, libtext-charwidth-perl, +# libtext-glob-perl, libtext-iconv-perl, libtext-wrapi18n-perl, libtextwrap1, +# libtirpc-common, libuchardet0, libunistring2, libuv1, libxml2, libxxhash0, +# libzstd1, linux-libc-dev, login, logrotate, lsb-base, lsof, mailcap, make, +# man-db, manpages, mawk, media-types, mime-support, nano, netbase, +# netcat-traditional, openssh-client, opensysusers, original-awk, patch, +# pci.ids, powerpc-ibm-utils [ppc64el], python-apt-common, python3-certifi, +# python3-chardet, python3-charset-normalizer, python3-debian, +# python3-debianbts, python3-httplib2, python3-idna, python3-pkg-resources, +# python3-pycurl, python3-pyparsing, python3-pysimplesoap, python3-reportbug, +# python3-requests, python3-six, python3-urllib3, rpcsvc-proto, runit-helper, +# s390-tools [s390x], sed, sensible-utils, startpar, +# sysconfig-hardware [s390x], systemd-cron, sysuser-helper, tar, tasksel, +# traceroute, tzdata, ucf, ucspi-unix, usr-is-merged, vim-common, wamerican, +# wget, zlib1g +#Restrictions: hint-testsuite-triggers diff --git a/debian/tests/sourcesfilter b/debian/tests/sourcesfilter new file mode 100755 index 0000000..f2d6b7d --- /dev/null +++ b/debian/tests/sourcesfilter @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 + +from aptsources.sourceslist import SourcesList, Deb822SourceEntry +import apt_pkg +import glob +import os.path +import sys +import os + + +def main(rootfs): + sources = SourcesList(False, deb822=True) + + dbglvl = os.environ.get("MMDEBSTRAP_VERBOSITY", "-1") + try: + dbglvl = int(dbglvl) + except ValueError: + dbglvl = -1 + if dbglvl >= 2: + print("before:", file=sys.stderr) + for s in sources.list: + print(s.str(), end="", file=sys.stderr) + + os.makedirs(rootfs + "/etc/apt/sources.list.d", exist_ok=True) + + # remove all the things we do not want and change components and uri + for s in list(sources): + # since we put everything into a single output file, only one-line + # format is supported for now + assert not isinstance(s, Deb822SourceEntry), s + s.file = rootfs + s.file + # if it's a local file:// repo, don't mangle it + if s.uri.startswith("file://"): + continue + # remove debug packages + if s.uri.endswith("/debian-debug"): + sources.remove(s) + continue + # only allow main + s.comps = [c for c in s.comps if c in ["main"]] + # remove sources with empty components list + if not s.comps: + sources.remove(s) + continue + # remove deb-src entries + if s.type == "deb-src": + sources.remove(s) + continue + # translate uri to our proxy on 127.0.0.1 + s.uri = "http://127.0.0.1/debian" + + # remove duplicates + # we cannot use set() because order must be preserved + seen = set() + for s in list(sources): + if s.str() in seen: + sources.remove(s) + continue + seen.add(s.str()) + + if dbglvl >= 2: + print("after:", file=sys.stderr) + for s in sources.list: + print(s.str(), end="", file=sys.stderr) + + # we want to append to existing files, so backup the files which would + # otherwise be overwritten by sources.save() + files_to_backup = {} + for s in sources.list: + if os.path.isfile(s.file): + files_to_backup[s.file] = b"" + + for fname in files_to_backup: + with open(fname, "rb") as f: + files_to_backup[fname] = f.read() + + sources.save() + + # now prepend the original content + for fname in files_to_backup: + with open(fname, "rb") as f: + updated_content = f.read() + with open(fname, "wb") as f: + f.write(files_to_backup[fname] + b"\n" + updated_content) + + # append apt preferences verbatim + for pref in glob.glob("/etc/apt/preferences.d/*"): + if not os.path.isfile(pref): + continue + os.makedirs(os.path.dirname(rootfs + pref), exist_ok=True) + with open(pref) as fin, open(rootfs + pref, "a") as fout: + fout.write("\n") + for line in fin: + fout.write(line) + + +if __name__ == "__main__": + main(sys.argv[1]) diff --git a/debian/tests/testsuite b/debian/tests/testsuite new file mode 100644 index 0000000..f8edddb --- /dev/null +++ b/debian/tests/testsuite @@ -0,0 +1,219 @@ +#!/bin/sh + +set -exu + +# dump information about the autopkgtest runner +# print to stderr to prevent wrong interleaving with set -x output +cat /etc/debian_version >&2 +env >&2 +nproc >&2 +apt-config dump >&2 +apt-cache policy >&2 +for f in /etc/apt/sources.list /etc/apt/sources.list.d/* /etc/apt/preferences.d/*; do + [ -e "$f" ] || continue + echo "dumping contents of $f" >&2 + cat "$f" >&2 +done + +# The mmdebstrap autopkgtest can take a very long time and it cannot be split +# into multiple individual tests because they all rely on the existence of the +# local package cache. We cannot re-generate this cache multiple times because +# if a dinstall happens while this autopkgtest is running (not unlikely because +# this test takes 2 hours easy) then the chroots might not be bit-by-bit +# identical with each other anymore. Being independent of unfortunate Debian +# mirror updates is one of the reasons the cache exists. +# +# By default (and this cannot be changed), a autopkgtest "test" is allowed to +# last 10000 seconds or 2:46:40 hours. If this test takes too long, we return +# exit code 77, marking it as "skipped". + +TIME_BEGIN=$(date +%s) + +# the archive with the highest priority where the base-files package comes from +# determines whether we are on stable, testing or unstable +DEFAULT_DIST=$(cat << END | python3 - +import apt_pkg, sys +apt_pkg.init() +c = apt_pkg.Cache(None) +d = apt_pkg.DepCache(c) +s = apt_pkg.SourceList() +s.read_main_list() + +highest_prio = -1 +highest_archive = None +for pkgfile, _ in d.get_candidate_ver(c["base-files"]).file_list: + print("processing: %s"%pkgfile, file=sys.stderr) + index = s.find_index(pkgfile) + if index is None: + print("index is none -- skipping", file=sys.stderr) + continue + if not index.is_trusted: + print("index is not trusted -- skipping", file=sys.stderr) + continue + archive = pkgfile.archive + if archive not in ["stable", "testing", "unstable"]: + print("index archive %s is %s -- skipping"%(index, archive), file=sys.stderr) + continue + prio = d.policy.get_priority(pkgfile) + if prio > highest_prio: + highest_prio = prio + highest_archive = archive +if highest_archive is None: + print("highest priority apt archive is neither stable, testing or unstable", file=sys.stderr) + for f in c.file_list: + print('========================', file=sys.stderr) + for a in ['architecture', 'archive', 'codename', 'component', 'filename', 'id', 'index_type', 'label', 'not_automatic', 'not_source', 'origin', 'site', 'size', 'version']: + print("%s: %s"%(a, getattr(f, a, None)), file=sys.stderr) + print("priority: ", d.policy.get_priority(f), file=sys.stderr) + exit(1) +print("highest archive priority: %s"%highest_archive, file=sys.stderr) +print(highest_archive) +END +) + +# On stable and testing we can run tests that require m-a:same packages to +# exist in the same version across multiple architectures. Only on unstable we +# disable this because packages in unstable are often out-of-sync. +RUN_MA_SAME_TESTS=yes +case $DEFAULT_DIST in + unstable) + RUN_MA_SAME_TESTS=no + ;; + stable|testing) + # nothing to do + ;; + *) + echo "unknown distribution $DEFAULT_DIST, must be one of stable, testing or unstable" >&2 + ;; +esac + +SRC="$(pwd)" + +# change to temporary directory to not interfere with the source +cd "$AUTOPKGTEST_TMP" + +# coverage.sh expects the scripts to be in the current directory +# we copy make_mirror.sh instead of symlinking it because we are going to patch +# it +cp -a "$SRC/make_mirror.sh" make_mirror.sh +ln -s "$SRC/run_qemu.sh" run_qemu.sh +ln -s "$SRC/run_null.sh" run_null.sh +cp -a "$SRC/hooks" . +ln -s "$SRC/coverage.sh" coverage.sh +ln -s "$SRC/gpgvnoexpkeysig" gpgvnoexpkeysig +ln -s "$SRC/coverage.py" coverage.py +ln -s "$SRC/coverage.txt" coverage.txt +ln -s "$SRC/caching_proxy.py" caching_proxy.py +ln -s "$SRC/.perltidyrc" .perltidyrc +ln -s "$SRC/mmdebstrap-autopkgtest-build-qemu" mmdebstrap-autopkgtest-build-qemu +cp -a "$SRC/tests" . + +# on Debian Salsa CI, $AUTOPKGTEST_NORMAL_USER is empty +if [ -z "$AUTOPKGTEST_NORMAL_USER" ]; then + AUTOPKGTEST_NORMAL_USER=debci + useradd --create-home --groups sudo "$AUTOPKGTEST_NORMAL_USER" +# useradd --create-home --groups kvm "$AUTOPKGTEST_NORMAL_USER" +# ls -lha /dev/kvm || true +# lsmod | grep kvm || true +else + adduser "$AUTOPKGTEST_NORMAL_USER" sudo +# adduser "$AUTOPKGTEST_NORMAL_USER" kvm +fi + +mkdir ./shared +chown "$AUTOPKGTEST_NORMAL_USER" ./shared + +echo "$AUTOPKGTEST_NORMAL_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +# we cannot use mini_httpd (or most other http servers) because they perform a +# chdir() into the directory that is to be served on startup. But later on we +# completely remove and replace that directory when creating the Debian mirror. +# Thus we need a really stupid server which is able to cope with having its +# www-root being replaced under its feet. +#mini_httpd -D -h 127.0.0.1 -p 80 -u "$AUTOPKGTEST_NORMAL_USER" -T UTF-8 -dd "$AUTOPKGTEST_TMP/shared/cache" & +python3 -m http.server --directory="$AUTOPKGTEST_TMP/shared/cache" --bind 127.0.0.1 80 2>/dev/null & +HTTPD_PID=$! +trap "kill $HTTPD_PID" INT QUIT TERM EXIT + +# create a fake mmdebstrap file in the current directory that coverage.sh can +# copy +cat << END > ./mmdebstrap +#!/usr/bin/perl +use strict; +use warnings; +exit(1) +END + +# must not be used during testing -- installed version must be used instead +cat << END > ./tarfilter +#!/usr/bin/env python3 +exit(1) +END + +# add entries to /etc/subuid and /etc/subgid if they don't exist yet +if [ ! -e /etc/subuid ] || ! grep "$AUTOPKGTEST_NORMAL_USER" /etc/subuid; then + echo "$AUTOPKGTEST_NORMAL_USER:100000:65536" >> /etc/subuid +fi +if [ ! -e /etc/subgid ] || ! grep "$AUTOPKGTEST_NORMAL_USER" /etc/subgid; then + echo "$AUTOPKGTEST_NORMAL_USER:100000:65536" >> /etc/subgid +fi + +ret=0 +timeout 50m runuser -u "$AUTOPKGTEST_NORMAL_USER" -- env CMD=mmdebstrap DEFAULT_DIST=$DEFAULT_DIST RUN_MA_SAME_TESTS=$RUN_MA_SAME_TESTS HAVE_QEMU=no HAVE_BINFMT=no USE_HOST_APT_CONFIG=yes "$SRC/make_mirror.sh" || ret=$? +if [ "$ret" -ne 0 ]; then + echo "./make_mirror.sh failed" >&2 + exit 77 +fi + +# subtract 10 seconds to account for the inaccuracy in measuring time +TIMEOUT=$((10000-$(date +%s)+$TIME_BEGIN-10)) + +# now run the script +# we set CMD so that Devel::Cover is not used +# HAVE_QEMU=no because there is no kvm kernel module +# HAVE_BINFMT=no because there is no binfmt_misc kernel module +ret=0 +timeout $TIMEOUT runuser -u "$AUTOPKGTEST_NORMAL_USER" -- env CMD="mmdebstrap --setup-hook=$SRC/debian/tests/sourcesfilter --hook-dir=$SRC/hooks/file-mirror-automount" DEFAULT_DIST=$DEFAULT_DIST RUN_MA_SAME_TESTS=$RUN_MA_SAME_TESTS HAVE_QEMU=no HAVE_BINFMT=no USE_HOST_APT_CONFIG=yes "$SRC/coverage.sh" --exitfirst || ret=$? +if [ "$ret" -eq 124 ]; then + echo "command timed out after $TIMEOUT seconds" >&2 + exit 77 +elif [ "$ret" -ne 0 ]; then + exit $ret +fi + +# subtract 10 seconds to account for the inaccuracy in measuring time +TIMEOUT=$((10000-$(date +%s)+$TIME_BEGIN-10)) + +# exit successfully if there is not enough time left +if [ "$TIMEOUT" -lt 3000 ]; then + echo "skipping remaining tests due to lack of remaining time" >&2 + exit 0 +fi + +du -hs ./shared + +# FORCE_UPDATE=yes to force rebuilding the cache +# ONLY_HOSTARCH=yes to limit the number of downloaded content +# RUN_MA_SAME_TESTS=no because foreign arches are missing +ret=0 +timeout $TIMEOUT runuser -u "$AUTOPKGTEST_NORMAL_USER" -- env CMD=mmdebstrap DEFAULT_DIST=$DEFAULT_DIST ONLY_HOSTARCH=yes FORCE_UPDATE=yes RUN_MA_SAME_TESTS=no HAVE_QEMU=no HAVE_BINFMT=no "$SRC/make_mirror.sh" || ret=$? +if [ "$ret" -ne 0 ]; then + echo "./make_mirror.sh failed" >&2 + exit 77 +fi + +# subtract 10 seconds to account for the inaccuracy in measuring time +TIMEOUT=$((10000-$(date +%s)+$TIME_BEGIN-10)) + +# run only those tests that were skipped because of USE_HOST_APT_CONFIG=yes but +# ignore if any of them fails +# failures here are irrelevant for transition testing because they cannot +# respect the apt pinning options given by the test environment +SKIPPED_TESTS=$(grep-dctrl --exact-match --field Needs-APT-Config true --no-field-names --show-field=Test < coverage.txt) +# for tar1.txt also add create-directory test +SKIPPED_TESTS="create-directory $SKIPPED_TESTS" +timeout $TIMEOUT runuser -u "$AUTOPKGTEST_NORMAL_USER" -- env CMD="mmdebstrap" DEFAULT_DIST=$DEFAULT_DIST RUN_MA_SAME_TESTS=no HAVE_QEMU=no HAVE_BINFMT=no "$SRC/coverage.py" --exitfirst $SKIPPED_TESTS || exit 77 + +du -hs ./shared + +exit 0 diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..f77f7e2 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Repository: https://gitlab.mister-muffin.de/josch/mmdebstrap.git +Bug-Database: https://gitlab.mister-muffin.de/josch/mmdebstrap/issues/ +Bug-Submit: https://gitlab.mister-muffin.de/josch/mmdebstrap/issues/new +Repository-Browse: https://gitlab.mister-muffin.de/josch/mmdebstrap/ diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..1a77ba5 --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=4 +opts=downloadurlmangle=s{/src/tag/(@ANY_VERSION@)}{/archive/$1.tar.gz},\ +filenamemangle=s{.*/(.*)}{@PACKAGE@-$1.tar.gz} \ +https://gitlab.mister-muffin.de/josch/@PACKAGE@/tags /josch/@PACKAGE@/src/tag/([0-9.]+) -- cgit v1.2.3