From 494168b06b81a32b889c3cb1f721f925d0a6824f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 8 Dec 2024 02:07:29 +0000 Subject: gentoo auto-resync : 08:12:2024 - 02:07:28 --- net-analyzer/gvmd/Manifest | 10 +-- net-analyzer/gvmd/files/gvmd-22.init | 6 +- net-analyzer/gvmd/files/gvmd.service.conf | 2 + net-analyzer/gvmd/gvmd-23.6.2.ebuild | 128 ----------------------------- net-analyzer/gvmd/gvmd-23.9.0-r1.ebuild | 129 ++++++++++++++++++++++++++++++ net-analyzer/gvmd/gvmd-23.9.0.ebuild | 129 ------------------------------ net-analyzer/gvmd/gvmd-24.1.0.ebuild | 129 ++++++++++++++++++++++++++++++ 7 files changed, 268 insertions(+), 265 deletions(-) delete mode 100644 net-analyzer/gvmd/gvmd-23.6.2.ebuild create mode 100644 net-analyzer/gvmd/gvmd-23.9.0-r1.ebuild delete mode 100644 net-analyzer/gvmd/gvmd-23.9.0.ebuild create mode 100644 net-analyzer/gvmd/gvmd-24.1.0.ebuild (limited to 'net-analyzer/gvmd') diff --git a/net-analyzer/gvmd/Manifest b/net-analyzer/gvmd/Manifest index 866b93716616..587840e2d945 100644 --- a/net-analyzer/gvmd/Manifest +++ b/net-analyzer/gvmd/Manifest @@ -1,8 +1,8 @@ -AUX gvmd-22.init 879 BLAKE2B 74c091d08deffb53ff9b94f08acea24ea8ff4ff5c763fcd38dff1d387fc25213531dc594bdf1beccd388f89b5684d7d09b8b75f80734c772018e47e17a8ebe47 SHA512 cdde77c51a8f42a6551356c56010ee8fa5d64e6b73f8040318b5dfcd738ad8e3c442a3c01ff786def9d5dfe6a3f01951143ea60cc4305c0b74d25c086259c447 +AUX gvmd-22.init 907 BLAKE2B 4648bb15248a76b9b1b472962f13924af06630ccd7306b312945afa0f9a29fa56a5da1e2baabcac58986c6b82e30c490c93fba8e956803ffe0d70f402cda8258 SHA512 0e99f2ac5393186cd17fa8c64759836bb28bd67e95fa67b7258f86bddcb446b992335667f806fc4cfcdb3708b161d51314a36bc29a5d2422f2549c7892988d28 AUX gvmd-daemon-22.conf 892 BLAKE2B 1b8c15d6c889e471d86d6a12f7795c0d126f905c55e2588937299868154ae402a8aeb4d71f0492920df738076d4dff41c372bef22432de69bf3f499da8f58028 SHA512 dcee0ad72e86b7822ca1dec11a60da9cfcfc7db50d1e179b3f819ed14e93b88e552b4b18a30fdac3423dfb913637e307e55da0aac73903ee6e736c41cde41454 -AUX gvmd.service.conf 608 BLAKE2B 95845701a20d93c1e09c960b912f32b063f9bdf90c955bf7483661f2cce7788367458480f3800abc7f4904702a0dfb7124fff0c5f38f7d495e0fa3d89e5ae9d0 SHA512 5c67480ac44f619fc0d88ec2140a1e4c6b7defdba2c18338df05f72db1c8c642d1a91a2ca35fcf3cef8719cd360cdf335a4010f932607cbcc2a4a3ce660ce3a7 -DIST gvmd-23.6.2.tar.gz 1065818 BLAKE2B 65b999c42628eec4816aea984ba1ab0383a9147ba04f934b21b5763db10dac2679cfab821520e69be42accdaad061fbb0692c9d6cd8f30db592d9466c3cdc351 SHA512 935af9a842d7b82a8467ccbb9edf1c9e8ea05c4f8a4e263c3692a2d8993209312af3d760943e32c77f8c12d2220771b9731b10dba59c89d2570682a3e363767d +AUX gvmd.service.conf 664 BLAKE2B 47e03bb5a165ab50598f7709418429a9a22360ec02df1a0a046c84757871fb1bbba2073ae48629fba2a2d99e195f2a2de8933ba17d0558a79ca962590dfe09ed SHA512 bd48e5b74bad54b4ad856e0a015536e83b2d2d826dc647a0deba790c9e66d7dfdba443c6e40c95d6787a46cd11b3549207d53e737369fd039ea4507c6cfa82f7 DIST gvmd-23.9.0.tar.gz 1087527 BLAKE2B a65ebf9aec0f5a29ade63b4aadcecdbbe0e342642b30c426257ef4de0f901b40a1ceaf0586a6ced38d94f4e404913da1b8eb53d8704e6c4ffe5c9791c70be011 SHA512 07c72679ed62f05e001c40f20eda8c5eef7512176d4eba1371047c4f1a0371625f1e380e81e306f7f764f918658f8223c8209b19a1a271f129e0677862517971 -EBUILD gvmd-23.6.2.ebuild 3231 BLAKE2B 4534e9760ef70c2e9086c5f5ad42c5e6910b4417486916d00e30c4f28a5d593259461aa189370674296f0de3b3596d13dc3231d245252ba66046a9db5d4c1dd7 SHA512 f2c65e7985c8e0480218e90f4ea300f24e88d96adb9df4f2841ac2413beb79478dafa6c71ddf145752c7140c30a139a0a21a4c159918ebf8c19543c7a5cd1d02 -EBUILD gvmd-23.9.0.ebuild 3257 BLAKE2B 3235f7c535afe00122bf103f159decffae9ccf1d0a33bf2cee44aff4433cde5cd3594280607643a3ef54eb93b7053322f63dc69728b063ae2d58f79468823eea SHA512 5461819261cd6f88146f41f4fe838448920379801b1c60befc0d7582783ec4bb3b7620db464b5612375973594e1a5ffcb10dc3d5000fcfa9f21583972b50f2b1 +DIST gvmd-24.1.0.tar.gz 1094175 BLAKE2B 347fab3161bcbc281b8c8e71347cbcc8210f13cdc8eba3b07d9ed61856a25eafa12a244d3d92cf74ff109477125c1daedd10d964efae22701768c5ed0f84a49e SHA512 3a40ea13b85cc1a856fb521e112806db6ff55c81190c54aa19e035cd002466fc1e2bf4c360d1c515f729196f680854421a89d3e2ffcd75475678b45a4882ba68 +EBUILD gvmd-23.9.0-r1.ebuild 3257 BLAKE2B 3235f7c535afe00122bf103f159decffae9ccf1d0a33bf2cee44aff4433cde5cd3594280607643a3ef54eb93b7053322f63dc69728b063ae2d58f79468823eea SHA512 5461819261cd6f88146f41f4fe838448920379801b1c60befc0d7582783ec4bb3b7620db464b5612375973594e1a5ffcb10dc3d5000fcfa9f21583972b50f2b1 +EBUILD gvmd-24.1.0.ebuild 3253 BLAKE2B 9e5613ec358ef9d7c32e679070efc998f1d0663785473688760c92cb018872f889a523cd2a5e748cf98bcaa9cc5216b50302d9533ac186d9eb0e26979021b690 SHA512 765c050c17dc98282cf6c248b62a4dcd59138e620300bb883572dfffd50909cf1f2e00a13de26d646f786973f120420f9bd8fd6c695b9f1310268f120b741412 MISC metadata.xml 1015 BLAKE2B 02f3f87588b78a5ec9114298b527d3a0731d993583c20e4988e4ce97fd95a00324c3692000b5572494fc4f6dc33aeb603f25c146c98cfdffa3cefd1ae77ac7ee SHA512 f99e5727c4b40ae8184f471045059a95df54deea829ba01d3d948ca90586ab9745dbeca90d826f088963a15396099a5fdb9583c3aecf47fd72f1e8760eda1aac diff --git a/net-analyzer/gvmd/files/gvmd-22.init b/net-analyzer/gvmd/files/gvmd-22.init index fdae00af6317..834a84668c90 100644 --- a/net-analyzer/gvmd/files/gvmd-22.init +++ b/net-analyzer/gvmd/files/gvmd-22.init @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 : ${GVMD_USER:=gvm} @@ -14,8 +14,8 @@ pidfile="/run/gvmd/gvmd.pid" retry="${GVMD_TIMEOUT}" depend() { - after bootmisc postgresql postgresql-9.6 postgresql-10 postgresql-11 postgresql-12 postgresql-13 postgresql-14 postgresql-15 postgresql-16 - want postgresql postgresql-9.6 postgresql-10 postgresql-11 postgresql-12 postgresql-13 postgresql-14 postgresql-15 postgresql-16 + after bootmisc postgresql postgresql-9.6 postgresql-10 postgresql-11 postgresql-12 postgresql-13 postgresql-14 postgresql-15 postgresql-16 postgresql-17 + want postgresql postgresql-9.6 postgresql-10 postgresql-11 postgresql-12 postgresql-13 postgresql-14 postgresql-15 postgresql-16 postgresql-17 need localmount net ospd-openvas } diff --git a/net-analyzer/gvmd/files/gvmd.service.conf b/net-analyzer/gvmd/files/gvmd.service.conf index 2e22ddab18c3..8edc19c97eae 100644 --- a/net-analyzer/gvmd/files/gvmd.service.conf +++ b/net-analyzer/gvmd/files/gvmd.service.conf @@ -7,6 +7,7 @@ After=postgresql-13.service After=postgresql-14.service After=postgresql-15.service After=postgresql-16.service +After=postgresql-17.service Wants=postgresql-9.6.service Wants=postgresql-10.service Wants=postgresql-11.service @@ -15,6 +16,7 @@ Wants=postgresql-13.service Wants=postgresql-14.service Wants=postgresql-15.service Wants=postgresql-16.service +Wants=postgresql-17.service PartOf=gvm.target [Service] diff --git a/net-analyzer/gvmd/gvmd-23.6.2.ebuild b/net-analyzer/gvmd/gvmd-23.6.2.ebuild deleted file mode 100644 index 85facb7d6bcb..000000000000 --- a/net-analyzer/gvmd/gvmd-23.6.2.ebuild +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake systemd toolchain-funcs - -DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" -HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvmd/" -SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="AGPL-3+" -SLOT="0" -KEYWORDS="amd64 ~x86" -IUSE="doc test" -RESTRICT="!test? ( test )" - -DEPEND=" - acct-user/gvm - app-crypt/gpgme:1= - dev-libs/libbsd - >=dev-db/postgresql-9.6:=[uuid] - >=dev-libs/glib-2.42:2 - >=dev-libs/libical-1.0.0:= - >=net-analyzer/gvm-libs-22.9 - >=net-libs/gnutls-3.2.15:=[tools] -" - -# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive -# and xmlstartlet are used for (PDF) report generator at runtime. -RDEPEND=" - ${DEPEND} - app-text/xmlstarlet - dev-perl/XML-Twig - dev-texlive/texlive-latexextra - >=net-analyzer/ospd-openvas-22.4 - >=dev-db/pg-gvm-22.4 -" -BDEPEND=" - app-alternatives/yacc - app-alternatives/lex - virtual/pkgconfig - doc? ( - app-text/doxygen[dot] - app-text/xmltoman - app-text/htmldoc - dev-libs/libxslt - ) - test? ( dev-libs/cgreen ) -" - -src_prepare() { - cmake_src_prepare - # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0 - sed -i -e "s*share/doc/gvm/html/*share/doc/${PF}/html/*g" doc/CMakeLists.txt || die - sed -i -e "s*/doc/gvm/*/doc/${PF}/*g" CMakeLists.txt || die - # QA-Fix | Remove !CLANG Doxygen warnings for 9.0.0 - if use doc; 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=( - "-DLOCALSTATEDIR=${EPREFIX}/var" - "-DSYSCONFDIR=${EPREFIX}/etc" - "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)" - "-DSBINDIR=${EPREFIX}/usr/bin" - "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)" - "-DGVM_DEFAULT_DROP_USER=gvm" - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - if use doc; then - cmake_build -C "${BUILD_DIR}" doc - cmake_build doc-full -C "${BUILD_DIR}" doc - fi - if use test; then - cmake_build tests - fi - cmake_build rebuild_cache -} - -src_install() { - if use doc; then - local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) - fi - cmake_src_install - - insinto /etc/gvm/sysconfig - newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf" - if ! use prefix; then - fowners -R gvm:gvm /etc/gvm - fi - - newinitd "${FILESDIR}/${PN}-22.init" "${PN}" - newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}" - - # Set proper permissions on required files/directories - keepdir /var/lib/gvm/gvmd - if ! use prefix; then - fowners -R gvm:gvm /var/lib/gvm - fi - - systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \ - ${PN}.service -} - -pkg_postinst() { - elog "If you are upgrading from a previous version, you need to update the database version." - elog "Please, create the running directory and give write permission to the database user" - elog "then run gvmd as the gvm user with --migrate option:" - elog "~# mkdir /run/gvmd" - elog "~# setfacl -m u:gvm:rwx /run/gvmd/" - elog "~# sudo -u gvm gvmd --migrate" -} diff --git a/net-analyzer/gvmd/gvmd-23.9.0-r1.ebuild b/net-analyzer/gvmd/gvmd-23.9.0-r1.ebuild new file mode 100644 index 000000000000..ce0743bc32df --- /dev/null +++ b/net-analyzer/gvmd/gvmd-23.9.0-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd toolchain-funcs + +DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" +HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvmd/" +SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="doc test" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-user/gvm + app-crypt/gpgme:1= + dev-libs/libbsd + >=dev-db/postgresql-9.6:=[uuid] + >=dev-libs/cJSON-1.7.14 + >=dev-libs/glib-2.42:2 + >=dev-libs/libical-1.0.0:= + >=net-analyzer/gvm-libs-22.10 + >=net-libs/gnutls-3.2.15:=[tools] +" + +# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive +# and xmlstartlet are used for (PDF) report generator at runtime. +RDEPEND=" + ${DEPEND} + app-text/xmlstarlet + dev-perl/XML-Twig + dev-texlive/texlive-latexextra + >=net-analyzer/ospd-openvas-22.4 + >=dev-db/pg-gvm-22.4 +" +BDEPEND=" + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + app-text/xmltoman + app-text/htmldoc + dev-libs/libxslt + ) + test? ( dev-libs/cgreen ) +" + +src_prepare() { + cmake_src_prepare + # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0 + sed -i -e "s*share/doc/gvm/html/*share/doc/${PF}/html/*g" doc/CMakeLists.txt || die + sed -i -e "s*/doc/gvm/*/doc/${PF}/*g" CMakeLists.txt || die + # QA-Fix | Remove !CLANG Doxygen warnings for 9.0.0 + if use doc; 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=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)" + "-DSBINDIR=${EPREFIX}/usr/bin" + "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)" + "-DGVM_DEFAULT_DROP_USER=gvm" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use doc; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + if use test; then + cmake_build tests + fi + cmake_build rebuild_cache +} + +src_install() { + if use doc; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + insinto /etc/gvm/sysconfig + newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf" + if ! use prefix; then + fowners -R gvm:gvm /etc/gvm + fi + + newinitd "${FILESDIR}/${PN}-22.init" "${PN}" + newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}" + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm/gvmd + if ! use prefix; then + fowners -R gvm:gvm /var/lib/gvm + fi + + systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \ + ${PN}.service +} + +pkg_postinst() { + elog "If you are upgrading from a previous version, you need to update the database version." + elog "Please, create the running directory and give write permission to the database user" + elog "then run gvmd as the gvm user with --migrate option:" + elog "~# mkdir /run/gvmd" + elog "~# setfacl -m u:gvm:rwx /run/gvmd/" + elog "~# sudo -u gvm gvmd --migrate" +} diff --git a/net-analyzer/gvmd/gvmd-23.9.0.ebuild b/net-analyzer/gvmd/gvmd-23.9.0.ebuild deleted file mode 100644 index ce0743bc32df..000000000000 --- a/net-analyzer/gvmd/gvmd-23.9.0.ebuild +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit cmake systemd toolchain-funcs - -DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" -HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvmd/" -SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="AGPL-3+" -SLOT="0" -KEYWORDS="amd64 ~x86" -IUSE="doc test" -RESTRICT="!test? ( test )" - -DEPEND=" - acct-user/gvm - app-crypt/gpgme:1= - dev-libs/libbsd - >=dev-db/postgresql-9.6:=[uuid] - >=dev-libs/cJSON-1.7.14 - >=dev-libs/glib-2.42:2 - >=dev-libs/libical-1.0.0:= - >=net-analyzer/gvm-libs-22.10 - >=net-libs/gnutls-3.2.15:=[tools] -" - -# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive -# and xmlstartlet are used for (PDF) report generator at runtime. -RDEPEND=" - ${DEPEND} - app-text/xmlstarlet - dev-perl/XML-Twig - dev-texlive/texlive-latexextra - >=net-analyzer/ospd-openvas-22.4 - >=dev-db/pg-gvm-22.4 -" -BDEPEND=" - app-alternatives/yacc - app-alternatives/lex - virtual/pkgconfig - doc? ( - app-text/doxygen[dot] - app-text/xmltoman - app-text/htmldoc - dev-libs/libxslt - ) - test? ( dev-libs/cgreen ) -" - -src_prepare() { - cmake_src_prepare - # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0 - sed -i -e "s*share/doc/gvm/html/*share/doc/${PF}/html/*g" doc/CMakeLists.txt || die - sed -i -e "s*/doc/gvm/*/doc/${PF}/*g" CMakeLists.txt || die - # QA-Fix | Remove !CLANG Doxygen warnings for 9.0.0 - if use doc; 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=( - "-DLOCALSTATEDIR=${EPREFIX}/var" - "-DSYSCONFDIR=${EPREFIX}/etc" - "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)" - "-DSBINDIR=${EPREFIX}/usr/bin" - "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)" - "-DGVM_DEFAULT_DROP_USER=gvm" - ) - cmake_src_configure -} - -src_compile() { - cmake_src_compile - if use doc; then - cmake_build -C "${BUILD_DIR}" doc - cmake_build doc-full -C "${BUILD_DIR}" doc - fi - if use test; then - cmake_build tests - fi - cmake_build rebuild_cache -} - -src_install() { - if use doc; then - local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) - fi - cmake_src_install - - insinto /etc/gvm/sysconfig - newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf" - if ! use prefix; then - fowners -R gvm:gvm /etc/gvm - fi - - newinitd "${FILESDIR}/${PN}-22.init" "${PN}" - newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}" - - # Set proper permissions on required files/directories - keepdir /var/lib/gvm/gvmd - if ! use prefix; then - fowners -R gvm:gvm /var/lib/gvm - fi - - systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \ - ${PN}.service -} - -pkg_postinst() { - elog "If you are upgrading from a previous version, you need to update the database version." - elog "Please, create the running directory and give write permission to the database user" - elog "then run gvmd as the gvm user with --migrate option:" - elog "~# mkdir /run/gvmd" - elog "~# setfacl -m u:gvm:rwx /run/gvmd/" - elog "~# sudo -u gvm gvmd --migrate" -} diff --git a/net-analyzer/gvmd/gvmd-24.1.0.ebuild b/net-analyzer/gvmd/gvmd-24.1.0.ebuild new file mode 100644 index 000000000000..45b91006b356 --- /dev/null +++ b/net-analyzer/gvmd/gvmd-24.1.0.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd toolchain-funcs + +DESCRIPTION="Greenbone vulnerability manager, previously named openvas-manager" +HOMEPAGE="https://www.greenbone.net https://github.com/greenbone/gvmd/" +SRC_URI="https://github.com/greenbone/gvmd/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc test" +RESTRICT="!test? ( test )" + +DEPEND=" + acct-user/gvm + app-crypt/gpgme:1= + dev-libs/libbsd + >=dev-db/postgresql-9.6:=[uuid] + >=dev-libs/cJSON-1.7.14 + >=dev-libs/glib-2.42:2 + >=dev-libs/libical-1.0.0:= + >=net-analyzer/gvm-libs-22.12 + >=net-libs/gnutls-3.2.15:=[tools] +" + +# gvmd (optionally) uses xml_split from XML-Twig at runtime. And texlive +# and xmlstartlet are used for (PDF) report generator at runtime. +RDEPEND=" + ${DEPEND} + app-text/xmlstarlet + dev-perl/XML-Twig + dev-texlive/texlive-latexextra + >=net-analyzer/ospd-openvas-22.4 + >=dev-db/pg-gvm-22.4 +" +BDEPEND=" + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + doc? ( + app-text/doxygen[dot] + app-text/xmltoman + app-text/htmldoc + dev-libs/libxslt + ) + test? ( dev-libs/cgreen ) +" + +src_prepare() { + cmake_src_prepare + # QA-Fix | Use correct FHS/Gentoo policy paths for 9.0.0 + sed -i -e "s*share/doc/gvm/html/*share/doc/${PF}/html/*g" doc/CMakeLists.txt || die + sed -i -e "s*/doc/gvm/*/doc/${PF}/*g" CMakeLists.txt || die + # QA-Fix | Remove !CLANG Doxygen warnings for 9.0.0 + if use doc; 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=( + "-DLOCALSTATEDIR=${EPREFIX}/var" + "-DSYSCONFDIR=${EPREFIX}/etc" + "-DLIBDIR=${EPREFIX}/usr/$(get_libdir)" + "-DSBINDIR=${EPREFIX}/usr/bin" + "-DSYSTEMD_SERVICE_DIR=$(systemd_get_systemunitdir)" + "-DGVM_DEFAULT_DROP_USER=gvm" + ) + cmake_src_configure +} + +src_compile() { + cmake_src_compile + if use doc; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + if use test; then + cmake_build tests + fi + cmake_build rebuild_cache +} + +src_install() { + if use doc; then + local HTML_DOCS=( "${BUILD_DIR}"/doc/generated/html/. ) + fi + cmake_src_install + + insinto /etc/gvm/sysconfig + newins "${FILESDIR}/${PN}-daemon-22.conf" "${PN}-daemon.conf" + if ! use prefix; then + fowners -R gvm:gvm /etc/gvm + fi + + newinitd "${FILESDIR}/${PN}-22.init" "${PN}" + newconfd "${FILESDIR}/${PN}-daemon-22.conf" "${PN}" + + # Set proper permissions on required files/directories + keepdir /var/lib/gvm/gvmd + if ! use prefix; then + fowners -R gvm:gvm /var/lib/gvm + fi + + systemd_install_serviced "${FILESDIR}/gvmd.service.conf" \ + ${PN}.service +} + +pkg_postinst() { + elog "If you are upgrading from a previous version, you need to update the database version." + elog "Please, create the running directory and give write permission to the database user" + elog "then run gvmd as the gvm user with --migrate option:" + elog "~# mkdir /run/gvmd" + elog "~# setfacl -m u:gvm:rwx /run/gvmd/" + elog "~# sudo -u gvm gvmd --migrate" +} -- cgit v1.2.3