diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-20 23:12:11 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-22 15:36:36 +0200 |
commit | 5aad4e73b6c1152f381865ae138c4f5c883a4e75 (patch) | |
tree | a6b9ff251ead8a856d1a69ed3682f62097df70a5 /pkgs/development/python-modules/privacyidea | |
parent | 64f945278d6fa553e79e28cafe9b086b6b0c16b6 (diff) | |
download | nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar.gz nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar.bz2 nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar.lz nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar.xz nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.tar.zst nixpkgs-5aad4e73b6c1152f381865ae138c4f5c883a4e75.zip |
privacyIDEA: 3.5.2 -> 3.6
ChangeLog: https://github.com/privacyidea/privacyidea/releases/tag/v3.6 Unfortunately we have to use `sqlalchemy` at 1.3 for `sqlsoup`. As `sqlalchemy` is required by a lot of packages, I decided to move this package out of `pythonPackages` itself and instantiate a new `pythonPackages` inside the expression where `sqlalchemy` points to `sqlalchemy_1_3`.
Diffstat (limited to 'pkgs/development/python-modules/privacyidea')
-rw-r--r-- | pkgs/development/python-modules/privacyidea/default.nix | 73 | ||||
-rw-r--r-- | pkgs/development/python-modules/privacyidea/fix-tests.patch | 28 |
2 files changed, 0 insertions, 101 deletions
diff --git a/pkgs/development/python-modules/privacyidea/default.nix b/pkgs/development/python-modules/privacyidea/default.nix deleted file mode 100644 index 11ff6f71af6..00000000000 --- a/pkgs/development/python-modules/privacyidea/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ lib, buildPythonPackage, fetchFromGitHub, cacert, openssl, python, nixosTests - -, cryptography, pyrad, pymysql, python-dateutil, flask-versioned, flask_script -, defusedxml, croniter, flask_migrate, pyjwt1, configobj, sqlsoup, pillow -, python-gnupg, passlib, pyopenssl, beautifulsoup4, smpplib, flask-babel -, ldap3, huey, pyyaml, qrcode, oauth2client, requests, lxml, cbor2, psycopg2 -, pydash, ecdsa - -, mock, pytestCheckHook, responses, testfixtures -}: - -buildPythonPackage rec { - pname = "privacyIDEA"; - version = "3.5.2"; - - src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-k2om2LjkFRCT53ECPAJEztCiMdz4fF5eoipVUvSoyGo="; - fetchSubmodules = true; - }; - - patches = [ - # Subset of https://github.com/privacyidea/privacyidea/commit/359db6dd10212b8a210e0a83536e92e9e796a1f8, - # fixes app context errors in tests. Can be removed on the next bump. - ./fix-tests.patch - ]; - - propagatedBuildInputs = [ - cryptography pyrad pymysql python-dateutil flask-versioned flask_script - defusedxml croniter flask_migrate pyjwt1 configobj sqlsoup pillow - python-gnupg passlib pyopenssl beautifulsoup4 smpplib flask-babel - ldap3 huey pyyaml qrcode oauth2client requests lxml cbor2 psycopg2 - pydash ecdsa - ]; - - passthru.tests = { inherit (nixosTests) privacyidea; }; - - checkInputs = [ openssl mock pytestCheckHook responses testfixtures ]; - disabledTests = [ - "AESHardwareSecurityModuleTestCase" - "test_01_cert_request" - "test_01_loading_scripts" - "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" - "test_14_convert_timestamp_to_utc" - ]; - - pythonImportsCheck = [ "privacyidea" ]; - - postPatch = '' - substituteInPlace privacyidea/lib/resolvers/LDAPIdResolver.py --replace \ - "/etc/privacyidea/ldap-ca.crt" \ - "${cacert}/etc/ssl/certs/ca-bundle.crt" - ''; - - postInstall = '' - rm -rf $out/${python.sitePackages}/tests - ''; - - meta = with lib; { - description = "Multi factor authentication system (2FA, MFA, OTP Server)"; - license = licenses.agpl3Plus; - homepage = "http://www.privacyidea.org"; - maintainers = with maintainers; [ globin ma27 ]; - }; -} diff --git a/pkgs/development/python-modules/privacyidea/fix-tests.patch b/pkgs/development/python-modules/privacyidea/fix-tests.patch deleted file mode 100644 index 67c22d2052e..00000000000 --- a/pkgs/development/python-modules/privacyidea/fix-tests.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/privacyidea/lib/resolvers/LDAPIdResolver.py b/privacyidea/lib/resolvers/LDAPIdResolver.py -index ae9d87764..cfc609931 100644 ---- a/privacyidea/lib/resolvers/LDAPIdResolver.py -+++ b/privacyidea/lib/resolvers/LDAPIdResolver.py -@@ -97,11 +97,6 @@ - SERVERPOOL_ROUNDS = 2 - # The number of seconds a non-responding server is removed from the server pool - SERVERPOOL_SKIP = 30 --# The number of seconds that ldap3 waits if no server is left in the pool, before --# starting the next round --pooling_loop_timeout = get_app_config_value("PI_LDAP_POOLING_LOOP_TIMEOUT", 10) --log.info("Setting system wide POOLING_LOOP_TIMEOUT to {0!s}.".format(pooling_loop_timeout)) --ldap3.set_config_parameter("POOLING_LOOP_TIMEOUT", pooling_loop_timeout) - - # 1 sec == 10^9 nano secs == 10^7 * (100 nano secs) - MS_AD_MULTIPLYER = 10 ** 7 -@@ -314,6 +309,11 @@ def __init__(self): - self.serverpool_rounds = SERVERPOOL_ROUNDS - self.serverpool_skip = SERVERPOOL_SKIP - self.serverpool = None -+ # The number of seconds that ldap3 waits if no server is left in the pool, before -+ # starting the next round -+ pooling_loop_timeout = get_app_config_value("PI_LDAP_POOLING_LOOP_TIMEOUT", 10) -+ log.info("Setting system wide POOLING_LOOP_TIMEOUT to {0!s}.".format(pooling_loop_timeout)) -+ ldap3.set_config_parameter("POOLING_LOOP_TIMEOUT", pooling_loop_timeout) - - def checkPass(self, uid, password): - """ |