From f95eeaf7db6ca1bfbb34c05fdad9ed9bb603b1c8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 10 Mar 2023 12:04:40 +0000 Subject: gentoo auto-resync : 10:03:2023 - 12:04:40 --- net-nds/389-ds-base/389-ds-base-2.3.2.ebuild | 1 + net-nds/389-ds-base/Manifest | 3 +- ...-ds-base-2.3.2-setuptools-67-packaging-23.patch | 167 +++++++++++++++++++++ net-nds/Manifest.gz | Bin 2395 -> 2395 bytes 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 net-nds/389-ds-base/files/389-ds-base-2.3.2-setuptools-67-packaging-23.patch (limited to 'net-nds') diff --git a/net-nds/389-ds-base/389-ds-base-2.3.2.ebuild b/net-nds/389-ds-base/389-ds-base-2.3.2.ebuild index 4080c2e34d42..017e6fdb227d 100644 --- a/net-nds/389-ds-base/389-ds-base-2.3.2.ebuild +++ b/net-nds/389-ds-base/389-ds-base-2.3.2.ebuild @@ -187,6 +187,7 @@ S="${WORKDIR}/${PN}-${P}" PATCHES=( "${FILESDIR}/${PN}-db-gentoo.patch" + "${FILESDIR}/${PN}-2.3.2-setuptools-67-packaging-23.patch" ) distutils_enable_tests pytest diff --git a/net-nds/389-ds-base/Manifest b/net-nds/389-ds-base/Manifest index 202c0aa7d5a2..f3bc50b1084c 100644 --- a/net-nds/389-ds-base/Manifest +++ b/net-nds/389-ds-base/Manifest @@ -1,3 +1,4 @@ +AUX 389-ds-base-2.3.2-setuptools-67-packaging-23.patch 5283 BLAKE2B 35850092bcab9500568f2bc385f73109d14067af375da3a154e36dd35ff30a9c0a04211defb77a20b835267a14730b17085276e1ab1232aca1261bcd2262066f SHA512 4da81028fa1adfd254cd87cd936e6ed1807892dd2d88553a2ff399d7c95a6af7657e58c26420b76853fda981ed1bfdbf762a8c276c7bd70f5ad9e93cac50da19 AUX 389-ds-base-db-gentoo.patch 838 BLAKE2B 88ba5e7b2868b9e790fd2b326e4ceddbbb5d82f8f598ab8a41c4f1acb79d3796a9e17f20fc9fd282a801e761612bf568947657f46001fd7d3fa76daadac44cfb SHA512 e37a1ca80cbd733e01bd077cb05cc656b725a3f596221946198a34b9e62f231642d5e10b09e40dd02564cab9e01593225b622c70d49b456054f9fcfd762f597d AUX 389-ds-base.conf 118 BLAKE2B 48d1ef0410b57658508544aa8826ff8e12a17aaf5de1c1ea3346414d6f16ea3b44d14e300b23b82441ae6272df36089892aabfd027c73a3ce70e6a3c9ec9d358 SHA512 69ed8b8f3bdbf9098088b0c92c41a238f16d14ba9f86ebc2b5debe5f001b4d8e235f7cff4731d72b30b5ac70486b0f4300b99646aa3926a3fa59515a64f16402 AUX 389-ds-snmp.initd 951 BLAKE2B 5598a35b1368cce330d314e335d8fe624ed318c3363f32e9128968cc23de9f87a253b4790673c7557325a395961490ee4918d9a9d9bce4efd23d616418735aaf SHA512 ce58938ac13efb74e3a70def3a44c267095aae4c2e47e65ff176e9cc7e65f4210af230dc52738b5dcd3d831c9ba97cb030f8e5c5f0eaccb6bc6a1a379383f3a4 @@ -169,5 +170,5 @@ DIST zeroize_derive-1.3.1.crate 10268 BLAKE2B cfca89267374c562dc89dbddcad9bc889b DIST zeroize_derive-1.3.3.crate 10380 BLAKE2B 5ed1fd50f483e1eeec54584adb3d6e20f12987037edf859bd0ca1e9274c41be332edfd4a294d25a96ec811ab06299185148702f4317dbcf1c5e0a23e7e8116b0 SHA512 cfe53287c80866868ca435414efba32267f68b6b95dca9c11201365c9fc21444b1ca926fe8a2dd64c0978a8691e351108538bc7e1fc6f60feb83dde93f56b3c3 EBUILD 389-ds-base-1.4.4.19-r4.ebuild 7005 BLAKE2B 190c57b470806b3868690fee92986eae9ccac9118ac46a13ae234ec86759461f5dfd6ef13815bf5f1b2348b70785dab4dc96593aee7c783a17430c056ac12621 SHA512 6cea45a0cfb6913f41c67bc27bad150435b7fbe6a2c9c35af8472a86b0202d9754133819a155df08f442b464dff8d06b7e1ff15978a3738c0cf73a38ec1be75d EBUILD 389-ds-base-2.1.0-r4.ebuild 6914 BLAKE2B a99eeac75cfa1bc96b270b70f7473a124c37395e4e8241b3c3f8bc78441565b5f1dab7479e4293e6f3baef705482b7893deab39f869a4b4cbec20957bd059909 SHA512 6f698a4a986bbb37171ce27ffba89a026135361738f74d4d8d77a1a9b1d6717d21d0d081b06a7f8e86c1c5bc2cd04faf729c43f7f75c6a7b85d1d2431f085de1 -EBUILD 389-ds-base-2.3.2.ebuild 6431 BLAKE2B 63a6ca9dc850ff51212ad873dc4ad9dca4933d273521bd41c2790411ce5fcf36f0cefe2bb56a932baa4d20d7aa61528af89639b685186db6492a1ebe5041ca9e SHA512 f360b6096b8e084d9d3268598c66143d4f540f73841ac1e14b95eec7205a0a5306fc5e0f182acbed2c39634d3b94262b8f39c929387a8c29e3b6230475479e6e +EBUILD 389-ds-base-2.3.2.ebuild 6491 BLAKE2B 4e2f613318d902f1cf2bcda368404ee004daec25d6e7049221cfec999c32aa375c323baa69cbce8d50bd8540c99cc65f5e01515788f14d8e5fc52518d938ba92 SHA512 531a7854f7f588c9260089cc50478b449c229660bbcdd40b10088ee4c88f9118d9f764a88f66bcccbb076b291ebc46a052da6b2d98a5d214195a81abc419a53b MISC metadata.xml 1582 BLAKE2B b29c4633cc0264cfc762327d8b24f21abed6a0e7b92d093d46826945f500d73898a488003d00a4c1fd2feef469a095ef3fc3d55c710f1c6543fb469e088ce2fd SHA512 6413a53a8494cb491bfdabfb4f097f657f86163e33e60ea0c7c1f02079a44d2e487ab2fd72a15f0e34d66ce840d52f058212b97213e45f50069d333a910dc83f diff --git a/net-nds/389-ds-base/files/389-ds-base-2.3.2-setuptools-67-packaging-23.patch b/net-nds/389-ds-base/files/389-ds-base-2.3.2-setuptools-67-packaging-23.patch new file mode 100644 index 000000000000..130ff673fae8 --- /dev/null +++ b/net-nds/389-ds-base/files/389-ds-base-2.3.2-setuptools-67-packaging-23.patch @@ -0,0 +1,167 @@ +https://bugs.gentoo.org/899702 +https://github.com/389ds/389-ds-base/commit/c0e2f68423ddde9bb91250d3f96dfc8617889514 + +From c0e2f68423ddde9bb91250d3f96dfc8617889514 Mon Sep 17 00:00:00 2001 +From: Viktor Ashirov +Date: Mon, 13 Feb 2023 18:39:20 +0100 +Subject: [PATCH] Issue 5642 - Build fails against setuptools 67.0.0 + +Bug Description: +`setuptools` 67.0.0 vendors `packaging` 23.0 which dropped `LegacyVersion`. + +Fix Description: +Replace `LegacyVersion` with `DSVersion` to compare version strings that are +not compatible with PEP 440 and PEP 508. + +Reviewed by: @mreynolds389, @progier389 + +Fixes: https://github.com/389ds/389-ds-base/issues/5642 +--- a/src/lib389/lib389/nss_ssl.py ++++ b/src/lib389/lib389/nss_ssl.py +@@ -23,16 +23,9 @@ + from lib389.passwd import password_generate + from lib389._mapped_object_lint import DSLint + from lib389.lint import DSCERTLE0001, DSCERTLE0002 +-from lib389.utils import ensure_str, format_cmd_list ++from lib389.utils import ensure_str, format_cmd_list, DSVersion + import uuid + +-# Setuptools ships with 'packaging' module, let's use it from there +-try: +- from pkg_resources.extern.packaging.version import LegacyVersion +-# Fallback to a normal 'packaging' module in case 'setuptools' is stripped +-except: +- from packaging.version import LegacyVersion +- + KEYBITS = 4096 + CA_NAME = 'Self-Signed-CA' + CERT_NAME = 'Server-Cert' +@@ -249,7 +242,7 @@ def openssl_rehash(self, certdir): + openssl_version = check_output(['/usr/bin/openssl', 'version']).decode('utf-8').strip() + except subprocess.CalledProcessError as e: + raise ValueError(e.output.decode('utf-8').rstrip()) +- rehash_available = LegacyVersion(openssl_version.split(' ')[1]) >= LegacyVersion('1.1.0') ++ rehash_available = DSVersion(openssl_version.split(' ')[1]) >= DSVersion('1.1.0') + + if rehash_available: + cmd = ['/usr/bin/openssl', 'rehash', certdir] +--- /dev/null ++++ b/src/lib389/lib389/tests/dsversion_test.py +@@ -0,0 +1,12 @@ ++from lib389.utils import DSVersion ++import pytest ++ ++versions = [('1.3.10.1', '1.3.2.1'), ++ ('2.3.2', '1.4.4.4'), ++ ('2.3.2.202302121950git1b4f5a5bf', '2.3.2'), ++ ('1.1.0a', '1.1.0')] ++ ++@pytest.mark.parametrize("x,y", versions) ++def test_dsversion(x, y): ++ assert DSVersion(x) > DSVersion(y) ++ +--- a/src/lib389/lib389/utils.py ++++ b/src/lib389/lib389/utils.py +@@ -42,12 +42,6 @@ def wait(self): + import subprocess + import math + import errno +-# Setuptools ships with 'packaging' module, let's use it from there +-try: +- from pkg_resources.extern.packaging.version import LegacyVersion +-# Fallback to a normal 'packaging' module in case 'setuptools' is stripped +-except: +- from packaging.version import LegacyVersion + from socket import getfqdn + from ldapurl import LDAPUrl + from contextlib import closing +@@ -1218,6 +1212,76 @@ def generate_ds_params(inst_num, role=ReplicaRole.STANDALONE): + + return instance_data + ++class DSVersion(): ++ def __init__(self, version): ++ self._version = str(version) ++ self._key = _cmpkey(self._version) ++ ++ def __str__(self): ++ return self._version ++ ++ def __repr__(self): ++ return f"" ++ ++ def __hash__(self): ++ return hash(self._key) ++ ++ def __lt__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key < other._key ++ ++ def __le__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key <= other._key ++ ++ def __eq__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key == other._key ++ ++ def __ge__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key >= other._key ++ ++ def __gt__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key > other._key ++ ++ def __ne__(self, other): ++ if not isinstance(other, DSVersion): ++ return NotImplemented ++ ++ return self._key != other._key ++ ++ ++def _parse_version_parts(s): ++ for part in re.compile(r"(\d+ | [a-z]+ | \. | -)", re.VERBOSE).split(s): ++ ++ if not part or part == ".": ++ continue ++ ++ if part[:1] in "0123456789": ++ # pad for numeric comparison ++ yield part.zfill(8) ++ else: ++ yield "*" + part ++ ++def _cmpkey(version): ++ parts = [] ++ for part in _parse_version_parts(version.lower()): ++ parts.append(part) ++ ++ return tuple(parts) ++ + + def get_ds_version(paths=None): + """ +@@ -1245,9 +1309,9 @@ def ds_is_related(relation, *ver, instance=None): + if len(ver) > 1: + for cmp_ver in ver: + if cmp_ver.startswith(ds_ver[:3]): +- return ops[relation](LegacyVersion(ds_ver),LegacyVersion(cmp_ver)) ++ return ops[relation](DSVersion(ds_ver), DSVersion(cmp_ver)) + else: +- return ops[relation](LegacyVersion(ds_ver), LegacyVersion(ver[0])) ++ return ops[relation](DSVersion(ds_ver), DSVersion(ver[0])) + + + def ds_is_older(*ver, instance=None): + diff --git a/net-nds/Manifest.gz b/net-nds/Manifest.gz index 6cef0ed24d04..28077c0b3753 100644 Binary files a/net-nds/Manifest.gz and b/net-nds/Manifest.gz differ -- cgit v1.2.3