summaryrefslogtreecommitdiff
path: root/dev-python/oslo-utils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-17 04:04:27 +0100
commit8796aaedb3257bbe4d80b0033408b2210b2259d6 (patch)
tree1ffee2ca4a87bd5dba43077259c000f9086fbfc8 /dev-python/oslo-utils
parent61a1cada8ceb208845fa604b982216b0a7b099cb (diff)
gentoo auto-resync : 17:10:2024 - 04:04:26
Diffstat (limited to 'dev-python/oslo-utils')
-rw-r--r--dev-python/oslo-utils/Manifest2
-rw-r--r--dev-python/oslo-utils/files/oslo-utils-7.3.0-netaddr-1.patch37
-rw-r--r--dev-python/oslo-utils/oslo-utils-7.3.0-r1.ebuild60
3 files changed, 99 insertions, 0 deletions
diff --git a/dev-python/oslo-utils/Manifest b/dev-python/oslo-utils/Manifest
index ab0b24ed4303..41de00b911d0 100644
--- a/dev-python/oslo-utils/Manifest
+++ b/dev-python/oslo-utils/Manifest
@@ -1,3 +1,5 @@
+AUX oslo-utils-7.3.0-netaddr-1.patch 1238 BLAKE2B 2d3e8e93007a7d73bd855b8b40f4958edfb6e0355a7ed53c9ed186f8d6acd92b0eca42dd66685aa77efd550be07cd71a59235de4d819f8d82ca0e56a1f711c97 SHA512 e55136b715acf20f7cdbf5ce20a8717c9f102657c07df08be5ef617cfa466c21bbb223c55776c8bf3cbc0f0667d3fcdedae406f3fd294baa34dd89f8c2dbcdd8
DIST oslo.utils-7.3.0.tar.gz 132561 BLAKE2B 98533d7b4e3111a548bfab4cb97854acb4485d84d89eed40fec713fcb14a63deedbf5c019f4ed44d9be535034f3323e96b9b9f5d30467899ea8cd1bdc217200b SHA512 71dcf6fe25cc4c0a2580c32b4a4ceaa22fa1046f84bebc2cbf2c3148379b569638c2e2cce3b7a9bb1bbb87660034baa199bd4a831baa4608ef2f4bbc1d39edb6
+EBUILD oslo-utils-7.3.0-r1.ebuild 1546 BLAKE2B 6ba731ab8b64ec5700b97d6068a89cbde7c0d0fde53de5f0cccfd653c04159a78ceee080d6d6cf864e5cdfee90d4f4ebc9e4170fcb04a055c6e6dfce64a7e337 SHA512 92b8349038956ed222d460ff92e75aa62a7990238b0456735e97160063b160bc8d97fc1b397840ec18782e5caa962f17ad66fadd7e685926859ed94c2b84c4d9
EBUILD oslo-utils-7.3.0.ebuild 1463 BLAKE2B 566fe1a749ab7e7047b5f6ffba86e7406a476f933faa2e3e4504518661bb41b19023d688c58ef263cc9a7d1a82d276762d47e79949767028c2769da3908b8672 SHA512 87abe145fd6b07cf731f1d76784c3285347eb7970f5efb250046291ccd8e0ee82069bc43bb54a814238408de1753c1a76ded983263ba8e0456560883a520fe49
MISC metadata.xml 667 BLAKE2B 2d3b1f3c01b74c3db8239b0711f6b10488cc17b214509a64607f3112e7100eb39f2d8774639d47a40cbad6786e7dee1430327a78b357b516325e5d06babcdee5 SHA512 e97a4a1f3718a69d39706d816f17018a7d57fd81702cd88ee01f9b849405f2f08769d381c5e41be84d8ae0c69a2a977b0dcb3ee1a481502ebf49f5ad6a5d6a95
diff --git a/dev-python/oslo-utils/files/oslo-utils-7.3.0-netaddr-1.patch b/dev-python/oslo-utils/files/oslo-utils-7.3.0-netaddr-1.patch
new file mode 100644
index 000000000000..93c9a0bc015a
--- /dev/null
+++ b/dev-python/oslo-utils/files/oslo-utils-7.3.0-netaddr-1.patch
@@ -0,0 +1,37 @@
+From 20983093b42bf5a9c43f8fa5d23784d26ccbd7b7 Mon Sep 17 00:00:00 2001
+From: Takashi Kajinami <kajinamit@oss.nttdata.com>
+Date: Mon, 7 Oct 2024 11:06:26 +0900
+Subject: [PATCH] Fix compatibility with netaddr 1.1.0
+
+Fix a few different behaviors detected in unit tests.
+
+Closes-Bug: #2054134
+Change-Id: I34f29d983fccc10cc4994fb23527a6dd0eac2b83
+---
+ oslo_utils/netutils.py | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/oslo_utils/netutils.py b/oslo_utils/netutils.py
+index 6e4c54c1..405256ee 100644
+--- a/oslo_utils/netutils.py
++++ b/oslo_utils/netutils.py
+@@ -101,6 +101,9 @@ def is_valid_ipv4(address, strict=None):
+ (``a.b.c.d``) as opposed to address format
+ (``a.b.c.d``, ``a.b.c``, ``a.b``, ``a``).
+ """
++ if not address:
++ return False
++
+ if strict is not None:
+ flag = INET_PTON if strict else INET_ATON
+ try:
+@@ -228,6 +231,9 @@ def get_ipv6_addr_by_EUI64(prefix, mac):
+
+ .. versionadded:: 1.4
+ """
++ if not isinstance(prefix, str):
++ msg = _("Prefix must be a string")
++ raise TypeError(msg)
+ # Check if the prefix is an IPv4 address
+ if is_valid_ipv4(prefix):
+ msg = _("Unable to generate IP address by EUI64 for IPv4 prefix")
diff --git a/dev-python/oslo-utils/oslo-utils-7.3.0-r1.ebuild b/dev-python/oslo-utils/oslo-utils-7.3.0-r1.ebuild
new file mode 100644
index 000000000000..1bcc92b47ea4
--- /dev/null
+++ b/dev-python/oslo-utils/oslo-utils-7.3.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYPI_PN=${PN/-/.}
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Oslo Utility library"
+HOMEPAGE="
+ https://opendev.org/openstack/oslo.utils/
+ https://github.com/openstack/oslo.utils/
+ https://pypi.org/project/oslo.utils/
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+
+RDEPEND="
+ >=dev-python/iso8601-0.1.11[${PYTHON_USEDEP}]
+ >=dev-python/oslo-i18n-3.15.3[${PYTHON_USEDEP}]
+ >=dev-python/netaddr-0.10.0[${PYTHON_USEDEP}]
+ >=dev-python/netifaces-0.10.4[${PYTHON_USEDEP}]
+ >=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
+ >=dev-python/pyparsing-2.1.0[${PYTHON_USEDEP}]
+ >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-3.13[${PYTHON_USEDEP}]
+ dev-python/tzdata[${PYTHON_USEDEP}]
+"
+# qemu needed for qemu-img
+BDEPEND="
+ >=dev-python/pbr-2.2.0[${PYTHON_USEDEP}]
+ test? (
+ app-emulation/qemu
+ >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
+ >=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
+ >=dev-python/oslotest-3.2.0[${PYTHON_USEDEP}]
+ >=dev-python/ddt-1.0.1[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ local PATCHES=(
+ # https://review.opendev.org/c/openstack/oslo.utils/+/931597
+ "${FILESDIR}/${P}-netaddr-1.patch"
+ )
+
+ distutils-r1_src_prepare
+
+ # require eventlet
+ rm oslo_utils/tests/test_eventletutils.py || die
+}