Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPEC: enabled 'sysusers' for f-41+ #7267

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/build-sssd-srpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ runs:
with:
tarball: ${{ inputs.working-directory }}/sssd-${{ steps.sanitize.outputs.version }}.tar.gz
specfile: ${{ inputs.working-directory }}/sssd.spec
sourcefiles: ${{ inputs.working-directory }}/contrib/sssd.sysusers
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5742,6 +5742,7 @@ if GIT_CHECKOUT
endif
cp $(builddir)/contrib/sssd.spec $(RPMBUILD)/SPECS
cp $(distdir).tar.gz $(RPMBUILD)/SOURCES
cp $(srcdir)/contrib/sssd.sysusers $(RPMBUILD)/SOURCES

rpms: rpmbrprep
cd $(RPMBUILD); \
Expand Down
8 changes: 4 additions & 4 deletions contrib/sssd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%endif

# sysusers depends on presence of sssd user
%if 0%{?rhel} >= 10
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10
%global use_sysusers 1
%else
%global use_sysusers 0
Expand Down Expand Up @@ -65,6 +65,7 @@ Summary: System Security Services Daemon
License: GPLv3+
URL: https://github.com/SSSD/sssd/
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Source1: sssd.sysusers

### Patches ###
# Place your patches here:
Expand Down Expand Up @@ -584,7 +585,6 @@ autoreconf -ivf
%if %{build_ssh_known_hosts_proxy}
--with-ssh-known-hosts-proxy \
%endif

%{nil}

%make_build all docs runstatedir=%{_rundir}
Expand Down Expand Up @@ -733,7 +733,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 +1047,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
2 changes: 1 addition & 1 deletion contrib/sssd.sysusers
Original file line number Diff line number Diff line change
@@ -1 +1 @@
u sssd - "User for sssd" / /sbin/nologin
u sssd - "User for sssd" /run/sssd/ /sbin/nologin
Loading