From a41e11bb918485585a6f36fc58509dd538d2a766 Mon Sep 17 00:00:00 2001 From: Sergio Arroutbi Date: Wed, 17 Aug 2022 15:38:45 +0200 Subject: [PATCH] Adopt systemd-sysusers format Signed-off-by: Sergio Arroutbi --- tang.spec | 14 +++++++++----- tang.sysusers | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 tang.sysusers diff --git a/tang.spec b/tang.spec index fdecc29..3423adc 100644 --- a/tang.spec +++ b/tang.spec @@ -1,11 +1,12 @@ Name: tang Version: 11 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Network Presence Binding Daemon License: GPLv3+ URL: https://github.com/latchset/%{name} Source0: https://github.com/latchset/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz +Source1: tang.sysusers BuildRequires: gcc BuildRequires: meson @@ -20,6 +21,7 @@ BuildRequires: systemd-devel BuildRequires: pkgconfig BuildRequires: systemd +BuildRequires: systemd-rpm-macros BuildRequires: curl BuildRequires: asciidoc @@ -48,16 +50,14 @@ Tang is a small daemon for binding data to the presence of a third party. %install %meson_install +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/tang.conf %{__mkdir_p} $RPM_BUILD_ROOT/%{_localstatedir}/db/%{name} %check %meson_test %pre -getent group %{name} >/dev/null || groupadd -r %{name} -getent passwd %{name} >/dev/null || \ - useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin \ - -c "Tang Network Presence Daemon user" %{name} +%sysusers_create_compat %{SOURCE1} exit 0 %post @@ -95,8 +95,12 @@ fi %{_bindir}/%{name}-show-keys %{_mandir}/man1/tang-show-keys.1* %{_mandir}/man1/tangd-rotate-keys.1.* +%{_sysusersdir}/tang.conf %changelog +* Wed Aug 17 2022 Sergio Arroutbi - 11-4 +- Adopt systemd-sysusers format + * Sat Jul 23 2022 Fedora Release Engineering - 11-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/tang.sysusers b/tang.sysusers new file mode 100644 index 0000000..98e12f5 --- /dev/null +++ b/tang.sysusers @@ -0,0 +1 @@ +u tang - "Tang Network Presence Daemon user" /var/cache/tang -