!10 update arpwatch version to 3.5
From: @yangl777 Reviewed-by: @robertxw Signed-off-by: @robertxw
This commit is contained in:
commit
0f6a2dca48
@ -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
|
diff -Naur arpwatch-3.5-original/arpwatch.c arpwatch-3.5/arpwatch.c
|
||||||
instead of just trying the first one and giving up if it is not usable. See
|
--- arpwatch-3.5-original/arpwatch.c 2023-12-03 13:10:05.000000000 -0500
|
||||||
RHBZ #842660.
|
+++ arpwatch-3.5/arpwatch.c 2023-12-03 20:06:32.694857659 -0500
|
||||||
|
@@ -163,6 +163,8 @@
|
||||||
Additionally, handle the case where a device provides both supported and
|
void hup(int);
|
||||||
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);
|
|
||||||
int isbogon(u_int32_t);
|
int isbogon(u_int32_t);
|
||||||
int main(int, char **);
|
int main(int, char **);
|
||||||
+int try_open_live(pcap_t ** pd_ptr, char const * interface_name,
|
+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_ether(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||||
void process_fddi(u_char *, const struct pcap_pkthdr *, const u_char *);
|
void process_fddi(u_char *, const struct pcap_pkthdr *, const u_char *);
|
||||||
int readsnmp(char *);
|
int readsnmp(char *);
|
||||||
@@ -177,7 +179,7 @@
|
@@ -179,7 +181,7 @@
|
||||||
int op, snaplen, timeout, linktype, status;
|
int op, snaplen, timeout, linktype, status;
|
||||||
pcap_t *pd;
|
pcap_t *pd;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
@ -26,7 +19,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
|||||||
char *interface, *rfilename;
|
char *interface, *rfilename;
|
||||||
struct bpf_program code;
|
struct bpf_program code;
|
||||||
char errbuf[PCAP_ERRBUF_SIZE];
|
char errbuf[PCAP_ERRBUF_SIZE];
|
||||||
@@ -309,13 +311,18 @@
|
@@ -311,13 +313,18 @@
|
||||||
"%s: pcap_findalldevs: %s\n", prog, errbuf);
|
"%s: pcap_findalldevs: %s\n", prog, errbuf);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -48,7 +41,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
|||||||
#else
|
#else
|
||||||
if (interface = pcap_lookupdev(errbuf)) == NULL) {
|
if (interface = pcap_lookupdev(errbuf)) == NULL) {
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
@@ -354,15 +361,12 @@
|
@@ -356,15 +363,12 @@
|
||||||
}
|
}
|
||||||
swapped = pcap_is_swapped(pd);
|
swapped = pcap_is_swapped(pd);
|
||||||
} else {
|
} else {
|
||||||
@ -68,7 +61,7 @@ diff -Naur arpwatch-3.1-original/arpwatch.c arpwatch-3.1/arpwatch.c
|
|||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
swapped = 1;
|
swapped = 1;
|
||||||
#endif
|
#endif
|
||||||
@@ -452,6 +456,74 @@
|
@@ -454,6 +458,74 @@
|
||||||
exit(0);
|
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
|
diff --git a/aclocal.m4 b/aclocal.m4
|
||||||
index 9e8a3fc..23eec03 100644
|
index 95728e0..1bc3ec8 100644
|
||||||
--- a/aclocal.m4
|
--- a/aclocal.m4
|
||||||
+++ b/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,
|
AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
|
||||||
[case "$target_cpu" in
|
[case "$target_cpu" in
|
||||||
|
|
||||||
@ -12,12 +12,12 @@ index 9e8a3fc..23eec03 100644
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
diff --git a/config.guess b/config.guess
|
diff --git a/config.guess b/config.guess
|
||||||
index 0bb53ae..25050b6 100755
|
index b1f709e..3699368 100755
|
||||||
--- a/config.guess
|
--- a/config.guess
|
||||||
+++ b/config.guess
|
+++ b/config.guess
|
||||||
@@ -900,6 +900,14 @@ EOF
|
@@ -907,6 +907,14 @@ EOF
|
||||||
UNAME_MACHINE=aarch64_be
|
UNAME_MACHINE=aarch64_be
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||||
exit ;;
|
exit ;;
|
||||||
+ sw_64:Linux:*:*)
|
+ sw_64:Linux:*:*)
|
||||||
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||||
@ -31,10 +31,10 @@ index 0bb53ae..25050b6 100755
|
|||||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||||
EV5) UNAME_MACHINE=alphaev5 ;;
|
EV5) UNAME_MACHINE=alphaev5 ;;
|
||||||
diff --git a/config.sub b/config.sub
|
diff --git a/config.sub b/config.sub
|
||||||
index a5eae25..3d7f4e6 100755
|
index dad7123..ca76eb6 100755
|
||||||
--- a/config.sub
|
--- a/config.sub
|
||||||
+++ b/config.sub
|
+++ b/config.sub
|
||||||
@@ -249,6 +249,7 @@ case $basic_machine in
|
@@ -569,6 +569,7 @@ case $basic_machine in
|
||||||
1750a | 580 \
|
1750a | 580 \
|
||||||
| a29k \
|
| a29k \
|
||||||
| aarch64 | aarch64_be \
|
| aarch64 | aarch64_be \
|
||||||
@ -42,7 +42,7 @@ index a5eae25..3d7f4e6 100755
|
|||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||||
| am33_2.0 \
|
| am33_2.0 \
|
||||||
@@ -371,6 +372,7 @@ case $basic_machine in
|
@@ -692,6 +693,7 @@ case $basic_machine in
|
||||||
580-* \
|
580-* \
|
||||||
| a29k-* \
|
| a29k-* \
|
||||||
| aarch64-* | aarch64_be-* \
|
| aarch64-* | aarch64_be-* \
|
||||||
@ -51,5 +51,5 @@ index a5eae25..3d7f4e6 100755
|
|||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
|
||||||
--
|
--
|
||||||
2.33.0
|
2.41.0
|
||||||
|
|
||||||
|
|||||||
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
Name: arpwatch
|
Name: arpwatch
|
||||||
Epoch: 14
|
Epoch: 14
|
||||||
Version: 3.3
|
Version: 3.5
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Network monitoring tools for tracking IP addresses on a network
|
Summary: Network monitoring tools for tracking IP addresses on a network
|
||||||
License: BSD with advertising
|
License: BSD-3-Clause
|
||||||
URL: http://ee.lbl.gov/
|
URL: http://ee.lbl.gov/
|
||||||
Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz
|
Source0: https://ee.lbl.gov/downloads/arpwatch/arpwatch-%{version}.tar.gz
|
||||||
Source1: arpwatch.service
|
Source1: arpwatch.service
|
||||||
@ -28,8 +28,8 @@ Patch4: arpwatch-3.1-arpfetch-stray-rm.patch
|
|||||||
Patch5: arpwatch-3.2-no-usr-local-path.patch
|
Patch5: arpwatch-3.2-no-usr-local-path.patch
|
||||||
Patch6: arpwatch-3.1-configure-no-local-pcap.patch
|
Patch6: arpwatch-3.1-configure-no-local-pcap.patch
|
||||||
Patch7: arpwatch-3.1-all-zero-bogon.patch
|
Patch7: arpwatch-3.1-all-zero-bogon.patch
|
||||||
Patch8: arpwatch-3.1-exitcode.patch
|
Patch8: arpwatch-3.5-exitcode.patch
|
||||||
Patch9: arpwatch-3.1-devlookup.patch
|
Patch9: arpwatch-3.5-devlookup.patch
|
||||||
Patch10: arpwatch-3.3-c99.patch
|
Patch10: arpwatch-3.3-c99.patch
|
||||||
Patch11: arpwatch-add-sw64-architecture.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
|
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
|
%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
|
%configure --with-sendmail=/usr/sbin/sendmail PYTHON=/usr/bin/python3
|
||||||
%make_build ARPDIR=%{pkgstatedir}
|
%make_build ARPDIR=%{pkgstatedir}
|
||||||
|
|
||||||
@ -110,6 +118,7 @@ exit 0
|
|||||||
%systemd_postun_with_restart arpwatch.service
|
%systemd_postun_with_restart arpwatch.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%license LICENSE
|
||||||
%doc README CHANGES arpfetch
|
%doc README CHANGES arpfetch
|
||||||
%attr(0755,-,-)%{_sbindir}/arpwatch
|
%attr(0755,-,-)%{_sbindir}/arpwatch
|
||||||
%attr(0755,-,-)%{_sbindir}/arpsnmp
|
%attr(0755,-,-)%{_sbindir}/arpsnmp
|
||||||
@ -129,6 +138,12 @@ exit 0
|
|||||||
%{_mandir}/man8/*.8*
|
%{_mandir}/man8/*.8*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Oct 26 2023 yanglu<yanglu72@h-partners.com> - 14:3.3-1
|
||||||
- Type:requirements
|
- Type:requirements
|
||||||
- Id:NA
|
- Id:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user