1 |
# $Id: smeserver-mailman.spec,v 1.9 2022/04/10 21:17:10 jpp Exp $ |
2 |
# Authority: gordonr |
3 |
# Name: Gordon Rowell |
4 |
|
5 |
# avoid brp bytecompile |
6 |
%define __os_install_post %{nil} |
7 |
%define debug_package %{nil} |
8 |
|
9 |
Summary: Mailman configuration for SME server. |
10 |
%define name smeserver-mailman |
11 |
Name: %{name} |
12 |
%define version 1.5.0 |
13 |
%define release 13 |
14 |
Version: %{version} |
15 |
Release: %{release}%{?dist} |
16 |
License: GPL |
17 |
Group: Applications/Internet |
18 |
Source: %{name}-%{version}.tar.gz |
19 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
20 |
BuildArchitectures: noarch |
21 |
Requires: e-smith-base |
22 |
Requires: e-smith-release >= 9.0 |
23 |
Requires: mailman >= 2.1.9-20.el5.sme |
24 |
Requires: e-smith-formmagick >= 1.4.0-12 |
25 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
26 |
Obsoletes: e-smith-mailman |
27 |
Provides: e-smith-mailman |
28 |
AutoReqProv: no |
29 |
Patch0: smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
30 |
Patch1: smeserver-mailman-1.5.0-locale-2016-03-09.patch |
31 |
Patch2: smeserver-mailman-1.5.0-locale-2021-08-22.patch |
32 |
Patch3: smeserver-mailman-1.5.0-bz11278-systemd.patch |
33 |
Patch4: smeserver-mailman-1.5.0-bz11278-wrapper.patch |
34 |
|
35 |
%description |
36 |
Add Mailman integration to the SME server. |
37 |
|
38 |
%changelog |
39 |
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-13.sme |
40 |
- add c wrapper with setuid [SME: 11278] |
41 |
|
42 |
* Sun Apr 10 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-12.sme |
43 |
- fix missing service start [SME: 11278] |
44 |
add update event |
45 |
|
46 |
* Tue Mar 15 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-11.sme |
47 |
- fix www line should be after apache line in /etc/group [SME: 8056] |
48 |
|
49 |
* Mon Aug 23 2021 Terry Fage <terry.fage@gmail.com> 1.5.0-10.sme |
50 |
- apply locale 2021-08-22 patch |
51 |
|
52 |
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.5.0-9.sme |
53 |
- fix conflicting folders [SME: 11278] |
54 |
|
55 |
* Mon Feb 22 2021 JP Pialasse <tests@pialasse.com> 1.5.0-8.sme |
56 |
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
57 |
by assuming the date is correct and changing the weekday. |
58 |
Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... |
59 |
- allow build on SME10 |
60 |
|
61 |
* Wed Mar 09 2016 JP Pialasse <tests@pialasse.com> 1.5.0-7.sme |
62 |
- apply locale 2016-03-09 patch |
63 |
|
64 |
* Fri Sep 11 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-6.sme |
65 |
- Mailman is now added to the backup/restore process [SME: 2411] |
66 |
- Added smeserver-mailman-1.5.0.bz2411.Backup_mailman.patch |
67 |
|
68 |
* Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-5.sme |
69 |
- mailman wants that the group apache appears before the www group in /etc/group |
70 |
- script added in %pre to change that order. [SME: 8056] |
71 |
|
72 |
* Fri Aug 21 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-3.sme |
73 |
- Initial release to contribs9 [SME: 8453] |
74 |
|
75 |
* Fri Jun 20 2014 stephane de Labrusse <stephdl@de-labrusse.fr> 1.5.0-1.sme |
76 |
- Initial release to sme9 |
77 |
|
78 |
* Fri Sep 20 2013 JP Pialasse <tests@pialasse.com> 1.3.0-45.sme |
79 |
- fix bug [SME: 7787] |
80 |
|
81 |
* Thu Sep 19 2013 JP Pialasse <tests@pialasse.com> 1.3.0-44.sme |
82 |
- fix case sensitive TRUE to true in smeserver-mailman-1.3.0-restarthang.patch |
83 |
- wrong path to actions folder fixed |
84 |
- see [SME: 7845] |
85 |
|
86 |
* Sun Jul 14 2013 JP Pialasse <tests@pialasse.com> 1.3.0-42.sme |
87 |
- apply locale 2013-07-14 patch |
88 |
|
89 |
* Sun Jul 14 2013 JP Pialasse <tests@pialasse.com> 1.3.0-41.sme |
90 |
- fix signal-event hang on mailman restart [SME ] |
91 |
* Mon Jul 01 2013 JP Pialasse <tests@pialasse.com> 1.3.0-40.sme |
92 |
- fix expanding pyc pyo [SME: 7730] |
93 |
|
94 |
* Mon Jul 01 2013 JP Pialasse <tests@pialasse.com> 1.3.0-38.sme |
95 |
- import to sme8 buildsys |
96 |
- fix bootstrap hang [SME: 6693] |
97 |
|
98 |
* Tue Mar 20 2012 SME Translation Server <translations@contribs.org> 1.3.0-37.el6 |
99 |
- apply locale 2012-03-20 patch |
100 |
|
101 |
* Wed Apr 27 2011 SME Translation Server <translations@contribs.org> 1.3.0-36.sme |
102 |
- apply locale 2011-04-27 patch |
103 |
|
104 |
* Sun Mar 06 2011 SME Translation Server <translations@contribs.org> 1.3.0-35.sme |
105 |
- apply locale 2011-03-06 patch |
106 |
|
107 |
* Tue Mar 02 2010 SME Translation Server <translations@contribs.org> 1.3.0-34.sme |
108 |
- apply locale 2010-03-02 patch |
109 |
|
110 |
* Tue Oct 27 2009 SME Translation Server <translations@contribs.org> 1.3.0-33.sme |
111 |
- apply locale 2009-10-27 patch |
112 |
|
113 |
* Mon Aug 24 2009 SME Translation Server <translations@contribs.org> 1.3.0-32.sme |
114 |
- apply locale 2009-08-24 patch |
115 |
|
116 |
* Wed May 20 2009 SME Translation Server <translations@contribs.org> 1.3.0-31.sme |
117 |
- apply locale 2009-05-20 patch |
118 |
|
119 |
* Mon Apr 27 2009 SME Translation Server <translations@contribs.org> 1.3.0-30.sme |
120 |
- apply locale 2009-04-27 patch |
121 |
|
122 |
* Tue Mar 03 2009 SME Translation Server |
123 |
- apply locale 2009-03-03 patch |
124 |
|
125 |
* Sun Mar 1 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-28 |
126 |
- Apply 1 Mar 2009 locale patch [SME: 5018] |
127 |
|
128 |
* Sat Jan 31 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-27 |
129 |
- Apply 31 Jan 2009 locale patch [SME: 4951] |
130 |
|
131 |
* Wed Nov 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-26 |
132 |
- Apply 5 Nov 2008 locale patch |
133 |
|
134 |
* Tue Oct 14 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-25 |
135 |
- Apply 14 Oct 2008 locale patch |
136 |
|
137 |
* Tue Jul 1 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-24 |
138 |
- Apply 1 July 2008 locale patch |
139 |
|
140 |
* Fri Jun 27 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-23 |
141 |
- Apply 27 Jun 2008 locale patch |
142 |
|
143 |
* Wed May 21 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-22 |
144 |
Thu May 21 2008 --> Thu May 15 2008 or Wed May 21 2008 or Thu May 22 2008 or .... |
145 |
- Apply 21 May 2008 locale patch |
146 |
- Fixed version number in previous changelog entry |
147 |
|
148 |
* Mon May 5 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.6-21 |
149 |
- Apply 5 May 2008 locale patch |
150 |
|
151 |
* Sat Apr 26 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-20 |
152 |
- Add common <base> tags to e-smith-formmagick's general |
153 |
|
154 |
* Sat Apr 26 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-19 |
155 |
- Added 26 April 2008 locale patch |
156 |
|
157 |
* Wed Apr 23 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-18 |
158 |
- Added 23 April 2008 locale patch |
159 |
- Fixed changelog |
160 |
|
161 |
* Wed Apr 23 2008 Daniel B. <daniel@firewall-services.com> 1.3.0-17 |
162 |
- Fix path for the archives [SME: 4252] |
163 |
|
164 |
* Tue Apr 22 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.3.0-16 |
165 |
- Added 22 April 2008 locale patch |
166 |
|
167 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
168 |
- Clean up spec so package can be built by koji/plague |
169 |
|
170 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
171 |
- Update to new release naming. No functional changes. |
172 |
- Make Packager generic |
173 |
|
174 |
* Fri Sep 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-15 |
175 |
- Allow hyphen in list names in smelist command [SME: 1307] |
176 |
|
177 |
* Fri Sep 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-14 |
178 |
- Add /sbin/e-smith/alias2mailman to convert hand-built alias files |
179 |
to mailman lists. Converst ~alias/.qmail-<listname> to the mailman |
180 |
list <listname> |
181 |
- List owner is mailman{DefaultOwner} defaulting to admin |
182 |
|
183 |
* Fri Sep 22 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-13 |
184 |
- Fix various permissions to satisfy /usr/lib/mailman/check_perms |
185 |
- Update mailman dependency to latest from CentOS |
186 |
|
187 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-12 |
188 |
- Run the addlist/rmlist actions before generic_template_expand [SME: 665] |
189 |
|
190 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-11 |
191 |
- Ensure that mailman record exists prior to trying to set the status |
192 |
|
193 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-10 |
194 |
- Adjust path in post-install script to match CentOS structure |
195 |
|
196 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-09 |
197 |
- Make further use of services2adjust and templates2expand |
198 |
|
199 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-08 |
200 |
- Make use of services2adjust and templates2expand |
201 |
- Update dependency as this is for 7.0 |
202 |
|
203 |
* Wed Mar 8 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-07 |
204 |
- Create qfiles heirarchy |
205 |
- Fix up taint issue in smelist script |
206 |
|
207 |
* Thu Jan 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-06 |
208 |
- TODO: Check permissions on /var/spool/mailman/qfiles. The |
209 |
'in' directory needs to be writable by the mailman CGI script, |
210 |
which is running as www. |
211 |
|
212 |
* Thu Jan 5 2006 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-05 |
213 |
- Remove postun section which depended on action scripts which |
214 |
no longer exist |
215 |
|
216 |
* Fri Dec 23 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-04 |
217 |
- Allow mail for mailman user |
218 |
- TODO: We should have configurable allow/deny for system accounts |
219 |
|
220 |
* Tue Oct 25 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-03 |
221 |
- No change |
222 |
- TODO: Rewrite templates to new API and move to templates2expand |
223 |
- TODO: Add pre script to relocate /opt/mailman parts for upgrades |
224 |
|
225 |
* Tue Oct 25 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-02 |
226 |
- Require patched mailman - SME Server runs httpd as www, not apache |
227 |
- Relocate paths from /opt/mailman to /usr/lib/mailman to match mailman pkg |
228 |
- Changed references to accounts db to new location |
229 |
|
230 |
* Tue Oct 25 2005 Gordon Rowell <gordonr@gormand.com.au> 1.3.0-01 |
231 |
- Package renamed to smeserver-mailman, including patches to 1.1.10-05 |
232 |
- TODO: Relocate to /usr/lib/mailman |
233 |
- TODO: Change DB references, and rewrite to new API |
234 |
|
235 |
* Fri Oct 14 2005 Michael Soulier <msoulier@e-smith.com> |
236 |
- [1.1.10-05] |
237 |
- Fixed error with creation of alias file with dot in the name. |
238 |
|
239 |
* Wed Mar 16 2005 Michael Soulier <msoulier@e-smith.com> |
240 |
- [1.1.10-04] |
241 |
- Added FQDN of box as a potential virtual host. |
242 |
|
243 |
* Mon Mar 14 2005 Michael Soulier <msoulier@e-smith.com> |
244 |
- [1.1.10-03] |
245 |
- Removed circular event call. |
246 |
|
247 |
* Wed Feb 23 2005 Michael Soulier <msoulier@e-smith.com> |
248 |
- [1.1.10-02] |
249 |
- Forgot to set mode on smelist. |
250 |
|
251 |
* Wed Feb 16 2005 Michael Soulier <msoulier@e-smith.com> |
252 |
- [1.1.10-01] |
253 |
- Added hooks into domain creation and deletion. |
254 |
|
255 |
* Wed Feb 16 2005 Michael Soulier <msoulier@e-smith.com> |
256 |
- [1.1.9-01] |
257 |
- Rolling again to get past build error on sme61build. |
258 |
|
259 |
* Wed Feb 16 2005 Michael Soulier <msoulier@e-smith.com> |
260 |
- [1.1.8-01] |
261 |
- Added create-system-user call to make the mailman user. |
262 |
- Added a link to the mailman UI. |
263 |
|
264 |
* Tue Feb 15 2005 Michael Soulier <msoulier@e-smith.com> |
265 |
- [1.1.7-01] |
266 |
- Updated mailman-conf to call a post-install script when first run. If this |
267 |
is ever included in a blade, post-install should move to the blade handler. |
268 |
|
269 |
* Tue Feb 15 2005 Michael Soulier <msoulier@e-smith.com> |
270 |
- [1.1.6-01] |
271 |
- Fixed badly placed lib. |
272 |
- Added post-install script to move it out of scriptlets. |
273 |
|
274 |
* Tue Feb 15 2005 Michael Soulier <msoulier@e-smith.com> |
275 |
- [1.1.5-01] |
276 |
- Added conf and restart actions. |
277 |
- Added a simple panel. |
278 |
|
279 |
* Tue Feb 15 2005 Michael Soulier <msoulier@e-smith.com> |
280 |
- [1.1.4-01] |
281 |
- Fixed perms on /opt/mailman, and bad symlink. |
282 |
|
283 |
* Sun Feb 13 2005 Michael Soulier <msoulier@e-smith.com> |
284 |
- [1.1.3-01] |
285 |
- Fixed error in createlinks. |
286 |
|
287 |
* Sun Feb 13 2005 Michael Soulier <msoulier@e-smith.com> |
288 |
- [1.1.2-01] |
289 |
- Rolling initial build of imported package. [msoulier] |
290 |
|
291 |
* Sun Feb 13 2005 Michael Soulier <msoulier@e-smith.com> |
292 |
- [1.1.1-01] |
293 |
- Reimplementation after lost packages. Implementing for mailman 2.1.5. |
294 |
[msoulier] |
295 |
|
296 |
* Sun Sep 08 2002 Shad L. Lords <slords@mail.com> |
297 |
- 1.0-5 |
298 |
- updated addlist and rmlist to better handle conflicts |
299 |
|
300 |
* Sun Sep 01 2002 Shad L. Lords <slords@mail.com> |
301 |
- 1.0-4 |
302 |
- updated accounts so that ezmlm can coexist with mailman |
303 |
|
304 |
* Tue Aug 27 2002 Shad L. Lords <slords@mail.com> |
305 |
- 1.0-3 |
306 |
- make site have a random password on install |
307 |
- make mailman list have random password on install |
308 |
|
309 |
* Sat Aug 24 2002 Shad L. Lords <slords@mail.com> |
310 |
- 1.0-2 |
311 |
- changed mailman-addlist to set perms and ownership correctly. |
312 |
- changed permissions from root,mailman to mailman,mailman |
313 |
|
314 |
* Fri Aug 23 2002 Shad L. Lords <slords@mail.com> |
315 |
- 1.0-1 |
316 |
- Initial release |
317 |
|
318 |
%prep |
319 |
%setup |
320 |
%patch0 -p1 |
321 |
%patch1 -p1 |
322 |
%patch2 -p1 |
323 |
%patch3 -p1 |
324 |
%patch4 -p1 |
325 |
|
326 |
#/bin/rm -r root/opt/mailman |
327 |
|
328 |
%build |
329 |
perl createlinks |
330 |
gcc -o root/usr/lib/mailman/bin/smelist smelist.c |
331 |
|
332 |
|
333 |
mkdir -p root/usr/lib/mailman/aliases |
334 |
|
335 |
mkdir -p root/opt |
336 |
ln -s /usr/lib/mailman root/opt/mailman |
337 |
mkdir -p root/var/spool/mailman/qfiles |
338 |
for dir in archive bounces commands in news out retry shunt virgin |
339 |
do |
340 |
mkdir -p root/var/spool/mailman/qfiles/$dir |
341 |
done |
342 |
|
343 |
%install |
344 |
rm -rf $RPM_BUILD_ROOT |
345 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
346 |
rm -f e-smith-%{version}-filelist |
347 |
/sbin/e-smith/genfilelist \ |
348 |
--dir '/var/spool/mailman' 'attr(02775,root,mailman)' \ |
349 |
--dir '/usr/lib/mailman/aliases' 'attr(02775,mailman,mailman)' \ |
350 |
--file '/usr/lib/mailman/bin/post-install' 'attr(0755,root,mailman)' \ |
351 |
--file '/usr/lib/mailman/bin/smelist' 'attr(04755,root,mailman)' \ |
352 |
--file '/usr/lib/mailman/bin/smelist.pl' 'attr(02755,root,root)' \ |
353 |
--file '/usr/lib/mailman/Mailman/MTA/SME.py' 'attr(02775,root,mailman)' \ |
354 |
--dir '/var/spool/mailman/qfiles' 'attr(02770,mailman,mailman)' \ |
355 |
--dir '/var/spool/mailman/qfiles/archive' 'attr(02770,mailman,mailman)' \ |
356 |
--dir '/var/spool/mailman/qfiles/bounces' 'attr(02770,mailman,mailman)' \ |
357 |
--dir '/var/spool/mailman/qfiles/commands' 'attr(02770,mailman,mailman)' \ |
358 |
--dir '/var/spool/mailman/qfiles/in' 'attr(02770,mailman,mailman)' \ |
359 |
--dir '/var/spool/mailman/qfiles/news' 'attr(02770,mailman,mailman)' \ |
360 |
--dir '/var/spool/mailman/qfiles/out' 'attr(02770,mailman,mailman)' \ |
361 |
--dir '/var/spool/mailman/qfiles/retry' 'attr(02770,mailman,mailman)' \ |
362 |
--dir '/var/spool/mailman/qfiles/shunt' 'attr(02770,mailman,mailman)' \ |
363 |
--dir '/var/spool/mailman/qfiles/virgin' 'attr(02770,mailman,mailman)' \ |
364 |
$RPM_BUILD_ROOT > %{name}-%{version}-filelist |
365 |
|
366 |
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 |
367 |
#those will conflict with mailman rpm on sme10 |
368 |
# --dir '/usr/lib/mailman' 'attr(02775,root,mailman)' \ |
369 |
# --dir '/usr/lib/mailman/bin' 'attr(02775,root,mailman)' \ |
370 |
# --dir '/usr/lib/mailman/Mailman' 'attr(02775,root,mailman)' \ |
371 |
# --dir '/usr/lib/mailman/Mailman/MTA' 'attr(02775,root,mailman)' \ |
372 |
|
373 |
# SME10 to avoid error |
374 |
#/usr/lib/rpm/brp-python-bytecompile |
375 |
# fix for unwanted listed compiled python files |
376 |
# those pyc and pyo gets added by default by genfilelist, so need to filtering them out when we disable byte compile. |
377 |
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc" |
378 |
#"/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyo" |
379 |
#/etc/e-smith/events/domain-create/templates2expand/usr/lib/mailman/Mailman/mm_cfg.pyc |
380 |
cat %{name}-%{version}-filelist |sed -r '/py[oc]"?$/d'>%{name}-%{version}-filelist.tmp |
381 |
cat %{name}-%{version}-filelist.tmp> %{name}-%{version}-filelist |
382 |
|
383 |
%clean |
384 |
rm -rf $RPM_BUILD_ROOT |
385 |
|
386 |
%files -f %{name}-%{version}-filelist |
387 |
|
388 |
%defattr(-,root,root) |
389 |
|
390 |
%pre |
391 |
/sbin/e-smith/create-system-user mailman 41 \ |
392 |
"Mailman user" /usr/lib/mailman /bin/false |
393 |
|
394 |
#mailman wants that the apache group appears before the www group in /etc/group [SME: 8056] |
395 |
TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:` |
396 |
TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:` |
397 |
if [[ $TEST > $TEST2 ]]; then |
398 |
WWW=$(sed -n '/^www/p' /etc/group) |
399 |
sed -i '/^www/d' /etc/group |
400 |
echo $WWW >> /etc/group |
401 |
fi |
402 |
|
403 |
%post |
404 |
|
405 |
%preun |
406 |
|
407 |
%postun |