Compare commits

..

No commits in common. "rawhide" and "f41" have entirely different histories.

View file

@ -63,6 +63,7 @@ Requires(preun): /sbin/install-info
Requires(post): /sbin/install-info
%endif
Requires: lockdev >= 1.0.0-14
Requires(pre): shadow-utils
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@ -95,12 +96,6 @@ because it can be useful even if you do not do uucp.
%patch -P12 -p1 -b .configure-c99
%patch -P13 -p1 -b .fix-types
# Create a sysusers.d config file
cat >uucp.sysusers.conf <<EOF
g uucp 14
u uucp 10 'Uucp user' /var/spool/uucp -
EOF
%build
# enable hardening because uucp contains setuid binaries
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 16 || 0%{?rhel} >= 7
@ -113,7 +108,7 @@ export LDFLAGS="-pie"
%endif
autoreconf --verbose --force --install
export CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -std=gnu17"
export CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
%configure --with-newconfigdir=%{_newconfigdir} --with-oldconfigdir=%{_oldconfigdir}
make %{?_smp_mflags}
@ -176,7 +171,18 @@ EOF
find "${RPM_BUILD_ROOT}%_datadir/uucp/contrib" -type f -exec chmod a-x {} +
install -m0644 -D uucp.sysusers.conf %{buildroot}%{_sysusersdir}/uucp.conf
%pre
getent group uucp >/dev/null || groupadd -g 14 -r uucp
if ! getent passwd uucp >/dev/null ; then
if ! getent passwd 10 >/dev/null ; then
useradd -r -u 10 -g uucp -d /var/spool/uucp -c "Uucp user" uucp
else
useradd -r -g uucp -d /var/spool/uucp -c "Uucp user" uucp
fi
fi
exit 0
%post
%if %{with systemd_macros}
@ -290,7 +296,6 @@ fi
%config(noreplace) %{_newconfigdir}/port
%config(noreplace) %{_newconfigdir}/sys
%attr(755,uucp,uucp) /var/spool/uucp
%{_sysusersdir}/uucp.conf
%files -n cu
%doc README COPYING ChangeLog NEWS TODO