python3Packages.oslo-utils: 7.3.0 -> 8.0.0

This commit is contained in:
Martin Weinelt
2025-01-27 10:56:23 +01:00
parent 1d97f8c439
commit c7a4c331c2
2 changed files with 35 additions and 2 deletions
@@ -0,0 +1,22 @@
diff --git a/oslo_utils/secretutils.py b/oslo_utils/secretutils.py
index 3183865..83e00e8 100644
--- a/oslo_utils/secretutils.py
+++ b/oslo_utils/secretutils.py
@@ -46,13 +46,10 @@ def md5(string=b'', usedforsecurity=True):
return hashlib.md5(string, usedforsecurity=usedforsecurity) # nosec
-if ctypes.util.find_library("crypt"):
- _libcrypt = ctypes.CDLL(ctypes.util.find_library("crypt"), use_errno=True)
- _crypt = _libcrypt.crypt
- _crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)
- _crypt.restype = ctypes.c_char_p
-else:
- _crypt = None
+_libcrypt = ctypes.CDLL("@crypt@", use_errno=True)
+_crypt = _libcrypt.crypt
+_crypt.argtypes = (ctypes.c_char_p, ctypes.c_char_p)
+_crypt.restype = ctypes.c_char_p
def crypt_mksalt(method):
@@ -7,16 +7,20 @@
eventlet,
fixtures,
iso8601,
libxcrypt-legacy,
netaddr,
netifaces,
oslo-i18n,
oslotest,
packaging,
pbr,
psutil,
pyparsing,
pytz,
qemu-utils,
replaceVars,
setuptools,
stdenv,
stestr,
testscenarios,
tzdata,
@@ -27,15 +31,21 @@
buildPythonPackage rec {
pname = "oslo-utils";
version = "7.3.0";
version = "8.0.0";
pyproject = true;
src = fetchPypi {
pname = "oslo.utils";
inherit version;
hash = "sha256-WaXT5Oe7x42AHM68K4I+QptiTBK7bjtudvccKfK/Id8=";
hash = "sha256-kG/PHIb2cfIkwZJbKo03WgU5FD+2FYsT4gKnndjmxpQ=";
};
patches = [
(replaceVars ./ctypes.patch {
crypt = "${lib.getLib libxcrypt-legacy}/lib/libcrypt${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
@@ -54,6 +64,7 @@ buildPythonPackage rec {
netifaces
oslo-i18n
packaging
psutil
pyparsing
pytz
tzdata