diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2022-09-18 01:34:26 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2022-09-18 08:46:44 +0200 |
commit | f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1 (patch) | |
tree | 3fe302ad69e7ac9eb9a5112513f76c0c9185cbc6 /pkgs | |
parent | dcc27d13e65972591bbf5f779bd8aaa78789cd48 (diff) | |
download | nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar.gz nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar.bz2 nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar.lz nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar.xz nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.tar.zst nixpkgs-f1fa5f1eb471a993e3b342fd95c92f3b38acb1b1.zip |
privacyidea: 3.7.2 -> 3.7.3, fix build
ChangeLog: https://github.com/privacyidea/privacyidea/blob/v3.7.3/Changelog Failing Hydra build: https://hydra.nixos.org/build/190981743 * Disable tests of `werkzeug` since a lot of it is now failing with `unclosed file handle` (partly just randomly) which is an indicator for a broken test-suite. Dependency updates that would help us to get rid of this hackery are apparently in progress upstream[1]. * Disable checkPhase for `Mako` since it now requires `lingua` as `checkInput`, but it'd require `click>8`, however we use v7 here for the older flask. To avoid even more dependency chaos, I decided to just turn off the tests here. * Update disabled tests for `privacyidea` itself: a few tests are either removed or succeeding now (perhaps because we now set `$HOME` now for tests ;-) ). Documented on the remaining tests why they can't work in a `nix-build`. [1] https://github.com/privacyidea/privacyidea/issues/2876
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/privacyidea/default.nix | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/pkgs/applications/misc/privacyidea/default.nix b/pkgs/applications/misc/privacyidea/default.nix index 9f08000de51..d7613b0c2a5 100644 --- a/pkgs/applications/misc/privacyidea/default.nix +++ b/pkgs/applications/misc/privacyidea/default.nix @@ -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" |