]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tmpfiles: add and install for uuidd, generate /run/uuidd & /var/lib/libuuid
authorChristian Hesse <mail@eworm.de>
Thu, 22 Feb 2024 07:48:55 +0000 (08:48 +0100)
committerChristian Hesse <mail@eworm.de>
Wed, 28 Feb 2024 14:41:31 +0000 (15:41 +0100)
These directories are requird for uuidd, so let systemd-tmpfiles create them.

Signed-off-by: Christian Hesse <mail@eworm.de>
misc-utils/.gitignore
misc-utils/Makemodule.am
misc-utils/meson.build
misc-utils/uuidd-tmpfiles.conf.in [new file with mode: 0644]

index 24b40acafa9056d9c3917a35d45062410154ff61..9cde348d8be7ab1c56c0984d6aa239ddea1a3b69 100644 (file)
@@ -2,6 +2,7 @@ getopt.1
 uuidd.8
 uuidd.rc
 uuidd.service
-lastlog2-import.service
 uuidd.socket
+uuidd-tmpfiles.conf
+lastlog2-import.service
 lastlog2.conf
index 514b27adceb130e6085bb77bd915c50e5da634b1..f17751d52b47eeb0ecaeb8a56a4e63eac767997a 100644 (file)
@@ -150,6 +150,7 @@ uuidd_SOURCES = misc-utils/uuidd.c lib/monotonic.c lib/timer.c
 if HAVE_SYSTEMD
 uuidd_LDADD += $(SYSTEMD_LIBS) $(SYSTEMD_DAEMON_LIBS)
 uuidd_CFLAGS += $(SYSTEMD_CFLAGS) $(SYSTEMD_DAEMON_CFLAGS)
+tmpfiles_DATA += misc-utils/uuidd-tmpfiles.conf
 systemdsystemunit_DATA += \
        misc-utils/uuidd.service \
        misc-utils/uuidd.socket
@@ -164,7 +165,8 @@ endif # BUILD_UUIDD
 PATHFILES += \
        misc-utils/uuidd.rc \
        misc-utils/uuidd.service \
-       misc-utils/uuidd.socket
+       misc-utils/uuidd.socket \
+       misc-utils/uuidd-tmpfiles.conf
 
 if BUILD_BLKID
 sbin_PROGRAMS += blkid
index 6a7dd8ceef06674a665b7087895dc3296136f55c..cde0baeaea2ccafd0ee736bacaa7c8854a2e2322 100644 (file)
@@ -97,6 +97,14 @@ if build_liblastlog2
 endif
 
 if build_uuidd and systemd.found()
+  uuidd_tmpfiles = configure_file(
+    input : 'uuidd-tmpfiles.conf.in',
+    output : 'uuidd-tmpfiles.conf',
+    configuration : conf)
+  install_data(
+    uuidd_tmpfiles,
+    install_dir : '/usr/lib/tmpfiles.d')
+
   uuidd_service = configure_file(
     input : 'uuidd.service.in',
     output : 'uuidd.service',
diff --git a/misc-utils/uuidd-tmpfiles.conf.in b/misc-utils/uuidd-tmpfiles.conf.in
new file mode 100644 (file)
index 0000000..9c2005b
--- /dev/null
@@ -0,0 +1,6 @@
+# This file is part of uuidd.
+#
+# See tmpfiles.d(5) for details
+#
+d @runstatedir@/uuidd 2775 uuidd uuidd -
+d /var/lib/libuuid 0755 uuidd uuidd -