From nobody Tue Aug 16 14:53:36 2022 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M6Z0K28wrz4ZJsv; Tue, 16 Aug 2022 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M6Z0K1cYkz3LjS; Tue, 16 Aug 2022 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660661617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUcG9ycCNHA11DTqRLgSv2r+sJoliD7UBQTtfbHj1fc=; b=nzwb1na8HpWCRAS82EFkqoDuS2w8gCQJAT6SOV9XgvCZK9aLV4e4ggA2mWJx8ScBHtgT8t 5jFk2Tz/B7FPrL7t2f5hVq0zqTrdD+LwDcxvxcTf8JuhAKJdZ2S5uRqPG/GzIwofLqkUYu Je6PVcQdVtCjSWkGVog1yi+llv//sBYCtTP5BDdATxx3AtRYNlazSnTzkegREmo7Xlez4J noguqQXrKS7w/+VX1FYgspCNA5M8te902hARQcjX3SW/WvpSZKSEEOCf21TfQU64BKIKJF qeNnP9AFsLY+DseIAnXjhXPPeLhgUCKnFJMKm2vYgggvt/qqcj0GIIl1nQNO0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M6Z0K0gYYz1CVb; Tue, 16 Aug 2022 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27GEraoA031470; Tue, 16 Aug 2022 14:53:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27GEra8R031469; Tue, 16 Aug 2022 14:53:36 GMT (envelope-from git) Date: Tue, 16 Aug 2022 14:53:36 GMT Message-Id: <202208161453.27GEra8R031469@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Nuno Teixeira Subject: git: cdad97dcc46b - 2022Q3 - net/wackamole: Fix build on armv7 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q3 X-Git-Reftype: branch X-Git-Commit: cdad97dcc46b2971ef6a2ef632dc688fcc19e5e5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660661617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mUcG9ycCNHA11DTqRLgSv2r+sJoliD7UBQTtfbHj1fc=; b=UzlQ1HIBS3cBALSIWTOnyFEtTf4rbmCljsLdzPk+RvAwBok8v4vkAej9+07KaXRsPsoP4I 4DxdM+bQRTjGCUqFeb1NnQL2E88BzHxIWyTstJbZozMopaHlVYhKfQAe8xaO4Ois6knd4i XILh8IOu66ipiMD3ye+GcC5px2yG7GrV+Xq9I9UNrGrrtKMwReM+S3UKzZ/Rk3Et5wfO2Z TkeW63qEJREeVEA8xVjqsIURwUc4c8Rykuq1TmEMP4OHGqwlcsei3rdwx6i/N4eJgVxe/X yaNIZAmTcrOnB2CctKYf55mTUQcWPMEDemy3jhrzgAWhrS5vSchVsnvvB/miTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660661617; a=rsa-sha256; cv=none; b=Ymb7/ztar/yBZ0PS+opWXZ/i+a25p2bi2biUNz4tDXoOhxJQIVZSdlEA/eU9Ou8205w3sT 9gXD8LsQ6FnJLOHPmrxzD2b+OsenkWp6Yp6RYzhQPbpNukbMl+BVCvFfqtfUJ4rvFd4CcR ca+7tT8L4MDQGrFTTGl4sZEo1+OK7S9aEXYMvlzWpu/iQ0uUk1Tm42Djd2JtPGhZhHdWCv LcA/B2uyzdgPf+MRe4e8NdGVsfXPlDNCOleDnSp5qz4lY7mYo4wBaIVkHY/p1zPXnL08UG x7MDx3Rn8QmcmFfmDVHpShAGuj9CrCFqxPNCpd1FjOXF0Juckh4YicpOmghonA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q3 has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=cdad97dcc46b2971ef6a2ef632dc688fcc19e5e5 commit cdad97dcc46b2971ef6a2ef632dc688fcc19e5e5 Author: Robert Clausecker AuthorDate: 2022-08-16 14:48:13 +0000 Commit: Nuno Teixeira CommitDate: 2022-08-16 14:53:04 +0000 net/wackamole: Fix build on armv7 Jails may not have a bpf(4) device, but can still build with BPF. - fix the configure test for BPF detection - define LICENSE - fix two obvious bugs in the code PR: 265561 Approved by: maintainer timeout, >2 weeks MFH: 2022Q3 (cherry picked from commit 4d98b01b6fff7b4c1dd36d5f0849ed6dc1f3eb9e) --- net/wackamole/Makefile | 7 +++++++ net/wackamole/files/patch-alarm.c | 8 ++++---- net/wackamole/files/patch-arpcache.c | 11 +++++++++++ net/wackamole/files/patch-config_gram.y | 6 +++--- net/wackamole/files/patch-configuration.c | 6 +++--- net/wackamole/files/patch-configure | 11 +++++++++++ net/wackamole/files/patch-defines.h | 11 +++++------ net/wackamole/files/patch-ife-bpf.c | 11 +++++++++++ net/wackamole/files/patch-wackamole.c | 8 ++++---- 9 files changed, 59 insertions(+), 20 deletions(-) diff --git a/net/wackamole/Makefile b/net/wackamole/Makefile index 1874636c7c42..91fd90c13f34 100644 --- a/net/wackamole/Makefile +++ b/net/wackamole/Makefile @@ -2,6 +2,7 @@ PORTNAME= wackamole PORTVERSION= 2.1.5 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://BSDforge.com/projects/source/net/wackamole/ \ http://mirrors.omniti.com/wackamole/ @@ -9,6 +10,12 @@ MASTER_SITES= https://BSDforge.com/projects/source/net/wackamole/ \ MAINTAINER= portmaster@bsdforge.com COMMENT= Peer-to-peer high availability cluster +# same as the net/spread license really +LICENSE= CNDS_OPEN-SOURCE_LICENSE +LICENSE_NAME= CNDS Open-Source License +LICENSE_FILE= ${WRKSRC}/license.txt +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + LIB_DEPENDS= libspread.so:net/spread USES= tar:xz diff --git a/net/wackamole/files/patch-alarm.c b/net/wackamole/files/patch-alarm.c index 7034c83282d1..010ad1ec45cd 100644 --- a/net/wackamole/files/patch-alarm.c +++ b/net/wackamole/files/patch-alarm.c @@ -1,6 +1,6 @@ ---- alarm.c.orig 2014-05-06 16:24:44.652074671 -0700 -+++ alarm.c 2014-05-06 16:26:49.173062394 -0700 -@@ -93,7 +93,7 @@ +--- alarm.c.orig 2005-03-30 19:56:58 UTC ++++ alarm.c +@@ -93,7 +93,7 @@ void wack_alarm( int32 mask, char *message, ...) timestamp[length] = ' '; #ifdef HAVE_SYSLOG_H if(syslog_flag) @@ -9,7 +9,7 @@ else #endif fwrite(timestamp, length+1, sizeof(char), stdout); -@@ -105,7 +105,7 @@ +@@ -105,7 +105,7 @@ void wack_alarm( int32 mask, char *message, ...) int len = strlen(message)+100; s = malloc(len);/*estimation*/ vsnprintf(s,len,message, ap); diff --git a/net/wackamole/files/patch-arpcache.c b/net/wackamole/files/patch-arpcache.c new file mode 100644 index 000000000000..edc12dff7f1f --- /dev/null +++ b/net/wackamole/files/patch-arpcache.c @@ -0,0 +1,11 @@ +--- arpcache.c.orig 2022-08-01 22:18:16 UTC ++++ arpcache.c +@@ -153,7 +153,7 @@ void sample_arp_cache() { + h = arpcache_private[count].mac; + wack_alarm(ARPING, "Adding: (private) %s [%02x:%02x:%02x:%02x:%02x:%02x]", + inet_ntoa(sa->sin_addr), +- *(h++), *(h++), *(h++), *(h++), *(h++), *(h++)); ++ h[0], h[1], h[2], h[3], h[4], h[5]); + count++; + } + arpcache_private[count].ip = 0; diff --git a/net/wackamole/files/patch-config_gram.y b/net/wackamole/files/patch-config_gram.y index d7ac0bce019c..fbb911e9a63e 100644 --- a/net/wackamole/files/patch-config_gram.y +++ b/net/wackamole/files/patch-config_gram.y @@ -1,6 +1,6 @@ ---- config_gram.y.orig 2014-05-06 16:30:17.040722949 -0700 -+++ config_gram.y 2014-05-06 16:32:22.614815187 -0700 -@@ -106,7 +106,7 @@ +--- config_gram.y.orig 2005-11-14 17:17:53 UTC ++++ config_gram.y +@@ -106,7 +106,7 @@ Setting : W_SPREAD W_EQUALS W_STRING SPIT("Setting Group: %s\n", Spread_group); } | W_LOG W_EQUALS W_STRING | W_CONTROL W_EQUALS W_STRING diff --git a/net/wackamole/files/patch-configuration.c b/net/wackamole/files/patch-configuration.c index e58e93d66ff0..e7d30955a605 100644 --- a/net/wackamole/files/patch-configuration.c +++ b/net/wackamole/files/patch-configuration.c @@ -1,6 +1,6 @@ ---- configuration.c.orig 2014-05-06 16:35:08.783140770 -0700 -+++ configuration.c 2014-05-06 16:35:58.734348535 -0700 -@@ -43,7 +43,7 @@ +--- configuration.c.orig 2003-01-08 05:58:19 UTC ++++ configuration.c +@@ -43,7 +43,7 @@ void Get_conf(const char *File_name, member *My) char my_local_host_name[255]; static const size_t my_local_host_name_len=255; struct hostent *hent; diff --git a/net/wackamole/files/patch-configure b/net/wackamole/files/patch-configure new file mode 100644 index 000000000000..a0b6f1e88416 --- /dev/null +++ b/net/wackamole/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2022-08-01 22:15:30 UTC ++++ configure +@@ -8991,7 +8991,7 @@ echo "${ECHO_T}no" >&6; } + if test "x$IFE_OBJ" = "x" ; then + { echo "$as_me:$LINENO: checking for BPF" >&5 + echo $ECHO_N "checking for BPF... $ECHO_C" >&6; } +- if test -c "/dev/bpf0" ; then ++ if test -f /usr/include/net/bpf.h ; then + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + diff --git a/net/wackamole/files/patch-defines.h b/net/wackamole/files/patch-defines.h index 84da09f03e28..08a59a9c948c 100644 --- a/net/wackamole/files/patch-defines.h +++ b/net/wackamole/files/patch-defines.h @@ -1,5 +1,5 @@ ---- defines.h.orig 2014-05-06 16:38:13.055354417 -0700 -+++ defines.h 2014-05-06 16:42:19.536056294 -0700 +--- defines.h.orig 2005-03-30 19:56:58 UTC ++++ defines.h @@ -13,6 +13,9 @@ #ifdef HAVE_STRINGS_H #include @@ -10,7 +10,7 @@ #ifdef HAVE_ERRNO_H #include #endif -@@ -59,12 +62,12 @@ +@@ -59,11 +62,11 @@ #ifdef HAVE_NET_ROUTE_H #include #endif @@ -19,10 +19,9 @@ -#endif #ifdef HAVE_NET_BPF_H #include - #endif ++#endif +#ifdef HAVE_PCAP_H +#include -+#endif + #endif #ifdef HAVE_NET_ETHERNET_H #include - #endif diff --git a/net/wackamole/files/patch-ife-bpf.c b/net/wackamole/files/patch-ife-bpf.c new file mode 100644 index 000000000000..7c736a320c74 --- /dev/null +++ b/net/wackamole/files/patch-ife-bpf.c @@ -0,0 +1,11 @@ +--- ife-bpf.c.orig 2022-08-01 22:25:04 UTC ++++ ife-bpf.c +@@ -58,7 +58,7 @@ if_send_spoof_request(char *dev, + static unsigned char my_mac[ETH_ALEN]; + static unsigned char bc_mac[ETH_ALEN] = + {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; +- memset(&ifr, sizeof(struct ifreq), 0); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, dev, IFNAMSIZ); + if (ioctl(_if_bpf, BIOCSETIF, (caddr_t)&ifr) < 0) { + perror("ioctl (BIOCSETIF)"); diff --git a/net/wackamole/files/patch-wackamole.c b/net/wackamole/files/patch-wackamole.c index 6fb6fee7c057..8b3771b38fe3 100644 --- a/net/wackamole/files/patch-wackamole.c +++ b/net/wackamole/files/patch-wackamole.c @@ -1,6 +1,6 @@ ---- wackamole.c.orig 2014-05-06 16:45:39.558907243 -0700 -+++ wackamole.c 2014-05-06 16:47:57.679302712 -0700 -@@ -911,7 +911,7 @@ +--- wackamole.c.orig 2014-05-06 22:24:08 UTC ++++ wackamole.c +@@ -911,7 +911,7 @@ static void Acquire( entry *VE ) wack_alarm(PRINT, "%d %s", __LINE__, if_error()); else { char buffer[16]; @@ -9,7 +9,7 @@ wack_alarm(PRINT, " UP: %s:%s/%s", iface.ifname,buffer,inet_ntoa(iface.netmask)); } -@@ -954,7 +954,7 @@ +@@ -954,7 +954,7 @@ static void Release( entry *VE ) } } else { char buffer[16];