From 75ff8d205ffd5a60d9e1b6550fa2d75e12a0bb6d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 6 Sep 2023 08:11:16 -0400 Subject: [PATCH] Update to 3.4 (close RHBZ#2237532) --- .gitignore | 1 + arpwatch-3.1-exitcode.patch | 15 --------------- ...evlookup.patch => arpwatch-3.4-devlookup.patch | 15 ++++----------- arpwatch-3.4-exitcode.patch | 12 ++++++++++++ arpwatch.spec | 13 ++++++++++--- sources | 2 +- 6 files changed, 28 insertions(+), 30 deletions(-) delete mode 100644 arpwatch-3.1-exitcode.patch rename arpwatch-3.1-devlookup.patch => arpwatch-3.4-devlookup.patch (88%) create mode 100644 arpwatch-3.4-exitcode.patch diff --git a/.gitignore b/.gitignore index 16d981d..b8ff172 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /arpwatch-3.1.tar.gz /arpwatch-3.2.tar.gz /arpwatch-3.3.tar.gz +/arpwatch-3.4.tar.gz diff --git a/arpwatch-3.1-exitcode.patch b/arpwatch-3.1-exitcode.patch deleted file mode 100644 index a6c2d34..0000000 --- a/arpwatch-3.1-exitcode.patch +++ /dev/null @@ -1,15 +0,0 @@ -When arpwatch is terminated cleanly by a signal (INT/TERM/HUP) handler, the -exit code should be zero for success instead of nonzero for failure. - -diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c ---- arpwatch-3.1-original/arpwatch.c 2019-11-30 13:35:23.000000000 -0500 -+++ arpwatch-3.1/arpwatch.c 2020-11-08 12:55:51.429575973 -0500 -@@ -892,7 +892,7 @@ - - lg(LOG_DEBUG, "exiting"); - checkpoint(0); -- exit(1); -+ exit(0); - } - - RETSIGTYPE diff --git a/arpwatch-3.1-devlookup.patch b/arpwatch-3.4-devlookup.patch similarity index 88% rename from arpwatch-3.1-devlookup.patch rename to arpwatch-3.4-devlookup.patch index 040705f..196197f 100644 --- a/arpwatch-3.1-devlookup.patch +++ b/arpwatch-3.4-devlookup.patch @@ -1,15 +1,8 @@ -When -i is not given, iterate all available devices until a usable one is found -instead of just trying the first one and giving up if it is not usable. See -RHBZ #842660. - -Additionally, handle the case where a device provides both supported and -unsupported datalink types. - -diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c ---- arpwatch-3.1-original/arpwatch.c 2019-11-30 13:35:23.000000000 -0500 -+++ arpwatch-3.1/arpwatch.c 2021-04-24 09:02:50.762535242 -0400 +diff -Naur arpwatch-3.4-original/arpwatch.c arpwatch-3.4/arpwatch.c +--- arpwatch-3.4-original/arpwatch.c 2023-09-05 13:50:56.000000000 -0400 ++++ arpwatch-3.4/arpwatch.c 2023-09-06 09:53:38.038275336 -0400 @@ -161,6 +161,8 @@ - RETSIGTYPE die(int); + void die(int); int isbogon(u_int32_t); int main(int, char **); +int try_open_live(pcap_t ** pd_ptr, char const * interface_name, diff --git a/arpwatch-3.4-exitcode.patch b/arpwatch-3.4-exitcode.patch new file mode 100644 index 0000000..719dfe7 --- /dev/null +++ b/arpwatch-3.4-exitcode.patch @@ -0,0 +1,12 @@ +diff -Naur arpwatch-3.4-original/arpwatch.c arpwatch-3.4/arpwatch.c +--- arpwatch-3.4-original/arpwatch.c 2023-09-05 13:50:56.000000000 -0400 ++++ arpwatch-3.4/arpwatch.c 2023-09-06 09:52:14.851126556 -0400 +@@ -892,7 +892,7 @@ + + lg(LOG_DEBUG, "exiting"); + checkpoint(0); +- exit(1); ++ exit(0); + } + + void diff --git a/arpwatch.spec b/arpwatch.spec index 8f415bc..5d20afc 100644 --- a/arpwatch.spec +++ b/arpwatch.spec @@ -1,6 +1,6 @@ Name: arpwatch Epoch: 14 -Version: 3.3 +Version: 3.4 Release: %autorelease Summary: Network monitoring tools for tracking IP addresses on a network @@ -69,12 +69,12 @@ Patch: arpwatch-3.1-configure-no-local-pcap.patch Patch: arpwatch-3.1-all-zero-bogon.patch # When arpwatch is terminated cleanly by a signal (INT/TERM/HUP) handler, the # exit code should be zero for success instead of nonzero for failure. -Patch: arpwatch-3.1-exitcode.patch +Patch: arpwatch-3.4-exitcode.patch # When -i is not given, do not just try the first device found, but keep # checking devices until a usable one is found, if any is available. # Additionally, handle the case where a device provides both supported and # unsupported datalink types. -Patch: arpwatch-3.1-devlookup.patch +Patch: arpwatch-3.4-devlookup.patch # Replace _getshort(), “a glibc function that hasn't been declared in the # installed headers for many, many years,” with ns_get16(). Fixes C99 @@ -128,6 +128,13 @@ awk '/^ \* / { print substr($0, 4); } /^ \*\// { exit }' arpwatch.c | %build +%set_build_flags +# Prior to version 3.4, this was handled by the configure script. If it is not +# defined, the build failes because time.h is not included in report.c. This +# regregression was reported upstream by email to arpwatch@ee.lbl.gov on +# 2023-09-06. +export CPPFLAGS="${CPPFLAGS-} -DTIME_WITH_SYS_TIME=1" + %configure --with-sendmail=/usr/sbin/sendmail PYTHON=%{python3} %make_build ARPDIR=%{pkgstatedir} diff --git a/sources b/sources index 69ce317..abd3702 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (arpwatch-3.3.tar.gz) = 4e3d542917dc9060ae7b35b40f41cb696eb36e68846194a76f025c5ecb1df1e67d5c1c66ba3c7e581e1f915b988d05cb7805f28d410784bd27dc3a448dccdece +SHA512 (arpwatch-3.4.tar.gz) = 0c984ec856e76df4475b367a2e5fb81d0bfdb00fd7730b303c0e1d422f2d2b4f8afef80082bf938d6a6a3b9855f4acfaea23b111430d5d13751271c5b4d70c36