diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-27 06:06:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-27 06:06:27 +0000 |
commit | 8d5dbd847cbc704a6a06405856e94b461011afe3 (patch) | |
tree | 4d26462d027b14926335894749d2e01d982234d0 /net-analyzer/greenbone-security-assistant | |
parent | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff) |
gentoo resync : 27.03.2021
Diffstat (limited to 'net-analyzer/greenbone-security-assistant')
3 files changed, 174 insertions, 0 deletions
diff --git a/net-analyzer/greenbone-security-assistant/Manifest b/net-analyzer/greenbone-security-assistant/Manifest index 1c8062583f62..e3b48a9e4de9 100644 --- a/net-analyzer/greenbone-security-assistant/Manifest +++ b/net-analyzer/greenbone-security-assistant/Manifest @@ -1,3 +1,4 @@ +AUX greenbone-security-assistant-20.8.1-node.patch 2065 BLAKE2B 506488ab0aaea2b44f2545cb98bef006d8dd2f5b78664c5038e3f583165c6c84234089a961ecc1087c33936db6ced3d07c480cde83906e577115160ad5cd5003 SHA512 d9582c239b36a7e8f3b0d03b4fad5051b333d1b236a10eb3647df68251666c3645ac69af119e3853843edb4bfe60f572db72770358d93139791f2b1a6fedca1a AUX greenbone-security-assistant-8.0.1-node.patch 1706 BLAKE2B a075c37a233679eb175a177e2605dd933b3c3d5440c0ae74075267d8f64d32afe2a7b4ae40b79692fef46020c5a5dd649c5f329ad1b786569219c339ad659043 SHA512 c5bbd495e9b5dd82896db841fde03a72c9937cbb3135123b578cb2dc8f86b8ed57226b7b46fc90e3587a94ca6505c61058669937bba1f6f7ad3d0953cb025ca9 AUX greenbone-security-assistant-9.0.1-glibc_siglist.patch 686 BLAKE2B 2c4259b823837617a63d96f4bd47c6f5fa1d3e9a8ac4c10c5cbf3a39812713ab07f1799ae74f299ce969116d3b4bfffa891535826cc78c6aad0e3bfac5cc04c6 SHA512 f68195d35974ef540ec2510fd19e8e7a1953e503ab3fc94f0f18e7f6110172647835991908719829daa9165f45e62573f7fd0bc4c1be803be13dedf0f013dbbd AUX greenbone-security-assistant-9.0.1-uninstall-snippet.patch 398 BLAKE2B 107dced9e5fe74901b0ab7c5cb98164bab43d4276793d2a92e86a1321408bbe0a98a0ec0038359ea1e1fc21e45b6af80f939160e511f1ef79abbb655bf7dda41 SHA512 582c34e24acd0cc181cb48749eaf4c48a6888122f6ecb5a27ff8db6fd0a095deea7bbbbdeb664afb6b31bc0b9056ae02838b52c51cd1bd5a6b05f3d6a47d4e85 @@ -6,7 +7,10 @@ AUX gsad-daemon.conf 416 BLAKE2B 7c6dff183ceb8afdbe7abb75333fb8aa570be406ecb1864 AUX gsad.init 582 BLAKE2B fd158b117350b0025ba7853f35ccfbbf0a3d67a0fabc60d6b9b7b698fe432125de63329246b254b94cee0173ef7f0cfe4967c2cc64d7f4e522e5e45407621580 SHA512 46c8de9165767089ebeefa78062ed5e2d81fdc77c7348cc1725526278dfbeb79be767faa91a5d42bbf2d04523a750c8a4dcaf8293dc587ce1f2ac66cbba9b625 AUX gsad.logrotate 325 BLAKE2B 00fb4953308bbfb47f328a88541778adb2f8523108b72058e16f6e93c4c55b01bf668c57b0151555401d3bc989f3b8e5a4cb872f1b2cbae691a40dd590facb40 SHA512 ab43f8c54cf72e2a800bdcf4daebeabfa18a7ef49f098d65e70f97ccab3d36606c353b82b8fd6b4f2cecd289d36f48f805a5c34cba86f8e8c61bf074b0afe695 AUX gsad.service 434 BLAKE2B 43ac179a66d1f4ddeecddae1804ff9bbb48ddce7e7cd18feff6c5ca681ecd5f6401e1a26b94b6f5d5e83a9e59bcccf2f773edca50d1d2f9abca0934ac813fd40 SHA512 d842531486d852b710b512a631ddde75bdfaee1db097e024f0de439d9c8c3ed699f7116a685650f1acf23b1be982987d38bc16a0c3bd4c6405b16c8cffc5a476 +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 +EBUILD greenbone-security-assistant-20.8.1.ebuild 3092 BLAKE2B 386a7f034ce9d4399c7d8b58b34aedd859ce80575149c1a0bc87385f05771a2b3d40b13a09e7af458cf50746a2bf34457507fd2f24414fe7268d8fbc8324ed18 SHA512 826b94ed14454072d1dbfa826ea8a0dbde30f92ae8bb3c3c349135ec532fc1a96e76655d12eb3def52295fdebfebb28c4d0ddca63d91866f30769837089f9b24 EBUILD greenbone-security-assistant-9.0.1.ebuild 3168 BLAKE2B ff7eccf999d89c8894579050728f999ab60d6e94e1f976d597652dba151b7f2129143349952386f8fb323e744afea4cd931755561e2722d44194e643d6545d36 SHA512 b78193863dc3e290b6a29cc0a429ec6bec13f3224a3b53e81e2b8deedf923b92fe075c19ad36bc51950123984ef489df99e54249435c6e0c77b5653c3ed9a9bd MISC metadata.xml 983 BLAKE2B 64406a37c0938a62b929cbedf6c16425dd999633cbf8a068afac38fa48de7e6cc05a5dcd03371c57c6f5c5a46c7de266c1e815fd97494bd8bf25ac3820904956 SHA512 c10b98354c2e9015086df0abd3961b006709104dee4f6f6eff682bc1ef4fdaabd35e8e8cb9454e966111c867bbc88a08dca0993545bd18cac02e4113b5225307 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" +} |