1 |
# $Id: smeserver-mailman.spec,v 1.2 2021/02/22 17:02:30 jpp Exp $ |
# $Id: smeserver-mailman.spec,v 1.5 2021/08/23 00:10:40 terryfage 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 11 |
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 |
|
|
32 |
%description |
%description |
33 |
Add Mailman integration to the SME server. |
Add Mailman integration to the SME server. |
34 |
|
|
35 |
%changelog |
%changelog |
36 |
|
* Tue Mar 15 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-11.sme |
37 |
|
- fix www line should be after apache line in /etc/group [SME: 8056] |
38 |
|
|
39 |
|
* Mon Aug 23 2021 Terry Fage <terry.fage@gmail.com> 1.5.0-10.sme |
40 |
|
- apply locale 2021-08-22 patch |
41 |
|
|
42 |
|
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-9.sme |
43 |
|
- fix conflicting folders [SME: 11278] |
44 |
|
|
45 |
* 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 |
46 |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
47 |
by assuming the date is correct and changing the weekday. |
by assuming the date is correct and changing the weekday. |
309 |
%setup |
%setup |
310 |
%patch0 -p1 |
%patch0 -p1 |
311 |
%patch1 -p1 |
%patch1 -p1 |
312 |
|
%patch2 -p1 |
313 |
|
|
314 |
#/bin/rm -r root/opt/mailman |
#/bin/rm -r root/opt/mailman |
315 |
|
|
325 |
mkdir -p root/var/spool/mailman/qfiles/$dir |
mkdir -p root/var/spool/mailman/qfiles/$dir |
326 |
done |
done |
327 |
|
|
|
|
|
328 |
%install |
%install |
329 |
rm -rf $RPM_BUILD_ROOT |
rm -rf $RPM_BUILD_ROOT |
330 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
331 |
rm -f e-smith-%{version}-filelist |
rm -f e-smith-%{version}-filelist |
332 |
/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)' \ |
|
333 |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
334 |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
335 |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
336 |
--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)' \ |
|
337 |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
338 |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
339 |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
347 |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
348 |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
349 |
|
|
350 |
|
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 |
351 |
|
#those will conflict with mailman rpm on sme10 |
352 |
|
# --dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ |
353 |
|
# --dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ |
354 |
|
# --dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ |
355 |
|
# --dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ |
356 |
|
|
357 |
# SME10 to avoid error |
# SME10 to avoid error |
358 |
#/usr/lib/rpm/brp-python-bytecompile |
#/usr/lib/rpm/brp-python-bytecompile |
359 |
# fix for unwanted listed compiled python files |
# fix for unwanted listed compiled python files |
376 |
"Mailman user" /usr/lib/mailman /bin/false |
"Mailman user" /usr/lib/mailman /bin/false |
377 |
|
|
378 |
#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] |
379 |
TEST=$(grep -P '^www|apache' /etc/group) |
TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:` |
380 |
TEST2='www:x:102:admin |
TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:` |
381 |
apache:x:102:' |
if [[ $TEST > $TEST2 ]]; then |
|
|
|
|
if [[ $TEST == $TEST2 ]]; then |
|
382 |
WWW=$(sed -n '/^www/p' /etc/group) |
WWW=$(sed -n '/^www/p' /etc/group) |
383 |
sed -i '/^www/d' /etc/group |
sed -i '/^www/d' /etc/group |
384 |
echo $WWW >> /etc/group |
echo $WWW >> /etc/group |