From 447f77ae0b10c8aad4d38c6c6b662b0a7762f7a3 Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Fri, 14 Jul 2023 15:02:16 -0400 Subject: [PATCH] Provide a sysusers.d file to get user() and group() provides --- tlog.spec | 19 ++++++++++++------- tlog.sysusers | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 tlog.sysusers diff --git a/tlog.spec b/tlog.spec index 45490fd..3367111 100644 --- a/tlog.spec +++ b/tlog.spec @@ -20,7 +20,7 @@ Name: tlog Version: 13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Terminal I/O logger %if "%{_vendor}" == "debbuild" @@ -34,7 +34,8 @@ License: GPL-2.0-or-later %endif URL: https://github.com/Scribery/%{name} -Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz +Source1: tlog.sysusers BuildRequires: autoconf BuildRequires: automake @@ -57,6 +58,7 @@ Requires: systemd-sysv Requires(preun): systemd Requires(post): systemd Requires(postun): systemd +%{?sysusers_requires_compat} %endif %else @@ -112,6 +114,8 @@ rm -r %{buildroot}/usr/include/%{name} install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name} %endif +install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf + %files %{!?_licensedir:%global license %doc} %license COPYING @@ -133,13 +137,10 @@ rm -r %{buildroot}/usr/include/%{name} %config(noreplace) %{_sysconfdir}/%{name}/%{name}-rec.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}-rec-session.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}-play.conf +%{_sysusersdir}/%{name}.conf %pre -getent group %{name} >/dev/null || - groupadd -r %{name} -getent passwd %{name} >/dev/null || - useradd -r -g %{name} -d %{_localstatedir}/run/%{name} -s /sbin/nologin \ - -c "Tlog terminal I/O logger" %{name} +%sysusers_create_compat %{SOURCE1} %post /sbin/ldconfig @@ -156,6 +157,10 @@ systemd-tmpfiles --create %{name}.conf >/dev/null 2>&1 || : /sbin/ldconfig %changelog +* Fri Jul 14 2023 Justin Stephenson - 13-2 +- Provide a sysusers.d file to get user() and group() provides + (see https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format). + * Fri Apr 14 2023 Justin Stephenson - 13-1 - Release v13 - Update the Fedora license diff --git a/tlog.sysusers b/tlog.sysusers new file mode 100644 index 0000000..d805593 --- /dev/null +++ b/tlog.sysusers @@ -0,0 +1,2 @@ +u tlog - "Tlog terminal I/O logger" /run/tlog /sbin/nologin +g tlog -