Provide a sysusers.d file to get user() and group() provides
Resolves: rhbz#2095476
This commit is contained in:
parent
bb7cac92a7
commit
24714cbc4b
18
tlog.spec
18
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: GPLv2+
|
||||
%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
|
||||
@ -111,6 +113,7 @@ rm -r %{buildroot}/usr/include/%{name}
|
||||
mkdir -p %{buildroot}%{_localstatedir}/run
|
||||
install -d -m 0755 %{buildroot}%{_localstatedir}/run/%{name}
|
||||
%endif
|
||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %doc}
|
||||
@ -133,13 +136,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 +156,10 @@ systemd-tmpfiles --create %{name}.conf >/dev/null 2>&1 || :
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Fri Jul 14 2023 Justin Stephenson <jstephen@redhat.com> - 13-2
|
||||
- Provide a sysusers.d file to get user() and group() provides
|
||||
(see https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format).
|
||||
|
||||
* Mon Apr 17 2023 Justin Stephenson <jstephen@redhat.com> - 13-1
|
||||
- Update the Fedora license
|
||||
- MAN: Add missing comma in tlog-rec-session.conf
|
||||
|
2
tlog.sysusers
Normal file
2
tlog.sysusers
Normal file
@ -0,0 +1,2 @@
|
||||
u tlog - "Tlog terminal I/O logger" /run/tlog /sbin/nologin
|
||||
g tlog -
|
Loading…
Reference in New Issue
Block a user