Gentoo Archives: gentoo-commits

From: "Hanno Boeck (hanno)" <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/mailman: ChangeLog mailman-2.1.14.ebuild
Date: Mon, 04 Oct 2010 19:16:53
Message-Id: 20101004191640.4E5ED20051@flycatcher.gentoo.org
1 hanno 10/10/04 19:16:40
2
3 Modified: ChangeLog
4 Added: mailman-2.1.14.ebuild
5 Log:
6 mailman version bump
7
8 (Portage version: 2.1.9.13/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.123 net-mail/mailman/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/mailman/ChangeLog?rev=1.123&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/mailman/ChangeLog?rev=1.123&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/mailman/ChangeLog?r1=1.122&r2=1.123
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-mail/mailman/ChangeLog,v
20 retrieving revision 1.122
21 retrieving revision 1.123
22 diff -u -r1.122 -r1.123
23 --- ChangeLog 13 Sep 2010 23:12:08 -0000 1.122
24 +++ ChangeLog 4 Oct 2010 19:16:40 -0000 1.123
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-mail/mailman
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/ChangeLog,v 1.122 2010/09/13 23:12:08 hanno Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/ChangeLog,v 1.123 2010/10/04 19:16:40 hanno Exp $
30 +
31 +*mailman-2.1.14 (04 Oct 2010)
32 +
33 + 04 Oct 2010; Hanno Boeck <hanno@g.o> +mailman-2.1.14.ebuild:
34 + Version bump.
35
36 *mailman-2.1.14_rc1 (13 Sep 2010)
37
38
39
40
41 1.1 net-mail/mailman/mailman-2.1.14.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/mailman/mailman-2.1.14.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/mailman/mailman-2.1.14.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mailman-2.1.14.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-mail/mailman/mailman-2.1.14.ebuild,v 1.1 2010/10/04 19:16:40 hanno Exp $
51
52 inherit eutils python multilib
53
54 DESCRIPTION="A python-based mailing list server with an extensive web interface"
55 SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
56 HOMEPAGE="http://www.list.org/"
57
58 SLOT="0"
59 LICENSE="GPL-2"
60 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
61 IUSE=""
62
63 DEPEND=">=dev-lang/python-2.3
64 virtual/mta
65 virtual/cron
66 virtual/httpd-cgi"
67 RDEPEND="${DEPEND}"
68
69 pkg_setup() {
70 INSTALLDIR=${MAILMAN_PREFIX:-"/usr/$(get_libdir)/mailman"}
71 VAR_PREFIX=${MAILMAN_VAR_PREFIX:-"/var/lib/mailman"}
72 CGIUID=${MAILMAN_CGIUID:-apache}
73 CGIGID=${MAILMAN_CGIGID:-apache}
74 MAILUSR=${MAILMAN_MAILUSR:-mailman}
75 MAILUID=${MAILMAN_MAILUID:-280}
76 MAILGRP=${MAILMAN_MAILGRP:-mailman}
77 MAILGID=${MAILMAN_MAILGID:-280}
78
79 # Bug #58526: switch to enew{group,user}.
80 # need to add mailman here for compile process.
81 # Duplicated at pkg_postinst() for binary install.
82 enewgroup ${MAILGRP} ${MAILGID}
83 enewuser ${MAILUSR} ${MAILUID} /bin/bash ${INSTALLDIR} mailman -G cron -c "mailman"
84 }
85
86 src_unpack() {
87 unpack ${A}
88 cd "${S}"
89 epatch "${FILESDIR}/${PN}-2.1.14_rc1-directory-check.patch" || die "patch failed."
90 epatch "${FILESDIR}/${PN}-2.1.9-icons.patch" || die "patch failed."
91 epatch "${FILESDIR}/${PN}-2.1.13-ldflags.patch"
92 }
93
94 src_compile() {
95 econf --without-permcheck \
96 --prefix="${INSTALLDIR}" \
97 --with-mail-gid=${MAILGID} \
98 --with-cgi-gid=${CGIGID} \
99 --with-cgi-ext="${MAILMAN_CGIEXT}" \
100 --with-var-prefix="${VAR_PREFIX}" \
101 --with-username=${MAILUSR} \
102 --with-groupname=${MAILGRP} \
103 || die "configure failed"
104
105 emake || die "make failed"
106 }
107
108 src_install () {
109 emake "DESTDIR=${D}" doinstall || die
110
111 insinto /etc/apache2/modules.d
112 newins "${FILESDIR}/50_mailman.conf-r1" 50_mailman.conf
113 dosed "s:/usr/local/mailman/cgi-bin:${INSTALLDIR}/cgi-bin:g" /etc/apache2/modules.d/50_mailman.conf
114 dosed "s:/usr/local/mailman/icons:${INSTALLDIR}/icons:g" /etc/apache2/modules.d/50_mailman.conf
115 dosed "s:/usr/local/mailman/archives:${VAR_PREFIX}/archives:g" /etc/apache2/modules.d/50_mailman.conf
116
117 newdoc "${FILESDIR}/README.gentoo-r3" README.gentoo || die "newdoc failed"
118
119 dodoc ACK* BUGS FAQ NEWS README* TODO UPGRADING INSTALL contrib/mailman.mc \
120 contrib/README.check_perms_grsecurity contrib/virtusertable || die "dodoc failed"
121
122 exeinto ${INSTALLDIR}/bin
123 doexe build/contrib/*.py contrib/majordomo2mailman.pl contrib/auto \
124 contrib/mm-handler* || die
125
126 dodir /etc/mailman
127 mv "${D}/${INSTALLDIR}/Mailman/mm_cfg.py" "${D}/etc/mailman"
128 dosym /etc/mailman/mm_cfg.py ${INSTALLDIR}/Mailman/mm_cfg.py
129
130 # Save the old config for updates from pre-2.1.9-r2
131 # To be removed some distant day
132 for i in /var/mailman /home/mailman /usr/local/mailman ${INSTALLDIR}
133 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"
136 fi
137 done
138
139 newinitd "${FILESDIR}/mailman.rc" mailman
140
141 keepdir ${VAR_PREFIX}/logs
142 keepdir ${VAR_PREFIX}/locks
143 keepdir ${VAR_PREFIX}/spam
144 keepdir ${VAR_PREFIX}/archives/public
145 keepdir ${VAR_PREFIX}/archives/private
146 keepdir ${VAR_PREFIX}/lists
147 keepdir ${VAR_PREFIX}/qfiles
148
149 chown -R ${MAILUSR}:${MAILGRP} "${D}/${VAR_PREFIX}" "${D}/${INSTALLDIR}" "${D}"/etc/mailman/*
150 chown ${CGIUID}:${MAILGRP} "${D}/${VAR_PREFIX}/archives/private"
151 chmod 2775 "${D}/${INSTALLDIR}" "${D}/${INSTALLDIR}"/templates/* \
152 "${D}/${INSTALLDIR}"/messages/* "${D}/${VAR_PREFIX}" "${D}/${VAR_PREFIX}"/{logs,lists,spam,locks,archives/public}
153 chmod 2770 "${D}/${VAR_PREFIX}/archives/private"
154 chmod 2770 "${D}/${VAR_PREFIX}/qfiles"
155 chmod 2755 "${D}/${INSTALLDIR}"/cgi-bin/* "${D}/${INSTALLDIR}/mail/mailman"
156
157 }
158
159 pkg_postinst() {
160 python_mod_optimize ${INSTALLDIR}/bin/ ${INSTALLDIR}/Mailman \
161 ${INSTALLDIR}/Mailman/*/
162
163 enewgroup ${MAILGRP} ${MAILGID}
164 enewuser ${MAILUSR} ${MAILUID} -1 ${INSTALLDIR} mailman -G cron -c "mailman"
165 elog
166 elog "Please read /usr/share/doc/${PF}/README.gentoo.bz2 for additional"
167 elog "Setup information, mailman will NOT run unless you follow"
168 elog "those instructions!"
169 elog
170
171 elog "An example Mailman configuration file for Apache has been installed into:"
172 elog " ${APACHE2_MODULES_CONFDIR}/50_mailman.conf"
173 elog
174 elog "To enable, you will need to add \"-D MAILMAN\" to"
175 elog "/etc/conf.d/apache2."
176 elog
177
178 ewarn "Default-Configuration has changed deeply in 2.1.9-r2. You can configure"
179 ewarn "mailman with the following variables:"
180 ewarn "MAILMAN_PREFIX (default: /usr/$(get_libdir)/mailman)"
181 ewarn "MAILMAN_VAR_PREFIX (default: /var/lib/mailman)"
182 ewarn "MAILMAN_CGIUID (default: apache)"
183 ewarn "MAILMAN_CGIGID (default: apache)"
184 ewarn "MAILMAN_CGIEXT (default: empty)"
185 ewarn "MAILMAN_MAILUSR (default: mailman)"
186 ewarn "MAILMAN_MAILUID (default: 280)"
187 ewarn "MAILMAN_MAILGRP (default: mailman)"
188 ewarn "MAILMAN_MAILGID (default: 280)"
189 ewarn
190 ewarn "Config file is now symlinked in /etc/mailman, so etc-update works."
191 ewarn
192 ewarn "If you're upgrading from below 2.1.9-r2 or changed MAILMAN_PREFIX, you"
193 ewarn "NEED to make a few manual updates to your system:"
194 ewarn
195 ewarn "1. Update your mailman users's home directory: usermod -d ${INSTALLDIR} mailman"
196 ewarn "2. Re-import the crontab: su - mailman -c 'crontab cron/crontab.in'"
197 ewarn "3. Copy your old mm_cfg.py file to /etc/mailman/mm_cfg.py"
198 ewarn
199 ewarn "Additionally if you've modified MAILMAN_VAR_PREFIX (or upgraded from"
200 ewarn "a pre 2.1.9-r2 installation), you should move your old lists/ and"
201 ewarn "archives/ directory to the new location, ensuring that the"
202 ewarn "permissions is correct. See bug #208789 for a discussion."
203 ebeep
204 }
205
206 pkg_postrm() {
207 INSTALLDIR=${MAILMAN_PREFIX:-"/usr/$(get_libdir)/mailman"}
208 python_mod_cleanup ${INSTALLDIR}/bin ${INSTALLDIR}/Mailman \
209 ${INSTALLDIR}/Mailman/*/
210 }