diff --git a/Force-click-8.2.0.patch b/Force-click-8.2.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..7125306e51bfa1d85addaa3f39203c13c652c671 --- /dev/null +++ b/Force-click-8.2.0.patch @@ -0,0 +1,39 @@ +From 3de3e22ee834c5092e83d8249e7a7d251d034d13 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Wed, 23 Jul 2025 12:26:39 +0800 +Subject: [PATCH] Force click < 8.2.0 + +--- + setup.py | 2 +- + src/mailman.egg-info/requires.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 714468c..53b5791 100644 +--- a/setup.py ++++ b/setup.py +@@ -115,7 +115,7 @@ case second 'm'. Any other spelling is incorrect.""", + 'atpublic', + 'authheaders>=0.15.2', + 'authres>=1.0.1', +- 'click>=8.0.0', ++ 'click>=8.0.0,<8.2.0', + 'dnspython>=1.14.0', + 'falcon>=3.0.0', + 'flufl.bounce>=4.0', +diff --git a/src/mailman.egg-info/requires.txt b/src/mailman.egg-info/requires.txt +index eeba2cb..3e23bdd 100644 +--- a/src/mailman.egg-info/requires.txt ++++ b/src/mailman.egg-info/requires.txt +@@ -3,7 +3,7 @@ alembic!=1.7.0,>=1.6.2 + atpublic + authheaders>=0.15.2 + authres>=1.0.1 +-click>=8.0.0 ++click>=8.0.0,<8.2.0 + dnspython>=1.14.0 + falcon>=3.0.0 + flufl.bounce>=4.0 +-- +2.47.1 + diff --git a/mailman.spec b/mailman.spec index 7294b35c1c2ca58ca1af49c4eb4de9006825bf80..bb599c5ccf8c38f5f6277817acfd6158b7217b88 100644 --- a/mailman.spec +++ b/mailman.spec @@ -1,16 +1,12 @@ %global pypi_name mailman -%global mmuser mailman -%global mmuserid 41 -%global mmgroup mailman -%global mmgroupid 41 %{?python_enable_dependency_generator} Name: mailman Version: 3.3.9 -Release: 2 +Release: 3 Epoch: 3 Summary: The GNU mailing list manager -License: GPLv3 +License: GPL-3.0-or-later URL: https://pypi.org/project/mailman Source0: https://files.pythonhosted.org/packages/source/m/mailman/mailman-%{version}.tar.gz Source1: mailman.cfg @@ -19,6 +15,7 @@ Source3: mailman3.service Source4: mailman3.logrotate Source5: mailman3-digests.service Source6: mailman3-digests.timer +Source7: mailman3-sysusers.conf # https://gitlab.com/mailman/mailman/-/merge_requests/1259 Patch0: fix-testcase-to-check-address-in-string.patch # https://gitlab.com/mailman/mailman/-/merge_requests/1228 @@ -27,49 +24,52 @@ Patch1: Modify-arc_sign-test-to-work-with-dkimpy-both.patch Patch2: Catch-a-database-exception-in-lmtp-runner-and-return-451-status.patch # https://gitlab.com/mailman/mailman/-/merge_requests/1267 Patch3: fix-falcon-4.0.2-upgrade.patch +# https://gitlab.com/mailman/mailman/-/commit/c7b94676e1dbc9a59534ac37ca0713e3a71dbbf0 +Patch4: Force-click-8.2.0.patch BuildArch: noarch BuildRequires: glibc-langpack-en BuildRequires: python%{python3_pkgversion}-devel >= 3.5 python%{python3_pkgversion}-setuptools %if %{undefined python_enable_dependency_generator} Requires: python%{python3_pkgversion} >= 3.5 python%{python3_pkgversion}-setuptools -Requires: python%{python3_pkgversion}-aiosmtpd >= 1.1 python%{python3_pkgversion}-alembic +Requires: python%{python3_pkgversion}-aiosmtpd >= 1.4.3 python%{python3_pkgversion}-alembic Requires: python%{python3_pkgversion}-atpublic -Requires: python%{python3_pkgversion}-authheaders >= 0.9.2 +Requires: python%{python3_pkgversion}-authheaders >= 0.15.2 Requires: python%{python3_pkgversion}-authres >= 1.0.1 -Requires: python%{python3_pkgversion}-click >= 7.0 +Requires: (python%{python3_pkgversion}-click >= 8.0.0 with python%{python3_pkgversion}-click < 8.2.0) Requires: python%{python3_pkgversion}-dateutil >= 2.0 Requires: python%{python3_pkgversion}-dns >= 1.14.0 -Requires: python%{python3_pkgversion}-falcon >= 1.0.0 -Requires: python%{python3_pkgversion}-flufl.bounce -Requires: python%{python3_pkgversion}-flufl.i18n >= 2.0.1 -Requires: python%{python3_pkgversion}-flufl.lock >= 3.1 +Requires: python%{python3_pkgversion}-falcon >= 3.0.0 +Requires: python%{python3_pkgversion}-flufl.bounce >= 4.0 +Requires: python%{python3_pkgversion}-flufl.i18n >= 3.2 +Requires: python%{python3_pkgversion}-flufl.lock >= 5.1 Requires: python%{python3_pkgversion}-gunicorn python%{python3_pkgversion}-lazr.config Requires: python%{python3_pkgversion}-passlib >= 1.6.0 Requires: python%{python3_pkgversion}-requests -Requires: python%{python3_pkgversion}-sqlalchemy >= 1.2.3 +Requires: python%{python3_pkgversion}-sqlalchemy >= 1.4 Requires: python%{python3_pkgversion}-zope-component Requires: python%{python3_pkgversion}-zope-configuration Requires: python%{python3_pkgversion}-zope-event Requires: python%{python3_pkgversion}-zope-interface >= 5.0 Requires: python%{python3_pkgversion}-importlib-resources %endif -BuildRequires: python%{python3_pkgversion}-aiosmtpd >= 1.1 python%{python3_pkgversion}-alembic +BuildRequires: python%{python3_pkgversion}-aiosmtpd >= 1.4.3 python%{python3_pkgversion}-alembic BuildRequires: python%{python3_pkgversion}-atpublic -BuildRequires: python%{python3_pkgversion}-authheaders >= 0.9.2 +BuildRequires: python%{python3_pkgversion}-authheaders >= 0.15.2 BuildRequires: python%{python3_pkgversion}-authres >= 1.0.1 -BuildRequires: python%{python3_pkgversion}-click >= 7.0 +BuildRequires: python%{python3_pkgversion}-click >= 8.0.0 +BuildRequires: python%{python3_pkgversion}-click < 8.2.0 BuildRequires: python%{python3_pkgversion}-dateutil >= 2.0 BuildRequires: python%{python3_pkgversion}-dns >= 1.14.0 -BuildRequires: python%{python3_pkgversion}-falcon >= 1.0.0 -BuildRequires: python%{python3_pkgversion}-flufl.bounce -BuildRequires: python%{python3_pkgversion}-flufl.i18n >= 2.0.1 -BuildRequires: python%{python3_pkgversion}-flufl.lock >= 3.1 +BuildRequires: python%{python3_pkgversion}-falcon >= 3.0.0 +BuildRequires: python%{python3_pkgversion}-flufl.bounce >= 4.0 +BuildRequires: python%{python3_pkgversion}-flufl.i18n >= 3.2 +BuildRequires: python%{python3_pkgversion}-flufl.lock >= 5.1 BuildRequires: python%{python3_pkgversion}-flufl.testing python%{python3_pkgversion}-gunicorn BuildRequires: python%{python3_pkgversion}-lazr.config BuildRequires: python%{python3_pkgversion}-mock BuildRequires: python%{python3_pkgversion}-nose2 python%{python3_pkgversion}-passlib >= 1.6.0 BuildRequires: python%{python3_pkgversion}-psycopg2 python%{python3_pkgversion}-requests -BuildRequires: python%{python3_pkgversion}-sqlalchemy >= 1.2.3 +BuildRequires: python%{python3_pkgversion}-sqlalchemy >= 1.4 BuildRequires: python%{python3_pkgversion}-zope-component BuildRequires: python%{python3_pkgversion}-zope-configuration BuildRequires: python%{python3_pkgversion}-zope-event @@ -85,8 +85,8 @@ Requires(post): policycoreutils Requires(post): policycoreutils-python-utils BuildRequires: checkpolicy, selinux-policy-devel util-linux %{?systemd_requires} +%{?sysusers_requires_compat} BuildRequires: systemd -Requires(pre): shadow-utils Requires: postfix %description @@ -130,7 +130,8 @@ fi EOF chmod +x %{buildroot}%{_bindir}/mailman3 install -D -m 0640 %{SOURCE1} %{buildroot}%{_sysconfdir}/mailman.cfg -install -D -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/tmpfiles.d/mailman3.conf +install -D -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/mailman3.conf +install -D -m 0644 %{SOURCE7} %{buildroot}%{_sysusersdir}/mailman3.conf install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/mailman3.service mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/ sed -e 's,@LOGDIR@,%{_localstatedir}/log/mailman3,g;s,@BINDIR@,%{_bindir},g' \ @@ -158,11 +159,7 @@ venv/bin/python setup.py develop venv/bin/python -m nose2 -v %pre -getent group %{mmgroup} >/dev/null || \ - groupadd -g %{mmgroupid} %{mmgroup} >/dev/null -getent passwd %{mmuser} >/dev/null || \ - useradd -r -u %{mmuserid} -g %{mmgroupid} -d %{_localstatedir}/lib/mailman3 -s /sbin/nologin \ - -c "Mailman, the mailing-list manager" %{mmuser} >/dev/null +%sysusers_create_compat %{SOURCE7} for selinuxvariant in %{selinux_variants}; do %selinux_relabel_pre -s ${selinuxvariant} done @@ -197,7 +194,8 @@ done %{python3_sitelib}/%{pypi_name}-*-py%{python3_version}.egg-info %{_unitdir}/*.service %{_unitdir}/*.timer -%{_prefix}/lib/tmpfiles.d/mailman3.conf +%{_tmpfilesdir}/mailman3.conf +%{_sysusersdir}/mailman3.conf %config(noreplace) %attr(640,mailman,mailman) %{_sysconfdir}/mailman.cfg %dir %{_sysconfdir}/mailman3.d %config(noreplace) %{_sysconfdir}/logrotate.d/mailman3 @@ -211,6 +209,11 @@ done %{_datadir}/selinux/*/mailman3.pp %changelog +* Wed Jul 23 2025 Funda Wang - 3:3.3.9-3 +- force python-click version requirement +- use systemd to create users and groups +- refresh required versions of 3rd-party components + * Sun Jan 26 2025 wangkai <13474090681@163.com> - 3:3.3.9-2 - Fix build error for python-dkimpy,python3,python-falcon upgrade diff --git a/mailman3-sysusers.conf b/mailman3-sysusers.conf new file mode 100644 index 0000000000000000000000000000000000000000..929ad6811e26fb350c6da605a18f9eb4e820f33f --- /dev/null +++ b/mailman3-sysusers.conf @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u mailman 41 "Mailman, the mailing-list manager" /var/lib/mailman3 /sbin/nologin