Gentoo Archives: gentoo-commits

From: Hanno Boeck <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/mailman/
Date: Tue, 26 Sep 2017 13:02:36
Message-Id: 1506430889.4d124f6a5d6919476d1786e98a9fff0953a4189b.hanno@gentoo
1 commit: 4d124f6a5d6919476d1786e98a9fff0953a4189b
2 Author: Hanno <hanno <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 26 13:01:29 2017 +0000
4 Commit: Hanno Boeck <hanno <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 26 13:01:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d124f6a
7
8 net-mail/mailman: Version bump.
9
10 Fix XSS vulnerability, see #629090.
11
12 Package-Manager: Portage-2.3.10, Repoman-2.3.3
13
14 net-mail/mailman/Manifest | 1 +
15 net-mail/mailman/mailman-2.1.24.ebuild | 167 +++++++++++++++++++++++++++++++++
16 2 files changed, 168 insertions(+)
17
18 diff --git a/net-mail/mailman/Manifest b/net-mail/mailman/Manifest
19 index bc2d77b517c..5a8c9b33b0f 100644
20 --- a/net-mail/mailman/Manifest
21 +++ b/net-mail/mailman/Manifest
22 @@ -1 +1,2 @@
23 DIST mailman-2.1.23.tgz 9290881 SHA256 b022ca6f8534621c9dbe50c983948688bc4623214773b580c2c78e4a7ae43e69 SHA512 398dd5c301005512900aff38c068ee641eea9f2970dfde17c37a8641759bd6fff8e6d37ad63c0c86b4b1594459b3c92023844ca4ec23d1681ac02542bd97f8db WHIRLPOOL c5e45bd4fb59dca5017f547e25986addff8079bf10bdcb6f814942e56cfc618d0e6e075beb7d5240e591d809f27af442c4da9c5e5f35358f5bf86a4f24c1d38d
24 +DIST mailman-2.1.24.tgz 9251009 SHA256 89b0cfc13c52915b9cdebd4b772852f1043e7435554050b4f5f7094f9093cd77 SHA512 f62f224abe5eb4804828a4d83389432b34595b8d4533310cda4da58ab10c2e62e0b2419929dcc53c32e2754d8f62fa8ef68877db4c65f6112f08f0e452fd6a38 WHIRLPOOL 583f8157de5c93ad6e97f49921f57af65d272da801f3534b454992034484924efde2d792334b7db7dc90b02bbae92a796352a1a65e8576affa80eef9b5cedfc8
25
26 diff --git a/net-mail/mailman/mailman-2.1.24.ebuild b/net-mail/mailman/mailman-2.1.24.ebuild
27 new file mode 100644
28 index 00000000000..28d88341e0f
29 --- /dev/null
30 +++ b/net-mail/mailman/mailman-2.1.24.ebuild
31 @@ -0,0 +1,167 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=5
36 +
37 +PYTHON_COMPAT=( python2_7 )
38 +
39 +inherit eutils python-single-r1 multilib systemd user
40 +
41 +DESCRIPTION="A python-based mailing list server with an extensive web interface"
42 +SRC_URI="mirror://sourceforge/${PN}/${P/_p/-}.tgz"
43 +HOMEPAGE="http://www.list.org/"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~ppc ~x86"
48 +IUSE="selinux"
49 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
50 +
51 +DEPEND="
52 + ${PYTHON_DEPS}
53 + virtual/mta
54 + virtual/cron
55 + virtual/httpd-cgi
56 + virtual/python-dnspython[${PYTHON_USEDEP}]"
57 +RDEPEND="${DEPEND}
58 + selinux? ( sec-policy/selinux-mailman )
59 +"
60 +
61 +S="${WORKDIR}/${P/_p/-}"
62 +
63 +pkg_setup() {
64 + python-single-r1_pkg_setup
65 + INSTALLDIR=${MAILMAN_PREFIX:-"/usr/$(get_libdir)/mailman"}
66 + VAR_PREFIX=${MAILMAN_VAR_PREFIX:-"/var/lib/mailman"}
67 + CGIUID=${MAILMAN_CGIUID:-apache}
68 + CGIGID=${MAILMAN_CGIGID:-apache}
69 + MAILUSR=${MAILMAN_MAILUSR:-mailman}
70 + MAILUID=${MAILMAN_MAILUID:-280}
71 + MAILGRP=${MAILMAN_MAILGRP:-mailman}
72 + MAILGID=${MAILMAN_MAILGID:-280}
73 +
74 + # Bug #58526: switch to enew{group,user}.
75 + # need to add mailman here for compile process.
76 + # Duplicated at pkg_postinst() for binary install.
77 + enewgroup ${MAILGRP} ${MAILGID}
78 + enewuser ${MAILUSR} ${MAILUID} /bin/bash ${INSTALLDIR} mailman,cron
79 +}
80 +
81 +src_prepare() {
82 + epatch "${FILESDIR}/${PN}-2.1.14_rc1-directory-check.patch"
83 + epatch "${FILESDIR}/${PN}-2.1.9-icons.patch"
84 +}
85 +
86 +src_configure() {
87 + econf \
88 + --without-permcheck \
89 + --prefix="${INSTALLDIR}" \
90 + --with-mail-gid=${MAILGID} \
91 + --with-cgi-gid=${CGIGID} \
92 + --with-cgi-ext="${MAILMAN_CGIEXT}" \
93 + --with-var-prefix="${VAR_PREFIX}" \
94 + --with-username=${MAILUSR} \
95 + --with-groupname=${MAILGRP} \
96 + --with-python="${PYTHON}"
97 +}
98 +
99 +src_install () {
100 + emake "DESTDIR=${D}" doinstall
101 +
102 + insinto /etc/apache2/modules.d
103 + newins "${FILESDIR}/50_mailman.conf-r2" 50_mailman.conf
104 + sed \
105 + -e "s:/usr/local/mailman/cgi-bin:${INSTALLDIR}/cgi-bin:g" \
106 + -e "s:/usr/local/mailman/icons:${INSTALLDIR}/icons:g" \
107 + -e "s:/usr/local/mailman/archives:${VAR_PREFIX}/archives:g" \
108 + -i "${D}/etc/apache2/modules.d/50_mailman.conf" || die
109 +
110 + newdoc "${FILESDIR}/README.gentoo-r3" README.gentoo
111 +
112 + dodoc ACK* BUGS FAQ NEWS README* TODO UPGRADING INSTALL contrib/mailman.mc \
113 + contrib/README.check_perms_grsecurity contrib/virtusertable
114 +
115 + exeinto ${INSTALLDIR}/bin
116 + doexe build/contrib/*.py contrib/majordomo2mailman.pl contrib/auto \
117 + contrib/mm-handler*
118 +
119 + dodir /etc/mailman
120 + mv "${D}/${INSTALLDIR}/Mailman/mm_cfg.py" "${D}/etc/mailman"
121 + dosym /etc/mailman/mm_cfg.py ${INSTALLDIR}/Mailman/mm_cfg.py
122 +
123 + # Save the old config for updates from pre-2.1.9-r2
124 + # To be removed some distant day
125 + for i in /var/mailman /home/mailman /usr/local/mailman ${INSTALLDIR}; do
126 + if [ -f ${i}/Mailman/mm_cfg.py ] && ! [ -L ${i}/Mailman/mm_cfg.py ]; then
127 + cp ${i}/Mailman/mm_cfg.py "${D}/etc/mailman/mm_cfg.py" || die
128 + fi
129 + done
130 +
131 + newinitd "${FILESDIR}/mailman.rc" mailman
132 + cp "${FILESDIR}/mailman.service" "${T}/mailman.service" || die
133 + sed -i "s/^User=.*/User=${MAILUSR}/" "${T}/mailman.service" || die
134 + systemd_dounit "${T}/mailman.service"
135 +
136 + keepdir ${VAR_PREFIX}/logs
137 + keepdir ${VAR_PREFIX}/locks
138 + keepdir ${VAR_PREFIX}/spam
139 + keepdir ${VAR_PREFIX}/archives/public
140 + keepdir ${VAR_PREFIX}/archives/private
141 + keepdir ${VAR_PREFIX}/lists
142 + keepdir ${VAR_PREFIX}/qfiles
143 +
144 + chown -R ${MAILUSR}:${MAILGRP} "${D}/${VAR_PREFIX}" "${D}/${INSTALLDIR}" "${D}"/etc/mailman/* || die
145 + chown ${CGIUID}:${MAILGRP} "${D}/${VAR_PREFIX}/archives/private" || die
146 + chmod 2775 "${D}/${INSTALLDIR}" "${D}/${INSTALLDIR}"/templates/* \
147 + "${D}/${INSTALLDIR}"/messages/* "${D}/${VAR_PREFIX}" "${D}/${VAR_PREFIX}"/{logs,lists,spam,locks,archives/public} || die
148 + chmod 2770 "${D}/${VAR_PREFIX}/archives/private" || die
149 + chmod 2770 "${D}/${VAR_PREFIX}/qfiles" || die
150 + chmod 2755 "${D}/${INSTALLDIR}"/cgi-bin/* "${D}/${INSTALLDIR}/mail/mailman" || die
151 +
152 + python_optimize "${D}/${INSTALLDIR}/bin/" \
153 + "${D}/${INSTALLDIR}/Mailman/" \
154 + "${D}/${INSTALLDIR}/Mailman/*"
155 +}
156 +
157 +pkg_postinst() {
158 + enewgroup ${MAILGRP} ${MAILGID}
159 + enewuser ${MAILUSR} ${MAILUID} -1 ${INSTALLDIR} mailman,cron
160 + echo
161 + elog "Please read /usr/share/doc/${PF}/README.gentoo.bz2 for additional"
162 + elog "Setup information, mailman will NOT run unless you follow"
163 + elog "those instructions!"
164 + echo
165 +
166 + elog "An example Mailman configuration file for Apache has been installed into:"
167 + elog " ${APACHE2_MODULES_CONFDIR}/50_mailman.conf"
168 + echo
169 + elog "To enable, you will need to add \"-D MAILMAN\" to"
170 + elog "/etc/conf.d/apache2."
171 + echo
172 +
173 + ewarn "Default-Configuration has changed deeply in 2.1.9-r2. You can configure"
174 + ewarn "mailman with the following variables:"
175 + ewarn "MAILMAN_PREFIX (default: /usr/$(get_libdir)/mailman)"
176 + ewarn "MAILMAN_VAR_PREFIX (default: /var/lib/mailman)"
177 + ewarn "MAILMAN_CGIUID (default: apache)"
178 + ewarn "MAILMAN_CGIGID (default: apache)"
179 + ewarn "MAILMAN_CGIEXT (default: empty)"
180 + ewarn "MAILMAN_MAILUSR (default: mailman)"
181 + ewarn "MAILMAN_MAILUID (default: 280)"
182 + ewarn "MAILMAN_MAILGRP (default: mailman)"
183 + ewarn "MAILMAN_MAILGID (default: 280)"
184 + ewarn
185 + ewarn "Config file is now symlinked in /etc/mailman, so etc-update works."
186 + ewarn
187 + ewarn "If you're upgrading from below 2.1.9-r2 or changed MAILMAN_PREFIX, you"
188 + ewarn "NEED to make a few manual updates to your system:"
189 + ewarn
190 + ewarn "1. Update your mailman users's home directory: usermod -d ${INSTALLDIR} mailman"
191 + ewarn "2. Re-import the crontab: su - mailman -c 'crontab cron/crontab.in'"
192 + ewarn "3. Copy your old mm_cfg.py file to /etc/mailman/mm_cfg.py"
193 + ewarn
194 + ewarn "Additionally if you've modified MAILMAN_VAR_PREFIX (or upgraded from"
195 + ewarn "a pre 2.1.9-r2 installation), you should move your old lists/ and"
196 + ewarn "archives/ directory to the new location, ensuring that the"
197 + ewarn "permissions is correct. See bug #208789 for a discussion."
198 +}