From dce828f1677bb5e197e2edffcff7e43dba204750 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Jun 22 2023 14:16:26 +0000 Subject: Use rpm's sysuser provide generation on Fedora >= 39 Rpm >= 4.19 has native sysusers integration and generates similar user() and group() provides but encodes additional information into them, information that is required for the rpm integration to work. Besides additional data, one noteworthy difference in the rpm generated provides is there are no provides generated for m(ember) directives. This is because users and groups possibly created by that directive are a too implicit for dependency resolution and install ordering purposes in the case where the user/group is actually owned by some other package. --- diff --git a/systemd.spec b/systemd.spec index e48e5e6..158ef06 100644 --- a/systemd.spec +++ b/systemd.spec @@ -789,8 +789,11 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE17} sed -i 's|#!/usr/bin/env python3|#!%{__python3}|' %{buildroot}/usr/lib/systemd/tests/run-unit-tests.py install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/macros.d/ %{SOURCE21} +# Use rpm's own sysusers provides where available +%if 0%{?fedora} < 39 install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/fileattrs/ %{SOURCE22} install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE23} +%endif install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE24} # https://bugzilla.redhat.com/show_bug.cgi?id=2107754