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