diff --git a/net/wackamole/Makefile b/net/wackamole/Makefile index 1874636c7c42..91fd90c13f34 100644 --- a/net/wackamole/Makefile +++ b/net/wackamole/Makefile @@ -1,19 +1,26 @@ # Created by: Marcin Cieslak PORTNAME= wackamole PORTVERSION= 2.1.5 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://BSDforge.com/projects/source/net/wackamole/ \ http://mirrors.omniti.com/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 GNU_CONFIGURE= yes CONFIGURE_ENV+= YACC=${YACC} .include 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,20 +1,20 @@ ---- 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) - syslog(LOG_NOTICE, timestamp); + syslog(LOG_NOTICE, "%s", timestamp); 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); - syslog(LOG_NOTICE, s); + syslog(LOG_NOTICE, "%s", s); free(s); } else 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,11 +1,11 @@ ---- 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 - { snprintf(control_socket, MAXPATHLEN, $3.string); } + { snprintf(control_socket, MAXPATHLEN, "%s", $3.string); } | W_MATURE W_EQUALS W_TIMEINTERVAL { Maturity_timeout.sec = $3.tv.tv_sec; Maturity_timeout.usec = 0; 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,11 +1,11 @@ ---- 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; - int i, full; + int full; Num_prefer = 0; if (File_name && File_name[0] && (NULL != (fp = fopen(File_name,"r"))) ) 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,28 +1,27 @@ ---- 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 #endif +#ifdef HAVE_STRING_H +#include +#endif #ifdef HAVE_ERRNO_H #include #endif -@@ -59,12 +62,12 @@ +@@ -59,11 +62,11 @@ #ifdef HAVE_NET_ROUTE_H #include #endif -#ifdef HAVE_PCAP_H -#include -#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,20 +1,20 @@ ---- 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]; - snprintf(buffer, 16, inet_ntoa(iface.ipaddr)); + snprintf(buffer, 16, "%s", inet_ntoa(iface.ipaddr)); 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]; - snprintf(buffer, 16, inet_ntoa(idown.ipaddr)); + snprintf(buffer, 16, "%s", inet_ntoa(idown.ipaddr)); wack_alarm(PRINT, "DOWN: %s:%s/%s", idown.ifname,buffer,inet_ntoa(idown.netmask)); }