--- rpms/smeserver-mailman/contribs9/smeserver-mailman.spec 2015/09/07 17:27:21 1.5 +++ 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.4 2015/08/21 17:26:10 stephdl Exp $ +# $Id: smeserver-mailman.spec,v 1.6 2015/09/08 12:15:10 stephdl Exp $ # Authority: gordonr # Name: Gordon Rowell @@ -9,7 +9,7 @@ Summary: Mailman configuration for SME s %define name smeserver-mailman Name: %{name} %define version 1.5.0 -%define release 4 +%define release 6 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -25,14 +25,18 @@ BuildRequires: e-smith-devtools >= 1.13. 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 -* Fri Aug 21 2015 stephane de Labrusse 1.5.0-4.sme +* 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: 8453] +- 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] @@ -281,6 +285,7 @@ Add Mailman integration to the SME serve %prep %setup +%patch0 -p1 #/bin/rm -r root/opt/mailman @@ -354,11 +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 -WWW=$(sed -n '/^www/p' /etc/group) -sed -i '/^www/d' /etc/group -echo $WWW >> /etc/group - +#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