public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pontos/, net-analyzer/pontos/files/
@ 2024-01-10  8:59 Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2024-01-10  8:59 UTC (permalink / raw
  To: gentoo-commits

commit:     3a60371cf9ab0fc47f5fbb4859b00e0fbd67624f
Author:     Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sun Dec 17 11:35:18 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jan 10 08:59:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a60371c

net-analyzer/pontos: new package, add 23.12.3

Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34323
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-analyzer/pontos/Manifest                       |  1 +
 .../pontos/files/pontos-23.12.3-remove-tests.patch | 61 ++++++++++++++++++++++
 net-analyzer/pontos/metadata.xml                   | 20 +++++++
 net-analyzer/pontos/pontos-23.12.3.ebuild          | 46 ++++++++++++++++
 4 files changed, 128 insertions(+)

diff --git a/net-analyzer/pontos/Manifest b/net-analyzer/pontos/Manifest
new file mode 100644
index 000000000000..bfb2e432c672
--- /dev/null
+++ b/net-analyzer/pontos/Manifest
@@ -0,0 +1 @@
+DIST pontos-23.12.3.tar.gz 388010 BLAKE2B 1c40ed09e8329b24074f220bef94e57ae85fbf1664d0b44007414f71e872d0dc1435d8a2de02f5d8454a0e8ab284dfd0601883af5133ce6056d67068d21c3082 SHA512 299fca3032dd7a863bc0dee9080b2822566fa94086be546fe65040d52efe9ec4443e8593b07337f53424acdc47fe048fdb56997a093d0488a2aab34108d9c5d5

diff --git a/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch b/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch
new file mode 100644
index 000000000000..ff17ea3a422c
--- /dev/null
+++ b/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch
@@ -0,0 +1,61 @@
+# Remove tests with a reference to system tmp directory
+# Patch by Giuseppe Foti
+
+--- a/tests/version/commands/test_java.py
++++ b/tests/version/commands/test_java.py
+@@ -154,17 +154,6 @@ class GetCurrentJavaVersionCommandTestCase(unittest.TestCase):
+ 
+             version_file_path.unlink()
+ 
+-    def test_getting_version_without_version_config(self):
+-        exp_err_msg = (
+-            r"No /tmp/.*/upgradeVersion\.json config file found\. "
+-            r"This file is required for pontos"
+-        )
+-        with temp_directory(change_into=True), self.assertRaisesRegex(
+-            VersionError,
+-            exp_err_msg,
+-        ):
+-            JavaVersionCommand(SemanticVersioningScheme).get_current_version()
+-
+ 
+ class VerifyJavaVersionCommandTestCase(unittest.TestCase):
+     def test_verify_version(self):
+@@ -196,37 +185,6 @@ class VerifyJavaVersionCommandTestCase(unittest.TestCase):
+             readme_file_path.unlink()
+             properties_file_path.unlink()
+ 
+-    def test_verify_version_does_not_match(self):
+-        exp_err_msg = (
+-            r"Provided version 2023\.9\.4 does not match the "
+-            + r"current version 2023\.9\.3 "
+-            + r"in '/tmp/.*/upgradeVersion\.json'"
+-        )
+-
+-        with temp_directory(change_into=True), self.assertRaisesRegex(
+-            VersionError,
+-            exp_err_msg,
+-        ):
+-            version_file_path = Path("upgradeVersion.json")
+-            version_file_path.write_text(
+-                TEMPLATE_UPGRADE_VERSION_SINGLE_JSON, encoding="utf-8"
+-            )
+-
+-            version = "2023.9.3"
+-            new_version = "2023.9.4"
+-            readme_file_path = Path("README.md")
+-            readme_file_path.write_text(
+-                TEMPLATE_UPGRADE_VERSION_MARKDOWN.format(version),
+-                encoding="utf-8",
+-            )
+-
+-            JavaVersionCommand(SemanticVersioningScheme).verify_version(
+-                SemanticVersioningScheme.parse_version(new_version)
+-            )
+-
+-            version_file_path.unlink()
+-            readme_file_path.unlink()
+-
+ 
+ class UpdateJavaVersionCommandTestCase(unittest.TestCase):
+     def test_update_version(self):

diff --git a/net-analyzer/pontos/metadata.xml b/net-analyzer/pontos/metadata.xml
new file mode 100644
index 000000000000..57f5489f18e3
--- /dev/null
+++ b/net-analyzer/pontos/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>foti.giuseppe@gmail.com</email>
+		<name>Giuseppe Foti</name>
+	</maintainer>
+	<maintainer type="project" proxied="proxy">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription lang="en">
+	The pontos Python package is a collection of utilities, tools, classes
+	and functions maintained by Greenbone Networks.
+	It is needed to run tests on some Greenbone Vulnerability Management packages.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">greenbone/pontos</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/net-analyzer/pontos/pontos-23.12.3.ebuild b/net-analyzer/pontos/pontos-23.12.3.ebuild
new file mode 100644
index 000000000000..4fb3b9fb5680
--- /dev/null
+++ b/net-analyzer/pontos/pontos-23.12.3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_USE_PEP517=poetry
+
+inherit distutils-r1
+
+DESCRIPTION="Common utilities and tools maintained by Greenbone Networks"
+HOMEPAGE="
+	https://www.greenbone.net
+	https://github.com/greenbone/pontos/
+	https://greenbone.github.io/pontos/
+"
+
+SRC_URI="https://github.com/greenbone/pontos/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-3+"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+	>=dev-python/colorful-0.5.4[${PYTHON_USEDEP}]
+	>=dev-python/tomlkit-0.5.11[${PYTHON_USEDEP}]
+	>=dev-python/packaging-20.3[${PYTHON_USEDEP}]
+	>=dev-python/httpx-0.23[${PYTHON_USEDEP}]
+	>=dev-python/rich-12.4.4[${PYTHON_USEDEP}]
+	>=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}]
+	>=dev-python/semver-2.13[${PYTHON_USEDEP}]
+	>=dev-python/lxml-4.9.0[${PYTHON_USEDEP}]
+"
+
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	# Removing tests with a reference to system tmp directory
+	"${FILESDIR}"/pontos-23.12.3-remove-tests.patch
+)
+
+distutils_enable_tests unittest
+
+src_prepare() {
+	distutils-r1_src_prepare
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pontos/, net-analyzer/pontos/files/
@ 2024-01-10  8:59 Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2024-01-10  8:59 UTC (permalink / raw
  To: gentoo-commits

commit:     3f4600258f86b09fb779199cbf7df69da45fb354
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 10 08:57:24 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jan 10 08:59:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f460025

net-analyzer/pontos: drop patch, use EPYTEST_DESELECT and pytest runner

Furthermore, add test_git_error, which seems to fail if there is a git
above the portage's package temp directory.

Also drop the unnecessary definition of src_prepare.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../pontos/files/pontos-23.12.3-remove-tests.patch | 61 ----------------------
 net-analyzer/pontos/pontos-23.12.3.ebuild          | 15 +++---
 2 files changed, 6 insertions(+), 70 deletions(-)

diff --git a/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch b/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch
deleted file mode 100644
index ff17ea3a422c..000000000000
--- a/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-# Remove tests with a reference to system tmp directory
-# Patch by Giuseppe Foti
-
---- a/tests/version/commands/test_java.py
-+++ b/tests/version/commands/test_java.py
-@@ -154,17 +154,6 @@ class GetCurrentJavaVersionCommandTestCase(unittest.TestCase):
- 
-             version_file_path.unlink()
- 
--    def test_getting_version_without_version_config(self):
--        exp_err_msg = (
--            r"No /tmp/.*/upgradeVersion\.json config file found\. "
--            r"This file is required for pontos"
--        )
--        with temp_directory(change_into=True), self.assertRaisesRegex(
--            VersionError,
--            exp_err_msg,
--        ):
--            JavaVersionCommand(SemanticVersioningScheme).get_current_version()
--
- 
- class VerifyJavaVersionCommandTestCase(unittest.TestCase):
-     def test_verify_version(self):
-@@ -196,37 +185,6 @@ class VerifyJavaVersionCommandTestCase(unittest.TestCase):
-             readme_file_path.unlink()
-             properties_file_path.unlink()
- 
--    def test_verify_version_does_not_match(self):
--        exp_err_msg = (
--            r"Provided version 2023\.9\.4 does not match the "
--            + r"current version 2023\.9\.3 "
--            + r"in '/tmp/.*/upgradeVersion\.json'"
--        )
--
--        with temp_directory(change_into=True), self.assertRaisesRegex(
--            VersionError,
--            exp_err_msg,
--        ):
--            version_file_path = Path("upgradeVersion.json")
--            version_file_path.write_text(
--                TEMPLATE_UPGRADE_VERSION_SINGLE_JSON, encoding="utf-8"
--            )
--
--            version = "2023.9.3"
--            new_version = "2023.9.4"
--            readme_file_path = Path("README.md")
--            readme_file_path.write_text(
--                TEMPLATE_UPGRADE_VERSION_MARKDOWN.format(version),
--                encoding="utf-8",
--            )
--
--            JavaVersionCommand(SemanticVersioningScheme).verify_version(
--                SemanticVersioningScheme.parse_version(new_version)
--            )
--
--            version_file_path.unlink()
--            readme_file_path.unlink()
--
- 
- class UpdateJavaVersionCommandTestCase(unittest.TestCase):
-     def test_update_version(self):

diff --git a/net-analyzer/pontos/pontos-23.12.3.ebuild b/net-analyzer/pontos/pontos-23.12.3.ebuild
index 4fb3b9fb5680..6d1c9629e587 100644
--- a/net-analyzer/pontos/pontos-23.12.3.ebuild
+++ b/net-analyzer/pontos/pontos-23.12.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -34,13 +34,10 @@ RDEPEND="
 
 DEPEND="${RDEPEND}"
 
-PATCHES=(
-	# Removing tests with a reference to system tmp directory
-	"${FILESDIR}"/pontos-23.12.3-remove-tests.patch
+EPYTEST_DESELECT=(
+	tests/git/test_git.py::GitExtendedTestCase::test_git_error
+	tests/version/commands/test_java.py::GetCurrentJavaVersionCommandTestCase::test_getting_version_without_version_config
+	tests/version/commands/test_java.py::VerifyJavaVersionCommandTestCase::test_verify_version_does_not_match
 )
 
-distutils_enable_tests unittest
-
-src_prepare() {
-	distutils-r1_src_prepare
-}
+distutils_enable_tests pytest


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-10  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10  8:59 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/pontos/, net-analyzer/pontos/files/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2024-01-10  8:59 Florian Schmaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox