From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 82F831581C1 for ; Thu, 4 Jul 2024 08:25:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF918E2A57; Thu, 4 Jul 2024 08:25:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2A60E2A57 for ; Thu, 4 Jul 2024 08:25:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CEDF133BEE8 for ; Thu, 4 Jul 2024 08:25:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C46A3A1 for ; Thu, 4 Jul 2024 08:25:20 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1720081276.1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/greenbone-feed-sync/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/greenbone-feed-sync/greenbone-feed-sync-24.3.0-r1.ebuild X-VCS-Directories: net-analyzer/greenbone-feed-sync/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50 X-VCS-Branch: master Date: Thu, 4 Jul 2024 08:25:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 939079e5-f3e7-448f-9959-152aba23de57 X-Archives-Hash: e070b5d9a1324a5ff34a68ec14e9527e commit: 1fb919b834b2ff3f0cdcbdd94402fd5e76dd7e50 Author: Florian Schmaus gentoo org> AuthorDate: Thu Jul 4 08:07:16 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Thu Jul 4 08:21:16 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fb919b8 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 gentoo.org> .../greenbone-feed-sync-24.3.0-r1.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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() {