Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c15ecc349a | ||
|
|
c73075af35 | ||
|
|
0f3611110f | ||
|
|
33f1ea4a5b | ||
| cd3dc6d062 | |||
|
|
eb99312cab |
1 changed files with 9 additions and 14 deletions
23
uucp.spec
23
uucp.spec
|
|
@ -63,7 +63,6 @@ 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
|
||||
|
|
@ -96,6 +95,12 @@ 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
|
||||
|
|
@ -108,7 +113,7 @@ export LDFLAGS="-pie"
|
|||
%endif
|
||||
|
||||
autoreconf --verbose --force --install
|
||||
export CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
|
||||
export CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -std=gnu17"
|
||||
%configure --with-newconfigdir=%{_newconfigdir} --with-oldconfigdir=%{_oldconfigdir}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
|
@ -171,18 +176,7 @@ EOF
|
|||
|
||||
find "${RPM_BUILD_ROOT}%_datadir/uucp/contrib" -type f -exec chmod a-x {} +
|
||||
|
||||
|
||||
%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
|
||||
|
||||
install -m0644 -D uucp.sysusers.conf %{buildroot}%{_sysusersdir}/uucp.conf
|
||||
|
||||
%post
|
||||
%if %{with systemd_macros}
|
||||
|
|
@ -296,6 +290,7 @@ 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue