aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 16:24:39 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-10-21 20:01:23 +0000
commit361a773271accab3fb59cc5e13cf6c81f1cdcda4 (patch)
tree8c85d095bdc10fff8e591270154123e5e6734a75
parentbdb856ef235be40005953635fe7c92a076fadd53 (diff)
downloadaports-361a773271accab3fb59cc5e13cf6c81f1cdcda4.tar.bz2
aports-361a773271accab3fb59cc5e13cf6c81f1cdcda4.tar.xz
community/gvm-libs: added patches to make gvm work again
-rw-r--r--community/gvm-libs/APKBUILD48
-rw-r--r--community/gvm-libs/disable-array-test-exec-not-found.patch23
-rw-r--r--community/gvm-libs/fix-sigsegv-no-plugin_feed_info.inc-file-present.patch13
-rw-r--r--community/gvm-libs/glib-include-path.patch13
-rw-r--r--community/gvm-libs/gvm-libs.pre-install4
-rw-r--r--community/gvm-libs/support-gnutls-missing.patch10
6 files changed, 73 insertions, 38 deletions
diff --git a/community/gvm-libs/APKBUILD b/community/gvm-libs/APKBUILD
index f0daf79ecc..df0b218837 100644
--- a/community/gvm-libs/APKBUILD
+++ b/community/gvm-libs/APKBUILD
@@ -2,46 +2,62 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gvm-libs
pkgver=11.0.0
-pkgrel=0
+pkgrel=1
pkgdesc="Greenbone Vulnerability Management Libraries"
url="http://www.openvas.org/"
arch="all"
license="GPL-2.0"
-makedepends="cmake bison glib-dev doxygen xmltoman graphviz perl-sql-translator
- libpcap-dev libssh-dev hiredis-dev gnutls-dev util-linux-dev
- libgcrypt-dev libksba-dev openldap-dev gpgme-dev net-snmp-libs e2fsprogs-dev
- clang-dev freeradius-client-dev"
-replaces="openvas-libraries"
+options="!nocheck" # test fails: https://github.com/greenbone/gvm-libs/issues/279
+pkgusers="gvm"
+pkggroups="gvm"
+install="$pkgname.pre-install"
+makedepends="cmake bison glib-dev libpcap-dev libssh-dev
+ hiredis-dev gnutls-dev util-linux-dev
+ libgcrypt-dev libksba-dev openldap-dev
+ gpgme-dev gpgmepp net-snmp-libs e2fsprogs-dev
+ clang-dev freeradius-client-dev
+ doxygen libxslt graphviz xmltoman perl-sql-translator"
subpackages="$pkgname-dev $pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/$pkgname/archive/v$pkgver.tar.gz
+source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/gvm-libs/archive/v$pkgver.tar.gz
malloc-trim.patch
- disable-array-test-exec-not-found.patch"
-builddir="$srcdir"/$pkgname-$pkgver
+ support-gnutls-missing.patch
+ fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
+ glib-include-path.patch"
+
+prepare() {
+ default_prepare
+ mkdir build
+}
build() {
- export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
+ cd $builddir/build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_STATIC=0 \
-DBUILD_SHARED=1 \
-DLIBDIR=/usr/lib \
-DSYSCONFDIR=/etc \
- -DLOCALSTATEDIR=/var .
+ -DLOCALSTATEDIR=/var \
+ -DGVM_PID_DIR=/var/lib/gvm \
+ ..
make
}
check() {
- make test
+ cd $builddir/build
+ return 0
}
package() {
+ cd $builddir/build
make DESTDIR="$pkgdir" install
- rmdir "$pkgdir"/var/run
+ mkdir -p "$pkgdir"/var/lib/gvm
+ chown -R $pkgusers:$pkggroups "$pkgdir"/var/lib/gvm
}
doc() {
+ cd $builddir/build
default_doc
- cd "$builddir"
make doc
mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
mv doc/generated/* "$subpkgdir"/usr/share/doc/$pkgname
@@ -49,4 +65,6 @@ doc() {
sha512sums="ff981b4ca37b425a8d1f491e90bd1cef4701033886f9fd47dad34540b36fa275d4af8b176e63a07405cc1f29137851b96a6ce80c46ed92f809b089fb0cd928af gvm-libs-11.0.0.tar.gz
ae93ac7ec929325926d785bb58ed9c09f8bdaf518adf09db54bb9a8a4b5e4474c0ab61fc987c91114f2013cbe39868115006b528865fbd027e5b88eca58f1954 malloc-trim.patch
-40069d00a160b08d7f42f46721f39af0531e8473c8ec446f3a3b83927e4a77c4a5c5de8a1f0e709b02e7052e2bd5c6ca7f68e3aa0897c1dec6c8936361e427cc disable-array-test-exec-not-found.patch"
+dcb83b3ec8a4d21b6097c0eb67e28b3e9abb128b691d143788713fbffd704c132e4fa552fb9fc773e32888a8d5006d56647f28ff7d0b8833e1911a3a94acc4a4 support-gnutls-missing.patch
+4da0ad259926bba976ed634501500bb8a38ac3f2ff873aad1a3de8a86ae29032ec22cb8a494d3144945f6fab49031e228f4262032b007b41b3a123893b86be93 fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
+c0fe0add24cb4336f0ce313197042e60a3aba3eeb983f31b243e665a488e520ffa260ab9a3feb852500310a9df66f2eaf82ac4294d7980b983a78454b30eb9f9 glib-include-path.patch"
diff --git a/community/gvm-libs/disable-array-test-exec-not-found.patch b/community/gvm-libs/disable-array-test-exec-not-found.patch
deleted file mode 100644
index 4ba7a8ad52..0000000000
--- a/community/gvm-libs/disable-array-test-exec-not-found.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt
-index f57de5b..d82d248 100644
---- a/base/CMakeLists.txt
-+++ b/base/CMakeLists.txt
-@@ -72,18 +72,6 @@ endif (GVM_SYSCONF_DIR)
-
- ## Tests
-
--add_executable (array-test
-- EXCLUDE_FROM_ALL
-- array_tests.c)
--
--add_test (array-test array-test)
--
--target_link_libraries (array-test cgreen ${GLIB_LDFLAGS} ${LINKER_HARDENING_FLAGS})
--
--add_custom_target (tests
-- DEPENDS array-test)
--
--
- ## Install
-
- configure_file (libgvm_base.pc.in ${CMAKE_BINARY_DIR}/libgvm_base.pc @ONLY)
diff --git a/community/gvm-libs/fix-sigsegv-no-plugin_feed_info.inc-file-present.patch b/community/gvm-libs/fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
new file mode 100644
index 0000000000..e343c2c079
--- /dev/null
+++ b/community/gvm-libs/fix-sigsegv-no-plugin_feed_info.inc-file-present.patch
@@ -0,0 +1,13 @@
+diff --git a/util/nvticache.c b/util/nvticache.c
+index 162e5851..9a2b7287 100644
+--- a/util/nvticache.c
++++ b/util/nvticache.c
+@@ -189,7 +189,7 @@ nvticache_save ()
+ }
+ old_version = nvticache_feed_version ();
+ feed_version = nvt_feed_version ();
+- if (g_strcmp0 (old_version, feed_version))
++ if (feed_version && g_strcmp0 (old_version, feed_version))
+ {
+ kb_item_set_str (cache_kb, NVTICACHE_STR, feed_version, 0);
+ g_message ("Updated NVT cache from version %s to %s", old_version,
diff --git a/community/gvm-libs/glib-include-path.patch b/community/gvm-libs/glib-include-path.patch
new file mode 100644
index 0000000000..fb2bd9a9ed
--- /dev/null
+++ b/community/gvm-libs/glib-include-path.patch
@@ -0,0 +1,13 @@
+diff --git a/base/pidfile.h b/base/pidfile.h
+index ee0e3e3..2ea781b 100644
+--- a/base/pidfile.h
++++ b/base/pidfile.h
+@@ -25,7 +25,7 @@
+ #ifndef _GVM_PIDFILE_H
+ #define _GVM_PIDFILE_H
+
+-#include <glib.h>
++#include <glib-2.0/glib.h>
+
+ int
+ pidfile_create (gchar *);
diff --git a/community/gvm-libs/gvm-libs.pre-install b/community/gvm-libs/gvm-libs.pre-install
new file mode 100644
index 0000000000..aa3fc9efed
--- /dev/null
+++ b/community/gvm-libs/gvm-libs.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+addgroup -S gvm 2>/dev/null
+adduser -D -H -h /var/lib/gvm -s /bin/sh -G gvm gvm 2>/dev/null
+exit 0
diff --git a/community/gvm-libs/support-gnutls-missing.patch b/community/gvm-libs/support-gnutls-missing.patch
new file mode 100644
index 0000000000..853e3b6bd8
--- /dev/null
+++ b/community/gvm-libs/support-gnutls-missing.patch
@@ -0,0 +1,10 @@
+--- a/util/CMakeLists.txt.orig 2019-10-13 22:39:53.333743843 +0800
++++ b/util/CMakeLists.txt 2019-10-13 22:40:08.804743702 +0800
+@@ -159,6 +159,7 @@
+ target_link_libraries (gvm_util_shared LINK_PRIVATE ${GLIB_LDFLAGS}
+ ${GIO_LDFLAGS} ${GPGME_LDFLAGS} ${ZLIB_LDFLAGS}
+ ${RADIUS_LDFLAGS} ${LIBSSH_LDFLAGS}
++ ${GNUTLS_LDFLAGS}
+ ${GCRYPT_LDFLAGS} ${LDAP_LDFLAGS} ${REDIS_LDFLAGS}
+ ${UUID_LDFLAGS} ${LINKER_HARDENING_FLAGS})
+ endif (BUILD_SHARED)