Gentoo Archives: gentoo-commits

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