From 3f0849f75cc0367694b9035e7cd0dea11ff59d77 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 15 Jan 2025 22:10:16 +0100 Subject: [PATCH] uuidd: add sysusers file 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 | 5 +++++ misc-utils/meson.build | 5 +++++ misc-utils/uuidd-sysusers.conf | 1 + 3 files changed, 11 insertions(+) create mode 100644 misc-utils/uuidd-sysusers.conf diff --git a/meson.build b/meson.build index 62687a102..d4649e0b9 100644 --- a/meson.build +++ b/meson.build @@ -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' diff --git a/misc-utils/meson.build b/misc-utils/meson.build index 474db30f5..c612440bf 100644 --- a/misc-utils/meson.build +++ b/misc-utils/meson.build @@ -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 index 000000000..afd02eb37 --- /dev/null +++ b/misc-utils/uuidd-sysusers.conf @@ -0,0 +1 @@ +u uuidd - "UUID generator helper daemon" /var/lib/libuuid -- 2.47.3