Gentoo Archives: gentoo-commits

From: "Christian Faulhammer (fauli)" <fauli@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/vpopmail: ChangeLog vpopmail-5.4.30.ebuild
Date: Tue, 29 Dec 2009 12:39:41
Message-Id: E1NPbMP-0006Ee-3Z@stork.gentoo.org
1 fauli 09/12/29 12:39:37
2
3 Modified: ChangeLog
4 Added: vpopmail-5.4.30.ebuild
5 Log:
6 version bump for bug 285213
7 (Portage version: 2.1.6.13/cvs/Linux i686)
8
9 Revision Changes Path
10 1.88 net-mail/vpopmail/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?rev=1.88&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?rev=1.88&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/ChangeLog?r1=1.87&r2=1.88
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v
19 retrieving revision 1.87
20 retrieving revision 1.88
21 diff -u -r1.87 -r1.88
22 --- ChangeLog 14 Jul 2009 08:54:16 -0000 1.87
23 +++ ChangeLog 29 Dec 2009 12:39:36 -0000 1.88
24 @@ -1,6 +1,12 @@
25 # ChangeLog for net-mail/vpopmail
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.87 2009/07/14 08:54:16 flameeyes Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-mail/vpopmail/ChangeLog,v 1.88 2009/12/29 12:39:36 fauli Exp $
29 +
30 +*vpopmail-5.4.30 (29 Dec 2009)
31 +
32 + 29 Dec 2009; Christian Faulhammer <fauli@g.o>
33 + +vpopmail-5.4.30.ebuild:
34 + version bump for bug 285213
35
36 14 Jul 2009; Diego E. Pettenò <flameeyes@g.o>
37 vpopmail-5.4.26.ebuild:
38
39
40
41 1.1 net-mail/vpopmail/vpopmail-5.4.30.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/vpopmail-5.4.30.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/vpopmail/vpopmail-5.4.30.ebuild?rev=1.1&content-type=text/plain
45
46 Index: vpopmail-5.4.30.ebuild
47 ===================================================================
48 # Copyright 1999-2009 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.ebuild,v 1.1 2009/12/29 12:39:36 fauli Exp $
51
52 inherit autotools eutils fixheadtails qmail
53
54 HOMEPAGE="http://www.inter7.com/index.php?page=vpopmail"
55 DESCRIPTION="A collection of programs to manage virtual email domains and accounts on your Qmail mail servers."
56 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
57
58 LICENSE="GPL-2"
59 SLOT="0"
60 KEYWORDS="~amd64 ~arm ~hppa ~ppc ~s390 ~sh ~sparc ~x86"
61 IUSE="clearpasswd ipalias maildrop mysql"
62
63 DEPEND="virtual/qmail
64 maildrop? ( mail-filter/maildrop )
65 mysql? ( virtual/mysql )"
66 RDEPEND="${DEPEND}"
67
68 # This makes sure the variable is set, and that it isn't null.
69 VPOP_DEFAULT_HOME="/var/vpopmail"
70
71 vpopmail_set_homedir() {
72 VPOP_HOME=$(getent passwd vpopmail | cut -d: -f6)
73 if [[ -z "${VPOP_HOME}" ]]; then
74 ebeep
75 eerror "vpopmail's home directory is null in passwd data!"
76 eerror "You probably want to check that out."
77 eerror "Continuing with default."
78 VPOP_HOME="${VPOP_DEFAULT_HOME}"
79 else
80 einfo "Setting VPOP_HOME to: $VPOP_HOME"
81 fi
82 }
83
84 pkg_setup() {
85 enewgroup vpopmail 89
86 enewuser vpopmail 89 -1 ${VPOP_DEFAULT_HOME} vpopmail
87 upgradewarning
88 }
89
90 src_unpack() {
91 unpack ${A}
92 cd "${S}"
93
94 epatch "${FILESDIR}"/${PN}-5.4.9-access.violation.patch
95 epatch "${FILESDIR}"/${PN}-lazy.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_compile() {
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 || die "configure failed"
149
150 emake || die "make failed"
151 }
152
153 src_install() {
154 vpopmail_set_homedir
155
156 # bug #277764
157 emake -j1 DESTDIR="${D}" install || die "make install failed"
158 keepdir "${VPOP_HOME}"/domains
159
160 # install helper script for maildir conversion
161 into "${VPOP_HOME}"
162 dobin "${FILESDIR}"/vpopmail-Maildir-dotmaildir-fix.sh
163 into /usr
164
165 dodoc doc/AUTHORS ChangeLog doc/FAQ doc/INSTALL doc/README*
166 dohtml doc/doc_html/* doc/man_html/*
167 rm -rf "${D}/${VPOP_HOME}"/doc
168 dosym /usr/share/doc/${PF}/ "${VPOP_HOME}"/doc
169
170 # create /etc/vpopmail.conf
171 if use mysql; then
172 dodir /etc
173 mv "${D}${VPOP_HOME}"/etc/vpopmail.mysql "${D}"/etc/vpopmail.conf
174 dosym /etc/vpopmail.conf "${VPOP_HOME}"/etc/vpopmail.mysql
175
176 sed -e '12d' -i "${D}"/etc/vpopmail.conf
177 echo '# Read-only DB' >> "${D}"/etc/vpopmail.conf
178 echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
179 echo '# Write DB' >> "${D}"/etc/vpopmail.conf
180 echo 'localhost|0|vpopmail|secret|vpopmail' >> "${D}"/etc/vpopmail.conf
181
182 # lock down perms
183 fperms 640 /etc/vpopmail.conf
184 fowners root:vpopmail /etc/vpopmail.conf
185 fi
186
187 einfo "Installing env.d entry"
188 dodir /etc/env.d
189 doenvd "${FILESDIR}"/99vpopmail
190
191 einfo "Locking down vpopmail permissions"
192 fowners root:0 -R "${VPOP_HOME}"/{bin,etc,include}
193 fowners root:vpopmail "${VPOP_HOME}"/bin/vchkpw
194 fperms 4711 "${VPOP_HOME}"/bin/vchkpw
195 }
196
197 pkg_postinst() {
198 if use mysql ; then
199 elog
200 elog "You have 'mysql' turned on in your USE"
201 elog "Vpopmail needs a VALID MySQL USER. Let's call it 'vpopmail'"
202 elog "You MUST add it and then specify its passwd in the /etc/vpopmail.conf file"
203 elog
204 elog "First log into mysql as your mysql root user and pass. Then:"
205 elog "> create database vpopmail;"
206 elog "> use mysql;"
207 elog "> grant select, insert, update, delete, create, drop on vpopmail.* to"
208 elog " vpopmail@localhost identified by 'your password';"
209 elog "> flush privileges;"
210 elog
211 elog "If you have problems with vpopmail not accepting mail properly,"
212 elog "please ensure that /etc/vpopmail.conf is chmod 640 and"
213 elog "owned by root:vpopmail"
214 elog
215 fi
216
217 # do this for good measure
218 if [[ -e /etc/vpopmail.conf ]]; then
219 chmod 640 /etc/vpopmail.conf
220 chown root:vpopmail /etc/vpopmail.conf
221 fi
222
223 upgradewarning
224 }
225
226 pkg_postrm() {
227 vpopmail_set_homedir
228
229 elog "The vpopmail DATA will NOT be removed automatically."
230 elog "You can delete them manually by removing the ${VPOP_HOME} directory."
231 }
232
233 upgradewarning() {
234 ewarn
235 ewarn "Massive important warning if you are upgrading to 5.2.1-r8 or older"
236 ewarn "The internal structure of the mail storage has changed for"
237 ewarn "consistancy with the rest of Gentoo! Please review and utilize the "
238 ewarn "script at ${VPOP_HOME}/bin/vpopmail-Maildir-dotmaildir-fix.sh"
239 ewarn "to upgrade your system! (It can do conversions both ways)."
240 ewarn "You should be able to run it right away without any changes."
241 ewarn
242
243 elog
244 elog "Use of vpopmail's tcp.smtp[.cdb] is also deprecated now, consider"
245 elog "using net-mail/relay-ctrl instead."
246 elog
247
248 if use mysql; then
249 elog
250 elog "If you are upgrading from 5.4.17 or older, you have to fix your"
251 elog "MySQL tables:"
252 elog
253 elog 'ALTER TABLE `dir_control` CHANGE `domain` `domain` CHAR(96) NOT NULL;'
254 elog 'ALTER TABLE `ip_alias_map` CHANGE domain domain CHAR(96) NOT NULL;'
255 elog 'ALTER TABLE `lastauth` CHANGE domain domain CHAR(96) NOT NULL;'
256 elog 'ALTER TABLE `valias` CHANGE domain domain CHAR(96) NOT NULL;'
257 elog 'ALTER TABLE `vlog` CHANGE domain domain CHAR(96) NOT NULL;'
258 elog 'ALTER TABLE `vpopmail` CHANGE domain domain CHAR(96) NOT NULL;'
259 elog 'ALTER TABLE `limits` CHANGE domain domain CHAR(96) NOT NULL,'
260 elog ' ADD `disable_spamassassin` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_smtp`,'
261 elog ' ADD `delete_spam` TINYINT(1) DEFAULT '0' NOT NULL AFTER `disable_spamassassin`;'
262 elog
263 fi
264 }