Skip to content

Commit b65c7bd

Browse files
Use patch to update unit file
1 parent a112bb9 commit b65c7bd

File tree

3 files changed

+31
-39
lines changed

3 files changed

+31
-39
lines changed

build_debian.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,13 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
447447
systemd-sysv \
448448
ntp
449449

450-
# Workaround to fix issue https://github.com/systemd/systemd/issues/24668.
451-
sudo cp files/image_config/systemd/systemd-udevd/systemd-udevd.service $FILESYSTEM_ROOT/lib/systemd/system/systemd-udevd.service
450+
# Workaround for issue: The udev rule may fail to be executed because the
451+
# daemon-reload command is executed in parallel
452+
# Github issue: https://github.com/systemd/systemd/issues/24668
453+
# Github PR: https://github.com/systemd/systemd/pull/24673
454+
# This workaround should be removed after a upstream already contains the fixes
455+
sudo patch $FILESYSTEM_ROOT/lib/systemd/system/systemd-udevd.service \
456+
files/image_config/systemd/systemd-udevd/fix-udev-rule-may-fail-if-daemon-reload-command-runs.patch
452457

453458
if [[ $TARGET_BOOTLOADER == grub ]]; then
454459
if [[ $CONFIGURED_ARCH == amd64 ]]; then
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -------------------------------------------------------------------
2+
# Patch for /lib/systemd/system/systemd-udevd.service
3+
# Fix issue: The udev rule may fail to be executed because the
4+
# daemon-reload command is executed in parallel
5+
# Github issue: https://github.com/systemd/systemd/issues/24668
6+
# Github PR: https://github.com/systemd/systemd/pull/24673
7+
# -------------------------------------------------------------------
8+
@@ -16,8 +16,6 @@
9+
ConditionPathIsReadWrite=/sys
10+
11+
[Service]
12+
-DeviceAllow=block-* rwm
13+
-DeviceAllow=char-* rwm
14+
Type=notify
15+
# Note that udev will reset the value internally for its workers
16+
OOMScoreAdjust=-1000
17+
@@ -29,7 +27,6 @@
18+
KillMode=mixed
19+
TasksMax=infinity
20+
PrivateMounts=yes
21+
-ProtectClock=yes
22+
ProtectHostname=yes
23+
MemoryDenyWriteExecute=yes
24+
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6

files/image_config/systemd/systemd-udevd/systemd-udevd.service

-37
This file was deleted.

0 commit comments

Comments
 (0)