aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/gvm-libs/APKBUILD52
-rw-r--r--community/gvm-libs/malloc-trim.patch24
-rw-r--r--community/openvas-libraries/000-fortify-source.patch13
-rw-r--r--community/openvas-libraries/001-maxhostnamelen.patch12
-rw-r--r--community/openvas-libraries/002-timeval.patch13
-rw-r--r--community/openvas-libraries/APKBUILD46
6 files changed, 76 insertions, 84 deletions
diff --git a/community/gvm-libs/APKBUILD b/community/gvm-libs/APKBUILD
new file mode 100644
index 0000000000..408bd692cb
--- /dev/null
+++ b/community/gvm-libs/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
+pkgname=gvm-libs
+pkgver=10.0.0
+pkgrel=0
+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"
+replaces="openvas-libraries"
+subpackages="$pkgname-dev $pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/$pkgname/archive/v$pkgver.tar.gz
+ malloc-trim.patch"
+builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_STATIC=0 \
+ -DBUILD_SHARED=1 \
+ -DLIBDIR=/usr/lib \
+ -DSYSCONFDIR=/etc \
+ -DLOCALSTATEDIR=/var .
+ make
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ rmdir "$pkgdir"/var/run
+}
+
+doc() {
+ default_doc
+ cd "$builddir"
+ make doc
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
+ mv doc/generated/* "$subpkgdir"/usr/share/doc/$pkgname
+}
+sha512sums="18ada48bea523ab22b886ca4f6c72724cfd18269d78c29b71d30ce2898b3056c4354a41992c42a0c55ade08f17cb8f7f056e73752c768cf043b6b9d2955a76b4 gvm-libs-10.0.0.tar.gz
+ae93ac7ec929325926d785bb58ed9c09f8bdaf518adf09db54bb9a8a4b5e4474c0ab61fc987c91114f2013cbe39868115006b528865fbd027e5b88eca58f1954 malloc-trim.patch"
diff --git a/community/gvm-libs/malloc-trim.patch b/community/gvm-libs/malloc-trim.patch
new file mode 100644
index 0000000000..fb566b50b0
--- /dev/null
+++ b/community/gvm-libs/malloc-trim.patch
@@ -0,0 +1,24 @@
+diff --git a/base/hosts.c b/base/hosts.c
+index 74f5d92..1073e2c 100644
+--- a/base/hosts.c
++++ b/base/hosts.c
+@@ -1013,7 +1013,9 @@ gvm_hosts_deduplicate (gvm_hosts_t *hosts)
+ hosts->count -= duplicates;
+ hosts->removed += duplicates;
+ hosts->current = 0;
++#ifdef __GLIBC__
+ malloc_trim (0);
++#endif
+ }
+
+ /**
+@@ -1208,7 +1210,9 @@ gvm_hosts_new_with_max (const gchar *hosts_str, unsigned int max_hosts)
+ gvm_hosts_deduplicate (hosts);
+
+ g_strfreev (split);
++#ifdef __GLIBC__
+ malloc_trim (0);
++#endif
+ return hosts;
+ }
+
diff --git a/community/openvas-libraries/000-fortify-source.patch b/community/openvas-libraries/000-fortify-source.patch
deleted file mode 100644
index 26ceb25ca9..0000000000
--- a/community/openvas-libraries/000-fortify-source.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a85088f..9d47f3a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -302,7 +302,7 @@ if (NOT MINGW)
-
- endif (NOT MINGW)
-
--set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
-+set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
- set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
-
-
diff --git a/community/openvas-libraries/001-maxhostnamelen.patch b/community/openvas-libraries/001-maxhostnamelen.patch
deleted file mode 100644
index 373554d4ab..0000000000
--- a/community/openvas-libraries/001-maxhostnamelen.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/misc/pcap.c b/misc/pcap.c
-index 125ea24..fa24299 100644
---- a/misc/pcap.c
-+++ b/misc/pcap.c
-@@ -16,6 +16,7 @@
- * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-+#include <sys/param.h>
- #include <netinet/in.h>
- #include <resolv.h>
- #include <pcap.h>
diff --git a/community/openvas-libraries/002-timeval.patch b/community/openvas-libraries/002-timeval.patch
deleted file mode 100644
index 937473da6f..0000000000
--- a/community/openvas-libraries/002-timeval.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/nasl/proto.h b/nasl/proto.h
-index cb16a3e..f293782 100644
---- a/nasl/proto.h
-+++ b/nasl/proto.h
-@@ -24,7 +24,7 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
--#include <time.h>
-+#include <sys/time.h>
- #include "smb.h"
- /*implemented in genrand.c*/
- void generate_random_buffer_ntlmssp( unsigned char *out, int len);
diff --git a/community/openvas-libraries/APKBUILD b/community/openvas-libraries/APKBUILD
deleted file mode 100644
index f03868770b..0000000000
--- a/community/openvas-libraries/APKBUILD
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor: Francesco Colista <fcolista@alpinelinux.org>
-# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
-pkgname=openvas-libraries
-_pkgname=gvm-libs
-pkgver=9.0.3
-pkgrel=2
-pkgdesc="OpenVAS libraries"
-url="http://www.openvas.org/"
-arch="all"
-license="GPL"
-makedepends="cmake bison glib-dev doxygen xmltoman 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"
-replaces="gvm-libs"
-subpackages="$pkgname-dev $pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/greenbone/$_pkgname/archive/v$pkgver.tar.gz
- 001-maxhostnamelen.patch
- 002-timeval.patch"
-builddir="$srcdir"/$_pkgname-$pkgver
-
-build() {
- cd "$builddir"
- export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
- cmake -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_STATIC=0 \
- -DBUILD_SHARED=1 \
- -DLIBDIR=/usr/lib \
- -DSYSCONFDIR=/etc \
- -DLOCALSTATEDIR=/var .
- make
-}
-
-check() {
- cd "$builddir"
- make test
-}
-
-package() {
- cd "$builddir"
- make DESTDIR="$pkgdir/" install
- rmdir "$pkgdir"/var/run
-}
-sha512sums="bca213309e06a39d2dcd790cacb01f2a71471622887424e41cc025a2bc25feb6a9b2c1d904f739df6fd87d8ec7af5171b31d1f5d08411c5143e4be1e6723397a openvas-libraries-9.0.3.tar.gz
-1e27ced30f20f0010a04abd17a9a2c4d90e5d159d341018fa1f66b887ef8b24b490297a27b9dbb241dbd88e33c363c06fa0e7345707792411bda4825b770edea 001-maxhostnamelen.patch
-2316c4808627da9a2daf0ea971fd9856cd77a62d6376f0d186c18fd7f90be217df2a17ccd2fccc88a583a830c593cb93b32d867ce5f0dd3ecb43cd75fa2b83ea 002-timeval.patch"