aboutsummaryrefslogtreecommitdiffstats
path: root/community/gvmd/fix-alpine-sql-syntax.patch
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 16:30:27 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 20:01:23 +0000
commit9e8139a9333ca4fa0b3d42e4854cb4c526a185e6 (patch)
tree44b9c43d49ca2af1f08d5870cc9beb4638f88906 /community/gvmd/fix-alpine-sql-syntax.patch
parent361a773271accab3fb59cc5e13cf6c81f1cdcda4 (diff)
downloadaports-9e8139a9333ca4fa0b3d42e4854cb4c526a185e6.tar.bz2
aports-9e8139a9333ca4fa0b3d42e4854cb4c526a185e6.tar.xz
community/gvmd: fix to make gvmd work again
Diffstat (limited to 'community/gvmd/fix-alpine-sql-syntax.patch')
-rw-r--r--community/gvmd/fix-alpine-sql-syntax.patch58
1 files changed, 22 insertions, 36 deletions
diff --git a/community/gvmd/fix-alpine-sql-syntax.patch b/community/gvmd/fix-alpine-sql-syntax.patch
index 796c623192..09fd9b2dd7 100644
--- a/community/gvmd/fix-alpine-sql-syntax.patch
+++ b/community/gvmd/fix-alpine-sql-syntax.patch
@@ -1,36 +1,22 @@
-From a1633b5a54456b2b152abef24db19ae3587c8dae Mon Sep 17 00:00:00 2001
-From: 7ym0n <bb.qnyd@gmail.com>
-Date: Fri, 27 Sep 2019 04:31:27 -0400
-Subject: [PATCH 1/2] fixed start task failed
-
----
- src/manage_sql.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/manage_sql.c b/src/manage_sql.c
-index 1fc9582bb..c03e800b4 100644
---- a/src/manage_sql.c
-+++ b/src/manage_sql.c
-@@ -38041,7 +38041,7 @@ init_otp_pref_iterator (iterator_t* iterator,
- " WHERE config_preferences.config = %llu"
- " AND config_preferences.type = '%s'"
- " AND (config_preferences.name = nvt_preferences.name"
-- " OR config_preferences.name LIKE 'timeout.%')"
-+ " OR config_preferences.name LIKE 'timeout.%%')"
- " AND config_preferences.name != 'max_checks'"
- " AND config_preferences.name != 'max_hosts'"
- " UNION"
-
-diff --git a/src/manage_sql.c b/src/manage_sql.c
-index 99ee86f..3ce495c 100644
---- a/src/manage_sql.c
-+++ b/src/manage_sql.c
-@@ -28550,7 +28550,7 @@ report_port_count (report_t report)
- {
- return sql_int ("SELECT count (DISTINCT port) FROM results"
- " WHERE report = %llu AND port != ''"
-- " AND port NOT %s 'general/%';",
-+ " AND port NOT %s 'general/%%';",
- report,
- sql_ilike_op ());
- }
+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"