update arpwatch version to 3.5
This commit is contained in:
parent
aaa610d19b
commit
4c22d6b712
@ -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
|
||||
Binary file not shown.
@ -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
|
||||
@@ -161,6 +161,8 @@
|
||||
RETSIGTYPE die(int);
|
||||
diff -Naur arpwatch-3.5-original/arpwatch.c arpwatch-3.5/arpwatch.c
|
||||
--- arpwatch-3.5-original/arpwatch.c 2023-12-03 13:10:05.000000000 -0500
|
||||
+++ arpwatch-3.5/arpwatch.c 2023-12-03 20:06:32.694857659 -0500
|
||||
@@ -163,6 +163,8 @@
|
||||
void hup(int);
|
||||
int isbogon(u_int32_t);
|
||||
int main(int, char **);
|
||||
+int try_open_live(pcap_t ** pd_ptr, char const * interface_name,
|
||||
@ -17,7 +10,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
||||
void process_ether(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
void process_fddi(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||
int readsnmp(char *);
|
||||
@@ -177,7 +179,7 @@
|
||||
@@ -179,7 +181,7 @@
|
||||
int op, snaplen, timeout, linktype, status;
|
||||
pcap_t *pd;
|
||||
FILE *fp;
|
||||
@ -26,7 +19,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
||||
char *interface, *rfilename;
|
||||
struct bpf_program code;
|
||||
char errbuf[PCAP_ERRBUF_SIZE];
|
||||
@@ -309,13 +311,18 @@
|
||||
@@ -311,13 +313,18 @@
|
||||
"%s: pcap_findalldevs: %s\n", prog, errbuf);
|
||||
exit(1);
|
||||
}
|
||||
@ -48,7 +41,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
||||
#else
|
||||
if (interface = pcap_lookupdev(errbuf)) == NULL) {
|
||||
(void)fprintf(stderr,
|
||||
@@ -354,15 +361,12 @@
|
||||
@@ -356,15 +363,12 @@
|
||||
}
|
||||
swapped = pcap_is_swapped(pd);
|
||||
} else {
|
||||
@ -68,7 +61,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
swapped = 1;
|
||||
#endif
|
||||
@@ -452,6 +456,74 @@
|
||||
@@ -454,6 +458,74 @@
|
||||
exit(0);
|
||||
}
|
||||
|
||||
12
arpwatch-3.5-exitcode.patch
Normal file
12
arpwatch-3.5-exitcode.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur arpwatch-3.5-original/arpwatch.c arpwatch-3.5/arpwatch.c
|
||||
--- arpwatch-3.5-original/arpwatch.c 2023-12-03 13:10:05.000000000 -0500
|
||||
+++ arpwatch-3.5/arpwatch.c 2023-12-03 20:04:01.834691097 -0500
|
||||
@@ -915,7 +915,7 @@
|
||||
{
|
||||
lg(LOG_DEBUG, "exiting");
|
||||
checkpoint(0);
|
||||
- exit(1);
|
||||
+ exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
BIN
arpwatch-3.5.tar.gz
Normal file
BIN
arpwatch-3.5.tar.gz
Normal file
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index 9e8a3fc..23eec03 100644
|
||||
index 95728e0..1bc3ec8 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -557,7 +557,7 @@ AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
|
||||
@@ -520,7 +520,7 @@ AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
|
||||
AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
|
||||
[case "$target_cpu" in
|
||||
|
||||
@ -12,44 +12,44 @@ index 9e8a3fc..23eec03 100644
|
||||
;;
|
||||
|
||||
diff --git a/config.guess b/config.guess
|
||||
index 0bb53ae..25050b6 100755
|
||||
index b1f709e..3699368 100755
|
||||
--- a/config.guess
|
||||
+++ b/config.guess
|
||||
@@ -900,6 +900,14 @@ EOF
|
||||
@@ -907,6 +907,14 @@ EOF
|
||||
UNAME_MACHINE=aarch64_be
|
||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
exit ;;
|
||||
+ sw_64:Linux:*:*)
|
||||
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
+ sw) UNAME_MACHINE=sw_64 ;;
|
||||
+ esac
|
||||
+ objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
+ echo ${UNAME_MACHINE}-sunway-linux-gnu${LIBC}
|
||||
+ exit ;;
|
||||
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
+ sw) UNAME_MACHINE=sw_64 ;;
|
||||
+ esac
|
||||
+ objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
+ echo ${UNAME_MACHINE}-sunway-linux-gnu${LIBC}
|
||||
+ exit ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||
diff --git a/config.sub b/config.sub
|
||||
index a5eae25..3d7f4e6 100755
|
||||
index dad7123..ca76eb6 100755
|
||||
--- a/config.sub
|
||||
+++ b/config.sub
|
||||
@@ -249,6 +249,7 @@ case $basic_machine in
|
||||
@@ -569,6 +569,7 @@ case $basic_machine in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| aarch64 | aarch64_be \
|
||||
+ | sw_64 \
|
||||
+ | sw_64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
@@ -371,6 +372,7 @@ case $basic_machine in
|
||||
@@ -692,6 +693,7 @@ case $basic_machine in
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| aarch64-* | aarch64_be-* \
|
||||
+ | sw_64-* \
|
||||
+ | sw_64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
|
||||
--
|
||||
2.33.0
|
||||
2.41.0
|
||||
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
Name: arpwatch
|
||||
Epoch: 14
|
||||
Version: 3.3
|
||||
Version: 3.5
|
||||
Release: 1
|
||||
Summary: Network monitoring tools for tracking IP addresses on a network
|
||||
License: BSD with advertising
|
||||
License: BSD-3-Clause
|
||||
URL: http://ee.lbl.gov/
|
||||
Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz
|
||||
Source1: arpwatch.service
|
||||
@ -28,8 +28,8 @@ Patch4: arpwatch-3.1-arpfetch-stray-rm.patch
|
||||
Patch5: arpwatch-3.2-no-usr-local-path.patch
|
||||
Patch6: arpwatch-3.1-configure-no-local-pcap.patch
|
||||
Patch7: arpwatch-3.1-all-zero-bogon.patch
|
||||
Patch8: arpwatch-3.1-exitcode.patch
|
||||
Patch9: arpwatch-3.1-devlookup.patch
|
||||
Patch8: arpwatch-3.5-exitcode.patch
|
||||
Patch9: arpwatch-3.5-devlookup.patch
|
||||
Patch10: arpwatch-3.3-c99.patch
|
||||
Patch11: arpwatch-add-sw64-architecture.patch
|
||||
|
||||
@ -55,7 +55,15 @@ sed -r -i 's|/usr/local/arpwatch|%{pkgstatedir}|g' *.8.in *.sh.in *.sh
|
||||
|
||||
sed -r -i 's|/usr/local/bin/python|/usr/bin/python3|g' update-ethercodes.sh.in
|
||||
|
||||
awk '/^ \* / { print substr($0, 4); } /^ \*\// { exit }' arpwatch.c | tee LICENSE
|
||||
|
||||
%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=/usr/bin/python3
|
||||
%make_build ARPDIR=%{pkgstatedir}
|
||||
|
||||
@ -110,6 +118,7 @@ exit 0
|
||||
%systemd_postun_with_restart arpwatch.service
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README CHANGES arpfetch
|
||||
%attr(0755,-,-)%{_sbindir}/arpwatch
|
||||
%attr(0755,-,-)%{_sbindir}/arpsnmp
|
||||
@ -129,6 +138,12 @@ exit 0
|
||||
%{_mandir}/man8/*.8*
|
||||
|
||||
%changelog
|
||||
* Mon Jan 08 2024 yanglu<yanglu72@h-partners.com> - 14:3.5-1
|
||||
- Type:requirements
|
||||
- Id:NA
|
||||
- SUG:NA
|
||||
- DESC:update arpwatch version to 3.5
|
||||
|
||||
* Thu Oct 26 2023 yanglu<yanglu72@h-partners.com> - 14:3.3-1
|
||||
- Type:requirements
|
||||
- Id:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user