diff --git a/security/openvas/Makefile b/security/openvas/Makefile index 93e2b40529ba..57c44842cf05 100644 --- a/security/openvas/Makefile +++ b/security/openvas/Makefile @@ -1,55 +1,61 @@ PORTNAME= openvas DISTVERSION= 22.7.6 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= acm@FreeBSD.org COMMENT= Open vulnerability assessment scanner WWW= https://github.com/greenbone/openvas LICENSE= GPLv2+ BUILD_DEPENDS= flex:textproc/flex LIB_DEPENDS= libgvm_base.so:security/gvm-libs \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error \ libpcap.so.1:net/libpcap \ libksba.so:security/libksba \ libgpgme.so:security/gpgme \ libssh.so:security/libssh \ libgnutls.so:security/gnutls \ libnetsnmp.so:net-mgmt/net-snmp \ libjson-glib-1.0.so:devel/json-glib RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}impacket>=0:net/py-impacket@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}greenbone-feed-sync>0:security/py-greenbone-feed-sync@${PY_FLAVOR} \ redis-server:databases/redis \ snmpget:net-mgmt/net-snmp \ rsync:net/rsync \ nmap:security/nmap USES= bison cmake gnome pkgconfig python ssl USE_GITHUB= yes GH_ACCOUNT= greenbone GH_PROJECT= ${PORTNAME}-scanner USE_GNOME= glib20 CMAKE_ARGS+= -DINSTALL_OLD_SYNC_SCRIPT=OFF USERS= gvm GROUPS= ${USERS} .include .if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 )) CFLAGS+= -Wno-error=strict-prototypes -Wno-error=unused-but-set-variable -Wno-error=invalid-utf8 .endif +# The struct this error is about is only ever accessed using bcopy() and memset(), +# so the unaligned structure doesn't matter. Disable the error, but keep it as a +# warning so we can see where it is. +CFLAGS_armv6= -Wno-error=unaligned-access +CFLAGS_armv7= -Wno-error=unaligned-access + post-patch: - @${REINPLACE_CMD} -e 's|#include ||g' ${WRKSRC}/src/attack.c ${WRKSRC}/src/nasl_plugins.c + @${REINPLACE_CMD} -e 's|#include ||g' ${WRKSRC}/src/nasl_plugins.c @${REINPLACE_CMD} -e 's|#include |#include |g' ${WRKSRC}//src/pluginload.c @${REINPLACE_CMD} -e 's|vendor_version_get ()|vendor_version_get (void)|g' ${WRKSRC}/misc/vendorversion.c post-install: @${MKDIR} ${STAGEDIR}/var/run/ospd .include diff --git a/security/openvas/files/patch-src_attack.c b/security/openvas/files/patch-src_attack.c index 2d6e3094ab66..8efb19d1240b 100644 --- a/security/openvas/files/patch-src_attack.c +++ b/security/openvas/files/patch-src_attack.c @@ -1,20 +1,47 @@ ---- src/attack.c.orig 2023-01-03 21:45:22 UTC +--- src/attack.c.orig 2023-10-11 11:14:13 UTC +++ src/attack.c -@@ -1493,13 +1493,13 @@ stop: +@@ -31,7 +31,7 @@ + #include "utils.h" + + #include /* for inet_ntoa() */ +-#include ++ + #include /* for errno() */ + #include + #include +@@ -1095,7 +1095,7 @@ apply_hosts_reverse_lookup_preferences (gvm_hosts_t *h + gvm_hosts_t *excluded; + + excluded = gvm_hosts_reverse_lookup_unify_excluded (hosts); +- g_debug ("reverse_lookup_unify: Skipped %lu host(s).", excluded->count); ++ g_debug ("reverse_lookup_unify: Skipped %zu host(s).", excluded->count); + + // Get the amount of hosts which are excluded now for this option, + // but they are already in the exclude list. +@@ -1111,7 +1111,7 @@ apply_hosts_reverse_lookup_preferences (gvm_hosts_t *h + gvm_hosts_t *excluded; + + excluded = gvm_hosts_reverse_lookup_only_excluded (hosts); +- g_debug ("reverse_lookup_unify: Skipped %lu host(s).", excluded->count); ++ g_debug ("reverse_lookup_unify: Skipped %zu host(s).", excluded->count); + // Get the amount of hosts which are excluded now for this option, + // but they are already in the exclude list. + // This is to avoid issues with the scan progress calculation, since +@@ -1614,13 +1614,13 @@ stop: gettimeofday (&now, NULL); if (test_alive_hosts_only) - g_message ("Vulnerability scan %s finished in %ld seconds: " + g_message ("Vulnerability scan %s finished in %lld seconds: " "%d alive hosts of %d", - globals->scan_id, now.tv_sec - then.tv_sec, + globals->scan_id, (long long)now.tv_sec - then.tv_sec, gvm_hosts_count (alive_hosts_list), gvm_hosts_count (hosts)); else - g_message ("Vulnerability scan %s finished in %ld seconds: %d hosts", - globals->scan_id, now.tv_sec - then.tv_sec, + g_message ("Vulnerability scan %s finished in %lld seconds: %d hosts", + globals->scan_id, (long long)now.tv_sec - then.tv_sec, gvm_hosts_count (hosts)); gvm_hosts_free (hosts);