diff options
Diffstat (limited to 'net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild')
-rw-r--r-- | net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild | 15 |
1 files changed, 14 insertions, 1 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..d62d82b0000a 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 @@ -13,7 +13,7 @@ SRC_URI="https://github.com/greenbone/greenbone-feed-sync/archive/refs/tags/v${P LICENSE="GPL-3+" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="amd64" IUSE="cron" COMMON_DEPEND=" @@ -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() { |