]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: add sysusers file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 15 Jan 2025 21:10:16 +0000 (22:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 15 Jan 2025 21:37:26 +0000 (22:37 +0100)
This will allow the user to be created automatically and the scriptlets
to create the user and group dropped from the spec file:
https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers

The config is equivalent to what the Fedora package does, i.e. a
dynamically-allocated uid and gid, and an account with nologin as the
shell.

meson.build
misc-utils/meson.build
misc-utils/uuidd-sysusers.conf [new file with mode: 0644]

index 62687a102045e606c059e51ffa23318df824b09d..d4649e0b95c4fb6d0d11f8265d05c662ff346eb2 100644 (file)
@@ -919,6 +919,11 @@ if systemd.found()
   systemdsystemunitdir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir')
 endif
 
+systemd_sysusers_dir = ''
+if systemd.found()
+  systemd_sysusers_dir = systemd.get_variable(pkgconfig : 'sysusers_dir')
+endif
+
 sysvinit = get_option('sysvinit').enabled()
 sysvinitrcdir = sysconfdir + '/init.d'
 
index 474db30f569dbc92666317675f8ad13db2b4da6e..c612440bfd7542f60944db0f7d8712160747cd02 100644 (file)
@@ -104,6 +104,11 @@ if build_uuidd and systemd.found()
   install_data(
     uuidd_socket,
     install_dir : systemdsystemunitdir)
+
+  install_data(
+    'uuidd-sysusers.conf',
+    install_dir: systemd_sysusers_dir,
+    rename : 'uuidd.conf')
 endif
 if build_uuidd and sysvinit
   uuidd_rc = configure_file(
diff --git a/misc-utils/uuidd-sysusers.conf b/misc-utils/uuidd-sysusers.conf
new file mode 100644 (file)
index 0000000..afd02eb
--- /dev/null
@@ -0,0 +1 @@
+u uuidd - "UUID generator helper daemon" /var/lib/libuuid