1 |
patrick 10/05/04 06:54:18 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dovecot-1.2.11-r2.ebuild |
5 |
Log: |
6 |
sieve bump, thanks to Eray Aslan |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.239 net-mail/dovecot/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.239&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.239&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.238&r2=1.239 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v |
19 |
retrieving revision 1.238 |
20 |
retrieving revision 1.239 |
21 |
diff -u -r1.238 -r1.239 |
22 |
--- ChangeLog 18 Apr 2010 11:57:26 -0000 1.238 |
23 |
+++ ChangeLog 4 May 2010 06:54:18 -0000 1.239 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for net-mail/dovecot |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.238 2010/04/18 11:57:26 maekke Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.239 2010/05/04 06:54:18 patrick Exp $ |
29 |
+ |
30 |
+*dovecot-1.2.11-r2 (04 May 2010) |
31 |
+ |
32 |
+ 04 May 2010; Patrick Lauer <patrick@g.o> +dovecot-1.2.11-r2.ebuild: |
33 |
+ sieve bump, thanks to Eray Aslan |
34 |
|
35 |
18 Apr 2010; Markus Meier <maekke@g.o> dovecot-1.2.11-r1.ebuild: |
36 |
amd64 stable, bug #314533 |
37 |
|
38 |
|
39 |
|
40 |
1.1 net-mail/dovecot/dovecot-1.2.11-r2.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.2.11-r2.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.2.11-r2.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: dovecot-1.2.11-r2.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2010 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.2.11-r2.ebuild,v 1.1 2010/05/04 06:54:18 patrick Exp $ |
50 |
|
51 |
EAPI="2" |
52 |
|
53 |
inherit eutils versionator ssl-cert |
54 |
|
55 |
major_minor="$( get_version_component_range 1-2 )" |
56 |
sieve_version="0.1.16" |
57 |
managesieve_version="0.11.11" |
58 |
SRC_URI="http://dovecot.org/releases/${major_minor}/${P}.tar.gz |
59 |
sieve? ( http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-sieve-${sieve_version}.tar.gz ) |
60 |
managesieve? ( |
61 |
http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${PV}-managesieve-${managesieve_version}.diff.gz |
62 |
http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-managesieve-${managesieve_version}.tar.gz |
63 |
)" |
64 |
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
65 |
HOMEPAGE="http://www.dovecot.org/" |
66 |
|
67 |
SLOT="0" |
68 |
LICENSE="LGPL-2.1" # MIT too? |
69 |
KEYWORDS="~alpha ~amd64 ~arm ~sparc ~x86" |
70 |
|
71 |
IUSE="berkdb bzip2 caps cydir dbox doc ipv6 kerberos ldap +maildir managesieve mbox mysql pam postgres sieve sqlite +ssl suid vpopmail zlib" |
72 |
|
73 |
DEPEND="berkdb? ( sys-libs/db ) |
74 |
caps? ( sys-libs/libcap ) |
75 |
kerberos? ( virtual/krb5 ) |
76 |
ldap? ( net-nds/openldap ) |
77 |
mysql? ( virtual/mysql ) |
78 |
pam? ( virtual/pam ) |
79 |
postgres? ( virtual/postgresql-base ) |
80 |
sqlite? ( dev-db/sqlite ) |
81 |
ssl? ( dev-libs/openssl ) |
82 |
vpopmail? ( net-mail/vpopmail )" |
83 |
|
84 |
RDEPEND="${DEPEND} |
85 |
>=net-mail/mailbase-0.00-r8" |
86 |
|
87 |
pkg_setup() { |
88 |
if use managesieve && ! use sieve; then |
89 |
eerror "managesieve USE flag selected but sieve USE flag unselected" |
90 |
die "USE flag problem" |
91 |
fi |
92 |
|
93 |
if use dbox && ! use maildir; then |
94 |
eerror "dbox USE flag needs maildir USE flag enabled" |
95 |
die "USE flag problem" |
96 |
fi |
97 |
|
98 |
# Add user and group for login process (same as for fedora/redhat) |
99 |
enewgroup dovecot 97 |
100 |
enewuser dovecot 97 -1 /dev/null dovecot |
101 |
# add "mail" group for suid'ing. Better security isolation. |
102 |
if use suid; then |
103 |
enewgroup mail |
104 |
fi |
105 |
} |
106 |
|
107 |
src_prepare() { |
108 |
use managesieve && epatch "${WORKDIR}"/dovecot-${PV}-managesieve-${managesieve_version}.diff |
109 |
} |
110 |
|
111 |
src_configure() { |
112 |
local conf="" |
113 |
|
114 |
if use postgres || use mysql || use sqlite; then |
115 |
conf="${conf} --with-sql" |
116 |
fi |
117 |
|
118 |
local storages="" |
119 |
for storage in cydir dbox maildir mbox; do |
120 |
use ${storage} && storages="${storage} ${storages}" |
121 |
done |
122 |
[ "${storages}" ] || storages="maildir" |
123 |
|
124 |
econf \ |
125 |
--sysconfdir=/etc/dovecot \ |
126 |
--localstatedir=/var \ |
127 |
--with-moduledir="/usr/$( get_libdir )/dovecot" \ |
128 |
$( use_with berkdb db ) \ |
129 |
$( use_with bzip2 bzlib ) \ |
130 |
$( use_with caps libcap ) \ |
131 |
$( use_with kerberos gssapi ) \ |
132 |
$( use_with ldap ) \ |
133 |
$( use_with mysql ) \ |
134 |
$( use_with pam ) \ |
135 |
$( use_with postgres pgsql ) \ |
136 |
$( use_with sqlite ) \ |
137 |
$( use_with ssl ) \ |
138 |
$( use_with vpopmail ) \ |
139 |
$( use_with zlib ) \ |
140 |
$( use_with ldap) \ |
141 |
--with-storages="${storages}" \ |
142 |
--with-pic \ |
143 |
--enable-header-install \ |
144 |
${conf} |
145 |
|
146 |
if use sieve; then |
147 |
# The sieve plugin needs this file to be build to determine the plugin |
148 |
# directory and the list of libraries to link to. |
149 |
emake dovecot-config || die "emake dovecot-config failed" |
150 |
cd "../dovecot-${major_minor}-sieve-${sieve_version}" |
151 |
econf --with-dovecot="${S}" |
152 |
|
153 |
if use managesieve; then |
154 |
cd "../dovecot-${major_minor}-managesieve-${managesieve_version}" |
155 |
econf --with-dovecot="${S}" --with-dovecot-sieve="../dovecot-${major_minor}-sieve-${sieve_version}" |
156 |
fi |
157 |
fi |
158 |
} |
159 |
|
160 |
src_compile() { |
161 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed" |
162 |
|
163 |
if use sieve; then |
164 |
cd "../dovecot-${major_minor}-sieve-${sieve_version}" |
165 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed" |
166 |
|
167 |
if use managesieve; then |
168 |
cd "../dovecot-${major_minor}-managesieve-${managesieve_version}" |
169 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed" |
170 |
fi |
171 |
fi |
172 |
} |
173 |
|
174 |
src_install () { |
175 |
emake DESTDIR="${D}" install || die "make install failed" |
176 |
|
177 |
# insecure: |
178 |
#use suid && fperms u+s /usr/libexec/dovecot/deliver |
179 |
#better: |
180 |
if use suid;then |
181 |
einfo "Changing perms to allow deliver to be suided" |
182 |
fowners root:mail /usr/libexec/dovecot/deliver |
183 |
fperms 4750 /usr/libexec/dovecot/deliver |
184 |
fi |
185 |
|
186 |
rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf |
187 |
|
188 |
newinitd "${FILESDIR}"/dovecot.init-r2 dovecot |
189 |
|
190 |
rm -rf "${D}"/usr/share/doc/dovecot |
191 |
|
192 |
if use ssl; then |
193 |
sed -i -e 's,^CERTDIR=.*,CERTDIR=\$SSLDIR/dovecot,' \ |
194 |
-e 's,^KEYDIR=.*,KEYDIR=\$SSLDIR/dovecot,' \ |
195 |
-e 's,^CERTFILE=.*,CERTFILE=\$CERTDIR/server.pem,' \ |
196 |
-e 's,^KEYFILE=.*,KEYFILE=\$KEYDIR/server.key,' \ |
197 |
doc/mkcert.sh || die "failed to update SSL settings in mkcert.sh" |
198 |
fi |
199 |
|
200 |
dodoc AUTHORS NEWS README TODO dovecot-example.conf || die "basic dodoc failed" |
201 |
dodoc doc/* || die "dodoc doc/ failed" |
202 |
docinto wiki |
203 |
dodoc doc/wiki/* || die "dodoc doc/wiki/ failed" |
204 |
|
205 |
# Create the dovecot.conf file from the dovecot-example.conf file that |
206 |
# the dovecot folks nicely left for us.... |
207 |
local conf="${D}/etc/dovecot/dovecot.conf" |
208 |
mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf |
209 |
|
210 |
# .maildir is the Gentoo default, but we need to support mbox to |
211 |
local mail_location="maildir:~/.maildir" |
212 |
if use mbox; then |
213 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
214 |
keepdir /var/dovecot |
215 |
sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}" |
216 |
fi |
217 |
sed -i -e \ |
218 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \ |
219 |
|| die "failed to update mail location settings in dovecot.conf" |
220 |
|
221 |
# We're using pam files (imap and pop3) provided by mailbase |
222 |
if use pam; then |
223 |
sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
224 |
"${conf}" || die "failed to update PAM settings in dovecot.conf" |
225 |
# mailbase does not provide a managesieve pam file |
226 |
use managesieve && dosym imap /etc/pam.d/managesieve |
227 |
fi |
228 |
|
229 |
# Listen on ipv6 and ipv4 |
230 |
if use ipv6; then |
231 |
sed -i -e 's/^#listen = \*/listen = \*, \[::\]/g' "${conf}" \ |
232 |
|| die "failed to update listen settings in dovecot.conf" |
233 |
fi |
234 |
|
235 |
# Update ssl cert locations |
236 |
if use ssl; then |
237 |
sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ |
238 |
-e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ |
239 |
"${conf}" || die "failed to update SSL settings in dovecot.conf" |
240 |
fi |
241 |
|
242 |
# Install SQL configuration |
243 |
if use mysql || use postgres; then |
244 |
cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf |
245 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
246 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \ |
247 |
|| die "failed to update SQL settings in dovecot-sql.conf" |
248 |
dodoc doc/dovecot-sql-example.conf |
249 |
fi |
250 |
|
251 |
# Install LDAP configuration |
252 |
if use ldap; then |
253 |
cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf |
254 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
255 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \ |
256 |
|| die "failed to update LDAP settings in dovecot-ldap.conf" |
257 |
dodoc doc/dovecot-ldap-example.conf |
258 |
fi |
259 |
|
260 |
if use sieve; then |
261 |
cd "../dovecot-${major_minor}-sieve-${sieve_version}" |
262 |
emake DESTDIR="${D}" install || die "make install failed (sieve)" |
263 |
|
264 |
if use managesieve; then |
265 |
cd "../dovecot-${major_minor}-managesieve-${managesieve_version}" |
266 |
emake DESTDIR="${D}" install || die "make install failed (managesieve)" |
267 |
fi |
268 |
fi |
269 |
|
270 |
dodir /var/run/dovecot |
271 |
fowners root:root /var/run/dovecot |
272 |
fperms 0755 /var/run/dovecot |
273 |
keepdir /var/run/dovecot/login |
274 |
fowners root:dovecot /var/run/dovecot/login |
275 |
fperms 0750 /var/run/dovecot/login |
276 |
|
277 |
ewarn "If you are upgrading from Dovecot 1.1, read " |
278 |
ewarn " http://wiki.dovecot.org/Upgrading/1.2" |
279 |
if use sieve; then |
280 |
ewarn " http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve" |
281 |
ewarn " In particular, do not forget to change cmusieve to sieve" |
282 |
fi |
283 |
} |
284 |
|
285 |
pkg_postinst() { |
286 |
|
287 |
if use ssl; then |
288 |
# Let's not make a new certificate if we already have one |
289 |
if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
290 |
-e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
291 |
einfo "Creating SSL certificate" |
292 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
293 |
install_cert /etc/ssl/dovecot/server |
294 |
chown dovecot:mail "${ROOT}"/etc/ssl/dovecot/server.{key,pem} |
295 |
fi |
296 |
fi |
297 |
|
298 |
if grep -q '^ssl_key_password' "${ROOT}"/etc/dovecot/dovecot.conf; then |
299 |
echo |
300 |
ewarn "You have set ssl_key_password in dovecot.conf!" |
301 |
ewarn "You are URGED to read the advice in the current" |
302 |
ewarn "dovecot.conf regarding sensible handling of that" |
303 |
ewarn "password, as it might be readable by any user" |
304 |
ewarn "on your system who can access that file!" |
305 |
fi |
306 |
|
307 |
} |