From b7b97785ebbb2f11d24d14dab8b81ed274f4ce6a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 19 Mar 2019 11:37:34 +0000 Subject: gentoo resync : 19.03.2019 --- net-analyzer/openvas-libraries/Manifest | 11 ++- .../openvas-libraries/files/OPENVAS.gentoo | 106 +++++++++++++++++++++ .../files/openvas-libraries-9.0.3-cachedir.patch | 18 ++++ .../files/openvas-libraries-9.0.3-gcc8.patch | 73 ++++++++++++++ .../files/openvas-libraries-9.0.3-netsnmp.patch | 11 +++ .../files/openvas-libraries-9.0.3-rpath.patch | 11 +++ .../files/openvas-libraries-9.0.3-rundir.patch | 45 +++++++++ .../openvas-libraries-9.0.3-underlinking.patch | 47 +++++++++ net-analyzer/openvas-libraries/metadata.xml | 14 ++- .../openvas-libraries-9.0.3-r1.ebuild | 94 ++++++++++++++++++ 10 files changed, 428 insertions(+), 2 deletions(-) create mode 100644 net-analyzer/openvas-libraries/files/OPENVAS.gentoo create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch create mode 100644 net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch create mode 100644 net-analyzer/openvas-libraries/openvas-libraries-9.0.3-r1.ebuild (limited to 'net-analyzer/openvas-libraries') diff --git a/net-analyzer/openvas-libraries/Manifest b/net-analyzer/openvas-libraries/Manifest index bdd060062ae2..7847a3023089 100644 --- a/net-analyzer/openvas-libraries/Manifest +++ b/net-analyzer/openvas-libraries/Manifest @@ -1,6 +1,15 @@ +AUX OPENVAS.gentoo 3648 BLAKE2B 69e29eec91e2384c7cc984cc09d8338865049d627662412748a2d16fea3043c832a448d52bba5795d0e20d2429525470bc8ce73fc321838853019136c5e06f3c SHA512 b81ef24a80c3774dc31dc2193e19767fb90fb2aa783f827fc45d2e54450b3f27789da8eb394708741ff6e96e86dd46b6b94c1f675ccf077a965b0825aa8c32b2 AUX openvas-libraries-7.0.4-libssh.patch 664 BLAKE2B e1d0c53fbf665685514337d5491092f9ff6411e4f3fcbdf9f2148777478a84d53b1c11edf0769901ebe258df0fccf2f6d68e2aaba2cd654456d033169d27980a SHA512 5306452c48a5db599b74e7a4dcaf28fb1848238fce7c33c8ccdaac18629e5bea2ad82c619620703309b5bb19fca9356da4518a7c3a180e038309f433a0896a40 AUX openvas-libraries-8.0.1-include.patch 3363 BLAKE2B b79ca4d652d04631343e6d918b34768d171a7a12ad2abe037e1d60b394044d1cbcde7b9ea6a50b33fa65b9b1746feba86d4fc388540c82fe9f0f7fb335c5086d SHA512 f3427464c1d3cdc875d4ef56d831e3dabed6431ef75450d86d2ba977379579e0b9f15544a22d336c24849b5aef08824139a18c137f62081718e5663e141cf114 AUX openvas-libraries-8.0.5-underlinking.patch 1966 BLAKE2B fef13eb8eb768da537e223d85a99f5759412884dc7c56fbd03276dea7f9afa000f9e5d791ea54aab7c0ca04e53701c45da823adc29d5964eeb0903ddce8f56c1 SHA512 ca917e7615aff2f056aac8fe15f5e7670e2df7e260886155dbe8331121ef8bb8809ca7bf3bea4baa5c159c7c5e0e5fac6459d3c34080a41893dd612b0662d55d +AUX openvas-libraries-9.0.3-cachedir.patch 793 BLAKE2B 1891f7d81f328f3b2bb63972478fab7763e17710a420aa7e592beb681b514b3361dd570d3b99fe9bd31b0ce7ff32905a23ca23cb6dd02eda04b2495305cdd0f2 SHA512 412d07104d4ce226ee95d84728308b43e51931d4705601e16b35fbad30a49d943831fa7c8f183e41e00c249bf0d3f3786eab5184ede8a2a9c5574a124c43c4ad +AUX openvas-libraries-9.0.3-gcc8.patch 2288 BLAKE2B 1b5fb4e77cbba1ef5a80217225f726be14e3fa8a79280d6433ae7f5a89edc0bcf0c2e26b48f28ddbee515962ae9b0ac2dbf5b06df666369ca3327469a509f2dc SHA512 7e2a3d3df6db4ed64263cc99df13e0e0c1c80be25257f1d6b1034b9aa63ca68b8a42376f50b95c8357542a97abfa42fc2ba379a7c16af931bf61e08fa8a417e4 +AUX openvas-libraries-9.0.3-netsnmp.patch 424 BLAKE2B 2fca08ace15ebe55891678e55b3324b1d4da817468788b13d009a4fbe1c35c90b6a022ddf3b7d3dc3c6fb9d500e04834cc729364341b7fc1e2e066907f9a891e SHA512 b80e00c267e1848474485cc3153d659672a20ef536e6e4bec81b737360dc908027be49c0723b04b0a7cdf317f97c3d6a76204cfbed1b60ed88db65421788e3ae +AUX openvas-libraries-9.0.3-rpath.patch 440 BLAKE2B 661d4b84ca3795dbfdd5830443259adfa30777475d063a3af14773e632948be836bd752f781fc2e8249587cae659faba18f5a340bf5fb83db4ad992ad694b87b SHA512 e2bf434ce4d7aac98c66b7175e475beab26a3d3ad680c088962a080f53528ae073f9e626d9235608151c312fbba8c51f8ca0dc0445a3c871148b8d2ae5ddf565 +AUX openvas-libraries-9.0.3-rundir.patch 1735 BLAKE2B d203bae1ee34f259ef6d6142004358d7617e1323239a6c0df87a76a7b4379277a7f4f414c6e2402f9dfa249d4df5db73c38664ee2a7e72aa29ce55fed844710c SHA512 0626e82f15e8be1c8b0e55e1a4daac78e3d848b46d6b5c039ee8e76c0891fb2dd6c51dc4096a5a1eadc9ab9c34d4313b4c93be68bdf3364a303e2572908628c1 +AUX openvas-libraries-9.0.3-underlinking.patch 2053 BLAKE2B 036fc4eab61063b330667a0c3c1a11ed0b559b61149dafa21df3fbd806f4f7cf58c50b23d9db4c17dd0dadce04725600bf362c9aced75b64ae8458946a4fbdbc SHA512 225dd41b2d96cfcf1031a0e2bf2f338ff30612fb03ce969ff4c292e10149c57f85560f0df98e697ab7dfb0a8c1ee82ccb3286bb3d1b652df902a8bc594c2e44f DIST openvas-libraries-8.0.5.tar.gz 603947 BLAKE2B 493a6b2f5cea7e78ce69b9fe730a4d6df89601e0c48cfbc3b0ab1480326c32bb479768c4a54d08bfcb67db0b2ad4ca28990ead57554abd9fd877e7f79b339d8f SHA512 3d788f931c55941663187f8038c15d0ff97799048c8ea9e5615ff22de3c5e6b5e4eaa599e41676778fadc50528c086060b6268b5edfbaf7289f0e498dbb1423b +DIST openvas-libraries-9.0.3.tar.gz 643948 BLAKE2B c05fbcd2a1b9c2292ac2d7ea3c7f4fe2ff4c5a41b0dd5610283712ce136fe4184d46b9fdcfb74bf2a4a6d7c016497df31caff121d9c7b013280164b49f874f4f SHA512 bca213309e06a39d2dcd790cacb01f2a71471622887424e41cc025a2bc25feb6a9b2c1d904f739df6fd87d8ec7af5171b31d1f5d08411c5143e4be1e6723397a EBUILD openvas-libraries-8.0.5.ebuild 1262 BLAKE2B 21f6520e857d2b940280d6e9d6a1dbe7f7e52337589e9b66c2c136f63c717e5a6bc5abc22afdc3792dd1722ed2e154709464274e6fc045f64cf5b2d91f56f763 SHA512 b060bf8c8b5986ed901a11d222274a1ae018fc9d2ed92e9204567c25d5ac79f1e7dbb20ba77d8943a2335c9639a43be120d226e2537ef4ea309f7a44f39c7273 -MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 +EBUILD openvas-libraries-9.0.3-r1.ebuild 2046 BLAKE2B f2b7af911415b45e18868eeb6cc134c56110bca8ddb76f1a140229fce83ba08c0d9d3a217a19ce79f2d43b1f90d2818ef5fab4a2b8d4d1dd8d88b15ab5342756 SHA512 bb1518514b41fac1dcb9fde05b64e2f3c0f6aa6cbdb9a47710e7d0bd6314edfccca46c6841b528b712e36fa1840fb2f51b32189b7b70820dbfa443cd1c394577 +MISC metadata.xml 541 BLAKE2B 79eea1b719e8891759105135f233184f63e819370efebb46bad6bea7425b37ffbf9122444c3e9379953ccd30555b1a840297dc74ac3abccd1afc842fa2a2d16b SHA512 4b3f65acd3a359fbc7d69ebad4dcfc1866837605b8a413999372d451ffba322f50ea72f5372370afe1385991d2b1be87e05de265e12fc989f6f1a5a1d16c1f99 diff --git a/net-analyzer/openvas-libraries/files/OPENVAS.gentoo b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo new file mode 100644 index 000000000000..ab3f4c8918c7 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo @@ -0,0 +1,106 @@ +----------------------------------------------------------------- +--------------------------IMPORTANT------------------------------ +----------------------------------------------------------------- +You will need to set up your /etc/redis.conf file properly before +running openvas-scanner for the first time. +For details, please see the example config file installed to: +--> /etc/openvas/redis.conf.example +Please configure /etc/openvas/openvassd.conf properly +according to redis listening unix socket. +e.g. /etc/openvas/openvassd.conf --> kb_location = /tmp/redis.sock +If you use first-start script it will check various issues and +automatically setup OpenVAS for first time use. +GSA(Greenbone Security Agent) WebUI listens port +9392(local) default. If you want to use nginx reverse proxy +to reach WebUI please see the example config file +--> /etc/openvas/gsa.nginx.reverse.proxy.example +otherwise you can change port to 443 or 80. + +----------------------------------------------------------------- +---------------------------SCRIPTS------------------------------- +----------------------------------------------------------------- +'first-start' +--> Automatically setup OpenVAS for first time use +--> Installed in /etc/openvas/scripts + +'openvas-feed-sync' +--> Updates Feeds | You can add this to cron +--> Installed in /etc/openvas/scripts + +----------------------------------------------------------------- +----------ENVIRONMENT SETTINGS FOR SYSTEMD & OPEN-RC------------- +----------------------------------------------------------------- +'openvas-scanner-daemon.conf' +--> OpenVAS Scanner systemd daemon settings +--> Installed in /etc/openvas/sysconfig + +'gvmd-daemon.conf' +--> OpenVAS Manager systemd daemon settings +--> Installed in /etc/openvas/sysconfig + +'gsa-daemon.conf +--> Greenbone Security Agent systemd daemon settings +--> Installed in /etc/openvas/sysconfig + +'openvas-scanner' +--> OpenVAS Scanner open-rc daemon settings +--> Installed in /etc/config.d + +'gvmd' +--> OpenVAS Manager open-rc daemon settings +--> Installed in /etc/config.d + +'gsa' +--> Greenbone Security Agent systemd daemon settings +--> Installed in /etc/config.d + +----------------------------------------------------------------- +--------QUICK START COMMANDS (IF YOU DON'T USE SCRIPTS)---------- +----------------------------------------------------------------- +'env-update && source /etc/profile' +--> Update PATHS + +'openvas-manage-certs -a' +--> Create certificates automatically first time + +'greenbone-nvt-sync' +--> Update NVT Feed + +'greenbone-scapdata-sync' +--> Update scapdata Feed + +'greenbone-certdata-sync' +--> Update certdata Feed + +'openvassd --foreground --only-cache' +--> Generate initial NVT cache and quit + +'rc-service openvas-scanner start or systemctl start openvas-scanner' +--> Start OpenVAS-Scanner + +'openvasmd --rebuild --progress' +--> Initialize the Database + +'openvasmd --create-user=admin --role=Admin' +--> Create User for WEBUI.Save your password + +'rc-service gvmd start or systemctl start gvmd' +--> Start OpenVAS-Manager + +'rc-service gsa start or systemctl start gsa' +--> Start the Greenbone Security Assistant + +----------------------------------------------------------------- +---------------------PLUGIN KEY AND SIGNING---------------------- +----------------------------------------------------------------- +'gpg --homedir=/etc/openvas/gnupg --gen-key' +--> Generate Key + +'wget https://www.greenbone.net/GBCommunitySigningKey.asc' +--> Official OpenVAS Transfer Key + +'gpg --homedir=/etc/openvas/gnupg --import GBCommunitySigningKey.asc' +--> Import OpenVAS Transfer Key + +'gpg --homedir=/etc/openvas/gnupg --lsign-key 0ED1E580' +--> Sign diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch new file mode 100644 index 000000000000..34fc9f68f437 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch @@ -0,0 +1,18 @@ +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:40:41.981031382 +0300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:44:08.867074208 +0300 +@@ -173,7 +173,6 @@ + set (OPENVAS_DATA_DIR "${DATADIR}/openvas") + set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas") + set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas") +-set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas") + set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas") + + set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}") +@@ -330,7 +329,6 @@ + + install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR}) + install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR}) +-install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR}) + install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR}) + install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR}) + install (DIRECTORY diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch new file mode 100644 index 000000000000..a2809087f820 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch @@ -0,0 +1,73 @@ +--- gvm-libs-9.0.3/nasl/nasl_isotime.c 2018-08-29 19:01:12.000000000 +0300 ++++ gvm-libs-9.0.3/nasl/nasl_isotime.c 2019-02-01 21:11:40.460358131 +0300 +@@ -102,9 +102,13 @@ + struct tm *tp; + + tp = gmtime (&atime); +- snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", ++ if (snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", + 1900 + tp->tm_year, tp->tm_mon+1, tp->tm_mday, +- tp->tm_hour, tp->tm_min, tp->tm_sec); ++ tp->tm_hour, tp->tm_min, tp->tm_sec) < 0) ++ { ++ *timebuf = '\0'; ++ return; ++ } + } + } + +@@ -480,8 +484,9 @@ + || year < 0 || month < 1 || day < 1) + return 1; + +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", +- year, month, day, hour, minute, sec); ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", ++ year, month, day, hour, minute, sec) < 0) ++ return 1; + return 0; + } + +@@ -519,8 +524,9 @@ + || year < 0 || month < 1 || day < 1) + return 1; + +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", +- year, month, day, hour, minute, sec); ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", ++ year, month, day, hour, minute, sec) < 0) ++ return 1; + return 0; + } + +@@ -558,13 +564,14 @@ + || year < 0 || month < 1 || day < 1) + return 1; + +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", +- year, month, day, hour, minute, sec); ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d", ++ year, month, day, hour, minute, sec) < 0) ++ return 1; + return 0; + } + + +- ++ + /** + * @brief Return the current time in ISO format + * @naslfn{isotime_now} +@@ -784,9 +791,9 @@ + memcpy (timebuf, string, ISOTIME_SIZE -1); + timebuf[ISOTIME_SIZE - 1] = 0; + +- nyears = get_int_local_var_by_name (lexic, "years", 0); +- ndays = get_int_local_var_by_name (lexic, "days", 0); +- nseconds = get_int_local_var_by_name (lexic, "seconds", 0); ++ nyears = get_int_var_by_name (lexic, "years", 0); ++ ndays = get_int_var_by_name (lexic, "days", 0); ++ nseconds = get_int_var_by_name (lexic, "seconds", 0); + + if (nyears && add_years_to_isotime (timebuf, nyears)) + return NULL; diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch new file mode 100644 index 000000000000..69305576d0d7 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch @@ -0,0 +1,11 @@ +--- gvm-libs-9.0.3/CMakeLists.txt 2018-08-29 19:01:12.000000000 +0300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-01 20:58:45.946113012 +0300 +@@ -238,7 +238,7 @@ + OUTPUT_STRIP_TRAILING_WHITESPACE) + + message (STATUS "Looking for netsnmp...") +- find_library (SNMP snmp) ++ find_library (SNMP netsnmp) + message (STATUS "Looking for netsnmp... ${SNMP}") + if (SNMP) + execute_process (COMMAND net-snmp-config --libs diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch new file mode 100644 index 000000000000..e14e2965e9fe --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch @@ -0,0 +1,11 @@ +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:42:27.367627369 +0300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:45:48.961135211 +0300 +@@ -80,7 +80,7 @@ + # TODO: Check pkg-config (maybe with code like in gsa/CMakeLists.txt). + + ## CPack configuration +- ++set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) + set (CPACK_CMAKE_GENERATOR "Unix Makefiles") + set (CPACK_GENERATOR "TGZ") + set (CPACK_INSTALL_CMAKE_PROJECTS ".;openvas-libraries;ALL;/") diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch new file mode 100644 index 000000000000..6ecdc8a64219 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch @@ -0,0 +1,45 @@ +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:50:41.230530261 +0300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:55:08.649433070 +0300 +@@ -162,9 +162,9 @@ + set (DATADIR "${CMAKE_INSTALL_PREFIX}/share") + endif (NOT DATADIR) + +-if (NOT OPENVAS_PID_DIR) +- set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run") +-endif (NOT OPENVAS_PID_DIR) ++#if (NOT OPENVAS_PID_DIR) ++# set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run") ++#endif (NOT OPENVAS_PID_DIR) + + #if (NOT SYSCONFDIR) + # set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc") +--- gvm-libs-9.0.3/base/pidfile.c 2018-08-29 19:01:12.000000000 +0300 ++++ gvm-libs-9.0.3/base/pidfile.c 2019-02-04 15:08:04.600958560 +0300 +@@ -59,7 +59,7 @@ + pidfile_create (gchar * daemon_name) + { + gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL); +- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL); ++ gchar *pidfile_name = g_build_filename (name_pid, NULL); + FILE *pidfile = g_fopen (pidfile_name, "w"); + + g_free (name_pid); +@@ -88,7 +88,7 @@ + pidfile_remove (gchar * daemon_name) + { + gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL); +- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL); ++ gchar *pidfile_name = g_build_filename (name_pid, NULL); + gchar *pidfile_contents; + + g_free (name_pid); +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:39.776282496 +0300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:23.160269081 +0300 +@@ -329,7 +329,6 @@ + + install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR}) + install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR}) +-install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR}) + install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR}) + install (DIRECTORY + DESTINATION ${OPENVAS_SYSCONF_DIR}/gnupg diff --git a/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch new file mode 100644 index 000000000000..e3c25f9b9c41 --- /dev/null +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch @@ -0,0 +1,47 @@ +--- gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:11:20.848707365 +0300 ++++ gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:40:27.745955904 +0300 +@@ -88,7 +88,7 @@ + assuan libgpg-error ole32 ws2_32 ffi z shlwapi dnsapi winmm) + target_link_libraries (openvas_base_shared ${W32LIBS}) + else (MINGW) +- target_link_libraries (openvas_base_shared LINK_PRIVATE ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS}) ++ target_link_libraries (openvas_base_shared LINK_PRIVATE ${LIBSSH_LDFLAGS} ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS}) + endif (MINGW) + endif (BUILD_SHARED) + +@@ -102,10 +102,10 @@ + + # Link the test-hosts executable + # TODO: This is currently only built for BUILD_SHARED +-if (BUILD_SHARED) +- add_executable (test-hosts test-hosts.c) +- target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS}) +-endif (BUILD_SHARED) ++#if (BUILD_SHARED) ++# add_executable (test-hosts test-hosts.c) ++# target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS}) ++#endif (BUILD_SHARED) + + ## Install + if (BUILD_STATIC) +@@ -123,3 +123,4 @@ + endif (BUILD_SHARED) + + ## End ++ +--- gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:11:20.847707368 +0300 ++++ gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:49:34.035071570 +0300 +@@ -146,7 +146,7 @@ + else (MINGW) + target_link_libraries (openvas_misc_shared LINK_PRIVATE ${GNUTLS_LDFLAGS} openvas_base_shared ${UUID_LDFLAGS} + ${GLIB_LDFLAGS} ${PCAP_LDFLAGS} ${LIBSSH_LDFLAGS} ${LDAP_LDFLAGS} +- ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS} ++ ${REDIS_LDFLAGS} ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS} + ${LINKER_HARDENING_FLAGS}) + endif (MINGW) + endif (BUILD_SHARED) +@@ -198,3 +198,4 @@ + ARCHIVE DESTINATION ${LIBDIR} + PUBLIC_HEADER DESTINATION "${INCLUDEDIR}/openvas/misc") + endif (BUILD_SHARED) ++ diff --git a/net-analyzer/openvas-libraries/metadata.xml b/net-analyzer/openvas-libraries/metadata.xml index 6f49eba8f496..c71bb473eca2 100644 --- a/net-analyzer/openvas-libraries/metadata.xml +++ b/net-analyzer/openvas-libraries/metadata.xml @@ -1,5 +1,17 @@ - + + hasan.calisir@psauxit.com + Hasan ÇALIŞIR + + + proxy-maint@gentoo.org + Proxy Maintainers + + + Html docs support + Enable support for ldap + Enable support for radius + diff --git a/net-analyzer/openvas-libraries/openvas-libraries-9.0.3-r1.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3-r1.ebuild new file mode 100644 index 000000000000..8f1d7043fc10 --- /dev/null +++ b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3-r1.ebuild @@ -0,0 +1,94 @@ +# 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 +MY_PN="gvm-libs" + +DESCRIPTION="A remote security scanner for Linux (openvas-libraries)" +HOMEPAGE="http://www.openvas.org/" +SRC_URI="https://github.com/greenbone/${MY_PN}/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:0= + dev-libs/libksba + dev-perl/UUID + net-analyzer/net-snmp + net-libs/gnutls:=[tools] + net-libs/libpcap + net-libs/libssh:= + sys-libs/zlib + extras? ( dev-perl/CGI ) + ldap? ( net-nds/openldap ) + radius? ( net-dialup/freeradius-client )" + +RDEPEND=" + ${DEPEND}" + +BDEPEND=" + sys-devel/bison + sys-devel/flex + virtual/pkgconfig + extras? ( app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + dev-perl/SQL-Translator + )" + +PATCHES=( + "${FILESDIR}/${P}-gcc8.patch" + "${FILESDIR}/${P}-netsnmp.patch" + "${FILESDIR}/${P}-cachedir.patch" + "${FILESDIR}/${P}-rundir.patch" + "${FILESDIR}/${P}-underlinking.patch" + "${FILESDIR}/${P}-rpath.patch" +) + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" + +src_prepare() { + cmake-utils_src_prepare + if use extras; then + doxygen -u "$S"/doc/Doxyfile_full.in || die + 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) + ) + 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 +} + +src_install() { + cmake-utils_src_install + + insinto /usr/share/openvas + doins "${FILESDIR}"/OPENVAS.gentoo + + keepdir /var/lib/openvas/gnupg + keepdir /var/log/openvas +} -- cgit v1.2.3