summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:54:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-03 13:54:53 +0000
commitaeb45575a8af28726ae7bd267a4e9b9e59bfbff6 (patch)
tree7fef61f71f1802d4fc0245349b9b517125bc3ea4 /debian
parentAdding debian version 060+5-1. (diff)
downloaddracut-aeb45575a8af28726ae7bd267a4e9b9e59bfbff6.tar.xz
dracut-aeb45575a8af28726ae7bd267a4e9b9e59bfbff6.zip
Adding debian version 060+5-2~exp1.debian/060+5-2_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog6
-rw-r--r--debian/dracut-core.install3
-rw-r--r--debian/patches/fix-test-running-tests-no-longer-requires-to-be-root.patch107
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/test-FULL-SYSTEMD-no-need-to-include-dbus-to-the-target-r.patch32
-rw-r--r--debian/tests/control70
-rwxr-xr-xdebian/tests/run-upstream-tests18
7 files changed, 238 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5ce6fdf..d2ca886 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dracut (060+5-2~exp1) experimental; urgency=low
+
+ * enable autopkgtest
+
+ -- Thomas Lange <lange@debian.org> Wed, 27 Mar 2024 21:30:35 +0100
+
dracut (060+5-1) unstable; urgency=medium
* upstream changed the release process, and do not tag the releases any
diff --git a/debian/dracut-core.install b/debian/dracut-core.install
index aa675bf..e2197d9 100644
--- a/debian/dracut-core.install
+++ b/debian/dracut-core.install
@@ -62,6 +62,9 @@ usr/lib/dracut/modules.d/62bluetooth
usr/lib/dracut/modules.d/80lvmmerge
usr/lib/dracut/modules.d/81cio_ignore
usr/lib/dracut/modules.d/80lvmthinpool-monitor
+usr/lib/dracut/modules.d/80test
+usr/lib/dracut/modules.d/80test-makeroot
+usr/lib/dracut/modules.d/80test-root
usr/lib/dracut/modules.d/90btrfs
usr/lib/dracut/modules.d/90crypt
usr/lib/dracut/modules.d/90dm
diff --git a/debian/patches/fix-test-running-tests-no-longer-requires-to-be-root.patch b/debian/patches/fix-test-running-tests-no-longer-requires-to-be-root.patch
new file mode 100644
index 0000000..0dc6e44
--- /dev/null
+++ b/debian/patches/fix-test-running-tests-no-longer-requires-to-be-root.patch
@@ -0,0 +1,107 @@
+From: Laszlo Gombos <laszlo.gombos@gmail.com>
+Date: Tue, 21 Feb 2023 00:20:29 +0000
+Subject: fix(test): running tests no longer requires to be root
+
+Origin: upstream, https://github.com/dracutdevs/dracut/pull/2429
+---
+ Makefile | 1 -
+ docs/HACKING.md | 10 +++++-----
+ test/Makefile | 1 -
+ test/test-functions | 12 ------------
+ 4 files changed, 5 insertions(+), 19 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -264,7 +264,6 @@
+ endif
+
+ check: all syncheck
+- @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
+ @$(MAKE) -C test check
+
+ testimage: all
+--- a/docs/HACKING.md
++++ b/docs/HACKING.md
+@@ -253,27 +253,27 @@
+ mentioned in the `test/container` Dockerfiles.
+
+ ```
+-$ sudo make clean check
++$ make clean check
+ ```
+
+ in verbose mode:
+ ```
+-$ sudo make V=1 clean check
++$ make V=1 clean check
+ ```
+
+ only specific test:
+ ```
+-$ sudo make TESTS="01 20 40" clean check
++$ make TESTS="01 20 40" clean check
+ ```
+ only runs the 01, 20 and 40 tests.
+
+ debug a specific test case:
+ ```
+ $ cd TEST-01-BASIC
+-$ sudo make clean setup run
++$ make clean setup run
+ ```
+ ... change some kernel parameters in `test.sh` ...
+ ```
+-$ sudo make run
++$ make run
+ ```
+ to run the test without doing the setup.
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -1,7 +1,6 @@
+ .PHONY: all check clean $(wildcard TEST-??-*)
+
+ $(wildcard TEST-??-*):
+- @[ "$(shell id -u)" = 0 ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
+ @{ \
+ [ -d $@ ] || exit 0; \
+ [ -f $@/Makefile ] || exit 0; \
+--- a/test/test-functions
++++ b/test/test-functions
+@@ -52,15 +52,6 @@
+ COLOR_WARNING='\033[0;33m'
+ COLOR_NORMAL='\033[0;39m'
+
+-check_root() {
+- if ((EUID != 0)); then
+- SETCOLOR_FAILURE
+- echo "Tests must be run as root! Please use 'sudo'."
+- SETCOLOR_NORMAL
+- exit 1
+- fi
+-}
+-
+ # generate qemu arguments for named raw disks
+ #
+ # qemu_add_drive_args <index> <args> <filename> <id-name> [<bootindex>]
+@@ -122,13 +113,11 @@
+ while (($# > 0)); do
+ case $1 in
+ --run)
+- check_root
+ echo "TEST RUN: $TEST_DESCRIPTION"
+ test_check && test_run
+ exit $?
+ ;;
+ --setup)
+- check_root
+ echo "TEST SETUP: $TEST_DESCRIPTION"
+ test_check && test_setup
+ exit $?
+@@ -141,7 +130,6 @@
+ exit $?
+ ;;
+ --all)
+- check_root
+ if ! test_check 2 &> test${TEST_RUN_ID:+-$TEST_RUN_ID}.log; then
+ echo -e "TEST: $TEST_DESCRIPTION " "$COLOR_WARNING" "[SKIPPED]" "$COLOR_NORMAL"
+ exit 0
diff --git a/debian/patches/series b/debian/patches/series
index 291266d..74e9921 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@ fido-libz
vconsole
microcode
initrd-not-initramfs.patch
+fix-test-running-tests-no-longer-requires-to-be-root.patch
+test-FULL-SYSTEMD-no-need-to-include-dbus-to-the-target-r.patch
diff --git a/debian/patches/test-FULL-SYSTEMD-no-need-to-include-dbus-to-the-target-r.patch b/debian/patches/test-FULL-SYSTEMD-no-need-to-include-dbus-to-the-target-r.patch
new file mode 100644
index 0000000..a149d7c
--- /dev/null
+++ b/debian/patches/test-FULL-SYSTEMD-no-need-to-include-dbus-to-the-target-r.patch
@@ -0,0 +1,32 @@
+From: Laszlo Gombos <laszlo.gombos@gmail.com>
+Date: Sat, 4 Nov 2023 02:25:18 -0400
+Subject: test(FULL SYSTEMD): no need to include dbus to the target rootfs
+
+systemd does not depend on dbus.
+
+Origin: upstream, https://github.com/dracutdevs/dracut/pull/2549
+---
+ test/TEST-04-FULL-SYSTEMD/test-init.sh | 3 +--
+ test/TEST-04-FULL-SYSTEMD/test.sh | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+--- a/test/TEST-04-FULL-SYSTEMD/test-init.sh
++++ b/test/TEST-04-FULL-SYSTEMD/test-init.sh
+@@ -37,5 +37,4 @@
+ setsid $CTTY sh -i
+ fi
+ echo "Powering down."
+-systemctl --no-block poweroff
+-exit 0
++poweroff -f
+--- a/test/TEST-04-FULL-SYSTEMD/test.sh
++++ b/test/TEST-04-FULL-SYSTEMD/test.sh
+@@ -52,7 +52,7 @@
+
+ # Create what will eventually be our root filesystem onto an overlay
+ "$DRACUT" -l --keep --tmpdir "$TESTDIR" \
+- -m "test-root dbus" \
++ -m "test-root systemd" \
+ -I "ldconfig" \
+ -i ./test-init.sh /sbin/test-init \
+ -i ./fstab /etc/fstab \
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..07809ed
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,70 @@
+# Skip following test cases:
+# * TEST-14-IMSM: dmraid was removed from Debian
+# * TEST-20-NFS: https://github.com/dracutdevs/dracut/issues/1901
+# * TEST-30-ISCSI: https://github.com/dracutdevs/dracut/issues/2497
+# * TEST-35-ISCSI-MULTI: https://github.com/dracutdevs/dracut/issues/2498
+# * TEST-50-MULTINIC: disabled in upstream CI since 2023-01-02
+# * TEST-60-BONDBRIDGEVLAN: https://github.com/dracutdevs/dracut/issues/2328
+# arm64, armhf, ppc64el, and s390x need upstream support: https://github.com/dracutdevs/dracut/issues/2493
+Architecture: amd64
+Test-Command: debian/tests/run-upstream-tests SKIP="14 16 20 30 35 40 50 60"
+Depends: btrfs-progs,
+ busybox,
+ cryptsetup,
+ dracut-core,
+ fdisk,
+ gawk,
+ kbd,
+ linux-image-generic,
+ lvm2,
+ make,
+ mdadm,
+ mount,
+ qemu-kvm,
+ systemd-boot-efi,
+ systemd-sysv,
+ util-linux
+Restrictions: allow-stderr
+Features: test-name=upstream-dracut-core
+
+Architecture: amd64
+Test-Command: debian/tests/run-upstream-tests TESTS="16"
+Depends: btrfs-progs,
+ busybox,
+ dracut-live,
+ fdisk,
+ kbd,
+ linux-image-generic,
+ make,
+ mount,
+ parted,
+ qemu-kvm,
+ squashfs-tools,
+ systemd-sysv,
+ util-linux
+Restrictions: allow-stderr
+Features: test-name=upstream-dracut-live
+
+Architecture: amd64
+Test-Command: debian/tests/run-upstream-tests TESTS="40"
+Depends: cryptsetup,
+ dracut-network,
+ gawk,
+ iproute2,
+ iputils-ping,
+ isc-dhcp-client,
+ isc-dhcp-server,
+ linux-image-generic,
+ lvm2,
+ make,
+ mdadm,
+ mount,
+ nbd-client,
+ nbd-server,
+ procps,
+ qemu-kvm,
+ systemd-sysv,
+ util-linux,
+ vim
+Restrictions: allow-stderr
+Features: test-name=upstream-dracut-network
diff --git a/debian/tests/run-upstream-tests b/debian/tests/run-upstream-tests
new file mode 100755
index 0000000..5dce6cf
--- /dev/null
+++ b/debian/tests/run-upstream-tests
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -eu
+
+if test -n "${AUTOPKGTEST_TMP-}"; then
+ export TMPDIR="${AUTOPKGTEST_TMP}"
+fi
+
+# shellcheck disable=SC2012
+KVERSION=$(cd /lib/modules; ls -1 | tail -1)
+export KVERSION
+export DRACUT=dracut
+export PKGLIBDIR=/usr/lib/dracut
+
+# Prapare out-of-tree test directory
+TESTDIR="$(mktemp -d -t dracut-test.XXXXXXXXXX)"
+cp -r test/* "$TESTDIR"
+
+make -C "$TESTDIR" V=1 check "$@"