summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHasan ÇALIŞIR <hasan.calisir@psauxit.com>2019-08-12 17:37:30 +0300
committerJoonas Niilola <juippis@gentoo.org>2019-10-28 06:01:05 +0200
commit9f60645625d8b57750165eb8e60bc2b24136540d (patch)
treee4deeaa9c17180760bfbc1b02550138800406f03 /net-analyzer
parentdev-util/diffball: ${P} prefix distfiles (diff)
downloadgentoo-9f60645625d8b57750165eb8e60bc2b24136540d.tar.gz
gentoo-9f60645625d8b57750165eb8e60bc2b24136540d.tar.bz2
gentoo-9f60645625d8b57750165eb8e60bc2b24136540d.zip
net-analyzer/gvm-libs: new package.
openvas-libraries with version 10 has been renamed in Greenbone vulnerability management libraries (gvm-libs). Version bump to 10.0.1. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Hasan ÇALIŞIR <hasan.calisir@psauxit.com> Closes: https://bugs.gentoo.org/692004 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/gvm-libs/Manifest1
-rw-r--r--net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch11
-rw-r--r--net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild102
-rw-r--r--net-analyzer/gvm-libs/metadata.xml23
4 files changed, 137 insertions, 0 deletions
diff --git a/net-analyzer/gvm-libs/Manifest b/net-analyzer/gvm-libs/Manifest
new file mode 100644
index 000000000000..02d15c5c6a56
--- /dev/null
+++ b/net-analyzer/gvm-libs/Manifest
@@ -0,0 +1 @@
+DIST gvm-libs-10.0.1.tar.gz 198483 BLAKE2B 4f4ddc7a3a1b4d45a51868cf03844365a9c4dd07f17ab53957ac4a1452ecba595885abdf01402a78aa784163aaba60b5c452fb9c2b5a11d38c40706e820c22c2 SHA512 961570e8fa8f89f0b462991bff1bf4e512ed6419cff6871c7432899847fb9edcc9f0adb7c280d12ee69fbb5c8e306c9e4366e2cbbb05fc3bae06795dcfb42206
diff --git a/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch b/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch
new file mode 100644
index 000000000000..29c2a4cd83a6
--- /dev/null
+++ b/net-analyzer/gvm-libs/files/gvm-libs-10.0.1-pid.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt 2019-04-05 11:27:07.000000000 +0300
++++ b/CMakeLists.txt 2019-07-14 23:42:42.723081614 +0300
+@@ -172,7 +172,7 @@
+ endif (NOT DATADIR)
+
+ if (NOT GVM_PID_DIR)
+- set (GVM_PID_DIR "${LOCALSTATEDIR}/run")
++ set (GVM_PID_DIR "/var/lib/gvm")
+ endif (NOT GVM_PID_DIR)
+
+ if (NOT GVM_SYSCONF_DIR)
diff --git a/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild b/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild
new file mode 100644
index 000000000000..e62251e4c866
--- /dev/null
+++ b/net-analyzer/gvm-libs/gvm-libs-10.0.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+inherit cmake-utils flag-o-matic toolchain-funcs user
+
+DESCRIPTION="Greenbone vulnerability management libraries, previously named openvas-libraries"
+HOMEPAGE="https://www.greenbone.net/en/"
+SRC_URI="https://github.com/greenbone/gvm-libs/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2+"
+KEYWORDS="~amd64 ~x86"
+IUSE="extras ldap radius"
+
+DEPEND="
+ app-crypt/gpgme:=
+ dev-libs/hiredis
+ dev-libs/libgcrypt:=
+ dev-perl/UUID
+ net-libs/gnutls:=
+ net-libs/libssh:=
+ sys-libs/zlib
+ ldap? ( net-nds/openldap )
+ radius? ( net-dialup/freeradius-client )"
+
+RDEPEND="
+ ${DEPEND}
+ !net-analyzer/openvas-libraries"
+
+BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ extras? ( app-doc/doxygen[dot]
+ app-doc/xmltoman
+ app-text/htmldoc
+ dev-perl/CGI
+ dev-perl/SQL-Translator
+ )"
+
+PATCHES=(
+ # Creating pid on build time instead of relying daemon!
+ # QA fix for 10.0.1.
+ "${FILESDIR}/${P}-pid.patch"
+)
+
+pkg_setup() {
+ enewgroup gvm 495
+ enewuser gvm 495 -1 /var/lib/gvm gvm
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # QA-Fix | Remove doxygen warnings for !CLANG
+ if use extras; then
+ if ! tc-is-clang; then
+ local f
+ for f in doc/*.in
+ do
+ sed -i \
+ -e "s*CLANG_ASSISTED_PARSING = NO*#CLANG_ASSISTED_PARSING = NO*g" \
+ -e "s*CLANG_OPTIONS*#CLANG_OPTIONS*g" \
+ "${f}" || die "couldn't disable CLANG parsing"
+ done
+ fi
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
+ "-DLOCALSTATEDIR=${EPREFIX}/var"
+ "-DSYSCONFDIR=${EPREFIX}/etc"
+ $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
+ $(usex radius -DBUILD_WITHOUT_RADIUS=0 -DBUILD_WITHOUT_RADIUS=1)
+ )
+ # Add release hardening flags for 10.0.1
+ append-cflags -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector
+ append-ldflags -Wl,-z,relro -Wl,-z,now
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use extras; then
+ cmake-utils_src_make -C "${BUILD_DIR}" doc
+ cmake-utils_src_make doc-full -C "${BUILD_DIR}" doc
+ HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
+ fi
+ cmake-utils_src_make rebuild_cache
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # Set proper permissions on required files/directories
+ keepdir /var/lib/gvm
+ fowners -R gvm:gvm /var/lib/gvm
+}
diff --git a/net-analyzer/gvm-libs/metadata.xml b/net-analyzer/gvm-libs/metadata.xml
new file mode 100644
index 000000000000..dbbfe2e9f17b
--- /dev/null
+++ b/net-analyzer/gvm-libs/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>hasan.calisir@psauxit.com</email>
+ <name>Hasan ÇALIŞIR</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="extras">Html docs support</flag>
+ </use>
+ <longdescription lang="en">
+ This is the libraries module for the Greenbone Vulnerability Management Solution.
+ It is used for the Greenbone Security Manager appliances and provides various
+ functionalities to support the integrated service daemons.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">greenbone/gvm-libs</remote-id>
+ </upstream>
+</pkgmetadata>