1 |
# $Id: smeserver-mailman.spec,v 1.8 2016/03/09 08:39:06 unnilennium Exp $ |
# $Id: smeserver-mailman.spec,v 1.7 2022/04/10 20:18:28 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 7 |
%define release 13 |
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 |
|
Patch4: smeserver-mailman-1.5.0-bz11278-wrapper.patch |
33 |
|
|
34 |
%description |
%description |
35 |
Add Mailman integration to the SME server. |
Add Mailman integration to the SME server. |
36 |
|
|
37 |
%changelog |
%changelog |
38 |
|
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-13.sme |
39 |
|
- add c wrapper with setuid [SME: 11278] |
40 |
|
|
41 |
|
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-12.sme |
42 |
|
- fix missing service start [SME: 11278] |
43 |
|
add update event |
44 |
|
|
45 |
|
* Tue Mar 15 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-11.sme |
46 |
|
- fix www line should be after apache line in /etc/group [SME: 8056] |
47 |
|
|
48 |
|
* Mon Aug 23 2021 Terry Fage <terry.fage@gmail.com> 1.5.0-10.sme |
49 |
|
- apply locale 2021-08-22 patch |
50 |
|
|
51 |
|
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-9.sme |
52 |
|
- fix conflicting folders [SME: 11278] |
53 |
|
|
54 |
|
* Mon Feb 22 2021 JP Pialasse <tests@pialasse.com> 1.5.0-8.sme |
55 |
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
56 |
|
by assuming the date is correct and changing the weekday. |
57 |
|
Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... |
58 |
|
- allow build on SME10 |
59 |
|
|
60 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.5.0-7.sme |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.5.0-7.sme |
61 |
- apply locale 2016-03-09 patch |
- apply locale 2016-03-09 patch |
62 |
|
|
139 |
* Fri Jun 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-23 |
* Fri Jun 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-23 |
140 |
- Apply 27 Jun 2008 locale patch |
- Apply 27 Jun 2008 locale patch |
141 |
|
|
142 |
* Thu May 21 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-22 |
* Wed May 21 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-22 |
143 |
|
Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... |
144 |
- Apply 21 May 2008 locale patch |
- Apply 21 May 2008 locale patch |
145 |
- Fixed version number in previous changelog entry |
- Fixed version number in previous changelog entry |
146 |
|
|
318 |
%setup |
%setup |
319 |
%patch0 -p1 |
%patch0 -p1 |
320 |
%patch1 -p1 |
%patch1 -p1 |
321 |
|
%patch2 -p1 |
322 |
|
%patch3 -p1 |
323 |
|
%patch4 -p1 |
324 |
|
|
325 |
#/bin/rm -r root/opt/mailman |
#/bin/rm -r root/opt/mailman |
326 |
|
|
327 |
%build |
%build |
328 |
perl createlinks |
perl createlinks |
329 |
|
gcc -o root//usr/lib/mailman/bin/smelist smelist.c |
330 |
mkdir -p root/usr/lib/mailman/aliases |
mkdir -p root/usr/lib/mailman/aliases |
331 |
|
|
332 |
mkdir -p root/opt |
mkdir -p root/opt |
337 |
mkdir -p root/var/spool/mailman/qfiles/$dir |
mkdir -p root/var/spool/mailman/qfiles/$dir |
338 |
done |
done |
339 |
|
|
|
|
|
340 |
%install |
%install |
341 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
342 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
343 |
rm -f e-smith-%{version}-filelist |
rm -f e-smith-%{version}-filelist |
344 |
/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)' \ |
|
345 |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
346 |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
347 |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
348 |
--file '/usr/lib/mailman/bin/smelist' 'attr(04755,root,mailman)' \ |
--file '/usr/lib/mailman/bin/smelist' 'attr(04755,root,mailman)' \ |
349 |
--dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ |
--file '/usr/lib/mailman/bin/smelist.pl' 'attr(02755,root,root)' \ |
|
--dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ |
|
350 |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
351 |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
352 |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
360 |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
361 |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
362 |
|
|
363 |
# 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 |
364 |
#/usr/lib/rpm/brp-python-bytecompile |
#those will conflict with mailman rpm on sme10 |
365 |
#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)' \ |
366 |
#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)' \ |
367 |
#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)' \ |
368 |
#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 |
|
369 |
|
|
370 |
# fixe for unwanted listed compiled python files |
# SME10 to avoid error |
371 |
cat %{name}-%{version}-filelist |sed '/py[oc]$/d'>%{name}-%{version}-filelist.tmp |
#/usr/lib/rpm/brp-python-bytecompile |
372 |
|
# fix for unwanted listed compiled python files |
373 |
|
# those pyc and pyo gets added by default by genfilelist, so need to filtering them out when we disable byte compile. |
374 |
|
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc" |
375 |
|
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo" |
376 |
|
#/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
377 |
|
cat %{name}-%{version}-filelist |sed -r '/py[oc]"?$/d'>%{name}-%{version}-filelist.tmp |
378 |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
|
#rm -rf %{name}-%{version}-filelist.tmp |
|
379 |
|
|
380 |
%clean |
%clean |
381 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
389 |
"Mailman user" /usr/lib/mailman /bin/false |
"Mailman user" /usr/lib/mailman /bin/false |
390 |
|
|
391 |
#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] |
392 |
TEST=$(grep -P '^www|apache' /etc/group) |
TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:` |
393 |
TEST2='www:x:102:admin |
TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:` |
394 |
apache:x:102:' |
if [[ $TEST > $TEST2 ]]; then |
|
|
|
|
if [[ $TEST == $TEST2 ]]; then |
|
395 |
WWW=$(sed -n '/^www/p' /etc/group) |
WWW=$(sed -n '/^www/p' /etc/group) |
396 |
sed -i '/^www/d' /etc/group |
sed -i '/^www/d' /etc/group |
397 |
echo $WWW >> /etc/group |
echo $WWW >> /etc/group |