Merge pull request #191748 from Ma27/bump-privacyidea

privacyidea: 3.7.2 -> 3.7.3, fix build
This commit is contained in:
Maximilian Bosch 2022-09-19 13:30:41 +02:00 committed by GitHub
commit 0bfdc6968a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,19 +35,7 @@ let
checkInputs = old.checkInputs ++ (with self; [
requests
]);
disabledTests = old.disabledTests ++ [
# ResourceWarning: unclosed file
"test_basic"
"test_date_to_unix"
"test_easteregg"
"test_file_rfc2231_filename_continuations"
"test_find_terminator"
"test_save_to_pathlib_dst"
];
disabledTestPaths = old.disabledTestPaths ++ [
# ResourceWarning: unclosed file
"tests/test_http.py"
];
doCheck = false;
});
# Required by flask-1.1
jinja2 = super.jinja2.overridePythonAttrs (old: rec {
@ -89,18 +77,25 @@ let
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
};
});
# Now requires `lingua` as check input that requires a newer `click`,
# however `click-7` is needed by the older flask we need here. Since it's just
# for the test-suite apparently, let's skip it for now.
Mako = super.Mako.overridePythonAttrs (lib.const {
checkInputs = [];
doCheck = false;
});
};
};
in
python3'.pkgs.buildPythonPackage rec {
pname = "privacyIDEA";
version = "3.7.2";
version = "3.7.3";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-bjMw69nKecv87nwsLfb4+h677WjZlkVcIpVe53AI9WU=";
sha256 = "sha256-odwYUGfgoRrGbLpOh8SuQzYby8Ya6hKSn0rdHp+RS/U=";
fetchSubmodules = true;
};
@ -115,23 +110,29 @@ python3'.pkgs.buildPythonPackage rec {
passthru.tests = { inherit (nixosTests) privacyidea; };
checkInputs = with python3'.pkgs; [ openssl mock pytestCheckHook responses testfixtures ];
preCheck = "export HOME=$(mktemp -d)";
postCheck = "unset HOME";
disabledTests = [
"AESHardwareSecurityModuleTestCase"
"test_01_cert_request"
# expects `/home/` to exist, fails with `FileNotFoundError: [Errno 2] No such file or directory: '/home/'`.
"test_01_loading_scripts"
# Tries to connect to `fcm.googleapis.com`.
"test_02_api_push_poll"
"test_02_cert_enrolled"
"test_02_enroll_rights"
"test_02_get_resolvers"
"test_02_success"
"test_03_get_identifiers"
"test_04_remote_user_auth"
# Timezone info not available in build sandbox
"test_14_convert_timestamp_to_utc"
# Fails because of different logger configurations
"test_01_create_default_app"
"test_03_logging_config_file"
"test_04_logging_config_yaml"
"test_05_logging_config_broken_yaml"
];
pythonImportsCheck = [ "privacyidea" ];
postPatch = ''
patchShebangs tests/testdata/scripts
substituteInPlace privacyidea/lib/resolvers/LDAPIdResolver.py --replace \
"/etc/privacyidea/ldap-ca.crt" \
"${cacert}/etc/ssl/certs/ca-bundle.crt"