From 346a7bd50f65eee7af1d13ed71d5807306ebb463 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Mon, 23 Oct 2023 16:24:01 +0700 Subject: [PATCH] fix and rename systemd sysusers (#750) * systemd-sysusers-presets package * rename package * rename folder * unwrap macro * forgor * forgot rename for the thing * complete description * append summary --- .../katsu-systemd-sysusers-presets/anda.hcl | 5 ++ .../katsu-systemd-sysusers-presets.spec | 72 +++++++++++++++++++ .../polkit.conf | 2 + .../rpcbind.conf | 2 + 4 files changed, 81 insertions(+) create mode 100644 anda/others/katsu-systemd-sysusers-presets/anda.hcl create mode 100644 anda/others/katsu-systemd-sysusers-presets/katsu-systemd-sysusers-presets.spec create mode 100644 anda/others/katsu-systemd-sysusers-presets/polkit.conf create mode 100644 anda/others/katsu-systemd-sysusers-presets/rpcbind.conf diff --git a/anda/others/katsu-systemd-sysusers-presets/anda.hcl b/anda/others/katsu-systemd-sysusers-presets/anda.hcl new file mode 100644 index 0000000000..9d6e4d9a58 --- /dev/null +++ b/anda/others/katsu-systemd-sysusers-presets/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "katsu-systemd-sysusers-presets.spec" + } +} diff --git a/anda/others/katsu-systemd-sysusers-presets/katsu-systemd-sysusers-presets.spec b/anda/others/katsu-systemd-sysusers-presets/katsu-systemd-sysusers-presets.spec new file mode 100644 index 0000000000..66dc5d69cb --- /dev/null +++ b/anda/others/katsu-systemd-sysusers-presets/katsu-systemd-sysusers-presets.spec @@ -0,0 +1,72 @@ +%define debug_package %nil + +Name: katsu-systemd-sysusers-presets +Version: 1.0 +Release: %autorelease +Summary: A set of systemd system user presets to supplement Fedora's defaults, used by Katsu +License: GPLv3+ +Source0: polkit.conf +Source1: rpcbind.conf +BuildRequires: systemd-rpm-macros +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + + +%description +A set of systemd system user presets to supplement Fedora's defaults, +Since for some packages, the system users are created using the package's +post-install script, this package is a no-op on its own. It is intended to be +used as a dependency for other packages that need to create system users. +For example, Polkit needs to create the polkitd system user, so this package +generates the polkitd system user for Polkit to use properly. + +Katsu uses this package to fix Fedora's default system user presets, which +fails to add the system users for Polkit and rpcbind. + +%package polkit +Summary: Polkit system user +Requires: rpcbind + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +Supplements: polkit + +%description polkit +Polkit system user preset + +%package rpcbind +Summary: RPC bind system user +Requires: rpcbind + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +Supplements: rpcbind + +%description rpcbind +RPC bind system user preset + +%prep + +%install +install -D %{SOURCE0} %{buildroot}%{_sysusersdir}/katsu-polkit.conf +install -D %{SOURCE1} %{buildroot}%{_sysusersdir}/katsu-rpcbind.conf + +%post polkit +systemd-sysusers %{_sysusersdir}/katsu-polkit.conf + +%post rpcbind +systemd-sysusers %{_sysusersdir}/katsu-rpcbind.conf + + +%files polkit +%{_sysusersdir}/katsu-polkit.conf +%files rpcbind +%{_sysusersdir}/katsu-rpcbind.conf + +%changelog +%autochangelog \ No newline at end of file diff --git a/anda/others/katsu-systemd-sysusers-presets/polkit.conf b/anda/others/katsu-systemd-sysusers-presets/polkit.conf new file mode 100644 index 0000000000..ae85edf105 --- /dev/null +++ b/anda/others/katsu-systemd-sysusers-presets/polkit.conf @@ -0,0 +1,2 @@ +g polkitd 114 +u polkitd 114:114 "User for polkitd" - - \ No newline at end of file diff --git a/anda/others/katsu-systemd-sysusers-presets/rpcbind.conf b/anda/others/katsu-systemd-sysusers-presets/rpcbind.conf new file mode 100644 index 0000000000..755a961397 --- /dev/null +++ b/anda/others/katsu-systemd-sysusers-presets/rpcbind.conf @@ -0,0 +1,2 @@ +g rpc 32 +u rpc 32:32 "Rpcbind Daemon" - - \ No newline at end of file