--- rpms/smeserver-mailman/contribs10/smeserver-mailman.spec 2021/01/01 10:30:06 1.1 +++ rpms/smeserver-mailman/contribs10/smeserver-mailman.spec 2022/07/24 01:52:07 1.14 @@ -1,15 +1,16 @@ -# $Id: smeserver-mailman.spec,v 1.8 2016/03/09 08:39:06 unnilennium Exp $ +# $Id: smeserver-mailman.spec,v 1.13 2022/04/12 23:00:39 jpp Exp $ # Authority: gordonr # Name: Gordon Rowell # avoid brp bytecompile %define __os_install_post %{nil} +%define debug_package %{nil} Summary: Mailman configuration for SME server. %define name smeserver-mailman Name: %{name} %define version 1.5.0 -%define release 7 +%define release 16 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -27,11 +28,54 @@ Provides: e-smith-mailman AutoReqProv: no Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch Patch1: smeserver-mailman-1.5.0-locale-2016-03-09.patch +Patch2: smeserver-mailman-1.5.0-locale-2021-08-22.patch +Patch3: smeserver-mailman-1.5.0-bz11278-systemd.patch +Patch4: smeserver-mailman-1.5.0-bz11278-wrapper.patch +Patch5: smeserver-mailman-1.5.0-bz11937.patch +Patch6: smeserver-mailman-1.5.0-bz11941-checkperms.patch +Patch7: smeserver-mailman-1.5.0-bz2248-bz2247-enabled-localonly.patch +Patch8: smeserver-mailman-1.5.0-locale-2022-07-24.patch %description Add Mailman integration to the SME server. %changelog +* Sat Jul 23 2022 Jean-Philippe Pialasse 1.5.0-16.sme +- apply locale 2022-07-24.patch +- fix [SME: ] + +* Tue Apr 12 2022 Jean-Philippe Pialasse 1.5.0-15.sme +- fix permissions as expected by mailman [SME: 11941] +- make mailman enabled on install [SME: 2248] +- by default listinfo is public [SME: 2247] +- by default admin and archives are private [SME: 2247] +- make access modifiable [SME: 2247] + +* Tue Apr 12 2022 Jean-Philippe Pialasse 1.5.0-14.sme +- increase master password size to 18 [SME: 11937] + +* Sun Apr 10 2022 Jean-Philippe Pialasse 1.5.0-13.sme +- add c wrapper with setuid [SME: 11278] + +* Sun Apr 10 2022 Jean-Philippe Pialasse 1.5.0-12.sme +- fix missing service start [SME: 11278] + add update event + +* Tue Mar 15 2022 Jean-Philippe Pialasse 1.5.0-11.sme +- fix www line should be after apache line in /etc/group [SME: 8056] + +* Mon Aug 23 2021 Terry Fage 1.5.0-10.sme +- apply locale 2021-08-22 patch + +* Thu Jun 03 2021 Jean-Philippe Pialasse 1.5.0-9.sme +- fix conflicting folders [SME: 11278] + +* Mon Feb 22 2021 JP Pialasse 1.5.0-8.sme +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... +- allow build on SME10 + * Wed Mar 09 2016 JP Pialasse 1.5.0-7.sme - apply locale 2016-03-09 patch @@ -114,7 +158,8 @@ Add Mailman integration to the SME serve * Fri Jun 27 2008 Jonathan Martens 1.3.6-23 - Apply 27 Jun 2008 locale patch -* Thu May 21 2008 Jonathan Martens 1.3.6-22 +* Wed May 21 2008 Jonathan Martens 1.3.6-22 + Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... - Apply 21 May 2008 locale patch - Fixed version number in previous changelog entry @@ -292,12 +337,21 @@ Add Mailman integration to the SME serve %setup %patch0 -p1 %patch1 -p1 - +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 #/bin/rm -r root/opt/mailman %build perl createlinks +gcc -o root/usr/lib/mailman/bin/smelist smelist.c + + mkdir -p root/usr/lib/mailman/aliases mkdir -p root/opt @@ -308,22 +362,18 @@ do mkdir -p root/var/spool/mailman/qfiles/$dir done - %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f e-smith-%{version}-filelist /sbin/e-smith/genfilelist \ - --dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ - --dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ --dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ --dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ --file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ --file '/usr/lib/mailman/bin/smelist' 'attr(04755,root,mailman)' \ - --dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ - --dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ - --file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ - --dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ + --file '/usr/lib/mailman/bin/smelist.pl' 'attr(02755,root,mailman)' \ + --file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,mailman,mailman)' \ + --dir '/var/spool/mailman/qfiles' 'attr(02775,mailman,mailman)' \ --dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ --dir '/var/spool/mailman/qfiles/bounces' 'attr(02770,mailman,mailman)' \ --dir '/var/spool/mailman/qfiles/commands' 'attr(02770,mailman,mailman)' \ @@ -335,25 +385,22 @@ rm -f e-smith-%{version}-filelist --dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ $RPM_BUILD_ROOT > %{name}-%{version}-filelist -# SME8 build to avoid error -#/usr/lib/rpm/brp-python-bytecompile -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/bootstrap-console-save/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/bootstrap-console-save/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/mailman-update/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc -#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/mailman-update/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo -#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/mm_cfg.pyc -#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/mm_cfg.pyo -#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/MTA/SME.pyc -#rm -rf $RPM_BUILD_ROOT/usr/lib/mailman/Mailman/MTA/SME.pyo +sed -i -e '/\/usr\/lib\/mailman$/d ; /\/usr\/lib\/mailman\/bin$/d ; /\/usr\/lib\/mailman\/Mailman$/d ; /\/usr\/lib\/mailman\/Mailman\/MTA$/d ' %{name}-%{version}-filelist +#those will conflict with mailman rpm on sme10 +# --dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ +# --dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ +# --dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ +# --dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ -# fixe for unwanted listed compiled python files -cat %{name}-%{version}-filelist |sed '/py[oc]$/d'>%{name}-%{version}-filelist.tmp +# SME10 to avoid error +#/usr/lib/rpm/brp-python-bytecompile +# fix for unwanted listed compiled python files +# those pyc and pyo gets added by default by genfilelist, so need to filtering them out when we disable byte compile. +#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc" +#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo" +#/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc +cat %{name}-%{version}-filelist |sed -r '/py[oc]"?$/d'>%{name}-%{version}-filelist.tmp cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist -#rm -rf %{name}-%{version}-filelist.tmp %clean rm -rf $RPM_BUILD_ROOT @@ -367,11 +414,9 @@ rm -rf $RPM_BUILD_ROOT "Mailman user" /usr/lib/mailman /bin/false #mailman wants that the apache group appears before the www group in /etc/group [SME: 8056] -TEST=$(grep -P '^www|apache' /etc/group) -TEST2='www:x:102:admin -apache:x:102:' - -if [[ $TEST == $TEST2 ]]; then +TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:` +TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:` +if [[ $TEST > $TEST2 ]]; then WWW=$(sed -n '/^www/p' /etc/group) sed -i '/^www/d' /etc/group echo $WWW >> /etc/group