diff options
author | Jonas Licht <jonas.licht@fem.tu-ilmenau.de> | 2021-03-18 23:11:20 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-03-22 15:33:55 +0200 |
commit | 5a9952ea7b07f818167215b6522d257851fcc625 (patch) | |
tree | 7a5b5f19c016a5debc7cfec685edfb26e43bf8b5 /net-analyzer | |
parent | net-analyzer/ospd-openvas: version bump to 20.8.1 (diff) | |
download | gentoo-5a9952ea7b07f818167215b6522d257851fcc625.tar.gz gentoo-5a9952ea7b07f818167215b6522d257851fcc625.tar.bz2 gentoo-5a9952ea7b07f818167215b6522d257851fcc625.zip |
net-analyzer/greenbone-security-assistant: version bump to 20.8.1
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Jonas Licht <jonas.licht@fem.tu-ilmenau.de>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-analyzer')
3 files changed, 172 insertions, 0 deletions
diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest index d46d8a5a6353..a58a52bdcbcc 100644 --- a/net-analyzer/greenbone-security-assistant/Manifest +++ b/net-analyzer/greenbone-security-assistant/Manifest @@ -1,2 +1,4 @@ +DIST greenbone-security-assistant-20.8.1-node_modules.tar.gz 56048261 BLAKE2B feb9c8bc1f6675f9cfe0914acc2afbd8dc69a0445f198f893c4dcd73364404491541fb5c81980b627c741ba58621d26f4a1c4c07d18dc89d9c0050739352e0fc SHA512 2fa731aa0037b1c5e24ae34afa1d1dd1519ca8fac7af9dbd6d00486fa2ecab6fecfebe0864bc7f0ac38bfc0443c7ea05b85b3dbe75d891af4f5544bc80601c46 +DIST greenbone-security-assistant-20.8.1.tar.gz 2136158 BLAKE2B 769b9fc10879f866bc6c17cecf35a33d1a8813fbfacac16f1a97f1f58f1545c4e3997880642e5306b782c74c5515a11f527d31526ae4224d037a6c5e06fb0241 SHA512 85a96d59317bedfbe748b02b71fcf5f931f049d1ca688e3d4e87e701f14cd39ec4320621689f3a9f6b91fc1cf4e25c422df4d9b4675a7bcfed330b431b64d3ef DIST greenbone-security-assistant-9.0.1-node_modules.tar.gz 44176347 BLAKE2B c8d1195ddc8167ff7a228a4e013c6139524e8527310c65529d37de8fe5e984379ba783e10544caf81ac801ceb1199ad7249c96a0e6032ade8a519068e6cefb42 SHA512 1718f97d330f7868afe34bf172699b8aa8ce795dc2e4a6f20b28135434623a68022c36310e381bd55bacbb621fd9bf5c8595c8030f5d3dc32bb427cc2febd028 DIST greenbone-security-assistant-9.0.1.tar.gz 1936391 BLAKE2B 22b9020a97e79b31555d66826740ca49d1eba5d55324f0e80349dc571a7b45bcf2c6403ac311e78f742c51900921f3e61ef0740f11fd794069242e2ab21b1c3e SHA512 688bde97722f31416406e43230253c05dc8d05eb9fea6d8fd084ec4e748b67bab238f78cc11534e4fc948d911e468d43b5be0b224f17959db5e59faae7f5d086 diff --git a/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch new file mode 100644 index 000000000000..c39a66c5405e --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/files/greenbone-security-assistant-20.8.1-node.patch @@ -0,0 +1,47 @@ +diff --git a/gsa/CMakeLists.txt b/gsa/CMakeLists.txt +index db597d390..d30e33ec1 100644 +--- a/gsa/CMakeLists.txt ++++ b/gsa/CMakeLists.txt +@@ -1176,29 +1176,17 @@ set (GSA_JS_SRC_FILES + ${GSA_SRC_DIR}/src/web/wizard/taskwizard.js + ) + +- +- +-add_custom_command (OUTPUT node-modules.stamp +- DEPENDS ${GSA_PKG_FILES} +- COMMAND ${INSTALLER} "${INSTALLER_ARGS}" "install" +- COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- WORKING_DIRECTORY ${GSA_SRC_DIR} +- COMMENT "Install gsa js dependencies") +- +- + add_custom_command (OUTPUT bundle.stamp +- COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} "${INSTALLER_ARGS}" run build ++ COMMAND ${CMAKE_COMMAND} -E env REACT_APP_VERSION=${PROJECT_VERSION_STRING} ${INSTALLER} --offline run build + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- ${GSA_PKG_FILES} ++ DEPENDS ${GSA_PKG_FILES} + ${GSA_STATIC_SRC_FILES} + ${GSA_JS_SRC_FILES} + COMMENT "Build gsa install files") + + add_custom_target (gsa ALL +- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/node-modules.stamp +- ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp) ++ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bundle.stamp) + + set (GSA_STATIC_BUILD_FILES + ${GSA_BUILD_DIR}/index.html) +@@ -1209,9 +1197,6 @@ install (FILES ${GSA_STATIC_BUILD_FILES} + install (FILES public/robots.txt + DESTINATION ${GSA_DEST_DIR}) + +-# remove old generated files +-install (CODE "file(REMOVE_RECURSE ${GSA_DEST_DIR}/static)") +- + install (DIRECTORY + ${GSA_BUILD_DIR}/static + ${GSA_BUILD_DIR}/img diff --git a/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-20.8.1.ebuild b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-20.8.1.ebuild new file mode 100644 index 000000000000..2d64966d2e09 --- /dev/null +++ b/net-analyzer/greenbone-security-assistant/greenbone-security-assistant-20.8.1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CMAKE_MAKEFILE_GENERATOR="emake" +inherit cmake flag-o-matic systemd toolchain-funcs + +MY_PN="gsa" +MY_DN="gsad" +MY_NODE_N="node_modules" + +DESCRIPTION="Greenbone Security Assistant" +HOMEPAGE="https://www.greenbone.net/en/ https://github.com/greenbone/gsa" +SRC_URI="https://github.com/greenbone/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/greenbone/${MY_PN}/releases/download/v${PV}/gsa-node-modules-${PV}.tar.gz -> ${P}-${MY_NODE_N}.tar.gz" + +SLOT="0" +LICENSE="GPL-2+" +KEYWORDS="~amd64 ~x86" +IUSE="extras" + +DEPEND=" + acct-group/gvm + acct-user/gvm + dev-libs/libgcrypt:0= + dev-libs/libxml2 + dev-libs/libxslt + >=net-analyzer/gvm-libs-20.8.0 + net-libs/gnutls:= + net-libs/libmicrohttpd" + +RDEPEND=" + ${DEPEND} + >=net-analyzer/gvmd-20.8.0 + net-analyzer/ospd-openvas" + +BDEPEND=" + dev-python/polib + >=net-libs/nodejs-8.12.0 + >=sys-apps/yarn-1.15.2 + virtual/pkgconfig + extras? ( + app-doc/doxygen[dot] + app-doc/xmltoman + app-text/htmldoc + sys-devel/gettext + )" + +BUILD_DIR="${WORKDIR}/${MY_PN}-${PV}_build" +S="${WORKDIR}/${MY_PN}-${PV}" +MY_NODE_DIR="${S}/${MY_PN}/" + +PATCHES=( + # Disable yarn-fetch during compile. + # AND Remove ugly uninstall-snippet that causes failing re-emerge. + "${FILESDIR}/${P}-node.patch" +) + +src_prepare() { + cmake_src_prepare + # We will use pre-generated npm stuff. + mv "${WORKDIR}/${MY_NODE_N}" "${MY_NODE_DIR}" || die "couldn't move node_modules" + # Update .yarnrc accordingly. + echo "--modules-folder ${MY_NODE_DIR}" >> "${S}/${MY_PN}/.yarnrc" || die "echo failed" + # QA-Fix | Remove !CLANG doxygen warnings for 9.0.0 + if use extras; then + if ! tc-is-clang; then + local f + for f in gsad/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" + "-DSBINDIR=${EPREFIX}/usr/bin" + "-DGSAD_PID_DIR=${EPREFIX}/run/" + "-DDEFAULT_CONFIG_DIR=${EPREFIX}/etc/default" + "-DLOGROTATE_DIR=${EPREFIX}/etc/logrotate.d" + ) + cmake_src_configure +} + +src_compile() { + # setting correct PATH for finding react-js + NODE_ENV=production PATH="$PATH:${S}/gsa/node_modules/.bin/" cmake_src_compile + if use extras; then + cmake_build -C "${BUILD_DIR}" doc + cmake_build doc-full -C "${BUILD_DIR}" doc + fi + cmake_build rebuild_cache +} + +src_install() { + if use extras; then + local HTML_DOCS=( "${BUILD_DIR}/${MY_DN}/doc/generated/html/." ) + fi + cmake_src_install + + insinto /etc/gvm/sysconfig + doins "${FILESDIR}/${MY_DN}-daemon.conf" + + insinto /etc/gvm/reverse-proxy + doins "${FILESDIR}/${MY_PN}.nginx.reverse.proxy.example" + fowners -R gvm:gvm /etc/gvm + + newinitd "${FILESDIR}/${MY_DN}.init" "${MY_DN}" + newconfd "${FILESDIR}/${MY_DN}-daemon.conf" "${MY_DN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${MY_DN}.logrotate" "${MY_DN}" + + systemd_dounit "${FILESDIR}/${MY_DN}.service" +} |