Package: dracut / 110-5

Metadata

Package Version Patches format
dracut 110-5 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
fix multipath include Debian specific priority of udev ru.patch | (download)

modules.d/70dmraid/module-setup.sh | 2 2 + 0 - 0 !
modules.d/70multipath/module-setup.sh | 2 2 + 0 - 0 !
2 files changed, 4 insertions(+)

 fix(multipath): include debian-specific priority of udev rules

In Debian multipath-tools 0.13.0-1 carries
0004-Debian-specific-priority-of-udev-rules.patch which changes the
priority of udev rules with following reasoning:

11-dm-*.rules supposedly should apply after dmsetup rules, but in Debian
these have priority 55 instead of 11. Also for historic reasons,
multipath.rules and kpartx.rules have a slightly higher prio in Debian
than upstream.

The result is that kpartx is not run when booting, multipath disk
partitions are not found, and boot fails.

Until Debian/Ubuntu and upstream agrees on one common naming, include
the renumbered udev rules (similar to what has been done in the dm and
lvm Dracut modules).

Bug-Ubuntu: https://launchpad.net/bugs/2137190
fix kernel modules export use return instead of exit in p.patch | (download)

man/dracut.modules.7.adoc | 7 6 + 1 - 0 !
modules.d/70kernel-modules-export/modules-export.sh | 12 6 + 6 - 0 !
2 files changed, 12 insertions(+), 7 deletions(-)

 fix(kernel-modules-export): use return instead of exit in pre-pivot
 hook

The `modules-export.sh` pre-pivot hook calls `exit 0`. This causes the
sourcing script (`dracut-pre-pivot.sh` on systemd or `init.sh` from the
base Dracut module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in kernel-modules-export pre-pivot hook.

Co-authored-by: Neal Gompa <neal@gompa.dev>
Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
fix memdisk use return instead of exit in cmdline hook.patch | (download)

modules.d/70memdisk/memdisk.sh | 6 3 + 3 - 0 !
1 file changed, 3 insertions(+), 3 deletions(-)

 fix(memdisk): use return instead of exit in cmdline hook

The `memdisk.sh` cmdline hook calls `exit 0`. This causes the sourcing
script (`dracut-cmdline.sh` on systemd or `init.sh` from the base Dracut
module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in the memdisk cmdline hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
fix ppcmac use return instead of exit in pre udev hook.patch | (download)

modules.d/70ppcmac/load-thermal.sh | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix(ppcmac): use return instead of exit in pre-udev hook

The `load-thermal.sh` pre-udev hook calls `exit 0`. This causes the
sourcing script (`dracut-pre-udev.sh` on systemd or `init.sh` from the
base Dracut module) to exit. The subsequent hooks are not executed.

Use `return` instead of `exit` in the ppcmac pre-udev hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
fix syslog use return instead of exit in initqueue online.patch | (download)

modules.d/77syslog/rsyslogd-start.sh | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 fix(syslog): use return instead of exit in initqueue/online hook

The `rsyslogd-start.sh` initqueue/online hook calls `exit 0`. This
causes the sourcing script to exit. The subsequent code is not executed.

Use `return` instead of `exit` in the syslog initqueue/online hook.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/2227
test force cpu to neoverse n1 for arm64 when QEMU_CPU not.patch | (download)

test/run-qemu | 11 10 + 1 - 0 !
1 file changed, 10 insertions(+), 1 deletion(-)

 test: force cpu to neoverse-n1 for arm64 when qemu_cpu not set

using cpu=max might expose new unstable features with qemu/edk2
upgrades, this unstability might cause test failures to happen
, we are experiencing that in Debian/Ubuntu with edk2 latest version
that enables LPA2 that is still unstable.

since using cpu=max is not required for dracut tests, using a
named model will offer a better stability for the tests for future
qemu/edk2 upgrades. the chosen cpu model for arm64 is neoverse-n1
since it is one of the most stable and proven CPU model from a
virtualization standpoint.

Co-authored-by: Benjamin Drung <bdrung@ubuntu.com>
test use separate networks for different NICs.patch | (download)

test/TEST-70-ISCSI/test.sh | 14 8 + 6 - 0 !
test/TEST-71-ISCSI-MULTI/test.sh | 14 8 + 6 - 0 !
2 files changed, 16 insertions(+), 12 deletions(-)

 test: use separate networks for different nics

The iSCSI tests 70 and 71 use two network interfaces. The server
test start hostname numbering at 0.patch | (download)

test/TEST-60-NFS/dhcpd.conf | 32 16 + 16 - 0 !
test/TEST-60-NFS/exports | 4 2 + 2 - 0 !
test/TEST-60-NFS/server-init.sh | 8 4 + 4 - 0 !
test/TEST-70-ISCSI/dhcpd.conf | 4 2 + 2 - 0 !
test/TEST-71-ISCSI-MULTI/dhcpd.conf | 4 2 + 2 - 0 !
test/TEST-72-NBD/dhcpd.conf | 12 6 + 6 - 0 !
6 files changed, 32 insertions(+), 32 deletions(-)

 test: start hostname numbering at 0

Start numbering the hostnames at 0 to match the MAC address with the
hostname.

test do not use the same IP for different MAC addresses.patch | (download)

test/TEST-60-NFS/dhcpd.conf | 30 15 + 15 - 0 !
test/TEST-72-NBD/dhcpd.conf | 10 5 + 5 - 0 !
2 files changed, 20 insertions(+), 20 deletions(-)

 test: do not use the same ip for different mac addresses

fix dbus remove After Requires from dbus service socket.patch | (download)

.github/workflows/daily-network.yml | 6 0 + 6 - 0 !
modules.d/16dbus-broker/module-setup.sh | 5 3 + 2 - 0 !
modules.d/16dbus-daemon/module-setup.sh | 10 6 + 4 - 0 !
3 files changed, 9 insertions(+), 12 deletions(-)

 fix(dbus): remove after/requires from dbus service/socket

Following dependencies are added to sockets unless
`DefaultDependencies=no` is set (according to systemd.socket man page):

```
Before=sockets.target shutdown.target
After=sysinit.target
Requires=sysinit.target
Conflicts=shutdown.target
```

Following dependencies are added to units unless
`DefaultDependencies=no` is set (according to systemd.service man page):

```
Requires=sysinit.target
After=sysinit.target basic.target
Conflicts=shutdown.target
Before=shutdown.target
```

The dbus-broker and dbus-daemon Dracut modules want to remove
`After=sysinit.target` and `Requires=sysinit.target` from `dbus.service`
and `dbus.socket`. This is done by setting `DefaultDependencies=no` and
specifying the remaining default dependencies. The relevant code has
been there since the introduction (see commit e1845955ff3d).

The Ubuntu package of dbus already removes some of the default
dependencies from the `dbus.service` and `dbus.socket` (see
https://launchpad.net/bugs/1438612):

```
DefaultDependencies=no
Wants=sysinit.target
After=sysinit.target basic.target
```

This results in not removing the `sysinit.target` dependency on Ubuntu
and causes the dbus service to start too late. Since NetworkManager
depends on dbus, it will start too late as well. That causes the NBD
test cases to fail.

So remove the `After` and `Requires` entries from the `dbus.service` and
`dbus.socket` before setting `DefaultDependencies=no`. Also restore
`Before=sockets.target` in `dbus.socket`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1815
Bug-Ubuntu: https://launchpad.net/bugs/2141603
test use different MAC addresses for all NFS client tests.patch | (download)

test/TEST-60-NFS/dhcpd.conf | 128 81 + 47 - 0 !
test/TEST-60-NFS/test.sh | 34 17 + 17 - 0 !
2 files changed, 98 insertions(+), 64 deletions(-)

 test: use different mac addresses for all nfs client tests

Having two separate client tests use the same MAC address might not work
with dnsmasq. To ease debugging use a separate MAC address for each
client test. Update the DHCP config to reflect the test case name and
make the numbering consecutive.

test switch QEMU network backend to dgram UDP.patch | (download)

test/TEST-60-NFS/test.sh | 8 4 + 4 - 0 !
test/TEST-70-ISCSI/test.sh | 8 4 + 4 - 0 !
test/TEST-71-ISCSI-MULTI/test.sh | 8 4 + 4 - 0 !
test/TEST-72-NBD/test.sh | 8 4 + 4 - 0 !
4 files changed, 16 insertions(+), 16 deletions(-)

 test: switch qemu network backend to dgram (udp)

When replacing isc-dhcp-server by dnsmasq, test 60 starts to fail on
some distributions. The second client test hangs for several seconds on
shutdown and the third client test fails to get an IP address. The client
sends a DHCP discover packet, but that never reaches dnsmasq.

Adding tcpdump to `server-init.sh` let the tests succeed:
```
tcpdump -v -Z root -i enx525400123456 -n port 67 or port 68 &
```

Running the client tests individually let them succeed as well.

The assumption is that the host kernel keeps the QEMU netdev TCP socket
in a TIME_WAIT or FIN_WAIT_2 state following a client shutdown which
leads to a socket deadlock: the next client may successfully connect to
the host socket, but the server QEMU process fails to re-initialize the
virtual link correctly.

Switch to `-netdev dgram` (UDP) to eliminate the connection state
management entirely.

See also https://github.com/dracut-ng/dracut-ng/pull/2271#issuecomment-3997945175

test switch from isc dhcp server to dnsmasq.patch | (download)

test/TEST-60-NFS/dhcpd.conf | 211 0 + 211 - 0 !
test/TEST-60-NFS/dnsmasq.conf | 95 95 + 0 - 0 !
test/TEST-60-NFS/server-init.sh | 9 3 + 6 - 0 !
test/TEST-60-NFS/test.sh | 9 4 + 5 - 0 !
test/TEST-70-ISCSI/dhcpd.conf | 48 0 + 48 - 0 !
test/TEST-70-ISCSI/dnsmasq.conf | 30 30 + 0 - 0 !
test/TEST-70-ISCSI/server-init.sh | 4 1 + 3 - 0 !
test/TEST-70-ISCSI/test.sh | 5 2 + 3 - 0 !
test/TEST-71-ISCSI-MULTI/dhcpd.conf | 48 0 + 48 - 0 !
test/TEST-71-ISCSI-MULTI/dnsmasq.conf | 30 30 + 0 - 0 !
test/TEST-71-ISCSI-MULTI/server-init.sh | 4 1 + 3 - 0 !
test/TEST-71-ISCSI-MULTI/test.sh | 5 2 + 3 - 0 !
test/TEST-72-NBD/dhcpd.conf | 66 0 + 66 - 0 !
test/TEST-72-NBD/dnsmasq.conf | 35 35 + 0 - 0 !
test/TEST-72-NBD/server-init.sh | 6 2 + 4 - 0 !
test/TEST-72-NBD/test.sh | 6 3 + 3 - 0 !
16 files changed, 208 insertions(+), 403 deletions(-)

 test: switch from isc-dhcp-server to dnsmasq

isc-dhcp-server is no longer activly maintained and has been removed
from Debian testing.

Use dnsmasq as DHCP server instead.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1451
fix crypt honor timeout setting when using UUID LABEL etc.patch | (download)

modules.d/70crypt/parse-crypt.sh | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 fix(crypt): honor timeout setting when using uuid, label, etc

Test 20 fails on slow architectures, because it runs into a timeout:

```
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device - /dev/disk/by-uuid/1dc514cd-8268-4a33-873f-84f8eb02d3e0.
[DEPEND] Dependency failed for systemd-cryptsetup@testluks.service - Cryptography Setup for testluks.
[DEPEND] Dependency failed for cryptsetup.target - Local Encrypted Volumes.
[  118.452336] systemd[1]: dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device: Job dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device/start timed out.
[  118.465917] systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device - /dev/disk/by-uuid/1dc514cd-8268-4a33-873f-84f8eb02d3e0.
[  118.483854] systemd[1]: Dependency failed for systemd-cryptsetup@testluks.service - Cryptography Setup for testluks.
[  118.500894] systemd[1]: Dependency failed for cryptsetup.target - Local Encrypted Volumes.
[  118.519552] systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
[  118.535383] systemd[1]: systemd-cryptsetup@testluks.service: Job systemd-cryptsetup@testluks.service/start failed with result 'dependency'.
[  118.549404] systemd[1]: dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device: Job dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device/start failed with result 'timeout'.
```

`parse-crypt.sh` is supposed to set the timeout for this device
(defaulting to `infinity`), but it uses the wrong unit name in case the
source device in `/etc/crypttab` uses `UUID`, `PARTLABEL`, `LABEL`, or
`PARTUUID`. For example: it converts
`UUID=1dc514cd-8268-4a33-873f-84f8eb02d3e0` to
`UUID\x3d1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device`
instead of
`dev-disk-by\x2duuid-1dc514cd\x2d8268\x2d4a33\x2d873f\x2d84f8eb02d3e0.device`.

Use `label_uuid_to_dev` to map the source device from `/etc/crypttab` to
a device path.