Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
mailman
mailman.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mailman.spec of Package mailman
# # spec file for package mailman # # Copyright (c) 2016 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 http://bugs.opensuse.org/ # Name: mailman #!BuildIgnore: sendmail BuildRequires: krb5 BuildRequires: pcre-devel BuildRequires: postfix BuildRequires: pwdutils BuildRequires: python-devel BuildRequires: python-dnspython %define DISTRIBUTABLE 1 Url: http://www.gnu.org/software/mailman/mailman.html Requires: cron Requires: logrotate Requires: python Requires: python-dnspython Requires: smtp_daemon Requires: w3m PreReq: /usr/sbin/useradd /usr/sbin/groupadd /bin/echo /bin/cp /bin/rm /bin/mkdir /usr/bin/awk /usr/bin/touch /usr/bin/getent openssl PreReq: permissions Summary: The GNU Mailing List Manager License: GPL-2.0+ Group: Productivity/Networking/Email/Mailinglists Version: 2.1.22 Release: 0 Source0: https://ftp.gnu.org/gnu/mailman/%{name}-%{version}.tgz Source13: https://ftp.gnu.org/gnu/mailman/%{name}-%{version}.tgz.sig Source14: %{name}.keyring Source1: README.SUSE Source2: mailman-2.1-manpages.tgz %if %DISTRIBUTABLE Source4: mailman-generate-sysconfig %else Source4: SuSEconfig.mailman-SuSE %endif Source5: rcmailman Source6: aliases Source7: sysconfig.mailman Source8: mailman.sgidlist Source9: mailman-apache2.conf Source11: logrotate.mailman Source12: mm-text.png Patch1: mailman-wrapper.patch %if %DISTRIBUTABLE %else Patch2: mailman-SuSE.patch %endif 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.2-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 %if %DISTRIBUTABLE %else Patch20: mailman-SuSE2.patch %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build %define m_uid 72 %define m_gid 67 %define apache2_confd /etc/apache2/conf.d %define sendmail_libd /usr/lib/sendmail.d %define mailman_confd /etc/mailman # ---------------------------------------------------------------------------- %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. Authors: -------- John Viega <mailman-users@python.org> %prep %setup -q %patch1 %if %DISTRIBUTABLE %else %patch2 %endif %patch3 %patch5 -p1 %patch6 -p1 %patch7 %patch10 -p1 %patch11 -p1 %patch17 -p1 %patch18 %if %DISTRIBUTABLE %else %patch20 %endif cp -av %{S:1} . # ---------------------------------------------------------------------------- %build /usr/sbin/groupadd -g %{m_gid} -o -r mailman 2> /dev/null || : /usr/sbin/useradd -r -o -g mailman -u %{m_uid} -s /bin/bash -c "GNU mailing list manager" -d /var/lib/mailman mailman 2> /dev/null || : ./configure --prefix=/usr/lib/mailman --sysconfdir=/etc \ --localstatedir=/var/run --libexecdir=/usr/lib/mailman \ --mandir=%{_mandir} --with-groupname=mailman --with-username=mailman \ --with-var-prefix=/var/lib/mailman \ --without-permcheck \ --with-cgi-gid=nobody --with-mail-gid=nobody # fake make OPT="$RPM_OPT_FLAGS -fpie -pie" # ---------------------------------------------------------------------------- %install install -d $RPM_BUILD_ROOT/{usr/sbin,etc/{mailman,sysconfig,init.d,logrotate.d},var/adm/fillup-templates,sbin/conf.d}/ make DESTDIR=$RPM_BUILD_ROOT install # add a hint to the crontab cat <<EOF > $RPM_BUILD_ROOT/usr/lib/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 }' \ $RPM_BUILD_ROOT/usr/lib/mailman/cron/crontab.in \ >> $RPM_BUILD_ROOT/usr/lib/mailman/cron/crontab # write initial wrapper id files: . %{S:7} getent group $MAILMAN_CGI_GID | cut -d: -f3 > $RPM_BUILD_ROOT/%{mailman_confd}/mailman.cgi-gid echo %{m_gid} > $RPM_BUILD_ROOT/%{mailman_confd}/mailman.mail-gid # SuSEconfig stuff: install -m 644 %{S:7} $RPM_BUILD_ROOT/var/adm/fillup-templates/ install -m 755 %{S:4} $RPM_BUILD_ROOT/usr/lib/mailman/bin/ install -m 644 %{S:8} %{buildroot}/usr/lib/mailman/sgidlist # start script: ln -sf ../../etc/init.d/mailman $RPM_BUILD_ROOT/usr/sbin/rcmailman install -m 755 %{S:5} $RPM_BUILD_ROOT/etc/init.d/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 %{S:6} $RPM_BUILD_ROOT/var/lib/mailman/data/aliases # created in %%post and marked as %%ghost in the file section, so simply fake it: /usr/bin/touch $RPM_BUILD_ROOT/var/lib/mailman/data/aliases.db # apache stuff: mkdir -p $RPM_BUILD_ROOT/%{apache2_confd} cp -av %{S:9} $RPM_BUILD_ROOT/%{apache2_confd}/mailman.conf # link to enhance interoperability with Sendmail mkdir -p $RPM_BUILD_ROOT/%{sendmail_libd}/bin ln -sf ../../../lib/mailman/mail/mailman $RPM_BUILD_ROOT/%{sendmail_libd}/bin/mailman install -d $RPM_BUILD_ROOT%{_mandir}/man8/ tar xz -C $RPM_BUILD_ROOT%{_mandir}/man8/ -f %SOURCE2 install -m 644 %{S:11} $RPM_BUILD_ROOT/etc/logrotate.d/mailman %if %DISTRIBUTABLE %else cp %SOURCE12 $RPM_BUILD_ROOT/usr/lib/mailman/icons/ %endif # ---------------------------------------------------------------------------- %clean rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %pre /usr/sbin/groupadd -g %{m_gid} -o -r mailman 2> /dev/null || : /usr/sbin/useradd -r -o -g mailman -u %{m_uid} -s /bin/bash -c "GNU mailing list manager" -d /var/lib/mailman mailman 2> /dev/null || : exit 0 # ---------------------------------------------------------------------------- %post %{fillup_and_insserv mailman} %set_permissions -f usr/lib/mailman/sgidlist if [ -e var/lib/mailman/logs/error ]; then chown wwwrun.mailman var/lib/mailman/logs/error else install -m 664 -o wwwrun -g mailman /dev/null var/lib/mailman/logs/error fi # handle very old installations test -d var/spool/mailman && { echo -n "Moving /var/spool/mailman -> /var/lib/mailman... " (cd var/lib/mailman && cp -a var/spool/mailman/* .) && rm -rf var/spool/mailman echo "Done." } echo "All done." # use Mailman facilities for updating old data usr/lib/mailman/bin/update if test -z "$YAST_IS_RUNNING" ; then echo "Please remember to run '/usr/lib/mailman/bin/mailman-generate-sysconfig' to configure mailman" fi # re-create the list aliases usr/lib/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 usr/sbin/postalias -a -r var/lib/mailman/data/aliases ]; then usr/sbin/postalias var/lib/mailman/data/aliases || : chmod g+w var/lib/mailman/data/aliases.db fi exit 0 # ---------------------------------------------------------------------------- %verifyscript %verify_permissions -f /usr/lib/mailman/sgidlist %preun %stop_on_removal mailman # ---------------------------------------------------------------------------- %postun %restart_on_update mailman %{insserv_cleanup} # ---------------------------------------------------------------------------- %files %defattr(-, root, root) %doc ACKNOWLEDGMENTS BUGS FAQ INSTALL NEWS TODO UPGRADING contrib doc/mailman-admin %doc README README.* %doc %{_mandir}/man8/*.8.gz %dir %{mailman_confd} %config(noreplace) /etc/logrotate.d/mailman %config(noreplace) %{mailman_confd}/mailman.*-gid %dir %attr(2755, root, mailman) /usr/lib/mailman/ /usr/lib/mailman/sgidlist %attr(-, root, mailman) /usr/lib/mailman/[^Mmc]* %attr(-, root, mailman) /usr/lib/mailman/cron %dir %attr(-, root, mailman) /usr/lib/mailman/cgi-bin %verify(not mode) %attr(2755, root, mailman) /usr/lib/mailman/cgi-bin/* %dir %attr(2755, root, mailman) /usr/lib/mailman/Mailman/ %attr(-, root, mailman) /usr/lib/mailman/Mailman/[^m]* %attr(-, root, mailman) /usr/lib/mailman/messages %dir %attr(-, root, mailman) /usr/lib/mailman/mail %verify(not mode) %attr(2755, root, mailman) /usr/lib/mailman/mail/mailman %config(noreplace) %attr(-, root, mailman) /usr/lib/mailman/Mailman/m* %dir %attr(2755, mailman, mailman) /var/lib/mailman/ %attr(-, root, mailman) /var/lib/mailman/[^d]* %dir %attr(2775, root, mailman) /var/lib/mailman/data/ %config(noreplace) %attr(-, root, mailman) /var/lib/mailman/data/[^a]* %config(noreplace) %attr(-, mailman, mailman) /var/lib/mailman/data/aliases %ghost %attr(0664, mailman, mailman) /var/lib/mailman/data/aliases.db /var/adm/fillup-templates/* /usr/sbin/* /etc/init.d/* %dir /etc/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