File 0001-Add-RequiresMountsFor-etc-override-for-systemd-udevd.patch of Package read-only-root-fs.23306

From 21c36fb3bfa66dc2bf331738f9492eda3d8f5581 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Tue, 12 Nov 2019 13:30:53 +0100
Subject: [PATCH 1/7] Add RequiresMountsFor=/etc override for
 systemd-udevd.service

For some reason, systemd-udevd keeps /etc/udev/hwdb.bin opened, which prevents
unmounting of /etc during shutdown. It appears like having /etc as mountpoint
is not considered valid by upstream systemd, so fix this here instead.

An alternative would be to set etc.mount to LazyUnmount=true, but apparently
overlayfs doesn't keep the underlying layers pinned, which leads to
`unmount /var` returning even if there are open files in /etc. This means that
proper unmounting on shutdown would no longer be guaranteed.

See also https://github.com/systemd/systemd/issues/13947
---
 usr/lib/systemd/system/systemd-udevd.service.d/etcmount.conf | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 usr/lib/systemd/system/systemd-udevd.service.d/etcmount.conf

diff --git a/usr/lib/systemd/system/systemd-udevd.service.d/etcmount.conf b/usr/lib/systemd/system/systemd-udevd.service.d/etcmount.conf
new file mode 100644
index 0000000..371f9b6
--- /dev/null
+++ b/usr/lib/systemd/system/systemd-udevd.service.d/etcmount.conf
@@ -0,0 +1,3 @@
+[Unit]
+# https://github.com/systemd/systemd/issues/13947
+RequiresMountsFor=/etc
-- 
2.35.1

openSUSE Build Service is sponsored by