From f89fa127ea5bc0d077cd9ae23e814dc388e1c14c Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Sat, 27 Jul 2024 11:39:20 -0500 Subject: [PATCH] arpwatch: update to 3.6. Closes: #51499 [via git-merge-pr] --- srcpkgs/arpwatch/files/LICENSE | 18 ------------- srcpkgs/arpwatch/patches/missing-time_h.patch | 11 ++++++++ srcpkgs/arpwatch/patches/no_getshort.patch | 15 +++++++++++ srcpkgs/arpwatch/template | 26 ++++++------------- 4 files changed, 34 insertions(+), 36 deletions(-) delete mode 100644 srcpkgs/arpwatch/files/LICENSE create mode 100644 srcpkgs/arpwatch/patches/missing-time_h.patch create mode 100644 srcpkgs/arpwatch/patches/no_getshort.patch diff --git a/srcpkgs/arpwatch/files/LICENSE b/srcpkgs/arpwatch/files/LICENSE deleted file mode 100644 index be49954d95b..00000000000 --- a/srcpkgs/arpwatch/files/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 1992, 1993, 1994, 1995, 1996, 1998, 2000 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that: (1) source code distributions -retain the above copyright notice and this paragraph in its entirety, (2) -distributions including binary code include the above copyright notice and -this paragraph in its entirety in the documentation or other materials -provided with the distribution, and (3) all advertising materials mentioning -features or use of this software display the following acknowledgement: -``This product includes software developed by the University of California, -Lawrence Berkeley Laboratory and its contributors.'' Neither the name of -the University nor the names of its contributors may be used to endorse -or promote products derived from this software without specific prior -written permission. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/srcpkgs/arpwatch/patches/missing-time_h.patch b/srcpkgs/arpwatch/patches/missing-time_h.patch new file mode 100644 index 00000000000..45b9ad07555 --- /dev/null +++ b/srcpkgs/arpwatch/patches/missing-time_h.patch @@ -0,0 +1,11 @@ +--- a/report.c ++++ b/report.c +@@ -33,7 +33,7 @@ + /* + * report - arpwatch report generating routines + */ +- ++#include + #include + #include /* concession to AIX */ + #include diff --git a/srcpkgs/arpwatch/patches/no_getshort.patch b/srcpkgs/arpwatch/patches/no_getshort.patch new file mode 100644 index 00000000000..f3f56e34c57 --- /dev/null +++ b/srcpkgs/arpwatch/patches/no_getshort.patch @@ -0,0 +1,15 @@ +--- a/dns.c ++++ b/dns.c +@@ -115,10 +115,10 @@ gethinfo(char *hostname, char *cpu, int cpulen, char *os, int oslen) + (u_char *)cp, (char *)bp, buflen)) < 0) + break; + cp += n; +- type = _getshort(cp); ++ type = ns_get16(cp); + cp += sizeof(u_short); /* class */ + cp += sizeof(u_short) + sizeof(u_int32_t); +- n = _getshort(cp); ++ n = ns_get16(cp); + cp += sizeof(u_short); + if (type == T_HINFO) { + /* Unpack */ diff --git a/srcpkgs/arpwatch/template b/srcpkgs/arpwatch/template index fdb840c5c2b..52ea07fa7ee 100644 --- a/srcpkgs/arpwatch/template +++ b/srcpkgs/arpwatch/template @@ -1,32 +1,22 @@ # Template file for 'arpwatch' pkgname=arpwatch -version=2.1a15 -revision=3 +version=3.6 +revision=1 build_style=gnu-configure +configure_args="--with-sendmail=/usr/bin/sendmail" makedepends="libpcap-devel" short_desc="Ethernet/FDDI station activity monitor" maintainer="Andrea Brancaleoni " license="BSD-3-Clause-LBNL" -homepage="ftp://ftp.ee.lbl.gov" -distfiles="ftp://ftp.ee.lbl.gov/$pkgname-$version.tar.gz" -distfiles="${DEBIAN_SITE}/main/a/arpwatch/arpwatch_${version}.orig.tar.gz>$pkgname-$version.tar.gz" -checksum=c1df9737e208a96a61fa92ddad83f4b4d9be66f8992f3c917e9edf4b05ff5898 - -make_install_target="install install-man" +homepage="https://ee.lbl.gov/" +distfiles="https://ee.lbl.gov/downloads/arpwatch/arpwatch-${version}.tar.gz" +checksum=f86529fe57fdb5a2ff5413bc13c245063f99b3bf742421fd3133272175be8156 pre_configure() { - # PIE support - export CFLAGS="$CFLAGS $LDFLAGS" - # move arp database in /var/lib/arpwatch - # /var is used because arpwatch write its learned mac into this folder - sed -i 's|ARPDIR = $(prefix)/arpwatch|ARPDIR = /var/lib/arpwatch|' Makefile.in - # binary ownership to root - sed -i 's/-\(o\|g\) bin/-\1 root/g' Makefile.in - # Do not spam root user - sed -i 's|root|arpwatch|' addresses.h.in + vsed -i '/@HAVE_FREEBSD_TRUE@/d' Makefile.in } pre_install() { install -d -m 0755 $DESTDIR/usr/{bin,share/man/man8} - vlicense $FILESDIR/LICENSE + sed -n '1,27p' arpwatch.c > LICENSE && vlicense LICENSE }