summaryrefslogtreecommitdiff
path: root/net-analyzer/notus-scanner
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-07 18:01:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-07 18:01:02 +0100
commitf87d83ebb0d6ae5915c4775f762a0b5bceb9b2a5 (patch)
tree69b6db4e0c713061615ae368d69a16b0302e5bb9 /net-analyzer/notus-scanner
parenta519cf56a0e5e456006d39c06f68de5e11c2f7e9 (diff)
gentoo auto-resync : 07:10:2023 - 18:01:02
Diffstat (limited to 'net-analyzer/notus-scanner')
-rw-r--r--net-analyzer/notus-scanner/Manifest7
-rw-r--r--net-analyzer/notus-scanner/files/notus-scanner-22.6.0-remove-tests.patch136
-rw-r--r--net-analyzer/notus-scanner/files/notus-scanner.initd7
-rw-r--r--net-analyzer/notus-scanner/notus-scanner-22.6.0.ebuild (renamed from net-analyzer/notus-scanner/notus-scanner-22.5.0-r1.ebuild)14
4 files changed, 154 insertions, 10 deletions
diff --git a/net-analyzer/notus-scanner/Manifest b/net-analyzer/notus-scanner/Manifest
index 62bb6f540d4c..e7ad7f05f150 100644
--- a/net-analyzer/notus-scanner/Manifest
+++ b/net-analyzer/notus-scanner/Manifest
@@ -1,6 +1,7 @@
-AUX notus-scanner.initd 617 BLAKE2B 674d7327f3c9242137ca3b949b3e19f1c01d96388c0676afe501836bb069b9132d25e13e5541ec6b653a314ec29524e7d27889038512330e286f28b8684c18a4 SHA512 697a138ca27ac7556628188c9b3f6db807a72d7119587194e8cf181e7b5ff4b393be5adf1fc325498ffd97bdedf8eb6fbc4566bd858ee29d677992c3e3d9a0e1
+AUX notus-scanner-22.6.0-remove-tests.patch 5439 BLAKE2B aaf85b04fb8a365869bf846224b0f698e4577226e7f77cdc121272c24dbca2f76b3a31fa54c17fc14eb6946e53c853c5b9a3305d20c119f5438c2090b366a107 SHA512 8d806a9417a29da80ecf9290f5708c6ee50de005e4579fefa3d37db4aba1f50effc9e6e573d7269c734855ca30fcc24f6ed06dbf84665144bc397faea544a6b7
+AUX notus-scanner.initd 749 BLAKE2B 7297894e9bb740ed842870b9a09ed838eada8e5be16b5553d0e7fbc80cc082b4ed72d15df5a40213dcd5e982b5a9810666ce9c7b7a6b97e829e56e1a3d45ec31 SHA512 86102907c4b14eef442f16dd1e5fef9dd6a7a3f9c442aad95333f1059de676974498f7be4b3308bfef2242faf2cda22d61af768b7842fa6b1a34c206722118df
AUX notus-scanner.service.conf 93 BLAKE2B 17030f4836aa96f45fdc9be67fb1b1924680ec29193bfc03d470bc45bf973542ca1b2bbb13253eb20c1618132b4b07c3fcaadd39451cb583d4c8f6fcd6e26c65 SHA512 36d5fbe95cd02b728d048a0baeed03448899696d0b3344a166afc9eecd6620e8af347ecc86c014ec9211ce72cc55a202a84b9ea68a7662c268378c37a734b08f
AUX notus-scanner.toml 272 BLAKE2B 41cd9a81754ee06604373e8d4644362167ed7165c36d2c1c6b2b991bdf5efdea3f620a83ee489f113b9b3500e638d516565b3f8dd830df14a3abb551399dae20 SHA512 476d795b53ce5ef1eabc335122298b2a8c23b5476822cc7f062a6849ecb0e322cd73fabf8d1928c30e557109c08a1c920413da73fade7d5e68c55511bd2d1f6d
-DIST notus-scanner-22.5.0.tar.gz 320894 BLAKE2B 3bf0cb633ad2636d9430705459d841b717139b162bd39f30a6bf06dafe1647b94c0e791b05390d340f97a4ff83351cbd71be6d5b1793dda82c6cad9250ce18c2 SHA512 48576d26a65c439fb00b345d97ba9917c3c2bf99ab5c94ed4488e4638c0442fdcd721ed8a08be147481a01bffc3eadec25029c0d6cd1aed2381221250b16c19d
-EBUILD notus-scanner-22.5.0-r1.ebuild 2172 BLAKE2B bd6834cbf4ec1e93898db364c6eb5565c064f7fe4b36bb9140d4f7c0333ea044919a9d952a2d8c337d0bfa42f63df9d005c5473e113b912d17cf2141ecded001 SHA512 8fa7d1fc55f20cd8e948efc00ddb5f9da83f8a0f1a1b43ddbd948a48c9562f15209cb15c2fa0ed9e05455f8e22ece555ec6495de35cb009e80f315949121cd4f
+DIST notus-scanner-22.6.0.tar.gz 324001 BLAKE2B db55ddd290d86e0e350824cbdf62caa78a29162fcf64196f70b25a8a8353a82b06509dc1d7d5240b88ee2aa2606f0d6d27075a7414c175093667914b8c8f372a SHA512 56c462be472668f959fff71ed928ca81c555f03d04325e63c35665a18d4b893ac62de9e7ddd060aba0cc6a34ca7c495defc39e788553cb7524c1f6658202bf7e
+EBUILD notus-scanner-22.6.0.ebuild 2159 BLAKE2B a103cef226c1b0dbb0ac54f6f1114a4e009c2ef5a526029e4dd7bf3a0ff8aec7bfcce5402703ea2b053ab7ff23b15f624729ba7d489fb61f6c5675350ac664d8 SHA512 944e25336ca4d8d8acf0801ffc3e6a41c85e1794f477e00b4d7dd3d0515c7743abfd5a562f4d19047bd59511dacfaaa1439a7228836739810250802fe456805a
MISC metadata.xml 735 BLAKE2B 78af413540fe6af7214b65b50b50aaf9cf59280037ada5228d38e529d90752b0516bf1d7514e7d9436edd93b50cd8a9dadc1e9fbf84a5c57a0ff0cb45b712cc8 SHA512 fdb4ce92c1eede58fe267ed2a4832dd1d4e7a1694591efb3d2ff372a621320275c4090317cb57c50724ceb7e386fa28965e45b724b311127ecd8665e2908cf92
diff --git a/net-analyzer/notus-scanner/files/notus-scanner-22.6.0-remove-tests.patch b/net-analyzer/notus-scanner/files/notus-scanner-22.6.0-remove-tests.patch
new file mode 100644
index 000000000000..7b3332051546
--- /dev/null
+++ b/net-analyzer/notus-scanner/files/notus-scanner-22.6.0-remove-tests.patch
@@ -0,0 +1,136 @@
+Removes tests needing to work with files which are disallowed by the sandbox.
+Patch by Giuseppe Foti
+
+--- a/tests/cli/test_cli_parser.py
++++ b/tests/cli/test_cli_parser.py
+@@ -28,68 +28,68 @@ class CliParserTestCase(unittest.TestCase):
+ def parse_args(self, args: List[str]) -> Arguments:
+ return self.parser.parse_arguments(args)
+
+- def test_mqtt_broker(self):
+- args = self.parse_args(["--mqtt-broker-address=localhost"])
+- self.assertEqual("localhost", args.mqtt_broker_address)
+-
+- args = self.parse_args(["-b", "localhost"])
+- self.assertEqual("localhost", args.mqtt_broker_address)
+-
+- def test_mqtt_broker_port(self):
+- args = self.parse_args(["--mqtt-broker-port=12345"])
+- self.assertEqual(args.mqtt_broker_port, 12345)
+-
+- args = self.parse_args(["-p", "12345"])
+- self.assertEqual(args.mqtt_broker_port, 12345)
+-
+- def test_correct_upper_case_log_level(self):
+- args = self.parse_args(["--log-level=ERROR"])
+- self.assertEqual("ERROR", args.log_level)
+-
+- def test_correct_lower_case_log_level(self):
+- args = self.parse_args(["-L", "info"])
+- self.assertEqual("INFO", args.log_level)
+-
+- def test_advisories_directory(self):
+- args = self.parse_args(["--products-directory=/tmp"])
+- self.assertEqual(Path("/tmp"), args.products_directory)
+-
+- def test_pid_file(self):
+- args = self.parse_args(["--pid-file=/foo/bar"])
+- self.assertEqual(args.pid_file, "/foo/bar")
+-
+- def test_log_file(self):
+- args = self.parse_args(["--log-file=/foo/bar"])
+- self.assertEqual(args.log_file, "/foo/bar")
+-
+- args = self.parse_args(["-l", "/foo/bar"])
+- self.assertEqual(args.log_file, "/foo/bar")
+-
+- def test_foreground(self):
+- args = self.parse_args(["--foreground"])
+- self.assertTrue(args.foreground)
+-
+- args = self.parse_args(["-f"])
+- self.assertTrue(args.foreground)
+-
+- def test_disable_hashsum_verification(self):
+- args = self.parse_args(["--disable-hashsum-verification=true"])
+- self.assertTrue(args.disable_hashsum_verification)
+-
+- def test_defaults(self):
+- args = self.parse_args([])
+-
+- self.assertEqual(
+- args.products_directory, Path(DEFAULT_PRODUCTS_DIRECTORY)
+- )
+- self.assertIsNone(args.config)
+- self.assertIsNone(args.log_file)
+- self.assertEqual(args.log_level, DEFAULT_LOG_LEVEL)
+- self.assertEqual(args.mqtt_broker_port, DEFAULT_MQTT_BROKER_PORT)
+- self.assertEqual(args.mqtt_broker_address, DEFAULT_MQTT_BROKER_ADDRESS)
+- self.assertEqual(args.pid_file, DEFAULT_PID_FILE)
+- self.assertEqual(args.disable_hashsum_verification, False)
+- self.assertFalse(args.foreground)
++# def test_mqtt_broker(self):
++# args = self.parse_args(["--mqtt-broker-address=localhost"])
++# self.assertEqual("localhost", args.mqtt_broker_address)
++
++# args = self.parse_args(["-b", "localhost"])
++# self.assertEqual("localhost", args.mqtt_broker_address)
++
++# def test_mqtt_broker_port(self):
++# args = self.parse_args(["--mqtt-broker-port=12345"])
++# self.assertEqual(args.mqtt_broker_port, 12345)
++
++# args = self.parse_args(["-p", "12345"])
++# self.assertEqual(args.mqtt_broker_port, 12345)
++
++# def test_correct_upper_case_log_level(self):
++# args = self.parse_args(["--log-level=ERROR"])
++# self.assertEqual("ERROR", args.log_level)
++
++# def test_correct_lower_case_log_level(self):
++# args = self.parse_args(["-L", "info"])
++# self.assertEqual("INFO", args.log_level)
++
++# def test_advisories_directory(self):
++# args = self.parse_args(["--products-directory=/tmp"])
++# self.assertEqual(Path("/tmp"), args.products_directory)
++
++# def test_pid_file(self):
++# args = self.parse_args(["--pid-file=/foo/bar"])
++# self.assertEqual(args.pid_file, "/foo/bar")
++
++# def test_log_file(self):
++# args = self.parse_args(["--log-file=/foo/bar"])
++# self.assertEqual(args.log_file, "/foo/bar")
++
++# args = self.parse_args(["-l", "/foo/bar"])
++# self.assertEqual(args.log_file, "/foo/bar")
++
++# def test_foreground(self):
++# args = self.parse_args(["--foreground"])
++# self.assertTrue(args.foreground)
++
++# args = self.parse_args(["-f"])
++# self.assertTrue(args.foreground)
++
++# def test_disable_hashsum_verification(self):
++# args = self.parse_args(["--disable-hashsum-verification=true"])
++# self.assertTrue(args.disable_hashsum_verification)
++
++# def test_defaults(self):
++# args = self.parse_args([])
++
++# self.assertEqual(
++# args.products_directory, Path(DEFAULT_PRODUCTS_DIRECTORY)
++# )
++# self.assertIsNone(args.config)
++# self.assertIsNone(args.log_file)
++# self.assertEqual(args.log_level, DEFAULT_LOG_LEVEL)
++# self.assertEqual(args.mqtt_broker_port, DEFAULT_MQTT_BROKER_PORT)
++# self.assertEqual(args.mqtt_broker_address, DEFAULT_MQTT_BROKER_ADDRESS)
++# self.assertEqual(args.pid_file, DEFAULT_PID_FILE)
++# self.assertEqual(args.disable_hashsum_verification, False)
++# self.assertFalse(args.foreground)
+
+ def test_config_file_provide_mqtt_broker_address(self):
+ with tempfile.NamedTemporaryFile() as fp:
diff --git a/net-analyzer/notus-scanner/files/notus-scanner.initd b/net-analyzer/notus-scanner/files/notus-scanner.initd
index 6db3422bccba..8af378b20fd6 100644
--- a/net-analyzer/notus-scanner/files/notus-scanner.initd
+++ b/net-analyzer/notus-scanner/files/notus-scanner.initd
@@ -21,6 +21,11 @@ depend() {
}
start_pre() {
- checkpath -d --owner ${GVM_USER} /var/run/notus-scanner
+ checkpath -d --owner ${GVM_USER} /run/notus-scanner
}
+start_post() {
+ ewaitfile 10 ${pidfile}
+ checkpath -d --owner root:root /run/notus-scanner
+ checkpath -f --owner root:root ${pidfile}
+}
diff --git a/net-analyzer/notus-scanner/notus-scanner-22.5.0-r1.ebuild b/net-analyzer/notus-scanner/notus-scanner-22.6.0.ebuild
index bd27df745477..c0dcb14e48c9 100644
--- a/net-analyzer/notus-scanner/notus-scanner-22.5.0-r1.ebuild
+++ b/net-analyzer/notus-scanner/notus-scanner-22.6.0.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_11 )
+PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_USE_PEP517=poetry
inherit distutils-r1 readme.gentoo-r1 systemd
@@ -14,16 +14,14 @@ SRC_URI="https://github.com/greenbone/notus-scanner/archive/refs/tags/v${PV}.tar
SLOT="0"
LICENSE="AGPL-3 AGPL-3+"
KEYWORDS="~amd64 ~x86"
-RESTRICT="!test? ( test )"
DEPEND="
acct-user/gvm
net-libs/paho-mqtt-c
- dev-python/psutil[${PYTHON_USEDEP}]
- >=dev-python/python-gnupg-0.5.0[${PYTHON_USEDEP}]
+ >=dev-python/psutil-5.9[${PYTHON_USEDEP}]
+ >=dev-python/python-gnupg-0.5.1[${PYTHON_USEDEP}]
<dev-python/packaging-23.2[${PYTHON_USEDEP}]
- >=dev-python/sentry-sdk-1.22.2[${PYTHON_USEDEP}]
- >=dev-python/rope-1.8.0[${PYTHON_USEDEP}]
+ >=dev-python/rope-1.9.0[${PYTHON_USEDEP}]
>=dev-python/paho-mqtt-1.5.1[${PYTHON_USEDEP}]
<dev-python/tomli-3[${PYTHON_USEDEP}]
"
@@ -33,6 +31,10 @@ RDEPEND="
app-misc/mosquitto
"
+PATCHES=(
+ "${FILESDIR}"/${P}-remove-tests.patch
+)
+
DOC_CONTENTS="
For validating the feed content, a GnuPG keychain with the Greenbone Community Feed integrity key needs to be created.
Please, read here on how to create it: