diff options
author | Florian Schmaus <flow@gentoo.org> | 2024-07-04 10:07:16 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2024-07-04 10:21:16 +0200 |
commit | 1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50 (patch) | |
tree | 9a581940c3bbfc4e87b7dede32637faf0a3e63b7 | |
parent | app-misc/fastfetch: drop 2.17.1 (diff) | |
download | gentoo-1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50.tar.gz gentoo-1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50.tar.bz2 gentoo-1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50.zip |
net-analyzer/greenbone-feed-sync: revert "drop config file patching in src_test"
This essentially reverts commit 0375a7b2b589d7ffe2b73a3426d8c0abd4f4b38e, but
adjusts the sed comment to remove the reference to sandbox violations,
because this are not what we are seeing without the sed.
We also now use T to store config.py.orig, as it brings down the line
length.
Furthermore, we keep the "${WORKDIR}/${P}"/ part dropped, as it is
unnecessary.
Closes: https://bugs.gentoo.org/932836
Signed-off-by: Florian Schmaus <flow@gentoo.org>
-rw-r--r-- | net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild index c5178e60a3c3..9e06b6cd11bb 100644 --- a/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild +++ b/net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild @@ -38,6 +38,16 @@ RDEPEND=" distutils_enable_tests unittest src_test() { + # Make a copy of the original config + cp greenbone/feed/sync/config.py "${T}"/config.py.orig || die + + # Patch the config.py to not use files from /etc/gvm, as this may + # cause a PermissionError. See https://bugs.gentoo.org/932836#c10 + sed -i \ + -e 's:DEFAULT_CONFIG_FILE = "/etc/gvm/greenbone-feed-sync.toml":DEFAULT_CONFIG_FILE = "'"${WORKDIR}/${P}-${TARGET}"'/install/etc/gvm/greenbone-feed-sync.toml":' \ + -e 's:DEFAULT_ENTERPRISE_KEY_PATH = "/etc/gvm/greenbone-enterprise-feed-key":DEFAULT_ENTERPRISE_KEY_PATH = "'"${WORKDIR}/${P}-${TARGET}"'/install/etc/gvm/greenbone-enterprise-feed-key":' \ + greenbone/feed/sync/config.py || die + # Disable tests that require network access. sed -i \ -e 's:test_do_not_run_as_root:_&:' \ @@ -50,6 +60,9 @@ src_test() { tests/test_main.py || die distutils-r1_src_test + + # Restore config.py after test. + mv "${T}"/config.py.orig greenbone/feed/sync/config.py || die } python_install() { |