Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:ARM
mailman
mailman.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mailman.spec of Package mailman
# # spec file for package mailman # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define m_uid 72 %define m_gid 67 %define apache2_confd %{_sysconfdir}/apache2/conf.d %define sendmail_libd %{_libexecdir}/sendmail.d %define mailman_confd %{_sysconfdir}/mailman #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif # Now, the user and group the CGIs will expect to be run under. This should # match the user and group the web server is configured to run as. The scripts # will error out if they are invoked by any other user. %define cgiuser wwwrun %define cgigroup www Name: mailman Version: 2.1.29 Release: 0 Summary: The GNU Mailing List Manager License: GPL-2.0-or-later Group: Productivity/Networking/Email/Mailinglists URL: http://www.gnu.org/software/mailman/mailman.html Source0: https://ftp.gnu.org/gnu/mailman/%{name}-%{version}.tgz Source1: README.SUSE Source2: mailman-2.1-manpages.tgz Source4: mailman-generate-sysconfig Source5: rcmailman Source6: aliases Source7: sysconfig.mailman Source8: mailman.sgidlist Source9: mailman-apache2.conf Source11: logrotate.mailman Source12: mm-text.png Source13: https://ftp.gnu.org/gnu/mailman/%{name}-%{version}.tgz.sig Source14: %{name}.keyring Patch1: mailman-wrapper.patch Patch3: mailman-2.1.14-python.dif Patch5: mailman-2.1.14-editarch.patch Patch6: mailman-2.1.14-misc-PACKAGES.diff Patch7: mailman-2.1.26-list_lists.patch Patch10: mailman-2.1.4-dirmode.patch Patch11: mailman-2.1.4-notavaliduser.patch Patch17: mailman-weak-password.diff Patch18: mailman-2.1.5-no_extra_asian.dif # PATCH-FIX-UPSTREAM CVE-2020-12108_injection_options.patch bsc#1171363 mcepl@suse.com # arbitrary content injection in options.py Patch19: CVE-2020-12108_injection_options.patch BuildRequires: krb5 BuildRequires: pcre-devel BuildRequires: postfix BuildRequires: pwdutils BuildRequires: python-devel BuildRequires: python-dnspython #!BuildIgnore: sendmail Requires: cron Requires: logrotate Requires: python Requires: python-dnspython Requires: smtp_daemon Requires: w3m Requires(post): %fillup_prereq Requires(post): %insserv_prereq Requires(post): coreutils Requires(post): gawk Requires(post): group(%cgigroup) Requires(post): openssl Requires(post): user(%cgiuser) Requires(pre): shadow %description This is the GNU Mailing List manager. Mailman provides an easy-to-configure means of maintaining mailing lists including Web administration. Mailman is written in Python. %prep %setup -q %autopatch -p1 cp -av %{SOURCE1} . %build %configure \ --prefix=%{_libexecdir}/mailman \ --exec-prefix=%{_libexecdir}/mailman \ --localstatedir=%{_localstatedir}/run \ --libexecdir=%{_libexecdir}/mailman \ --with-groupname=mailman \ --with-username=mailman \ --with-var-prefix=%{_localstatedir}/lib/mailman \ --without-permcheck \ --with-cgi-gid=%{cgiuser} \ --with-mail-gid=%{cgigroup} make %{?_smp_mflags} OPT="%{optflags} -fpie -pie" %install install -d %{buildroot}/{usr/sbin,etc/{mailman,sysconfig,init.d,logrotate.d},%{_fillupdir},bin/conf.d}/ %make_install # add a hint to the crontab cat <<EOF > %{buildroot}%{_libexecdir}/mailman/cron/crontab # # if you want to make changes to this file, please modify # /usr/lib/mailman/cron/crontab and restart mailman # EOF # add user mailman in column 6 since we are going to use it as system crontab awk '/^[0-9,\*]/ { print $1 " " $2 " " $3 " " $4 " " $5 " mailman " $6 " " $7 " " $8 } /^\#/ { print $0 }' \ %{buildroot}%{_libexecdir}/mailman/cron/crontab.in \ >> %{buildroot}%{_libexecdir}/mailman/cron/crontab # write initial wrapper id files: . %{SOURCE7} getent group %{cgigroup} \ | cut -d: -f3 > %{buildroot}/%{mailman_confd}/mailman.cgi-gid echo %{m_gid} > %{buildroot}/%{mailman_confd}/mailman.mail-gid # SuSEconfig stuff: install -m 644 %{SOURCE7} %{buildroot}%{_fillupdir}/ install -m 755 %{SOURCE4} %{buildroot}%{_libexecdir}/mailman/bin/ install -m 644 %{SOURCE8} %{buildroot}%{_libexecdir}/mailman/sgidlist # start script: ln -sf ../..%{_initddir}/mailman %{buildroot}%{_sbindir}/rcmailman install -m 755 %{SOURCE5} %{buildroot}%{_initddir}/mailman # make sure there is a valid group writable aliases.db # if the aliases.db would be generated later on, list creation # through the web interface would not work! install -m 664 %{SOURCE6} %{buildroot}%{_localstatedir}/lib/mailman/data/aliases # created in %%post and marked as %%ghost in the file section, so simply fake it: %{_bindir}/touch %{buildroot}%{_localstatedir}/lib/mailman/data/aliases.db # apache stuff: mkdir -p %{buildroot}/%{apache2_confd} cp -av %{SOURCE9} %{buildroot}/%{apache2_confd}/mailman.conf # link to enhance interoperability with Sendmail mkdir -p %{buildroot}/%{sendmail_libd}/bin ln -sf %{_libexecdir}/mailman/mail/mailman %{buildroot}/%{sendmail_libd}/bin/mailman install -d %{buildroot}%{_mandir}/man8/ tar xz -C %{buildroot}%{_mandir}/man8/ -f %{SOURCE2} install -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/logrotate.d/mailman # Better solution for bsc#1154328 (and bnc#697638) install -m 0664 -D /dev/null %{buildroot}/var/lib/%{name}/logs/error %pre getent group mailman >/dev/null || %{_sbindir}/groupadd -g %{m_gid} -o -r mailman getent passwd mailman >/dev/null || %{_sbindir}/useradd -r -o -g mailman -u %{m_uid} -s /bin/bash -c "GNU mailing list manager" -d %{_localstatedir}/lib/mailman mailman exit 0 %post %{fillup_and_insserv mailman} # handle very old installations test -d %{_localstatedir}/spool/mailman && { echo -n "Moving %{_localstatedir}/spool/mailman -> %{_localstatedir}/lib/mailman... " (cd %{_localstatedir}/lib/mailman && cp -a %{_localstatedir}/spool/mailman/* .) && rm -rf %{_localstatedir}/spool/mailman echo "Done." } echo "All done." # use Mailman facilities for updating old data %{_libexecdir}/mailman/bin/update if test -z "$YAST_IS_RUNNING" ; then echo "Please remember to run '%{_libexecdir}/mailman/bin/mailman-generate-sysconfig' to configure mailman" fi # re-create the list aliases %{_libexecdir}/mailman/bin/genaliases > /dev/null # update the alias db file and make it group-writeable (important for being able to create mailing lists thru the web interface) if [ -x %{_sbindir}/postalias -a -r %{_localstatedir}/lib/mailman/data/aliases ]; then %{_sbindir}/postalias %{_localstatedir}/lib/mailman/data/aliases || : chmod g+w %{_localstatedir}/lib/mailman/data/aliases.db fi exit 0 %verifyscript %verify_permissions -f %{_libexecdir}/mailman/sgidlist %preun %stop_on_removal mailman %postun %restart_on_update mailman %insserv_cleanup %files %license gnu-COPYING-GPL %doc ACKNOWLEDGMENTS BUGS FAQ INSTALL NEWS TODO UPGRADING contrib doc/mailman-admin %doc README README.* %{_mandir}/man8/*.8%{?ext_man} %dir %{mailman_confd} %config(noreplace) %{_sysconfdir}/logrotate.d/mailman %config(noreplace) %{mailman_confd}/mailman.*-gid %dir %attr(2755, root, mailman) %{_libexecdir}/mailman/ %{_libexecdir}/mailman/sgidlist %attr(-, root, mailman) %{_libexecdir}/mailman/[^Mmc]* %attr(-, root, mailman) %{_libexecdir}/mailman/cron %dir %attr(-, root, mailman) %{_libexecdir}/mailman/cgi-bin %verify(not mode) %attr(2755, root, mailman) %{_libexecdir}/mailman/cgi-bin/* %dir %attr(2755, root, mailman) %{_libexecdir}/mailman/Mailman/ %attr(-, root, mailman) %{_libexecdir}/mailman/Mailman/[^m]* %attr(-, root, mailman) %{_libexecdir}/mailman/messages %dir %attr(-, root, mailman) %{_libexecdir}/mailman/mail %verify(not mode) %attr(2755, root, mailman) %{_libexecdir}/mailman/mail/mailman %config(noreplace) %attr(-, root, mailman) %{_libexecdir}/mailman/Mailman/m* %dir %attr(2755, mailman, mailman) %{_localstatedir}/lib/mailman/ %attr(-, root, mailman) %{_localstatedir}/lib/mailman/[^d]* %dir %attr(750, mailman, www) %{_localstatedir}/lib/mailman/archives %dir %attr(750, mailman, www) %{_localstatedir}/lib/mailman/archives/private %dir %attr(2775, root, mailman) %{_localstatedir}/lib/mailman/data/ %config(noreplace) %attr(-, root, mailman) %{_localstatedir}/lib/mailman/data/[^a]* %config(noreplace) %attr(-, mailman, mailman) %{_localstatedir}/lib/mailman/data/aliases %ghost %attr(0664, wwwrun, mailman) %{_localstatedir}/lib/mailman/logs/error %ghost %attr(0664, mailman, mailman) %{_localstatedir}/lib/mailman/data/aliases.db %{_fillupdir}/* %{_sbindir}/* %{_initddir}/* %dir %{_sysconfdir}/apache2 %dir %{apache2_confd} %config (noreplace) %{apache2_confd}/mailman.conf %dir %{sendmail_libd} %dir %{sendmail_libd}/bin %{sendmail_libd}/bin/mailman %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor