1 Summary: Tool for discovering DHCP and BootP servers
2 Summary(pl.UTF-8): Narzędzie do znajdowania serwerów DHCP i BootP
6 License: GPL v2+ and MIT
7 Group: Applications/Networking
8 Source0: https://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz
9 # Source0-md5: 0fecf69bd0439603b5e3b3f0a652b822
11 Source2: %{name}.sysconfig
12 Source3: dhcp_probe.target
13 Source4: dhcp_probe@.service
14 Source5: dhcp_probe-service-generator
15 Patch3: dhcp_probe-virta-02-keep-pcap.patch
16 Patch4: dhcp_probe-virta-03-drop-privs.patch
17 URL: https://www.net.princeton.edu/software/dhcp_probe/
18 BuildRequires: libnet-devel >= 1:1.2
19 BuildRequires: libpcap-devel
20 BuildRequires: rpmbuild(macros) >= 1.647
21 Requires(post,preun): /sbin/chkconfig
22 Requires(post,preun,postun): systemd-units >= 38
23 Requires: libnet >= 1:1.2
25 Requires: systemd-units >= 38
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
43 cp -a extras/README README.extras
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{systemdunitdir}} \
52 $RPM_BUILD_ROOT/lib/systemd/system-generators
55 DESTDIR=$RPM_BUILD_ROOT
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
60 install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.target
61 install -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe@.service
62 ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/dhcp_probe.service
63 install -p %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system-generators/dhcp_probe-service-generator
66 rm -rf $RPM_BUILD_ROOT
69 /sbin/chkconfig --add %{name}
70 %service %{name} restart
71 %systemd_post %{name}.target
74 if [ "$1" = "0" ]; then
75 %service -q %{name} stop
76 /sbin/chkconfig --del %{name}
78 %systemd_preun %{name}.target
84 %defattr(644,root,root,755)
85 %doc AUTHORS COPYING ChangeLog INSTALL.dhcp_probe NEWS README* TODO extras/{dhcp_probe_notify*,mail-throttled}
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
90 %attr(755,root,root) /lib/systemd/system-generators/dhcp_probe-service-generator
91 %{systemdunitdir}/dhcp_probe.service
92 %{systemdunitdir}/dhcp_probe.target
93 %{systemdunitdir}/dhcp_probe@.service
94 %{_mandir}/man5/dhcp_probe.cf.5*
95 %{_mandir}/man8/dhcp_probe.8*