[packages/dhcp_probe] - guignard-04_linux_32_or_64bits patch replaced by simple change to match Linux kernel behaviour - r
qboosh
qboosh at pld-linux.org
Sat May 23 14:53:56 CEST 2020
commit ade5218cb9fc5c1ffe2414c177916594322972e3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 23 14:54:34 2020 +0200
- guignard-04_linux_32_or_64bits patch replaced by simple change to match Linux kernel behaviour
- release 3 (rebuild with libnet 1.2)
dhcp_probe-guignard-04_linux_32_or_64bits.patch | 29 ++++----------------
dhcp_probe.spec | 35 +++++++++++++------------
2 files changed, 23 insertions(+), 41 deletions(-)
---
diff --git a/dhcp_probe.spec b/dhcp_probe.spec
index e0de5d7..c22a3df 100644
--- a/dhcp_probe.spec
+++ b/dhcp_probe.spec
@@ -1,10 +1,11 @@
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
@@ -16,12 +17,12 @@ Patch1: dhcp_probe-guignard-04_linux_32_or_64bits.patch
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)
@@ -31,6 +32,12 @@ dchp_probe attempts to discover DHCP and BootP servers on
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
@@ -41,11 +48,6 @@ this tool to locate unauthorized DHCP and BootP servers.
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}
@@ -85,15 +87,14 @@ fi
%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 at .service
%{_mandir}/man5/dhcp_probe.cf.5*
%{_mandir}/man8/dhcp_probe.8*
diff --git a/dhcp_probe-guignard-04_linux_32_or_64bits.patch b/dhcp_probe-guignard-04_linux_32_or_64bits.patch
index ce6e3f0..1457780 100644
--- a/dhcp_probe-guignard-04_linux_32_or_64bits.patch
+++ b/dhcp_probe-guignard-04_linux_32_or_64bits.patch
@@ -1,33 +1,14 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_linux_32_or_64bits.dpatch by Laurent Guignard <lguignard.debian at 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 ???
-
- at 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;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dhcp_probe.git/commitdiff/ade5218cb9fc5c1ffe2414c177916594322972e3
More information about the pld-cvs-commit
mailing list