Update OpenStack packages (#483651)
This commit is contained in:
@@ -4,13 +4,10 @@
|
||||
fetchPypi,
|
||||
autopage,
|
||||
cmd2,
|
||||
importlib-metadata,
|
||||
openstackdocstheme,
|
||||
pbr,
|
||||
prettytable,
|
||||
pyparsing,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
stevedore,
|
||||
sphinxHook,
|
||||
callPackage,
|
||||
@@ -18,17 +15,17 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cliff";
|
||||
version = "4.10.0";
|
||||
version = "4.13.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-jB9baCdBoDsMRgfILor0HU6cKFkCRkZWL4bN6ylZqG0=";
|
||||
hash = "sha256-t5zAssGfbG54yCvZI+BnhQNdd8sNKhpIMinwooNvDKc=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
openstackdocstheme
|
||||
setuptools
|
||||
pbr
|
||||
sphinxHook
|
||||
];
|
||||
|
||||
@@ -37,10 +34,7 @@ buildPythonPackage rec {
|
||||
dependencies = [
|
||||
autopage
|
||||
cmd2
|
||||
importlib-metadata
|
||||
pbr
|
||||
prettytable
|
||||
pyparsing
|
||||
pyyaml
|
||||
stevedore
|
||||
];
|
||||
|
||||
@@ -8,12 +8,14 @@
|
||||
oslo-i18n,
|
||||
oslo-utils,
|
||||
pbr,
|
||||
pythonAtLeast,
|
||||
requests,
|
||||
requests-mock,
|
||||
setuptools,
|
||||
stdenv,
|
||||
stestr,
|
||||
stevedore,
|
||||
writeText,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -56,15 +58,26 @@ buildPythonPackage rec {
|
||||
stestr
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
stestr run -e <(echo "
|
||||
${lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
osc_lib.tests.test_shell.TestShellCli.test_shell_args_cloud_public
|
||||
osc_lib.tests.test_shell.TestShellCli.test_shell_args_precedence
|
||||
osc_lib.tests.test_shell.TestShellCliPrecedence.test_shell_args_precedence_1
|
||||
osc_lib.tests.test_shell.TestShellCliPrecedence.test_shell_args_precedence_2
|
||||
''}")
|
||||
'';
|
||||
checkPhase =
|
||||
let
|
||||
disabledTests =
|
||||
lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"osc_lib.tests.test_shell.TestShellCli.test_shell_args_cloud_public"
|
||||
"osc_lib.tests.test_shell.TestShellCli.test_shell_args_precedence"
|
||||
"osc_lib.tests.test_shell.TestShellCliPrecedence.test_shell_args_precedence_1"
|
||||
"osc_lib.tests.test_shell.TestShellCliPrecedence.test_shell_args_precedence_2"
|
||||
]
|
||||
++ lib.optionals (pythonAtLeast "3.14") [
|
||||
# Disable test incompatible with Python 3.14+
|
||||
# See upstream issue: https://bugs.launchpad.net/python-openstackclient/+bug/2138684
|
||||
"osc_lib.tests.utils.test_tags.TestTagHelps"
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preCheck
|
||||
stestr run -e <(echo "${lib.concatStringsSep "\n" disabledTests}")
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "osc_lib" ];
|
||||
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
oslo-utils,
|
||||
oslotest,
|
||||
pbr,
|
||||
pythonAtLeast,
|
||||
setuptools,
|
||||
stdenv,
|
||||
stestr,
|
||||
writeText,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -64,22 +66,36 @@ buildPythonPackage rec {
|
||||
stestr
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
echo "nameserver 127.0.0.1" > resolv.conf
|
||||
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
|
||||
checkPhase =
|
||||
let
|
||||
disabledTests = [
|
||||
"oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_fair_lock_with_spawn"
|
||||
"oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_fair_lock_with_spawn_n"
|
||||
"oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn"
|
||||
"oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn_n"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"oslo_concurrency.tests.unit.test_lockutils.FileBasedLockingTestCase.test_interprocess_nonblocking_external_lock"
|
||||
"oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally"
|
||||
"oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally_lock_dir_not_exist"
|
||||
"oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_stack_size"
|
||||
]
|
||||
++ lib.optionals (pythonAtLeast "3.14") [
|
||||
# Disable test incompatible with Python 3.14+
|
||||
# See proposed change upstream: https://review.opendev.org/c/openstack/oslo.concurrency/+/971765
|
||||
"oslo_concurrency.tests.unit.test_lockutils"
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preCheck
|
||||
|
||||
stestr run -e <(echo "
|
||||
oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_fair_lock_with_spawn
|
||||
oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_fair_lock_with_spawn_n
|
||||
oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn
|
||||
oslo_concurrency.tests.unit.test_lockutils_eventlet.TestInternalLock.test_lock_with_spawn_n
|
||||
${lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
oslo_concurrency.tests.unit.test_lockutils.FileBasedLockingTestCase.test_interprocess_nonblocking_external_lock
|
||||
oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally
|
||||
oslo_concurrency.tests.unit.test_lockutils.LockTestCase.test_lock_externally_lock_dir_not_exist
|
||||
oslo_concurrency.tests.unit.test_processutils.PrlimitTestCase.test_stack_size
|
||||
''}")
|
||||
'';
|
||||
echo "nameserver 127.0.0.1" > resolv.conf
|
||||
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
|
||||
|
||||
stestr run -e <(echo "${lib.concatStringsSep "\n" disabledTests}")
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "oslo_concurrency" ];
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "oslo-config";
|
||||
version = "10.1.0";
|
||||
version = "10.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "oslo_config";
|
||||
inherit version;
|
||||
hash = "sha256-k6aPm9UiQhmLQEuweyuB9kQAgESkiC6xtQQkF7mBmzY=";
|
||||
hash = "sha256-bSghE/L7LuTUDIvs20rDmRfD9EfDuzVav0fw1hge3/w=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "oslo-metrics";
|
||||
version = "0.11.0";
|
||||
format = "setuptools";
|
||||
version = "0.14.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "opendev.org";
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
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):
|
||||
@@ -11,7 +11,6 @@
|
||||
debtcollector,
|
||||
iso8601,
|
||||
netaddr,
|
||||
netifaces,
|
||||
oslo-i18n,
|
||||
packaging,
|
||||
psutil,
|
||||
@@ -29,7 +28,6 @@
|
||||
oslotest,
|
||||
pyyaml,
|
||||
qemu-utils,
|
||||
replaceVars,
|
||||
stdenv,
|
||||
stestr,
|
||||
testscenarios,
|
||||
@@ -37,26 +35,27 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "oslo-utils";
|
||||
version = "9.1.0";
|
||||
version = "9.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "oslo_utils";
|
||||
inherit version;
|
||||
hash = "sha256-AcOHXnzKAFtZRlxCn0ZxE7X0sEIRy9U0yawvFSJ207M=";
|
||||
hash = "sha256-H0IAbea5KRoDBQJfXM24kHEg2I7X68N4ShRyozKASKs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./ctypes.patch {
|
||||
crypt = "${lib.getLib libxcrypt-legacy}/lib/libcrypt${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
})
|
||||
];
|
||||
postPatch =
|
||||
let
|
||||
soext = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in
|
||||
''
|
||||
substituteInPlace oslo_utils/secretutils.py \
|
||||
--replace-fail "ctypes.util.find_library(\"crypt\")" '"${lib.getLib libxcrypt-legacy}/lib/libcrypt${soext}"'
|
||||
|
||||
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
|
||||
rm test-requirements.txt
|
||||
'';
|
||||
# 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
|
||||
rm test-requirements.txt
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
pbr
|
||||
@@ -67,7 +66,6 @@ buildPythonPackage rec {
|
||||
debtcollector
|
||||
iso8601
|
||||
netaddr
|
||||
netifaces
|
||||
oslo-i18n
|
||||
packaging
|
||||
psutil
|
||||
|
||||
@@ -122,6 +122,8 @@ buildPythonPackage rec {
|
||||
disabledTests = [
|
||||
# Require network access
|
||||
"test_yaml_unicode_dump"
|
||||
# FileNotFoundError: Command not found: 'init'
|
||||
"test_git_cli"
|
||||
];
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -1,53 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
distutils,
|
||||
fetchFromGitHub,
|
||||
liberasurecode,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
six,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyeclib";
|
||||
version = "1.6.4";
|
||||
version = "1.7.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openstack";
|
||||
repo = "pyeclib";
|
||||
tag = version;
|
||||
hash = "sha256-oRitXlQunfqLSKMaSW3E1BnL0otA4UPj/y6bbiN0kPM=";
|
||||
hash = "sha256-wYzZUtr80KgVTznD0ISy7qhGngm4Xmt8Mauu9lP+2T4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# python's platform.platform() doesn't return "Darwin" (anymore?)
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail '"Darwin"' '"macOS"'
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
distutils
|
||||
setuptools
|
||||
];
|
||||
|
||||
preBuild =
|
||||
let
|
||||
ldLibraryPathEnvName =
|
||||
if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in
|
||||
''
|
||||
# required for the custom _find_library function in setup.py
|
||||
export ${ldLibraryPathEnvName}="${lib.makeLibraryPath [ liberasurecode ]}"
|
||||
'';
|
||||
|
||||
dependencies = [ liberasurecode ];
|
||||
buildInputs = [ liberasurecode ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
six
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
@@ -61,6 +40,7 @@ buildPythonPackage rec {
|
||||
description = "This library provides a simple Python interface for implementing erasure codes";
|
||||
homepage = "https://github.com/openstack/pyeclib";
|
||||
license = lib.licenses.bsd2;
|
||||
mainProgram = "pyeclib-backend";
|
||||
teams = [ lib.teams.openstack ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "stevedore";
|
||||
version = "5.4.1";
|
||||
version = "5.6.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-MTW1rlD+EoFu8pG6/0IKy3J/zTVhBuPpy/qeWYXNb0s=";
|
||||
hash = "sha256-8i0VxurUDFu/qcpUqn57SgfVmzauA+0SztGlTPC1GUU=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
||||
Reference in New Issue
Block a user