Gentoo Archives: gentoo-commits

From: "Benedikt Boehm (hollow)" <hollow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/vpopmail: ChangeLog vpopmail-5.4.30-r1.ebuild
Date: Sat, 20 Feb 2010 10:57:32
Message-Id: E1Nin1e-0005fV-3A@stork.gentoo.org
1 hollow 10/02/20 10:57:30
2
3 Modified: ChangeLog
4 Added: vpopmail-5.4.30-r1.ebuild
5 Log:
6 fix vusagec failure wrt #301650
7 (Portage version: 2.2_rc61/cvs/Linux i686)
8
9 Revision Changes Path
10 1.92 net-mail/vpopmail/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?rev=1.92&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?rev=1.92&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?r1=1.91&r2=1.92
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v
19 retrieving revision 1.91
20 retrieving revision 1.92
21 diff -u -r1.91 -r1.92
22 --- ChangeLog 26 Jan 2010 17:34:34 -0000 1.91
23 +++ ChangeLog 20 Feb 2010 10:57:29 -0000 1.92
24 @@ -1,6 +1,12 @@
25 # ChangeLog for net-mail/vpopmail
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.91 2010/01/26 17:34:34 hollow Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.92 2010/02/20 10:57:29 hollow Exp $
29 +
30 +*vpopmail-5.4.30-r1 (20 Feb 2010)
31 +
32 + 20 Feb 2010; Benedikt Böhm <hollow@g.o>
33 + +vpopmail-5.4.30-r1.ebuild, +files/vpopmail-double-free.patch:
34 + fix vusagec failure wrt #301650
35
36 26 Jan 2010; Benedikt Böhm <hollow@g.o> vpopmail-5.4.30.ebuild:
37 unstable wrt #301650
38
39
40
41 1.1 net-mail/vpopmail/vpopmail-5.4.30-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/vpopmail-5.4.30-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/vpopmail-5.4.30-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: vpopmail-5.4.30-r1.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/vpopmail/vpopmail-5.4.30-r1.ebuild,v 1.1 2010/02/20 10:57:29 hollow Exp $
51
52 EAPI="2"
53
54 inherit autotools eutils fixheadtails qmail
55
56 HOMEPAGE="http://www.inter7.com/index.php?page=vpopmail"
57 DESCRIPTION="A collection of programs to manage virtual email domains and accounts on your Qmail mail servers."
58 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
59
60 LICENSE="GPL-2"
61 SLOT="0"
62 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~s390 ~sh ~sparc ~x86"
63 IUSE="clearpasswd ipalias maildrop mysql"
64
65 DEPEND="virtual/qmail
66 maildrop? ( mail-filter/maildrop )
67 mysql? ( virtual/mysql )"
68 RDEPEND="${DEPEND}"
69
70 # This makes sure the variable is set, and that it isn't null.
71 VPOP_DEFAULT_HOME="/var/vpopmail"
72
73 vpopmail_set_homedir() {
74 VPOP_HOME=$(getent passwd vpopmail | cut -d: -f6)
75 if [[ -z "${VPOP_HOME}" ]]; then
76 ebeep
77 eerror "vpopmail's home directory is null in passwd data!"
78 eerror "You probably want to check that out."
79 eerror "Continuing with default."
80 VPOP_HOME="${VPOP_DEFAULT_HOME}"
81 else
82 einfo "Setting VPOP_HOME to: $VPOP_HOME"
83 fi
84 }
85
86 pkg_setup() {
87 enewgroup vpopmail 89
88 enewuser vpopmail 89 -1 ${VPOP_DEFAULT_HOME} vpopmail
89 upgradewarning
90 }
91
92 src_prepare() {
93 epatch "${FILESDIR}"/${PN}-5.4.9-access.violation.patch
94 epatch "${FILESDIR}"/${PN}-lazy.patch
95 epatch "${FILESDIR}"/${PN}-double-free.patch
96
97 # fix maildir paths
98 sed -i -e 's|Maildir|.maildir|g' \
99 vchkpw.c vconvert.c vdelivermail.c \
100 vpopbull.c vpopmail.c vqmaillocal.c \
101 vuserinfo.c maildirquota.c || die
102
103 # remove vpopmail advertisement
104 sed -i -e '/printf.*vpopmail/s:vpopmail (:(:' \
105 vdelivermail.c vpopbull.c vqmaillocal.c || die
106
107 eautoreconf
108 ht_fix_file cdb/Makefile
109 }
110
111 src_configure() {
112 vpopmail_set_homedir
113
114 if use mysql; then
115 authopts=" \
116 --enable-auth-module=mysql \
117 --enable-libdir=/usr/lib/mysql \
118 --enable-sql-logging \
119 --enable-valias \
120 --disable-mysql-replication \
121 --enable-mysql-limits"
122 else
123 authopts="--enable-auth-module=cdb"
124 fi
125
126 econf ${authopts} \
127 --sysconfdir=${VPOP_HOME}/etc \
128 --enable-non-root-build \
129 --enable-qmaildir=${QMAIL_HOME} \
130 --enable-qmail-newu=${QMAIL_HOME}/bin/qmail-newu \
131 --enable-qmail-inject=${QMAIL_HOME}/bin/qmail-inject \
132 --enable-qmail-newmrh=${QMAIL_HOME}/bin/qmail-newmrh \
133 --enable-vpopuser=vpopmail \
134 --enable-vpopgroup=vpopmail \
135 --enable-many-domains \
136 --enable-file-locking \
137 --enable-file-sync \
138 --enable-md5-passwords \
139 --enable-logging \
140 --enable-auth-logging \
141 --enable-log-name=vpopmail \
142 --enable-qmail-ext \
143 --disable-tcpserver-file \
144 --disable-roaming-users \
145 $(use_enable ipalias ip-alias-domains) \
146 $(use_enable clearpasswd clear-passwd) \
147 $(use_enable maildrop) \
148 $(use_enable maildrop maildrop-prog /usr/bin/maildrop)
149 }
150
151 src_compile() {
152 emake || die "make failed"
153 }
154
155 src_install() {
156 vpopmail_set_homedir
157
158 # bug #277764
159 emake -j1 DESTDIR="${D}" install || die "make install failed"
160 keepdir "${VPOP_HOME}"/domains
161
162 # install helper script for maildir conversion
163 into "${VPOP_HOME}"
164 dobin "${FILESDIR}"/vpopmail-Maildir-dotmaildir-fix.sh
165 into /usr
166
167 dodoc doc/AUTHORS ChangeLog doc/FAQ doc/INSTALL doc/README*
168 dohtml doc/doc_html/* doc/man_html/*
169 rm -rf "${D}/${VPOP_HOME}"/doc
170 dosym /usr/share/doc/${PF}/ "${VPOP_HOME}"/doc
171
172 # create /etc/vpopmail.conf
173 if use mysql; then
174 dodir /etc
175 mv "${D}${VPOP_HOME}"/etc/vpopmail.mysql "${D}"/etc/vpopmail.conf
176 dosym /etc/vpopmail.conf "${VPOP_HOME}"/etc/vpopmail.mysql
177
178 sed -e '12d' -i "${D}"/etc/vpopmail.conf
179 echo '# Read-only DB' >> "${D}"/etc/vpopmail.conf
180 echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
181 echo '# Write DB' >> "${D}"/etc/vpopmail.conf
182 echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
183
184 # lock down perms
185 fperms 640 /etc/vpopmail.conf
186 fowners root:vpopmail /etc/vpopmail.conf
187 fi
188
189 insinto "${VPOP_HOME}"/etc
190 doins vusagec.conf
191 dosym "${VPOP_HOME}"/etc/vusagec.conf /etc/vusagec.conf
192 sed -i 's/Disable = False;/Disable = True;/g' "${D}${VPOP_HOME}"/etc/vusagec.conf
193
194 einfo "Installing env.d entry"
195 dodir /etc/env.d
196 doenvd "${FILESDIR}"/99vpopmail
197
198 einfo "Locking down vpopmail permissions"
199 fowners root:0 -R "${VPOP_HOME}"/{bin,etc,include}
200 fowners root:vpopmail "${VPOP_HOME}"/bin/vchkpw
201 fperms 4711 "${VPOP_HOME}"/bin/vchkpw
202 }
203
204 pkg_postinst() {
205 if use mysql ; then
206 elog
207 elog "You have 'mysql' turned on in your USE"
208 elog "Vpopmail needs a VALID MySQL USER. Let's call it 'vpopmail'"
209 elog "You MUST add it and then specify its passwd in the /etc/vpopmail.conf file"
210 elog
211 elog "First log into mysql as your mysql root user and pass. Then:"
212 elog "> create database vpopmail;"
213 elog "> use mysql;"
214 elog "> grant select, insert, update, delete, create, drop on vpopmail.* to"
215 elog " vpopmail@localhost identified by 'your password';"
216 elog "> flush privileges;"
217 elog
218 elog "If you have problems with vpopmail not accepting mail properly,"
219 elog "please ensure that /etc/vpopmail.conf is chmod 640 and"
220 elog "owned by root:vpopmail"
221 elog
222 fi
223
224 # do this for good measure
225 if [[ -e /etc/vpopmail.conf ]]; then
226 chmod 640 /etc/vpopmail.conf
227 chown root:vpopmail /etc/vpopmail.conf
228 fi
229
230 upgradewarning
231 }
232
233 pkg_postrm() {
234 vpopmail_set_homedir
235
236 elog "The vpopmail DATA will NOT be removed automatically."
237 elog "You can delete them manually by removing the ${VPOP_HOME} directory."
238 }
239
240 upgradewarning() {
241 ewarn
242 ewarn "Massive important warning if you are upgrading to 5.2.1-r8 or older"
243 ewarn "The internal structure of the mail storage has changed for"
244 ewarn "consistancy with the rest of Gentoo! Please review and utilize the "
245 ewarn "script at ${VPOP_HOME}/bin/vpopmail-Maildir-dotmaildir-fix.sh"
246 ewarn "to upgrade your system! (It can do conversions both ways)."
247 ewarn "You should be able to run it right away without any changes."
248 ewarn
249
250 elog
251 elog "Use of vpopmail's tcp.smtp[.cdb] is also deprecated now, consider"
252 elog "using net-mail/relay-ctrl instead."
253 elog
254
255 if use mysql; then
256 elog
257 elog "If you are upgrading from 5.4.17 or older, you have to fix your"
258 elog "MySQL tables:"
259 elog
260 elog 'ALTER TABLE `dir_control` CHANGE `domain` `domain` CHAR(96) NOT NULL;'
261 elog 'ALTER TABLE `ip_alias_map` CHANGE domain domain CHAR(96) NOT NULL;'
262 elog 'ALTER TABLE `lastauth` CHANGE domain domain CHAR(96) NOT NULL;'
263 elog 'ALTER TABLE `valias` CHANGE domain domain CHAR(96) NOT NULL;'
264 elog 'ALTER TABLE `vlog` CHANGE domain domain CHAR(96) NOT NULL;'
265 elog 'ALTER TABLE `vpopmail` CHANGE domain domain CHAR(96) NOT NULL;'
266 elog 'ALTER TABLE `limits` CHANGE domain domain CHAR(96) NOT NULL,'
267 elog ' ADD `disable_spamassassin` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_smtp`,'
268 elog ' ADD `delete_spam` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_spamassassin`;'
269 elog
270 fi
271
272 ewarn
273 ewarn "Newer versions of vpopmail contain a quota daemon called vusaged."
274 ewarn "This ebuild DOES NOT INSTALL vusaged and has therefore disabled"
275 ewarn "its usage in ${VPOP_HOME}/etc/vusagec.conf. DO NOT ENABLE!"
276 ewarn "Otherwise mail delivery WILL BREAK"
277 ewarn
278 }