Skip to content

Commit

Permalink
SPEC: use sysusers as additional source
Browse files Browse the repository at this point in the history
This partially reverts 736430a

The reason is that 'sysusers_create_compat' macro is evaluated after
the tar ball is extracted, after SSSD is built and after content of
the BUILD and BUILDROOT directories is removed, so otherwise there is
no extracted or built data available anymore.

See SSSD#7267 (comment) for
details.
  • Loading branch information
alexey-tikhonov committed Apr 3, 2024
1 parent 79c384f commit 3db17b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ Summary: System Security Services Daemon
License: GPLv3+
URL: https://github.com/SSSD/sssd/
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
%if %{use_sysusers}
Source1: sssd.sysusers
%endif

### Patches ###
# Place your patches here:
Expand Down Expand Up @@ -733,7 +736,7 @@ do
done

%if %{use_sysusers}
install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.conf
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/sssd.conf
%endif

%files
Expand Down Expand Up @@ -1047,7 +1050,7 @@ install -D -p -m 0644 contrib/sssd.sysusers %{buildroot}%{_sysusersdir}/sssd.con
%if %{use_sssd_user}
%pre common
%if %{use_sysusers}
%sysusers_create_compat contrib/sssd.sysusers
%sysusers_create_compat %{SOURCE1}
%else
getent group sssd >/dev/null || groupadd -r sssd
getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "User for sssd" sssd
Expand Down

0 comments on commit 3db17b9

Please sign in to comment.