aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2020-09-07 12:27:55 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2020-09-07 12:52:00 +0000
commit121989695d0a877ca62134321f3c4c9ad96b3845 (patch)
tree2a3b3ef8da7af51aca173c282e42ba021e62741c
parentaa703c6851f981896734feaf5254b6c0f8dbda95 (diff)
downloadaports-121989695d0a877ca62134321f3c4c9ad96b3845.tar.gz
aports-121989695d0a877ca62134321f3c4c9ad96b3845.tar.bz2
aports-121989695d0a877ca62134321f3c4c9ad96b3845.tar.xz
community/gvmd: upgrade to 20.8.0
-rw-r--r--community/gvmd/APKBUILD22
-rw-r--r--community/gvmd/bin-openvas-change.patch19
-rw-r--r--community/gvmd/fix-alpine-sql-syntax.patch22
-rw-r--r--community/gvmd/fix-gvm-port-update-name-and-backend.patch24
-rw-r--r--community/gvmd/malloc-trim.patch15
-rw-r--r--community/gvmd/strptime.patch74
-rw-r--r--community/gvmd/sys-siglist.patch85
7 files changed, 57 insertions, 204 deletions
diff --git a/community/gvmd/APKBUILD b/community/gvmd/APKBUILD
index 4016aaa952..7bb68e3c94 100644
--- a/community/gvmd/APKBUILD
+++ b/community/gvmd/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvmd
-pkgver=9.0.1
-pkgrel=2
+pkgver=20.8.0
+pkgrel=0
pkgdesc="Greenbone Vulnerability Manager"
url="https://www.openvas.org/"
arch="all"
@@ -26,12 +26,9 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvmd/archive/v$pkg
greenbone-nvt-sync.conf
added-missing-includes.patch
- bin-openvas-change.patch
- fix-alpine-sql-syntax.patch
sys-siglist.patch
- fix-gvm-port-update-name-and-backend.patch
- lockfile.patch
- strptime.patch"
+ strptime.patch
+ malloc-trim.patch"
case "$CARCH" in
# cppcheck is not available
@@ -91,7 +88,7 @@ EOF
}
-sha512sums="4c4f0e1fdd2255be1a96967d61d9066d8860aecc5959f04c559b1a248bcc54d9cb75facd0156e223d674f038718f1e8ba0ee6b36cdc8ed88efe480acd1aa54cf gvmd-9.0.1.tar.gz
+sha512sums="5f14dde3f40926a39be87d1866b0b5bd73a3fd8d646ee53395db746b59ffed0e48f4a98ec76f97e13a18becd4e4ec81de8a7425be9575d103fc13a5a4ca82848 gvmd-20.8.0.tar.gz
035a46a287dc87329c9f2fd436bbd822cbfea82752558dce356026ecacce1639169e147a7e683663df394c1b0b18576f4dfd72f42966a90ebd54c46cd7a75402 gvmd.initd
63ca41e839e40292e4e6eb93947866ae2626f375353dfc142a9618f5bfb87e843f924e5a2ab3f24b5c30ac1c7c8791a5b323cbe2e88fb3c4cfc9713647f8eec2 gvmd.confd
e1eeef173bfab7c750efcc7faa42cf7a1cfb9e6b137716063f273bc709c1346f11262dadbdb0c49822d885dc00177d8ccb91c0491ddc33cfee0a3827f11908f6 gvmd.logrotate
@@ -99,9 +96,6 @@ e1eeef173bfab7c750efcc7faa42cf7a1cfb9e6b137716063f273bc709c1346f11262dadbdb0c498
37dbbd3f92f8baee8e89c274d820e03cba5ed5469a826f118897035c2f7719a915a71a6069eb6bf7f9a72e798b7837af9a6f25709215683d9d264292b5ccad66 greenbone-scapdata-sync.conf
964779adc39cbed191bccf02ccc408a263860002d2dbddee755cf0d015336814b0b3c83f88a02cc0c5959657be5c49eb94380cd6ba15844e4b6088e49cd7a3f0 greenbone-nvt-sync.conf
b5411a618e62e5a64fae3441d7f8a4db1fb7675200d8ce5f8208b09c6459b33920f3a65519c8d17781929917eeb4966e60701e64612c6cfcb77101130f779992 added-missing-includes.patch
-8d711e7411c92aaa1fb7d2cb3bce1aae80e8843703fca15dcac202619907589e43ef0575e26470e075d6517bca150b777b1fa1afd32f900ca3e36537bacb17e4 bin-openvas-change.patch
-5b7645912e107f67e1cc64cdb817404bc5212c41328201cfcc048a3ee73cf3c135b5128f1da6e84946ddc9361751b3da92518e493d940c2bbbda0c8ada8f3d5f fix-alpine-sql-syntax.patch
-682ae0efb02c565ed28d67c3adc5d181fb0ac43d670573f0d9587cb6ff9d4dd89eaf1f43f0fab3928e447bee735958afec0f31c70f5ceffac3c68633469ff71a sys-siglist.patch
-981c4cb32e5ef46be97b0c2d3cb24ab8b49226212104eb56c49216d976a5ae3cda3518e7629c0417dd22c94cf2fe19c34b6a5d4efd291c06747db84e7be76596 fix-gvm-port-update-name-and-backend.patch
-ef23f5bb64371f4e11eae0830a0c7a6a6463b792b2907cbc0527b1cf5a273927f676a254634ee3228315b44b6ca56716d3dce122dd43937fed79f2a443ae2d3d lockfile.patch
-e9c2717eacf852e6a08050245eff79cf917875c6e403bc1558c3dd02239fb07ad7d3ccd18978ce1b80f035077124c7d6049c75a587bd9609869861bdeb6aaba1 strptime.patch"
+ba1aabdb99183f45e5b4b568700ce5620a4547a0184addb6762a7baca7255641ff481a3b5396c55c66c69551736fc7b4ed60a03880dcd0fcb060eb4ba6013d16 sys-siglist.patch
+69ad3dfd66683020e22919dabb593d2282dd073b56706637fa8be1c1351845881ee5241c0d60a1c0095ca70db1eb9afd93e3e852d0ec53180491575acd1da2ec strptime.patch
+73e1d455573dc4f11e86904740ea5ea7163d76fd422b81978f2a2a7127a8b50f6a1ad5f1f259fb86469d4d3ce5754db549158477696bb92b2b783d19b7bdbc63 malloc-trim.patch"
diff --git a/community/gvmd/bin-openvas-change.patch b/community/gvmd/bin-openvas-change.patch
deleted file mode 100644
index 4ae7bb4f5a..0000000000
--- a/community/gvmd/bin-openvas-change.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/tools/gvm-portnames-update.in b/tools/gvm-portnames-update.in
-index ab49349..b2889ee 100644
---- a/tools/gvm-portnames-update.in
-+++ b/tools/gvm-portnames-update.in
-@@ -49,12 +49,12 @@ fi
-
- # Configure DB_DIR where our DB is located.
- if [ -z "$DB_DIR" ]; then
-- OPENVASSD=`which openvassd`
-+ OPENVASSD=`which openvas`
- if [ -z "$OPENVASSD" ] ; then
- echo "[e] Error: openvassd is not in the path, could not determine the Manager directory."
- exit 1
- else
-- OV_DIR=`openvassd -s | awk -F" = " '/^plugins_folder/ { print $2 }' | sed -s 's/\(^.*\)\/plugins/\1/'`
-+ OV_DIR=`openvas -s | awk -F" = " '/^plugins_folder/ { print $2 }' | sed -s 's/\(^.*\)\/plugins/\1/'`
- fi
- DB_DIR="$OV_DIR/gvmd"
- fi
diff --git a/community/gvmd/fix-alpine-sql-syntax.patch b/community/gvmd/fix-alpine-sql-syntax.patch
deleted file mode 100644
index 09fd9b2dd7..0000000000
--- a/community/gvmd/fix-alpine-sql-syntax.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/src/manage_pg.c b/src/manage_pg.c
-index e91b9f9..d6aa3b9 100644
---- a/src/manage_pg.c
-+++ b/src/manage_pg.c
-@@ -679,7 +679,7 @@ manage_create_sql_functions ()
- " BEGIN"
- " CASE"
- " WHEN NOT valid_db_resource_type ($1)"
-- " THEN RAISE EXCEPTION 'Invalid resource type argument: %', $1;"
-+ " THEN RAISE EXCEPTION 'Invalid resource type argument: %%', $1;"
- " WHEN $1 = 'note'"
- " AND $3 = " G_STRINGIFY (LOCATION_TABLE)
- " THEN RETURN (SELECT 'Note for: '"
-@@ -942,7 +942,7 @@ manage_create_sql_functions ()
- " ELSIF $1 > 0.0 AND $1 <= 10.0 THEN"
- " RETURN 'Alarm';"
- " ELSE"
-- " RAISE EXCEPTION 'Invalid severity score given: %', $1;"
-+ " RAISE EXCEPTION 'Invalid severity score given: %%', $1;"
- " END IF;"
- " END;"
- "$$ LANGUAGE plpgsql"
diff --git a/community/gvmd/fix-gvm-port-update-name-and-backend.patch b/community/gvmd/fix-gvm-port-update-name-and-backend.patch
deleted file mode 100644
index b10f52c12a..0000000000
--- a/community/gvmd/fix-gvm-port-update-name-and-backend.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/tools/gvm-portnames-update.in b/tools/gvm-portnames-update.in
-index ab49349..4d71471 100644
---- a/tools/gvm-portnames-update.in
-+++ b/tools/gvm-portnames-update.in
-@@ -20,9 +20,7 @@
- # Update Port Names data.
-
- POSTGRES=0
--if [ "@BACKEND@" = "POSTGRESQL" ]; then
-- POSTGRES=1
--fi
-+psql -d gvmd -c '\q' && POSTGRES=1;
-
- do_help () {
- echo "Update port names data from a port names XML file.";
-@@ -31,7 +29,7 @@ do_help () {
- echo "In order to update the DB, download the port names list and";
- echo "provide its path as an argument to this script.";
- echo " $ wget http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml";
-- echo " $ openvas-portnames-update service-names-port-numbers.xml";
-+ echo " $ gvm-portnames-update service-names-port-numbers.xml";
- echo " $ rm service-names-port-numbers.xml";
- exit 0
- }
diff --git a/community/gvmd/malloc-trim.patch b/community/gvmd/malloc-trim.patch
new file mode 100644
index 0000000000..459f1fcea7
--- /dev/null
+++ b/community/gvmd/malloc-trim.patch
@@ -0,0 +1,15 @@
+diff --git a/src/manage_sql.c b/src/manage_sql.c
+index b41e5c6..48e3fdb 100644
+--- a/src/manage_sql.c
++++ b/src/manage_sql.c
+@@ -15276,7 +15276,9 @@ update_nvti_cache ()
+
+ cleanup_iterator (&nvts);
+
+- malloc_trim (0);
++#ifdef __GLIBC__
++ malloc_trim (0);
++#endif
+ }
+
+ /**
diff --git a/community/gvmd/strptime.patch b/community/gvmd/strptime.patch
index ac2ceeded6..4d0edf26b2 100644
--- a/community/gvmd/strptime.patch
+++ b/community/gvmd/strptime.patch
@@ -1,82 +1,22 @@
diff --git a/src/manage_sql.c b/src/manage_sql.c
-index 5fbcea45..1d247f23 100644
+index b41e5c6..a36acdf 100644
--- a/src/manage_sql.c
+++ b/src/manage_sql.c
-@@ -888,23 +888,23 @@ parse_iso_time (const char *text_time)
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%T%z", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%T%z", &tm) == NULL)
- {
- gchar *tz;
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%TZ", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%TZ", &tm) == NULL)
- {
- /* Try time without timezone suffix, applying timezone of user. */
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%T", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%T", &tm) == NULL)
- {
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%F %T", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%d %T", &tm) == NULL)
- return parse_ctime (text_time);
- }
-
-@@ -928,11 +928,11 @@ parse_iso_time (const char *text_time)
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%T", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%T", &tm) == NULL)
- {
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%F %T", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%d %T", &tm) == NULL)
- {
- assert (0);
- g_warning ("%s: Failed to parse time", __FUNCTION__);
-@@ -961,7 +961,7 @@ parse_iso_time (const char *text_time)
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%TZ", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%TZ", &tm) == NULL)
- {
- assert (0);
- g_warning ("%s: Failed to parse time", __FUNCTION__);
-@@ -1045,7 +1045,7 @@ parse_iso_time (const char *text_time)
-
- memset (&tm, 0, sizeof (struct tm));
- tm.tm_isdst = -1;
-- if (strptime ((char*) text_time, "%FT%T%z", &tm) == NULL)
-+ if (strptime ((char*) text_time, "%Y-%m-%dT%T%z", &tm) == NULL)
- {
- assert (0);
- g_warning ("%s: Failed to parse time", __FUNCTION__);
-@@ -28442,7 +28442,7 @@ host_summary_append (GString *host_summary_buffer, const char *host,
+@@ -26579,7 +26579,7 @@ host_summary_append (GString *host_summary_buffer, const char *host,
struct tm start_tm;
-
+
memset (&start_tm, 0, sizeof (struct tm));
- if (strptime (start_iso, "%FT%H:%M:%S", &start_tm) == NULL)
+ if (strptime (start_iso, "%Y-%m-%dT%H:%M:%S", &start_tm) == NULL)
{
- g_warning ("%s: Failed to parse start", __FUNCTION__);
+ g_warning ("%s: Failed to parse start", __func__);
return;
-@@ -28462,7 +28462,7 @@ host_summary_append (GString *host_summary_buffer, const char *host,
+@@ -26599,7 +26599,7 @@ host_summary_append (GString *host_summary_buffer, const char *host,
struct tm end_tm;
-
+
memset (&end_tm, 0, sizeof (struct tm));
- if (strptime (end_iso, "%FT%H:%M:%S", &end_tm) == NULL)
+ if (strptime (end_iso, "%Y-%m-%dT%H:%M:%S", &end_tm) == NULL)
{
- g_warning ("%s: Failed to parse end", __FUNCTION__);
+ g_warning ("%s: Failed to parse end", __func__);
return;
diff --git a/community/gvmd/sys-siglist.patch b/community/gvmd/sys-siglist.patch
index 8d5ba9681f..61861c1c8c 100644
--- a/community/gvmd/sys-siglist.patch
+++ b/community/gvmd/sys-siglist.patch
@@ -1,48 +1,8 @@
-diff --git a/src/manage.c b/src/manage.c
-index a98a0c1..85e3147 100644
---- a/src/manage.c
-+++ b/src/manage.c
-@@ -3278,7 +3278,7 @@ handle_slave_task (task_t task, target_t target,
- {
- g_debug ("%s: Received %s signal.",
- __FUNCTION__,
-- sys_siglist[get_termination_signal()]);
-+ strsignal(get_termination_signal()));
- }
- if (global_current_report)
- {
-@@ -3300,7 +3300,7 @@ handle_slave_task (task_t task, target_t target,
- {
- g_debug ("%s: Received %s signal.",
- __FUNCTION__,
-- sys_siglist[get_termination_signal()]);
-+ strsignal(get_termination_signal()));
- if (global_current_report)
- {
- set_report_scan_run_status (global_current_report,
diff --git a/src/gvmd.c b/src/gvmd.c
-index 047977c..419a585 100644
+index 667ee96..37dbf32 100644
--- a/src/gvmd.c
+++ b/src/gvmd.c
-@@ -922,7 +922,7 @@ setup_signal_handler (int signal, void (*handler) (int), int block)
- if (sigaction (signal, &action, NULL) == -1)
- {
- g_critical ("%s: failed to register %s handler",
-- __FUNCTION__, sys_siglist[signal]);
-+ __FUNCTION__, strsignal(signal));
- exit (EXIT_FAILURE);
- }
- }
-@@ -953,7 +953,7 @@ setup_signal_handler_info (int signal,
- if (sigaction (signal, &action, NULL) == -1)
- {
- g_critical ("%s: failed to register %s handler",
-- __FUNCTION__, sys_siglist[signal]);
-+ __FUNCTION__, strsignal(signal));
- exit (EXIT_FAILURE);
- }
- }
-@@ -1258,7 +1258,7 @@ serve_and_schedule ()
+@@ -1241,7 +1241,7 @@ serve_and_schedule ()
if (termination_signal)
{
g_debug ("Received %s signal",
@@ -51,7 +11,7 @@ index 047977c..419a585 100644
cleanup ();
/* Raise signal again, to exit with the correct return value. */
setup_signal_handler (termination_signal, SIG_DFL, 0);
-@@ -1347,7 +1347,7 @@ serve_and_schedule ()
+@@ -1330,7 +1330,7 @@ serve_and_schedule ()
if (termination_signal)
{
g_debug ("Received %s signal",
@@ -60,24 +20,11 @@ index 047977c..419a585 100644
cleanup ();
/* Raise signal again, to exit with the correct return value. */
setup_signal_handler (termination_signal, SIG_DFL, 0);
-diff --git a/src/gmpd.c b/src/gmpd.c
-index 3becfe3..e45897c 100644
---- a/src/gmpd.c
-+++ b/src/gmpd.c
-@@ -496,7 +496,7 @@ serve_gmp (gvm_connection_t *client_connection, const gchar *database,
- {
- g_debug ("%s: Received %s signal.",
- __FUNCTION__,
-- sys_siglist[get_termination_signal()]);
-+ strsignal(get_termination_signal()));
-
- goto client_free;
- }
diff --git a/src/manage_sql.c b/src/manage_sql.c
-index 5fbcea4..c7c516c 100644
+index b41e5c6..288e0e3 100644
--- a/src/manage_sql.c
+++ b/src/manage_sql.c
-@@ -18421,7 +18421,7 @@ cleanup_manage_process (gboolean cleanup)
+@@ -16570,7 +16570,7 @@ cleanup_manage_process (gboolean cleanup)
void
manage_cleanup_process_error (int signal)
{
@@ -86,3 +33,25 @@ index 5fbcea4..c7c516c 100644
if (sql_is_open ())
{
if (current_scanner_task)
+diff --git a/src/utils.c b/src/utils.c
+index 2a785b5..b9ebec6 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -796,7 +796,7 @@ setup_signal_handler (int signal, void (*handler) (int), int block)
+ if (sigaction (signal, &action, NULL) == -1)
+ {
+ g_critical ("%s: failed to register %s handler",
+- __func__, sys_siglist[signal]);
++ __func__, strsignal(signal));
+ exit (EXIT_FAILURE);
+ }
+ }
+@@ -827,7 +827,7 @@ setup_signal_handler_info (int signal,
+ if (sigaction (signal, &action, NULL) == -1)
+ {
+ g_critical ("%s: failed to register %s handler",
+- __func__, sys_siglist[signal]);
++ __func__, strsignal(signal));
+ exit (EXIT_FAILURE);
+ }
+ }