--- rpms/smeserver-mailman/contribs9/smeserver-mailman.spec 2013/11/13 12:55:27 1.1 +++ rpms/smeserver-mailman/contribs9/smeserver-mailman.spec 2015/09/11 15:05:17 1.7 @@ -1,4 +1,4 @@ -# $Id: smeserver-mailman.spec,v 1.10 2013/09/20 15:59:31 unnilennium Exp $ +# $Id: smeserver-mailman.spec,v 1.6 2015/09/08 12:15:10 stephdl Exp $ # Authority: gordonr # Name: Gordon Rowell @@ -8,30 +8,41 @@ Summary: Mailman configuration for SME server. %define name smeserver-mailman Name: %{name} -%define version 1.4.0 -%define release 1 +%define version 1.5.0 +%define release 6 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Applications/Internet -Source: %{name}-%{version}.tar.xz +Source: %{name}-%{version}.tar.gz BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch Requires: e-smith-base -Requires: e-smith-release >= 8.0 +Requires: e-smith-release >= 9.0 Requires: mailman >= 2.1.9-20.el5.sme Requires: e-smith-formmagick >= 1.4.0-12 BuildRequires: e-smith-devtools >= 1.13.1-03 Obsoletes: e-smith-mailman Provides: e-smith-mailman AutoReqProv: no - +Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch %description Add Mailman integration to the SME server. %changelog -* Wed Nov 13 2013 Daniel Berteaud 1.4.0-1.sme -- Rebuild for SME9 +* Fri Sep 11 2015 stephane de Labrusse 1.5.0-6.sme +- Mailman is now added to the backup/restore process [SME: 2411] +- Added smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch + +* Fri Aug 21 2015 stephane de Labrusse 1.5.0-5.sme +- mailman wants that the group apache appears before the www group in /etc/group +- script added in %pre to change that order. [SME: 8056] + +* Fri Aug 21 2015 stephane de Labrusse 1.5.0-3.sme +- Initial release to contribs9 [SME: 8453] + +* Fri Jun 20 2014 stephane de Labrusse 1.5.0-1.sme +- Initial release to sme9 * Fri Sep 20 2013 JP Pialasse 1.3.0-45.sme - fix bug [SME: 7787] @@ -274,8 +285,9 @@ Add Mailman integration to the SME serve %prep %setup +%patch0 -p1 -/bin/rm -r root/opt/mailman +#/bin/rm -r root/opt/mailman %build perl createlinks @@ -316,6 +328,21 @@ 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 + # fixe for unwanted listed compiled python files cat %{name}-%{version}-filelist |sed '/py[oc]$/d'>%{name}-%{version}-filelist.tmp cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist @@ -332,6 +359,17 @@ rm -rf $RPM_BUILD_ROOT /sbin/e-smith/create-system-user mailman 41 \ "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 + WWW=$(sed -n '/^www/p' /etc/group) + sed -i '/^www/d' /etc/group + echo $WWW >> /etc/group +fi + %post %preun