Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/openvas-libraries/, net-analyzer/openvas-libraries/files/
Date: Wed, 13 Mar 2019 14:59:17
Message-Id: 1552489107.bdb9f0c42f339d8752d912f99c145e4d5d7643b9.monsieurp@gentoo
1 commit: bdb9f0c42f339d8752d912f99c145e4d5d7643b9
2 Author: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit <DOT> com>
3 AuthorDate: Thu Feb 7 01:50:12 2019 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 13 14:58:27 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdb9f0c4
7
8 net-analyzer/openvas-libraries: version bump to 9.0.3.
9
10 Bump to 9.0.3.
11
12 This also fixes cmake bug 663446 and introduces the new USE flags
13 'extras' 'ldap' 'radius'.
14
15 Introduces six new patches which fixes build and QA issues:
16 - gcc8.patch fixes gcc-8 build issue.
17 - netsnmp.patch fixes cmake netsnmp name issue.
18 - cachedir.patch fixes unnecessary directory install QA issue.
19 - rundir.patch fixes unnecessary directory install QA issue.
20 - rpath.patch fixes insecure rpath QA issue.
21 - underlinking.patch fixes linking issue.
22
23 Because of new dependencies ~arm ~ppc keywords have been
24 dropped.
25
26 This package is part of net-analyzer/openvas.
27
28 Reported-by: Toralf Förster <toralf <AT> gentoo.org>
29 Reported-by: NP-Hardass <np-hardass <AT> gentoo.org>
30 Acked-by: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit.com>
31 Closes: https://bugs.gentoo.org/663446
32 Tested-by: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit.com>
33 Signed-off-by: Hasan ÇALIŞIR <hasan.calisir <AT> psauxit.com>
34 Package-Manager: Portage-2.3.51, Repoman-2.3.11
35 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
36
37 net-analyzer/openvas-libraries/Manifest | 1 +
38 .../openvas-libraries/files/OPENVAS.gentoo | 106 +++++++++++++++++++++
39 .../files/openvas-libraries-9.0.3-cachedir.patch | 18 ++++
40 .../files/openvas-libraries-9.0.3-gcc8.patch | 73 ++++++++++++++
41 .../files/openvas-libraries-9.0.3-netsnmp.patch | 11 +++
42 .../files/openvas-libraries-9.0.3-rpath.patch | 11 +++
43 .../files/openvas-libraries-9.0.3-rundir.patch | 45 +++++++++
44 .../openvas-libraries-9.0.3-underlinking.patch | 47 +++++++++
45 net-analyzer/openvas-libraries/metadata.xml | 14 ++-
46 .../openvas-libraries-9.0.3.ebuild | 93 ++++++++++++++++++
47 10 files changed, 418 insertions(+), 1 deletion(-)
48
49 diff --git a/net-analyzer/openvas-libraries/Manifest b/net-analyzer/openvas-libraries/Manifest
50 index 516be95f4c1..2f17b77b5a7 100644
51 --- a/net-analyzer/openvas-libraries/Manifest
52 +++ b/net-analyzer/openvas-libraries/Manifest
53 @@ -1 +1,2 @@
54 DIST openvas-libraries-8.0.5.tar.gz 603947 BLAKE2B 493a6b2f5cea7e78ce69b9fe730a4d6df89601e0c48cfbc3b0ab1480326c32bb479768c4a54d08bfcb67db0b2ad4ca28990ead57554abd9fd877e7f79b339d8f SHA512 3d788f931c55941663187f8038c15d0ff97799048c8ea9e5615ff22de3c5e6b5e4eaa599e41676778fadc50528c086060b6268b5edfbaf7289f0e498dbb1423b
55 +DIST openvas-libraries-9.0.3.tar.gz 643948 BLAKE2B c05fbcd2a1b9c2292ac2d7ea3c7f4fe2ff4c5a41b0dd5610283712ce136fe4184d46b9fdcfb74bf2a4a6d7c016497df31caff121d9c7b013280164b49f874f4f SHA512 bca213309e06a39d2dcd790cacb01f2a71471622887424e41cc025a2bc25feb6a9b2c1d904f739df6fd87d8ec7af5171b31d1f5d08411c5143e4be1e6723397a
56
57 diff --git a/net-analyzer/openvas-libraries/files/OPENVAS.gentoo b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo
58 new file mode 100644
59 index 00000000000..ab3f4c8918c
60 --- /dev/null
61 +++ b/net-analyzer/openvas-libraries/files/OPENVAS.gentoo
62 @@ -0,0 +1,106 @@
63 +-----------------------------------------------------------------
64 +--------------------------IMPORTANT------------------------------
65 +-----------------------------------------------------------------
66 +You will need to set up your /etc/redis.conf file properly before
67 +running openvas-scanner for the first time.
68 +For details, please see the example config file installed to:
69 +--> /etc/openvas/redis.conf.example
70 +Please configure /etc/openvas/openvassd.conf properly
71 +according to redis listening unix socket.
72 +e.g. /etc/openvas/openvassd.conf --> kb_location = /tmp/redis.sock
73 +If you use first-start script it will check various issues and
74 +automatically setup OpenVAS for first time use.
75 +GSA(Greenbone Security Agent) WebUI listens port
76 +9392(local) default. If you want to use nginx reverse proxy
77 +to reach WebUI please see the example config file
78 +--> /etc/openvas/gsa.nginx.reverse.proxy.example
79 +otherwise you can change port to 443 or 80.
80 +
81 +-----------------------------------------------------------------
82 +---------------------------SCRIPTS-------------------------------
83 +-----------------------------------------------------------------
84 +'first-start'
85 +--> Automatically setup OpenVAS for first time use
86 +--> Installed in /etc/openvas/scripts
87 +
88 +'openvas-feed-sync'
89 +--> Updates Feeds | You can add this to cron
90 +--> Installed in /etc/openvas/scripts
91 +
92 +-----------------------------------------------------------------
93 +----------ENVIRONMENT SETTINGS FOR SYSTEMD & OPEN-RC-------------
94 +-----------------------------------------------------------------
95 +'openvas-scanner-daemon.conf'
96 +--> OpenVAS Scanner systemd daemon settings
97 +--> Installed in /etc/openvas/sysconfig
98 +
99 +'gvmd-daemon.conf'
100 +--> OpenVAS Manager systemd daemon settings
101 +--> Installed in /etc/openvas/sysconfig
102 +
103 +'gsa-daemon.conf
104 +--> Greenbone Security Agent systemd daemon settings
105 +--> Installed in /etc/openvas/sysconfig
106 +
107 +'openvas-scanner'
108 +--> OpenVAS Scanner open-rc daemon settings
109 +--> Installed in /etc/config.d
110 +
111 +'gvmd'
112 +--> OpenVAS Manager open-rc daemon settings
113 +--> Installed in /etc/config.d
114 +
115 +'gsa'
116 +--> Greenbone Security Agent systemd daemon settings
117 +--> Installed in /etc/config.d
118 +
119 +-----------------------------------------------------------------
120 +--------QUICK START COMMANDS (IF YOU DON'T USE SCRIPTS)----------
121 +-----------------------------------------------------------------
122 +'env-update && source /etc/profile'
123 +--> Update PATHS
124 +
125 +'openvas-manage-certs -a'
126 +--> Create certificates automatically first time
127 +
128 +'greenbone-nvt-sync'
129 +--> Update NVT Feed
130 +
131 +'greenbone-scapdata-sync'
132 +--> Update scapdata Feed
133 +
134 +'greenbone-certdata-sync'
135 +--> Update certdata Feed
136 +
137 +'openvassd --foreground --only-cache'
138 +--> Generate initial NVT cache and quit
139 +
140 +'rc-service openvas-scanner start or systemctl start openvas-scanner'
141 +--> Start OpenVAS-Scanner
142 +
143 +'openvasmd --rebuild --progress'
144 +--> Initialize the Database
145 +
146 +'openvasmd --create-user=admin --role=Admin'
147 +--> Create User for WEBUI.Save your password
148 +
149 +'rc-service gvmd start or systemctl start gvmd'
150 +--> Start OpenVAS-Manager
151 +
152 +'rc-service gsa start or systemctl start gsa'
153 +--> Start the Greenbone Security Assistant
154 +
155 +-----------------------------------------------------------------
156 +---------------------PLUGIN KEY AND SIGNING----------------------
157 +-----------------------------------------------------------------
158 +'gpg --homedir=/etc/openvas/gnupg --gen-key'
159 +--> Generate Key
160 +
161 +'wget https://www.greenbone.net/GBCommunitySigningKey.asc'
162 +--> Official OpenVAS Transfer Key
163 +
164 +'gpg --homedir=/etc/openvas/gnupg --import GBCommunitySigningKey.asc'
165 +--> Import OpenVAS Transfer Key
166 +
167 +'gpg --homedir=/etc/openvas/gnupg --lsign-key 0ED1E580'
168 +--> Sign
169
170 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
171 new file mode 100644
172 index 00000000000..34fc9f68f43
173 --- /dev/null
174 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-cachedir.patch
175 @@ -0,0 +1,18 @@
176 +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:40:41.981031382 +0300
177 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 01:44:08.867074208 +0300
178 +@@ -173,7 +173,6 @@
179 + set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
180 + set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
181 + set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
182 +-set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas")
183 + set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
184 +
185 + set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}")
186 +@@ -330,7 +329,6 @@
187 +
188 + install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR})
189 + install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR})
190 +-install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR})
191 + install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR})
192 + install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR})
193 + install (DIRECTORY
194
195 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
196 new file mode 100644
197 index 00000000000..a2809087f82
198 --- /dev/null
199 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-gcc8.patch
200 @@ -0,0 +1,73 @@
201 +--- gvm-libs-9.0.3/nasl/nasl_isotime.c 2018-08-29 19:01:12.000000000 +0300
202 ++++ gvm-libs-9.0.3/nasl/nasl_isotime.c 2019-02-01 21:11:40.460358131 +0300
203 +@@ -102,9 +102,13 @@
204 + struct tm *tp;
205 +
206 + tp = gmtime (&atime);
207 +- snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
208 ++ if (snprintf (timebuf, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
209 + 1900 + tp->tm_year, tp->tm_mon+1, tp->tm_mday,
210 +- tp->tm_hour, tp->tm_min, tp->tm_sec);
211 ++ tp->tm_hour, tp->tm_min, tp->tm_sec) < 0)
212 ++ {
213 ++ *timebuf = '\0';
214 ++ return;
215 ++ }
216 + }
217 + }
218 +
219 +@@ -480,8 +484,9 @@
220 + || year < 0 || month < 1 || day < 1)
221 + return 1;
222 +
223 +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
224 +- year, month, day, hour, minute, sec);
225 ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
226 ++ year, month, day, hour, minute, sec) < 0)
227 ++ return 1;
228 + return 0;
229 + }
230 +
231 +@@ -519,8 +524,9 @@
232 + || year < 0 || month < 1 || day < 1)
233 + return 1;
234 +
235 +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
236 +- year, month, day, hour, minute, sec);
237 ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
238 ++ year, month, day, hour, minute, sec) < 0)
239 ++ return 1;
240 + return 0;
241 + }
242 +
243 +@@ -558,13 +564,14 @@
244 + || year < 0 || month < 1 || day < 1)
245 + return 1;
246 +
247 +- snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
248 +- year, month, day, hour, minute, sec);
249 ++ if (snprintf (atime, ISOTIME_SIZE, "%04d%02d%02dT%02d%02d%02d",
250 ++ year, month, day, hour, minute, sec) < 0)
251 ++ return 1;
252 + return 0;
253 + }
254 +
255 +
256 +-
257 ++
258 + /**
259 + * @brief Return the current time in ISO format
260 + * @naslfn{isotime_now}
261 +@@ -784,9 +791,9 @@
262 + memcpy (timebuf, string, ISOTIME_SIZE -1);
263 + timebuf[ISOTIME_SIZE - 1] = 0;
264 +
265 +- nyears = get_int_local_var_by_name (lexic, "years", 0);
266 +- ndays = get_int_local_var_by_name (lexic, "days", 0);
267 +- nseconds = get_int_local_var_by_name (lexic, "seconds", 0);
268 ++ nyears = get_int_var_by_name (lexic, "years", 0);
269 ++ ndays = get_int_var_by_name (lexic, "days", 0);
270 ++ nseconds = get_int_var_by_name (lexic, "seconds", 0);
271 +
272 + if (nyears && add_years_to_isotime (timebuf, nyears))
273 + return NULL;
274
275 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
276 new file mode 100644
277 index 00000000000..69305576d0d
278 --- /dev/null
279 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-netsnmp.patch
280 @@ -0,0 +1,11 @@
281 +--- gvm-libs-9.0.3/CMakeLists.txt 2018-08-29 19:01:12.000000000 +0300
282 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-01 20:58:45.946113012 +0300
283 +@@ -238,7 +238,7 @@
284 + OUTPUT_STRIP_TRAILING_WHITESPACE)
285 +
286 + message (STATUS "Looking for netsnmp...")
287 +- find_library (SNMP snmp)
288 ++ find_library (SNMP netsnmp)
289 + message (STATUS "Looking for netsnmp... ${SNMP}")
290 + if (SNMP)
291 + execute_process (COMMAND net-snmp-config --libs
292
293 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
294 new file mode 100644
295 index 00000000000..e14e2965e9f
296 --- /dev/null
297 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rpath.patch
298 @@ -0,0 +1,11 @@
299 +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:42:27.367627369 +0300
300 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 21:45:48.961135211 +0300
301 +@@ -80,7 +80,7 @@
302 + # TODO: Check pkg-config (maybe with code like in gsa/CMakeLists.txt).
303 +
304 + ## CPack configuration
305 +-
306 ++set (CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
307 + set (CPACK_CMAKE_GENERATOR "Unix Makefiles")
308 + set (CPACK_GENERATOR "TGZ")
309 + set (CPACK_INSTALL_CMAKE_PROJECTS ".;openvas-libraries;ALL;/")
310
311 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
312 new file mode 100644
313 index 00000000000..6ecdc8a6421
314 --- /dev/null
315 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-rundir.patch
316 @@ -0,0 +1,45 @@
317 +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:50:41.230530261 +0300
318 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 14:55:08.649433070 +0300
319 +@@ -162,9 +162,9 @@
320 + set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
321 + endif (NOT DATADIR)
322 +
323 +-if (NOT OPENVAS_PID_DIR)
324 +- set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
325 +-endif (NOT OPENVAS_PID_DIR)
326 ++#if (NOT OPENVAS_PID_DIR)
327 ++# set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
328 ++#endif (NOT OPENVAS_PID_DIR)
329 +
330 + #if (NOT SYSCONFDIR)
331 + # set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
332 +--- gvm-libs-9.0.3/base/pidfile.c 2018-08-29 19:01:12.000000000 +0300
333 ++++ gvm-libs-9.0.3/base/pidfile.c 2019-02-04 15:08:04.600958560 +0300
334 +@@ -59,7 +59,7 @@
335 + pidfile_create (gchar * daemon_name)
336 + {
337 + gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL);
338 +- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL);
339 ++ gchar *pidfile_name = g_build_filename (name_pid, NULL);
340 + FILE *pidfile = g_fopen (pidfile_name, "w");
341 +
342 + g_free (name_pid);
343 +@@ -88,7 +88,7 @@
344 + pidfile_remove (gchar * daemon_name)
345 + {
346 + gchar *name_pid = g_strconcat (daemon_name, ".pid", NULL);
347 +- gchar *pidfile_name = g_build_filename (OPENVAS_PID_DIR, name_pid, NULL);
348 ++ gchar *pidfile_name = g_build_filename (name_pid, NULL);
349 + gchar *pidfile_contents;
350 +
351 + g_free (name_pid);
352 +--- gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:39.776282496 +0300
353 ++++ gvm-libs-9.0.3/CMakeLists.txt 2019-02-04 17:39:23.160269081 +0300
354 +@@ -329,7 +329,6 @@
355 +
356 + install (DIRECTORY DESTINATION ${OPENVAS_LOG_DIR})
357 + install (DIRECTORY DESTINATION ${OPENVAS_DATA_DIR})
358 +-install (DIRECTORY DESTINATION ${OPENVAS_PID_DIR})
359 + install (DIRECTORY DESTINATION ${OPENVAS_SYSCONF_DIR})
360 + install (DIRECTORY
361 + DESTINATION ${OPENVAS_SYSCONF_DIR}/gnupg
362
363 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
364 new file mode 100644
365 index 00000000000..e3c25f9b9c4
366 --- /dev/null
367 +++ b/net-analyzer/openvas-libraries/files/openvas-libraries-9.0.3-underlinking.patch
368 @@ -0,0 +1,47 @@
369 +--- gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:11:20.848707365 +0300
370 ++++ gvm-libs-9.0.3/base/CMakeLists.txt 2019-02-04 15:40:27.745955904 +0300
371 +@@ -88,7 +88,7 @@
372 + assuan libgpg-error ole32 ws2_32 ffi z shlwapi dnsapi winmm)
373 + target_link_libraries (openvas_base_shared ${W32LIBS})
374 + else (MINGW)
375 +- target_link_libraries (openvas_base_shared LINK_PRIVATE ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS})
376 ++ target_link_libraries (openvas_base_shared LINK_PRIVATE ${LIBSSH_LDFLAGS} ${GLIB_LDFLAGS} ${GIO_LDFLAGS} ${ZLIB_LDFLAGS} ${GPGME_LDFLAGS} ${REDIS_LDFLAGS} ${LINKER_HARDENING_FLAGS})
377 + endif (MINGW)
378 + endif (BUILD_SHARED)
379 +
380 +@@ -102,10 +102,10 @@
381 +
382 + # Link the test-hosts executable
383 + # TODO: This is currently only built for BUILD_SHARED
384 +-if (BUILD_SHARED)
385 +- add_executable (test-hosts test-hosts.c)
386 +- target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS})
387 +-endif (BUILD_SHARED)
388 ++#if (BUILD_SHARED)
389 ++# add_executable (test-hosts test-hosts.c)
390 ++# target_link_libraries (test-hosts openvas_base_shared ${GLIB_LDFLAGS} ${REDIS_LDFLAGS})
391 ++#endif (BUILD_SHARED)
392 +
393 + ## Install
394 + if (BUILD_STATIC)
395 +@@ -123,3 +123,4 @@
396 + endif (BUILD_SHARED)
397 +
398 + ## End
399 ++
400 +--- gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:11:20.847707368 +0300
401 ++++ gvm-libs-9.0.3/misc/CMakeLists.txt 2019-02-04 15:49:34.035071570 +0300
402 +@@ -146,7 +146,7 @@
403 + else (MINGW)
404 + target_link_libraries (openvas_misc_shared LINK_PRIVATE ${GNUTLS_LDFLAGS} openvas_base_shared ${UUID_LDFLAGS}
405 + ${GLIB_LDFLAGS} ${PCAP_LDFLAGS} ${LIBSSH_LDFLAGS} ${LDAP_LDFLAGS}
406 +- ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS}
407 ++ ${REDIS_LDFLAGS} ${GCRYPT_LDFLAGS} ${RADIUS_LDFLAGS}
408 + ${LINKER_HARDENING_FLAGS})
409 + endif (MINGW)
410 + endif (BUILD_SHARED)
411 +@@ -198,3 +198,4 @@
412 + ARCHIVE DESTINATION ${LIBDIR}
413 + PUBLIC_HEADER DESTINATION "${INCLUDEDIR}/openvas/misc")
414 + endif (BUILD_SHARED)
415 ++
416
417 diff --git a/net-analyzer/openvas-libraries/metadata.xml b/net-analyzer/openvas-libraries/metadata.xml
418 index 6f49eba8f49..c71bb473eca 100644
419 --- a/net-analyzer/openvas-libraries/metadata.xml
420 +++ b/net-analyzer/openvas-libraries/metadata.xml
421 @@ -1,5 +1,17 @@
422 <?xml version="1.0" encoding="UTF-8"?>
423 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
424 <pkgmetadata>
425 -<!-- maintainer-needed -->
426 + <maintainer type="person">
427 + <email>hasan.calisir@×××××××.com</email>
428 + <name>Hasan ÇALIŞIR</name>
429 + </maintainer>
430 + <maintainer type="project">
431 + <email>proxy-maint@g.o</email>
432 + <name>Proxy Maintainers</name>
433 + </maintainer>
434 + <use>
435 + <flag name="extras">Html docs support</flag>
436 + <flag name="ldap">Enable support for ldap</flag>
437 + <flag name="radius">Enable support for radius</flag>
438 + </use>
439 </pkgmetadata>
440
441 diff --git a/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild
442 new file mode 100644
443 index 00000000000..1437868b499
444 --- /dev/null
445 +++ b/net-analyzer/openvas-libraries/openvas-libraries-9.0.3.ebuild
446 @@ -0,0 +1,93 @@
447 +# Copyright 1999-2019 Gentoo Authors
448 +# Distributed under the terms of the GNU General Public License v2
449 +
450 +EAPI=7
451 +
452 +CMAKE_MAKEFILE_GENERATOR="emake"
453 +inherit cmake-utils
454 +MY_PN="gvm-libs"
455 +
456 +DESCRIPTION="A remote security scanner for Linux (openvas-libraries)"
457 +HOMEPAGE="http://www.openvas.org/"
458 +SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
459 +
460 +SLOT="0"
461 +LICENSE="GPL-2"
462 +KEYWORDS="~amd64 ~x86"
463 +IUSE="extras ldap radius"
464 +
465 +DEPEND="
466 + dev-libs/hiredis
467 + dev-libs/libgcrypt:0=
468 + dev-libs/libksba
469 + dev-perl/UUID
470 + net-analyzer/net-snmp
471 + net-libs/gnutls:=[tools]
472 + net-libs/libpcap
473 + net-libs/libssh:=
474 + sys-libs/zlib
475 + extras? ( dev-perl/CGI )
476 + ldap? ( net-nds/openldap )
477 + radius? ( net-dialup/freeradius-client )"
478 +
479 +RDEPEND="
480 + ${DEPEND}"
481 +
482 +BDEPEND="
483 + sys-devel/bison
484 + sys-devel/flex
485 + virtual/pkgconfig
486 + extras? ( app-doc/doxygen[dot]
487 + app-doc/xmltoman
488 + app-text/htmldoc
489 + dev-perl/SQL-Translator
490 + )"
491 +
492 +PATCHES=(
493 + "${FILESDIR}/${P}-gcc8.patch"
494 + "${FILESDIR}/${P}-netsnmp.patch"
495 + "${FILESDIR}/${P}-cachedir.patch"
496 + "${FILESDIR}/${P}-rundir.patch"
497 + "${FILESDIR}/${P}-underlinking.patch"
498 + "${FILESDIR}/${P}-rpath.patch"
499 +)
500 +
501 +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build"
502 +S="${WORKDIR}/${MY_PN}-${PV}"
503 +
504 +src_prepare() {
505 + cmake-utils_src_prepare
506 + if use extras; then
507 + doxygen -u "$S"/doc/Doxyfile_full.in || die
508 + fi
509 +}
510 +
511 +src_configure() {
512 + local mycmakeargs=(
513 + "-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr"
514 + "-DLOCALSTATEDIR=${EPREFIX}/var"
515 + "-DSYSCONFDIR=${EPREFIX}/etc"
516 + $(usex ldap -DBUILD_WITHOUT_LDAP=0 -DBUILD_WITHOUT_LDAP=1)
517 + $(usex radius -DBUILD_WITHOUT_RADIUS=0 -DBUILD_WITHOUT_RADIUS=1)
518 + )
519 + cmake-utils_src_configure
520 +}
521 +
522 +src_compile() {
523 + cmake-utils_src_compile
524 + if use extras; then
525 + cmake-utils_src_make -C "${BUILD_DIR}" doc
526 + cmake-utils_src_make doc-full -C "${BUILD_DIR}" doc
527 + HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. )
528 + fi
529 +}
530 +
531 +src_install() {
532 + cmake-utils_src_install
533 +
534 + insinto /usr/share/openvas
535 + doins "${FILESDIR}"/OPENVAS.gentoo
536 +
537 + keepdir /var/lib/openvas/gnupg
538 + keepdir /var/log/openvas
539 +}