-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian@gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: A solution to solve the bug #535361
-## May be this will be a solution with the right method ???
-
-@DPATCH@
+Debian patch used original code for 32-bit and sizeof(struct ifreq) for 64-bit builds,
+but the latter is exactly what Linux kernel does everywhere.
diff -urNad src/get_myipaddr.c trunk/src/get_myipaddr.c
--- src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200
+++ src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200
-@@ -118,7 +118,21 @@
+@@ -118,7 +118,7 @@
#endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */
/* increment ptr to next interface for next time through the loop */
-+#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */
-+ switch(__ARCH__) {
-+ case 32: /* 32 bits architectures */
-+ ptr += sizeof(ifr->ifr_name) + len;
-+ break;
-+ case 64: /* 64 bits architectures */
-+ ptr += sizeof(struct ifreq);
-+ break;
-+ default: /* Default dhcp_probe behavior */
-+ ptr += sizeof(ifr->ifr_name) + len;
-+ break;
-+ }
-+#else /* Default dhcp_probe behavior */
- ptr += sizeof(ifr->ifr_name) + len;
-+#endif
+- ptr += sizeof(ifr->ifr_name) + len;
++ ptr += sizeof(struct ifreq);
if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */
continue;
Summary: Tool for discovering DHCP and BootP servers
+Summary(pl.UTF-8): Narzędzie do znajdowania serwerów DHCP i BootP
Name: dhcp_probe
Version: 1.3.0
-Release: 2
-License: GPLv2+ and MIT
-Group: Applications
-Source0: http://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz
+Release: 3
+License: GPL v2+ and MIT
+Group: Applications/Networking
+Source0: https://www.net.princeton.edu/software/dhcp_probe/%{name}-%{version}.tar.gz
# Source0-md5: 8067e696fbd88120bdcc2ffef4b64da2
Source1: %{name}.init
Source2: %{name}.sysconfig
Patch2: dhcp_probe-virta-01-pcap-loop.patch
Patch3: dhcp_probe-virta-02-keep-pcap.patch
Patch4: dhcp_probe-virta-03-drop-privs.patch
-URL: http://www.net.princeton.edu/software/dhcp_probe/
+URL: https://www.net.princeton.edu/software/dhcp_probe/
+BuildRequires: libnet-devel >= 1:1.1.6
+BuildRequires: libpcap-devel
BuildRequires: rpmbuild(macros) >= 1.647
Requires(post,preun): /sbin/chkconfig
Requires(post,preun,postun): systemd-units >= 38
-BuildRequires: libnet-devel >= 1:1.1.6
-BuildRequires: libpcap-devel
Requires: rc-scripts
Requires: systemd-units >= 38
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
a directly-attached Ethernet network. A network administrator can use
this tool to locate unauthorized DHCP and BootP servers.
+%description -l pl.UTF-8
+dhcp_probe próbuje wykryć serwery DHCP i BootP w bezpośrednio
+podłączonej sieci Ethernet. Narzędzie jest przydatne dla
+administratorów sieci do lokalizowania nieautoryzowanych serwerów DHCP
+oraz BootP.
+
%prep
%setup -q
%patch0 -p0
cp -a extras/README README.extras
%build
-%ifarch %{x8664}
-export CFLAGS="%{rpmcflags} -D__ARCH__=64"
-%else
-export CFLAGS="%{rpmcflags} -D__ARCH__=32"
-%endif
%configure
%{__make}
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog INSTALL.dhcp_probe NEWS README* TODO
-%doc extras/dhcp_probe_notify* extras/mail-throttled
+%doc AUTHORS COPYING ChangeLog INSTALL.dhcp_probe NEWS README* TODO extras/{dhcp_probe_notify*,mail-throttled}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dhcp_probe.cf
%attr(755,root,root) %{_sbindir}/dhcp_probe
%attr(754,root,root) /etc/rc.d/init.d/dhcp_probe
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/dhcp_probe
%attr(755,root,root) /lib/systemd/system-generators/dhcp_probe-service-generator
-%{systemdunitdir}/%{name}.service
-%{systemdunitdir}/%{name}.target
-%{systemdunitdir}/%{name}@.service
+%{systemdunitdir}/dhcp_probe.service
+%{systemdunitdir}/dhcp_probe.target
+%{systemdunitdir}/dhcp_probe@.service
%{_mandir}/man5/dhcp_probe.cf.5*
%{_mandir}/man8/dhcp_probe.8*