Using systemd-sysusers
This commit is contained in:
parent
728ea04ea8
commit
b7be0eed7f
4
tcpdump-sysusers.conf
Normal file
4
tcpdump-sysusers.conf
Normal file
@ -0,0 +1,4 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g tcpdump 72
|
||||
u tcpdump 72 "tcpdump" - /sbin/nologin
|
||||
m tcpdump tcpdump
|
16
tcpdump.spec
16
tcpdump.spec
@ -2,16 +2,18 @@ Summary: A network traffic monitoring tool
|
||||
Name: tcpdump
|
||||
Epoch: 14
|
||||
Version: 4.99.1
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: BSD with advertising
|
||||
URL: http://www.tcpdump.org
|
||||
Requires(pre): shadow-utils
|
||||
BuildRequires: make
|
||||
BuildRequires: automake openssl-devel libpcap-devel git-core gcc
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Source0: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz
|
||||
Source1: ftp://ftp.ee.lbl.gov/tcpslice-1.5.tar.gz
|
||||
Source2: http://www.tcpdump.org/release/tcpdump-%{version}.tar.gz.sig
|
||||
Source3: tcpdump-sysusers.conf
|
||||
|
||||
Patch0002: 0002-Use-getnameinfo-instead-of-gethostbyaddr.patch
|
||||
Patch0003: 0003-Drop-root-priviledges-before-opening-first-savefile-.patch
|
||||
@ -60,16 +62,14 @@ popd
|
||||
install -m755 tcpdump ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
install -m644 tcpdump.1 ${RPM_BUILD_ROOT}%{_mandir}/man8/tcpdump.8
|
||||
|
||||
install -p -D -m 0644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysusersdir}/tcpdump.conf
|
||||
|
||||
# fix section numbers
|
||||
sed -i 's/\(\.TH[a-zA-Z ]*\)[1-9]\(.*\)/\18\2/' \
|
||||
${RPM_BUILD_ROOT}%{_mandir}/man8/*
|
||||
|
||||
%pre
|
||||
/usr/bin/getent group tcpdump >/dev/null || /usr/sbin/groupadd \
|
||||
-g 72 tcpdump 2> /dev/null
|
||||
/usr/bin/getent passwd tcpdump >/dev/null || /usr/sbin/useradd \
|
||||
-u 72 -g 72 -s /sbin/nologin -M -r \
|
||||
-d / tcpdump 2> /dev/null
|
||||
%sysusers_create_compat %{SOURCE3}
|
||||
exit 0
|
||||
|
||||
%files
|
||||
@ -77,10 +77,14 @@ exit 0
|
||||
%doc README.md CHANGES CREDITS
|
||||
%{_sbindir}/tcpdump
|
||||
%{_sbindir}/tcpslice
|
||||
%{_sysusersdir}/tcpdump.conf
|
||||
%{_mandir}/man8/tcpslice.8*
|
||||
%{_mandir}/man8/tcpdump.8*
|
||||
|
||||
%changelog
|
||||
* Tue Jun 14 2022 Michal Ruprich <mruprich@redhat.com> - 14:4.99.1-6
|
||||
- Using systemd-sysusers
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 14:4.99.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user