1 |
# $Id: smeserver-mailman.spec,v 1.1 2021/01/01 10:30:06 brianr Exp $ |
# $Id: smeserver-mailman.spec,v 1.6 2022/03/15 18:15:59 jpp Exp $ |
2 |
# Authority: gordonr |
# Authority: gordonr |
3 |
# Name: Gordon Rowell |
# Name: Gordon Rowell |
4 |
|
|
9 |
%define name smeserver-mailman |
%define name smeserver-mailman |
10 |
Name: %{name} |
Name: %{name} |
11 |
%define version 1.5.0 |
%define version 1.5.0 |
12 |
%define release 8 |
%define release 12 |
13 |
Version: %{version} |
Version: %{version} |
14 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
15 |
License: GPL |
License: GPL |
27 |
AutoReqProv: no |
AutoReqProv: no |
28 |
Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
29 |
Patch1: smeserver-mailman-1.5.0-locale-2016-03-09.patch |
Patch1: smeserver-mailman-1.5.0-locale-2016-03-09.patch |
30 |
|
Patch2: smeserver-mailman-1.5.0-locale-2021-08-22.patch |
31 |
|
Patch3: smeserver-mailman-1.5.0-bz11278-systemd.patch |
32 |
|
|
33 |
%description |
%description |
34 |
Add Mailman integration to the SME server. |
Add Mailman integration to the SME server. |
35 |
|
|
36 |
%changelog |
%changelog |
37 |
|
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-12.sme |
38 |
|
- fix missing service start [SME: 11278] |
39 |
|
add update event |
40 |
|
|
41 |
|
* Tue Mar 15 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-11.sme |
42 |
|
- fix www line should be after apache line in /etc/group [SME: 8056] |
43 |
|
|
44 |
|
* Mon Aug 23 2021 Terry Fage <terry.fage@gmail.com> 1.5.0-10.sme |
45 |
|
- apply locale 2021-08-22 patch |
46 |
|
|
47 |
|
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-9.sme |
48 |
|
- fix conflicting folders [SME: 11278] |
49 |
|
|
50 |
* Mon Feb 22 2021 JP Pialasse <tests@pialasse.com> 1.5.0-8.sme |
* Mon Feb 22 2021 JP Pialasse <tests@pialasse.com> 1.5.0-8.sme |
51 |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
52 |
by assuming the date is correct and changing the weekday. |
by assuming the date is correct and changing the weekday. |
314 |
%setup |
%setup |
315 |
%patch0 -p1 |
%patch0 -p1 |
316 |
%patch1 -p1 |
%patch1 -p1 |
317 |
|
%patch2 -p1 |
318 |
|
%patch3 -p1 |
319 |
|
|
320 |
#/bin/rm -r root/opt/mailman |
#/bin/rm -r root/opt/mailman |
321 |
|
|
331 |
mkdir -p root/var/spool/mailman/qfiles/$dir |
mkdir -p root/var/spool/mailman/qfiles/$dir |
332 |
done |
done |
333 |
|
|
|
|
|
334 |
%install |
%install |
335 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
336 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
337 |
rm -f e-smith-%{version}-filelist |
rm -f e-smith-%{version}-filelist |
338 |
/sbin/e-smith/genfilelist \ |
/sbin/e-smith/genfilelist \ |
|
--dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ |
|
|
--dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ |
|
339 |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
340 |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
341 |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
342 |
--file '/usr/lib/mailman/bin/smelist' 'attr(04755,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)' \ |
|
343 |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
344 |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
345 |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
353 |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
354 |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
355 |
|
|
356 |
# SME8 build to avoid error |
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 |
357 |
#/usr/lib/rpm/brp-python-bytecompile |
#those will conflict with mailman rpm on sme10 |
358 |
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
# --dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ |
359 |
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
# --dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ |
360 |
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
# --dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ |
361 |
#rm -rf $RPM_BUILD_ROOT/etc/e-smith/events/domain-delete/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo |
# --dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ |
|
#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 |
|
362 |
|
|
363 |
# fixe for unwanted listed compiled python files |
# SME10 to avoid error |
364 |
|
#/usr/lib/rpm/brp-python-bytecompile |
365 |
|
# fix for unwanted listed compiled python files |
366 |
|
# those pyc and pyo gets added by default by genfilelist, so need to filtering them out when we disable byte compile. |
367 |
|
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc" |
368 |
|
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo" |
369 |
|
#/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
370 |
cat %{name}-%{version}-filelist |sed -r '/py[oc]"?$/d'>%{name}-%{version}-filelist.tmp |
cat %{name}-%{version}-filelist |sed -r '/py[oc]"?$/d'>%{name}-%{version}-filelist.tmp |
371 |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
|
#rm -rf %{name}-%{version}-filelist.tmp |
|
372 |
|
|
373 |
%clean |
%clean |
374 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
382 |
"Mailman user" /usr/lib/mailman /bin/false |
"Mailman user" /usr/lib/mailman /bin/false |
383 |
|
|
384 |
#mailman wants that the apache group appears before the www group in /etc/group [SME: 8056] |
#mailman wants that the apache group appears before the www group in /etc/group [SME: 8056] |
385 |
TEST=$(grep -P '^www|apache' /etc/group) |
TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:` |
386 |
TEST2='www:x:102:admin |
TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:` |
387 |
apache:x:102:' |
if [[ $TEST > $TEST2 ]]; then |
|
|
|
|
if [[ $TEST == $TEST2 ]]; then |
|
388 |
WWW=$(sed -n '/^www/p' /etc/group) |
WWW=$(sed -n '/^www/p' /etc/group) |
389 |
sed -i '/^www/d' /etc/group |
sed -i '/^www/d' /etc/group |
390 |
echo $WWW >> /etc/group |
echo $WWW >> /etc/group |