]>
Commit | Line | Data |
---|---|---|
0d9e0091 | 1 | Summary: Tool for discovering DHCP and BootP servers |
ade5218c | 2 | Summary(pl.UTF-8): Narzędzie do znajdowania serwerów DHCP i BootP |
0d9e0091 | 3 | Name: dhcp_probe |
c6298b67 JB |
4 | Version: 1.3.1 |
5 | Release: 1 | |
ade5218c JB |
6 | License: GPL v2+ and MIT |
7 | Group: Applications/Networking | |
8 | Source0: https://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz | |
c6298b67 | 9 | # Source0-md5: 0fecf69bd0439603b5e3b3f0a652b822 |
0d9e0091 JR |
10 | Source1: %{name}.init |
11 | Source2: %{name}.sysconfig | |
eaaa0e04 JR |
12 | Source3: dhcp_probe.target |
13 | Source4: dhcp_probe@.service | |
14 | Source5: dhcp_probe-service-generator | |
0d9e0091 JR |
15 | Patch3: dhcp_probe-virta-02-keep-pcap.patch |
16 | Patch4: dhcp_probe-virta-03-drop-privs.patch | |
ade5218c | 17 | URL: https://www.net.princeton.edu/software/dhcp_probe/ |
c6298b67 | 18 | BuildRequires: libnet-devel >= 1:1.2 |
ade5218c | 19 | BuildRequires: libpcap-devel |
0d9e0091 JR |
20 | BuildRequires: rpmbuild(macros) >= 1.647 |
21 | Requires(post,preun): /sbin/chkconfig | |
22 | Requires(post,preun,postun): systemd-units >= 38 | |
c6298b67 | 23 | Requires: libnet >= 1:1.2 |
0d9e0091 | 24 | Requires: rc-scripts |
1fcebd1c | 25 | Requires: systemd-units >= 38 |
0d9e0091 JR |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | dchp_probe attempts to discover DHCP and BootP servers on | |
30 | a directly-attached Ethernet network. A network administrator can use | |
31 | this tool to locate unauthorized DHCP and BootP servers. | |
32 | ||
ade5218c JB |
33 | %description -l pl.UTF-8 |
34 | dhcp_probe próbuje wykryć serwery DHCP i BootP w bezpośrednio | |
35 | podłączonej sieci Ethernet. Narzędzie jest przydatne dla | |
36 | administratorów sieci do lokalizowania nieautoryzowanych serwerów DHCP | |
37 | oraz BootP. | |
38 | ||
0d9e0091 JR |
39 | %prep |
40 | %setup -q | |
0d9e0091 JR |
41 | %patch3 -p0 |
42 | %patch4 -p0 | |
43 | cp -a extras/README README.extras | |
44 | ||
45 | %build | |
46 | %configure | |
47 | %{__make} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
2f2adddb JR |
51 | install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{systemdunitdir}} \ |
52 | $RPM_BUILD_ROOT/lib/systemd/system-generators | |
0d9e0091 JR |
53 | |
54 | %{__make} install \ | |
55 | DESTDIR=$RPM_BUILD_ROOT | |
56 | ||
57 | install -p extras/dhcp_probe.cf.sample $RPM_BUILD_ROOT%{_sysconfdir}/dhcp_probe.cf | |
58 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcp_probe | |
59 | install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/dhcp_probe | |
eaaa0e04 JR |
60 | install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.target |
61 | install -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe@.service | |
0ca270ff | 62 | ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.service |
eaaa0e04 | 63 | install -p %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system-generators/dhcp_probe-service-generator |
0d9e0091 JR |
64 | |
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %post | |
69 | /sbin/chkconfig --add %{name} | |
70 | %service %{name} restart | |
707b5dd8 | 71 | %systemd_post %{name}.target |
0d9e0091 JR |
72 | |
73 | %preun | |
74 | if [ "$1" = "0" ]; then | |
75 | %service -q %{name} stop | |
76 | /sbin/chkconfig --del %{name} | |
77 | fi | |
707b5dd8 | 78 | %systemd_preun %{name}.target |
0d9e0091 JR |
79 | |
80 | %postun | |
81 | %systemd_reload | |
82 | ||
83 | %files | |
84 | %defattr(644,root,root,755) | |
ade5218c | 85 | %doc AUTHORS COPYING ChangeLog INSTALL.dhcp_probe NEWS README* TODO extras/{dhcp_probe_notify*,mail-throttled} |
0d9e0091 JR |
86 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcp_probe.cf |
87 | %attr(755,root,root) %{_sbindir}/dhcp_probe | |
88 | %attr(754,root,root) /etc/rc.d/init.d/dhcp_probe | |
89 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp_probe | |
2f2adddb | 90 | %attr(755,root,root) /lib/systemd/system-generators/dhcp_probe-service-generator |
ade5218c JB |
91 | %{systemdunitdir}/dhcp_probe.service |
92 | %{systemdunitdir}/dhcp_probe.target | |
93 | %{systemdunitdir}/dhcp_probe@.service | |
0d9e0091 JR |
94 | %{_mandir}/man5/dhcp_probe.cf.5* |
95 | %{_mandir}/man8/dhcp_probe.8* |