add patch with sysusers config for uuidd

... (rhbz#2338304)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2025-01-15 22:16:51 +01:00 • committed by zbyszek
commit bcd2482fd5
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,61 @@
From 025b03b1f71e98764b52719cd4d6e45c5243c57b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
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 addcca2534..9ec67f8ef5 100644
--- a/meson.build
+++ b/meson.build
@@ -891,6 +891,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 474db30f56..c612440bfd 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 0000000000..afd02eb37b
--- /dev/null
+++ b/misc-utils/uuidd-sysusers.conf
@@ -0,0 +1 @@
+u uuidd - "UUID generator helper daemon" /var/lib/libuuid
--
2.47.1

View file

@ -106,6 +106,10 @@ Patch0: login-lastlog-create.patch
# https://github.com/coreos/console-login-helper-messages/issues/60
Patch1: login-default-motd-file.patch
# https://github.com/util-linux/util-linux/pull/3364
# https://bugzilla.redhat.com/show_bug.cgi?id=2338304
Patch2: 0001-uuidd-add-sysusers-file.patch
%description
The util-linux package contains a large variety of low-level system
utilities that are necessary for a Linux system to function. Among
@ -455,6 +459,8 @@ find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \
-regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64|uname26)\.8.*" \
-printf "%{_mandir}/man8/%f*\n" >> %{name}.files
install -m0644 -D misc-utils/uuidd-sysusers.conf %{buildroot}%{_sysusersdir}/uuidd.conf
%if "%{_sbindir}" == "%{_bindir}"
# Autotools installation script gets the location wrong :(
mv -v %{buildroot}/usr/sbin/* %{buildroot}/usr/bin/
@ -891,6 +897,7 @@ fi
%dir %attr(2775, uuidd, uuidd) /run/uuidd
%{compldir}/uuidd
%{_tmpfilesdir}/uuidd-tmpfiles.conf
%{_sysusersdir}/uuidd.conf
%files -n libfdisk