Merge #260527: Mailman fixes

...into staging-next
This commit is contained in:
Vladimír Čunát 2023-10-20 18:56:03 +02:00
commit 9320d9e7bc
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
10 changed files with 66 additions and 44 deletions

View file

@ -592,7 +592,7 @@ in {
# Since the mailman-web settings.py obstinately creates a logs
# dir in the cwd, change to the (writable) runtime directory before
# starting uwsgi.
ExecStart = "${pkgs.coreutils}/bin/env -C $RUNTIME_DIRECTORY ${pkgs.uwsgi.override { plugins = ["python3"]; }}/bin/uwsgi --json ${uwsgiConfigFile}";
ExecStart = "${pkgs.coreutils}/bin/env -C $RUNTIME_DIRECTORY ${pkgs.uwsgi.override { plugins = ["python3"]; python3 = webEnv.python; }}/bin/uwsgi --json ${uwsgiConfigFile}";
User = cfg.webUser;
Group = "mailman";
RuntimeDirectory = "mailman-uwsgi";

View file

@ -28,7 +28,7 @@
buildPythonPackage rec {
pname = "django-allauth";
version = "0.55.2";
version = "0.57.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -37,7 +37,7 @@ buildPythonPackage rec {
owner = "pennersr";
repo = pname;
rev = version;
hash = "sha256-i0thQymrEDkx2Yt9kM10j4LxL7yChHkG9vsS0508EQA=";
hash = "sha256-zhKqvm43rw28UKNFdfJ2C1dIeZfPqmchb1rJykm1lx4=";
};
nativeBuildInputs = [
@ -73,11 +73,6 @@ buildPythonPackage rec {
]
++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
disabledTestPaths = [
# tests are out of date
"allauth/socialaccount/providers/cern/tests.py"
];
passthru.tests = {
inherit dj-rest-auth;
};
@ -85,7 +80,7 @@ buildPythonPackage rec {
meta = with lib; {
changelog = "https://github.com/pennersr/django-allauth/blob/${version}/ChangeLog.rst";
description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication";
downloadPage = " https://github.com/pennersr/django-allauth";
downloadPage = "https://github.com/pennersr/django-allauth";
homepage = "https://www.intenct.nl/projects/django-allauth";
license = licenses.mit;
maintainers = with maintainers; [ derdennisop ];

View file

@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
# propagates
, django-gravatar2
@ -24,6 +25,17 @@ buildPythonPackage rec {
hash = "sha256-GpI1W0O9aJpLF/mcS23ktJDZsP69S2zQy7drOiWBnTM=";
};
patches = [
(fetchpatch {
url = "https://gitlab.com/mailman/django-mailman3/-/commit/840d0d531a0813de9a30e72427e202aea21b40fe.patch";
hash = "sha256-vltvsIP/SWpQZeXDUB+GWlTu+ghFMUqIT8i6CrYcmGo=";
})
(fetchpatch {
url = "https://gitlab.com/mailman/django-mailman3/-/commit/25c55e31d28f2fa8eb23f0e83c12f9b0a05bfbf0.patch";
hash = "sha256-ug5tBmnVfJTn5ufDDVg/cEtsZM59jQYJpQZV51T3qIc=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace 'django>=3.2,<4.2' 'django>=3.2,<4.3'

View file

@ -24,14 +24,23 @@ buildPythonPackage rec {
};
patches = [
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/bd65578e5a21494c89320094c61c1c77250bea33.diff";
hash = "sha256-9Trew6R5JDjtc0NRGoklqMVDEI4IEqFOdK3ezyBU6gI=";
})
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
./skip-broken-tests.patch
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/ea3a6d4ee6ea0c5cfb0f698d8c0ed25638150f47.patch";
hash = "sha256-Q9+GM+mCEZK0QVp7ulH2hORVig2411OvkC4+o36DeXg=";
})
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/feb0d1d954ee4d0ad1ad1d7d536bf9e83fa9431b.patch";
hash = "sha256-NURGI4FUnFlWRZfkioU9IYmZ+Zk9FKfZchjdn7N9abU=";
})
];
propagatedBuildInputs = [

View file

@ -1,28 +0,0 @@
diff --git a/tests/src/OneLogin/saml2_tests/response_test.py b/tests/src/OneLogin/saml2_tests/response_test.py
index fbe714f..bbed3c2 100644
--- a/tests/src/OneLogin/saml2_tests/response_test.py
+++ b/tests/src/OneLogin/saml2_tests/response_test.py
@@ -562,6 +562,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
response_2 = OneLogin_Saml2_Response(settings, xml_2)
self.assertTrue(response_2.check_one_condition())
+ @unittest.skip("test data expired")
def testCheckOneAuthnStatement(self):
"""
Tests the check_one_authnstatement method of SamlResponse
@@ -970,6 +971,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
with self.assertRaisesRegex(Exception, 'Could not validate timestamp: expired. Check system clock.'):
response_2.is_valid(self.get_request_data(), raise_exceptions=True)
+ @unittest.skip("test data expired")
def testIsInValidNoStatement(self):
"""
Tests the is_valid method of the OneLogin_Saml2_Response
@@ -1080,6 +1082,7 @@ class OneLogin_Saml2_Response_Test(unittest.TestCase):
with self.assertRaisesRegex(Exception, 'Found an Attribute element with duplicated Name'):
response.get_attributes()
+ @unittest.skip("test data expired")
def testIsInValidDestination(self):
"""
Tests the is_valid method of the OneLogin_Saml2_Response class

View file

@ -1,6 +1,7 @@
{ lib
, python3
, fetchPypi
, fetchpatch
}:
with python3.pkgs;
@ -17,6 +18,10 @@ buildPythonPackage rec {
patches = [
./0001-Disable-broken-test_help_output-testcase.patch
(fetchpatch {
url = "https://gitlab.com/mailman/hyperkitty/-/commit/5bb394662882bfc73c3e877458da44343aa06922.patch";
hash = "sha256-9vcY6nu3txDftH6aYpdh9qSrLzZceGjVFxuD1Ux18gw=";
})
];
postPatch = ''

View file

@ -2,7 +2,6 @@
, fetchpatch
, python3
, fetchPypi
, sphinx
, postfix
, lynx
}:
@ -30,7 +29,6 @@ buildPythonPackage rec {
flufl_i18n
flufl_lock
gunicorn
importlib-resources
lazr_config
passlib
requests
@ -52,6 +50,11 @@ buildPythonPackage rec {
url = "https://gitlab.com/mailman/mailman/-/commit/9613154f3c04fa2383fbf017031ef263c291418d.patch";
sha256 = "0vyw87s857vfxbf7kihwb6w094xyxmxbi1bpdqi3ybjamjycp55r";
})
(fetchpatch {
url = "https://gitlab.com/mailman/mailman/-/commit/5e4431af6bb7d672a7ed7e3329f8fac7812d47f8.patch";
excludes = [ ".gitlab-ci.yml" ];
hash = "sha256-y2AE9hU4Z1BpBlJywxMWiuRvltWkk+R9YgMkpemvlIo=";
})
./log-stderr.patch
];

View file

@ -20,6 +20,14 @@ python3.override {
*/
django = super.django_3;
elasticsearch = super.elasticsearch.overridePythonAttrs ({ pname, ... }: rec {
version = "7.17.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-ZsTs4q3+fMEg4rameYof1cd3rs+C7sObuVzvfPx+orM=";
};
});
# https://gitlab.com/mailman/hyperkitty/-/merge_requests/541
mistune = super.mistune.overridePythonAttrs (old: rec {
version = "2.0.5";
@ -29,6 +37,15 @@ python3.override {
hash = "sha256-AkYRPLJJLbh1xr5Wl0p8iTMzvybNkokchfYxUc7gnTQ=";
};
});
# django-q tests fail with redis 5.0.0.
redis = super.redis.overridePythonAttrs ({ pname, ... }: rec {
version = "4.5.4";
src = fetchPypi {
inherit pname version;
hash = "sha256-c+w12k2iZ9aEfkf2hzD91fYuLKaePvWIXGp4qTdMOJM=";
};
});
})
overlay;

View file

@ -1,4 +1,4 @@
{ lib, python3, fetchPypi
{ lib, python3, fetchPypi, fetchpatch
, sassc, hyperkitty, postorius
}:
@ -14,6 +14,13 @@ buildPythonPackage rec {
sha256 = "sha256-UWdqrcx529r6kwgf0YEHiDrpZlGoUBR6OdYtHMTPMGY=";
};
patches = [
(fetchpatch {
url = "https://gitlab.com/mailman/mailman-web/-/commit/448bba249d39c09c0cef5e059415cc07a3ce569c.patch";
hash = "sha256-rs1vaV4YyLyJ0+EGY70CirvjArpGQr29DOTvgj68wgs=";
})
];
postPatch = ''
# Django is depended on transitively by hyperkitty and postorius,
# and mailman_web has overly restrictive version bounds on it, so

View file

@ -26616,7 +26616,9 @@ with pkgs;
mackerel-agent = callPackage ../servers/monitoring/mackerel-agent { };
mailmanPackages = callPackage ../servers/mail/mailman { };
mailmanPackages = callPackage ../servers/mail/mailman {
python3 = python310;
};
inherit (mailmanPackages) mailman mailman-hyperkitty;
mailman-web = mailmanPackages.web;