From nobody Mon Aug 1 21:00:29 2022 X-Original-To: dev-commits-ports-all@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 4LxVrY4g7mz4XwTK; Mon, 1 Aug 2022 21:00:29 +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 4LxVrY4FWrz41mk; Mon, 1 Aug 2022 21:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659387629; 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=nKbPihb9EAaBt+QJqiIRGB1Tc2xS/LkA+USzcjJAwAc=; b=LmBNthIkXqaz03bNsW6XBda0DnQ4lD+7CG+MwzyiVdk0mI0Rz/SeYmOenAJsdXVlnWEumX 0XsLXdrot6FryslLha/9z73SvbvI42Plf3HDnaIoQrNnIE31eTes8aL7kwXDk2teKr6X3Z iBFHKBNlyssVuC8hm7P1lK1K75p3QoxaJfEmFGuUcHC5pJme+Ndfc4F9NkiNvae8VXmnag dTGBdn9HaPYeiEOYgbbPc7VU1etlbziaBTcXHbL5BUVJisQfieUCdLuoPo8QQfsDwlLDLg l8akvmnyAzccf2y8hrNv/M6O/GSN0sz1NbZUgo+z+gCyYP11Ux6Yz13sPesLSw== 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 4LxVrY3FmyznP5; Mon, 1 Aug 2022 21:00:29 +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 271L0TLA076259; Mon, 1 Aug 2022 21:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 271L0TJp076258; Mon, 1 Aug 2022 21:00:29 GMT (envelope-from git) Date: Mon, 1 Aug 2022 21:00:29 GMT Message-Id: <202208012100.271L0TJp076258@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: f9d9aa45ab13 - main - security/openvas: update to 22.4.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9d9aa45ab135b10230b1aad9f37dd8bb8a72413 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659387629; 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=nKbPihb9EAaBt+QJqiIRGB1Tc2xS/LkA+USzcjJAwAc=; b=BL1hSw5RPu3kCqVmuQtGtDI+1KFWyARJpypmmetzwA75uquXiD3djU45AlIqTrix0ilJud rjuHTuHX1TJnXCdx1l4ywJTGq9r5U16IJZLfETXnK4Ix4/mjJhqvL9nTo/3mAgTbb1cE/v 0cDEo9YidnE6jA2jm70X+3kNUlFJvv+PuNn53iECT2YBAa0+22H8Yop1cycEzdW6a9z2I3 lwhEhQQldkcWT+9FsEXzIj2gMxhYF7pi5pOJ1MTfQcxWpgrbMQH63CtgG8PcbwClABRw0N tDrMWLK18zB1RSvbLcPr4vEHP9y2Z/4ksuG8qV+eSSBuI7ZWOQoaOvFmJGoSRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659387629; a=rsa-sha256; cv=none; b=iunUqwKPpzsWh5UnZrBBr1vwKT0pO6QZnkVvujEtGXBxogYkjNC1hR4eo3Fn85XTSWWpTS ECqxKDk1MLE1A5al+KuQWIsvbNiZ7Ca6tvanjBWCmb/ElpCDSeFabtfUYDFo3cbgmbiy/j Nn+BUeqnXhTB/7j79jOwV37z3VAEXkssBxsKGP4fvcAsJq5e+WZ60W6eChbomRM8dT0WaE ukXfLGEAYoIUy6PMkXpnsYfkb8balkly7g+mohEDwiP8x0Dt7sGF/qVXRbiU6yR19hdDgP XFbgtjmyAV5PKcmV/PJcQ//PZvMVYDdnS627zRtLLnYUTl0HIztuRVmxJr87lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9d9aa45ab135b10230b1aad9f37dd8bb8a72413 commit f9d9aa45ab135b10230b1aad9f37dd8bb8a72413 Author: Jose Alonso Cardenas Marquez AuthorDate: 2022-08-01 20:51:31 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2022-08-01 20:51:31 +0000 security/openvas: update to 22.4.0 ChangeLot at: https://github.com/greenbone/openvas-scanner/releases/tag/v22.4.0 --- security/openvas/Makefile | 5 ++- security/openvas/distinfo | 6 ++-- .../openvas/files/patch-nasl_nasl_frame_forgery.c | 2 +- security/openvas/files/patch-src_CMakeLists.txt | 16 +++++++-- security/openvas/files/patch-src_main.c | 16 +++++++++ security/openvas/files/patch-src_openvas.c | 31 +++++++++++++++++ security/openvas/files/patch-src_openvas.h | 13 +++++++ security/openvas/files/patch-src_pluginscheduler.c | 29 ++++------------ security/openvas/files/patch-src_sighand.c | 11 ------ .../files/patch-tools_greenbone-nvt-sync.in | 40 +++++----------------- security/openvas/pkg-plist | 8 ++--- 11 files changed, 101 insertions(+), 76 deletions(-) diff --git a/security/openvas/Makefile b/security/openvas/Makefile index 8786d9135330..de63c8d92032 100644 --- a/security/openvas/Makefile +++ b/security/openvas/Makefile @@ -1,5 +1,5 @@ PORTNAME= openvas -DISTVERSION= 21.4.4 +DISTVERSION= 22.4.0 DISTVERSIONPREFIX= v CATEGORIES= security @@ -34,6 +34,9 @@ GROUPS= ${USERS} post-patch: @${REINPLACE_CMD} -e 's|g_pattern_match_string|g_pattern_spec_match_string|g' ${WRKSRC}/misc/strutils.c + @${REINPLACE_CMD} -e 's|-Wunused-but-set-variable|-Wunused-variable|g' ${WRKSRC}/nasl/nasl_grammar.y + @${REINPLACE_CMD} -e 's|#include ||g' ${WRKSRC}/src/attack.c ${WRKSRC}/src/nasl_plugins.c + @${REINPLACE_CMD} -e 's|#include |#include |g' ${WRKSRC}//src/pluginload.c post-install: @${MKDIR} ${STAGEDIR}/var/run/ospd diff --git a/security/openvas/distinfo b/security/openvas/distinfo index 3e1a580b3e4a..b3485668aca5 100644 --- a/security/openvas/distinfo +++ b/security/openvas/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1646618189 -SHA256 (greenbone-openvas-scanner-v21.4.4_GH0.tar.gz) = 94af7113c8f16754eebf0a7e26c231586e3c2b70342d818d20cf24be4f40c578 -SIZE (greenbone-openvas-scanner-v21.4.4_GH0.tar.gz) = 460601 +TIMESTAMP = 1659314127 +SHA256 (greenbone-openvas-scanner-v22.4.0_GH0.tar.gz) = 232a64206f2ce17633ea16951b91d5d8743b174afd521f6318961353aadf8268 +SIZE (greenbone-openvas-scanner-v22.4.0_GH0.tar.gz) = 478488 diff --git a/security/openvas/files/patch-nasl_nasl_frame_forgery.c b/security/openvas/files/patch-nasl_nasl_frame_forgery.c index 51d880b7f29e..19f03c3450b8 100644 --- a/security/openvas/files/patch-nasl_nasl_frame_forgery.c +++ b/security/openvas/files/patch-nasl_nasl_frame_forgery.c @@ -60,7 +60,7 @@ + sdl->sdl_family = AF_LINK; + sdl->sdl_index = ifindex; + sdl->sdl_alen = ETHER_ADDR_LEN; -+ sdl->sdl_type = htons (ETH_P_ALL); ++ sdl->sdl_type = ETH_P_ALL; + + memcpy (sdl->sdl_data + sdl->sdl_nlen, ether_dst_addr, ETHER_ADDR_LEN); +} diff --git a/security/openvas/files/patch-src_CMakeLists.txt b/security/openvas/files/patch-src_CMakeLists.txt index a16cfea800e4..054b24b3335d 100644 --- a/security/openvas/files/patch-src_CMakeLists.txt +++ b/security/openvas/files/patch-src_CMakeLists.txt @@ -1,6 +1,16 @@ ---- src/CMakeLists.txt 2020-08-11 07:00:25.000000000 -0500 -+++ src/CMakeLists.txt 2021-01-04 19:20:27.629700000 -0500 -@@ -228,8 +228,8 @@ +--- src/CMakeLists.txt 2022-07-18 04:07:38.000000000 -0500 ++++ sc/CMakeLists.txt 2022-07-31 19:53:15.521197000 -0500 +@@ -30,7 +30,9 @@ + pkg_check_modules (LIBGVM_BOREAS REQUIRED libgvm_boreas>=22.4) + pkg_check_modules (LIBGVM_UTIL REQUIRED libgvm_util>=22.4) + pkg_check_modules (GLIB REQUIRED glib-2.0>=2.42) ++if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + pkg_check_modules (LIBBSD REQUIRED libbsd) ++endif() + + message (STATUS "Looking for libgcrypt...") + find_library (GCRYPT gcrypt) +@@ -230,8 +232,8 @@ PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/security/openvas/files/patch-src_main.c b/security/openvas/files/patch-src_main.c new file mode 100644 index 000000000000..0e0411d8035a --- /dev/null +++ b/security/openvas/files/patch-src_main.c @@ -0,0 +1,16 @@ +--- src/main.c 2022-07-18 04:07:38.000000000 -0500 ++++ src/main.c 2022-07-31 21:37:38.265241000 -0500 +@@ -35,7 +35,13 @@ + * @return EXIT_SUCCESS on success, EXIT_FAILURE on failure. + */ + int ++#if defined(__FreeBSD__) ++main (int argc, char **argv) ++{ ++ return openvas (argc, argv); ++#else + main (int argc, char **argv, char *env[]) + { + return openvas (argc, argv, env); ++#endif + } diff --git a/security/openvas/files/patch-src_openvas.c b/security/openvas/files/patch-src_openvas.c new file mode 100644 index 000000000000..cf3bb71d8026 --- /dev/null +++ b/security/openvas/files/patch-src_openvas.c @@ -0,0 +1,31 @@ +--- src/openvas.c 2022-07-31 21:26:36.888737000 -0500 ++++ src/openvas.c 2022-07-31 21:28:05.607778000 -0500 +@@ -44,7 +44,7 @@ + #include "sighand.h" /* for openvas_signal */ + #include "utils.h" /* for store_file */ + +-#include /* for proctitle_init */ ++#include /* for proctitle_init */ + #include /* for errno() */ + #include /* for open() */ + #include /* for gcry_control */ +@@ -468,11 +468,19 @@ + * @param argv Argument vector. + */ + int ++#if defined(__FreeBSD__) ++openvas (int argc, char *argv[]) ++ ++{ ++ int err; ++#else + openvas (int argc, char *argv[], char *env[]) ++ + { + int err; + + setproctitle_init (argc, argv, env); ++#endif + gcrypt_init (); + + static gboolean display_version = FALSE; diff --git a/security/openvas/files/patch-src_openvas.h b/security/openvas/files/patch-src_openvas.h new file mode 100644 index 000000000000..f385cb98afee --- /dev/null +++ b/security/openvas/files/patch-src_openvas.h @@ -0,0 +1,13 @@ +--- src/openvas.h 2022-07-31 21:28:34.160685000 -0500 ++++ src/openvas.h 2022-07-31 21:29:05.831561000 -0500 +@@ -26,6 +26,10 @@ + #define _OPENVAS_H + + int ++#if defined(__FreeBSD__) ++openvas (int, char **); ++#else + openvas (int, char **, char **); ++#endif + + #endif /* not _OPENVAS_H */ diff --git a/security/openvas/files/patch-src_pluginscheduler.c b/security/openvas/files/patch-src_pluginscheduler.c index 839bbd874c93..16335ac743a7 100644 --- a/security/openvas/files/patch-src_pluginscheduler.c +++ b/security/openvas/files/patch-src_pluginscheduler.c @@ -1,29 +1,14 @@ ---- src/pluginscheduler.c 2020-08-11 07:00:25.000000000 -0500 -+++ src/pluginscheduler.c 2021-01-04 18:10:12.943469000 -0500 -@@ -33,7 +33,7 @@ +--- src/pluginscheduler.c 2022-07-18 04:07:38.000000000 -0500 ++++ src/pluginscheduler.c 2022-07-31 19:38:07.076865000 -0500 +@@ -33,7 +33,11 @@ #include #include /* for prefs_get() */ #include /* for nvticache_t */ --#include ++#include ++#if !defined(__FreeBSD__) + #include ++#endif +#include #include /* for strcmp() */ #undef G_LOG_DOMAIN -@@ -325,7 +325,7 @@ - plugins_scheduler_free (ret); - return NULL; - } -- malloc_trim (0); -+// malloc_trim (0); - return ret; - } - -@@ -427,7 +427,7 @@ - element = element->next; - } - } -- malloc_trim (0); -+// malloc_trim (0); - } - - struct scheduler_plugin * diff --git a/security/openvas/files/patch-src_sighand.c b/security/openvas/files/patch-src_sighand.c deleted file mode 100644 index 724185542aa7..000000000000 --- a/security/openvas/files/patch-src_sighand.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/sighand.c 2022-05-19 23:34:53.324417000 -0500 -+++ src/sighand.c 2022-05-19 23:35:02.138680000 -0500 -@@ -119,7 +119,7 @@ - strings = backtrace_symbols (array, ret); - g_warning ("%s", message); - -- for (left = 0; left < 10; left++) -+ for (left = 0; left < ret; left++) - g_warning ("%s\n", strings[left]); - - g_free (strings); diff --git a/security/openvas/files/patch-tools_greenbone-nvt-sync.in b/security/openvas/files/patch-tools_greenbone-nvt-sync.in index a2a18e9668e6..3ea8874e455d 100644 --- a/security/openvas/files/patch-tools_greenbone-nvt-sync.in +++ b/security/openvas/files/patch-tools_greenbone-nvt-sync.in @@ -1,11 +1,11 @@ ---- tools/greenbone-nvt-sync.in 2021-04-15 09:39:00.000000000 -0500 -+++ tools/greenbone-nvt-sync.in 2021-06-15 16:41:18.698165000 -0500 -@@ -87,10 +87,10 @@ - LOG_CMD="logger -t $SCRIPT_NAME" +--- tools/greenbone-nvt-sync.in 2022-07-18 04:07:38.000000000 -0500 ++++ tools/greenbone-nvt-sync.in 2022-07-31 19:51:15.176021000 -0500 +@@ -98,10 +98,10 @@ + [ -z "$RSYNC_DOMAIN" ] && RSYNC_DOMAIN=feed.community.greenbone.net check_logger () { - logger --socket-error=on -p daemon.info -t $SCRIPT_NAME "Checking logger" --no-act 1>/dev/null 2>&1 -+ logger -p daemon.info -t $SCRIPT_NAME "Checking logger" 1>/dev/null 2>&1 ++ logger -p daemon.info -t $SCRIPT_NAME "Checking logger" 1>/dev/null 2>&1 if [ $? -gt 0 ] then - LOG_CMD="logger --socket-error=off -s -t $SCRIPT_NAME" @@ -13,38 +13,16 @@ $LOG_CMD -p daemon.warning "The log facility is not working as expected. All messages will be written to the standard error stream." fi } -@@ -202,7 +202,7 @@ - SYNC_TMP_DIR=/tmp - # If we have mktemp, create a temporary dir (safer) - if [ -n "`which mktemp`" ]; then -- SYNC_TMP_DIR=`mktemp -t -d greenbone-nvt-sync.XXXXXXXXXX` || { echo "ERROR: Cannot create temporary directory for file download" >&2; exit 1 ; } -+ SYNC_TMP_DIR=`mktemp -d /tmp/greenbone-nvt-sync.XXXXXXXXXX` || { echo "ERROR: Cannot create temporary directory for file download" >&2; exit 1 ; } - trap "rm -rf $SYNC_TMP_DIR" EXIT HUP INT TRAP TERM - fi - else -@@ -437,7 +437,7 @@ +@@ -448,7 +448,7 @@ log_err "rsync failed, aborting synchronization." exit 1 fi -- eval "cd \"$NVT_DIR\" ; md5sum -c --status \"$NVT_DIR/md5sums\"" -+ eval "cd \"$NVT_DIR\" ; xargs -n 2 md5 -c < \"$NVT_DIR/md5sums\" > /dev/null" +- eval "cd \"$NVT_DIR\" ; sha256sum -c --status \"$NVT_DIR/sha256sums\"" ++ eval "cd \"$NVT_DIR\" ; xargs -n 2 sha256sum -c < \"$NVT_DIR/sha256sums\" > /dev/null" if [ $? -ne 0 ] ; then if [ -n "$retried" ] then -@@ -471,10 +471,10 @@ - - do_self_test () - { -- MD5SUM_AVAIL=`command -v md5sum` -+ MD5SUM_AVAIL=`command -v md5` - if [ $? -ne 0 ] ; then - SELFTEST_FAIL=1 -- stderr_write "The md5sum binary could not be found." -+ stderr_write "The md5 binary could not be found." - fi - - RSYNC_AVAIL=`command -v rsync` -@@ -512,7 +512,7 @@ +@@ -523,7 +523,7 @@ log_write "Feed is already current, skipping synchronization." else ( diff --git a/security/openvas/pkg-plist b/security/openvas/pkg-plist index 26895d331121..8ac19bef60b4 100644 --- a/security/openvas/pkg-plist +++ b/security/openvas/pkg-plist @@ -3,11 +3,11 @@ bin/openvas-nasl bin/openvas-nasl-lint @sample %%ETCDIR%%/openvas_log.conf.sample lib/libopenvas_misc.so -lib/libopenvas_misc.so.21 -lib/libopenvas_misc.so.21.4.4 +lib/libopenvas_misc.so.22 +lib/libopenvas_misc.so.22.4.0 lib/libopenvas_nasl.so -lib/libopenvas_nasl.so.21 -lib/libopenvas_nasl.so.21.4.4 +lib/libopenvas_nasl.so.22 +lib/libopenvas_nasl.so.22.4.0 sbin/openvas share/man/man1/openvas-nasl-lint.1.gz share/man/man1/openvas-nasl.1.gz