1 |
wschlich 09/01/13 18:01:25 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dovecot-1.1.8.ebuild |
5 |
Log: |
6 |
version bump |
7 |
(Portage version: 2.2_rc13/cvs/Linux 2.6.24-gentoo-r5-1 i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.195 net-mail/dovecot/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.195&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.195&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.194&r2=1.195 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v |
19 |
retrieving revision 1.194 |
20 |
retrieving revision 1.195 |
21 |
diff -u -r1.194 -r1.195 |
22 |
--- ChangeLog 8 Dec 2008 16:37:30 -0000 1.194 |
23 |
+++ ChangeLog 13 Jan 2009 18:01:25 -0000 1.195 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for net-mail/dovecot |
26 |
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.194 2008/12/08 16:37:30 armin76 Exp $ |
28 |
+# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.195 2009/01/13 18:01:25 wschlich Exp $ |
30 |
+ |
31 |
+*dovecot-1.1.8 (13 Jan 2009) |
32 |
+ |
33 |
+ 13 Jan 2009; Wolfram Schlich <wschlich@g.o> |
34 |
+ +files/dovecot-1.1.8-5417c01fff5b.patch, |
35 |
+ +files/dovecot-1.1.8-b42c06ef8213.patch, +dovecot-1.1.8.ebuild: |
36 |
+ version bump |
37 |
|
38 |
08 Dec 2008; Raúl Porcel <armin76@g.o> dovecot-1.1.7-r1.ebuild: |
39 |
alpha/sparc stable wrt #245316 |
40 |
|
41 |
|
42 |
|
43 |
1.1 net-mail/dovecot/dovecot-1.1.8.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.1.8.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.1.8.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: dovecot-1.1.8.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2009 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.1.8.ebuild,v 1.1 2009/01/13 18:01:25 wschlich Exp $ |
53 |
|
54 |
inherit autotools eutils ssl-cert versionator |
55 |
|
56 |
MY_P="${P/_/.}" |
57 |
MY_PV12=$(get_version_component_range 1-2 ${PV}) |
58 |
S="${WORKDIR}/${MY_P}" |
59 |
SIEVE="dovecot-sieve-1.1.6" |
60 |
SIEVE_S="${WORKDIR}/${SIEVE}" |
61 |
MANAGESIEVE_PATCH="managesieve-0.10.4" |
62 |
MANAGESIEVE="managesieve-0.10.4" |
63 |
MANAGESIEVE_S="${WORKDIR}/${PN}-${MY_PV12}-${MANAGESIEVE}" |
64 |
|
65 |
SRC_URI="http://dovecot.org/releases/${MY_PV12}/${MY_P}.tar.gz |
66 |
sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz ) |
67 |
managesieve? ( http://www.rename-it.nl/${PN}/${MY_PV12}/${MY_P}-${MANAGESIEVE_PATCH}.diff.gz |
68 |
http://www.rename-it.nl/${PN}/${MY_PV12}/${PN}-${MY_PV12}-${MANAGESIEVE}.tar.gz )" |
69 |
|
70 |
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
71 |
HOMEPAGE="http://www.dovecot.org/" |
72 |
|
73 |
SLOT="0" |
74 |
LICENSE="LGPL-2.1" |
75 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" |
76 |
|
77 |
IUSE="berkdb debug doc ipv6 kerberos ldap managesieve mbox mysql pop3d pam postgres sieve sqlite3 ssl suid vpopmail" |
78 |
|
79 |
# Developer documentation, controlled by the doc USE flag |
80 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
81 |
|
82 |
DEPEND=">=sys-apps/sed-4 |
83 |
sys-libs/libcap |
84 |
berkdb? ( >=sys-libs/db-4.2 ) |
85 |
kerberos? ( virtual/krb5 ) |
86 |
ldap? ( net-nds/openldap ) |
87 |
pam? ( virtual/pam ) |
88 |
ssl? ( dev-libs/openssl ) |
89 |
postgres? ( virtual/postgresql-base ) |
90 |
mysql? ( virtual/mysql ) |
91 |
sqlite3? ( =dev-db/sqlite-3* ) |
92 |
vpopmail? ( net-mail/vpopmail )" |
93 |
|
94 |
RDEPEND="${DEPEND} |
95 |
>=net-mail/mailbase-0.00-r8" |
96 |
|
97 |
src_unpack() { |
98 |
unpack ${A} |
99 |
cd "${S}" |
100 |
if use managesieve; then |
101 |
epatch "${WORKDIR}"/${MY_P}-${MANAGESIEVE_PATCH}.diff |
102 |
eautoreconf |
103 |
fi |
104 |
epatch "${FILESDIR}"/${P}-5417c01fff5b.patch |
105 |
epatch "${FILESDIR}"/${P}-b42c06ef8213.patch |
106 |
} |
107 |
|
108 |
pkg_setup() { |
109 |
if ! use sieve && use managesieve; then |
110 |
eerror "managesieve USE flag selected but sieve USE flag unselected" |
111 |
die "USE flag problem" |
112 |
fi |
113 |
# Add user and group for login process (same as for fedora/redhat) |
114 |
enewgroup dovecot 97 |
115 |
enewuser dovecot 97 -1 /dev/null dovecot |
116 |
} |
117 |
|
118 |
src_compile() { |
119 |
local myconf= |
120 |
use ssl && myconf="${myconf} --with-ssl=openssl" \ |
121 |
|| myconf="${myconf} --without-ssl" |
122 |
econf \ |
123 |
--localstatedir=/var \ |
124 |
--sysconfdir=/etc/dovecot \ |
125 |
--enable-header-install \ |
126 |
--with-ioloop=best \ |
127 |
--with-poll=best \ |
128 |
$(use_with berkdb db) \ |
129 |
$(use_enable debug) \ |
130 |
$(use_enable ipv6) \ |
131 |
$(use_with kerberos gssapi) \ |
132 |
$(use_with ldap) \ |
133 |
$(use_with mysql) \ |
134 |
$(use_with pam) \ |
135 |
$(use_with pop3d) \ |
136 |
$(use_with postgres pgsql) \ |
137 |
$(use_with sqlite3 sqlite) \ |
138 |
$(use_with vpopmail) \ |
139 |
${myconf} \ |
140 |
|| die "configure failed" |
141 |
emake || die "make failed" |
142 |
|
143 |
if use sieve; then |
144 |
einfo "Building sieve" |
145 |
cd "${SIEVE_S}" |
146 |
econf --with-dovecot="${S}" || die "configure failed (sieve)" |
147 |
emake || die "make failed (sieve)" |
148 |
fi |
149 |
|
150 |
if use managesieve; then |
151 |
einfo "Building managesieve" |
152 |
cd "${MANAGESIEVE_S}" |
153 |
econf --with-dovecot="${S}" --with-dovecot-sieve="${SIEVE_S}" \ |
154 |
|| die "configure failed (managesieve)" |
155 |
emake || die "make failed (managesieve)" |
156 |
fi |
157 |
} |
158 |
|
159 |
src_install () { |
160 |
make DESTDIR="${D}" install || die "make install failed" |
161 |
use suid && fperms u+s /usr/libexec/dovecot/deliver |
162 |
|
163 |
rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf |
164 |
|
165 |
newinitd "${FILESDIR}"/dovecot.init-r2 dovecot |
166 |
|
167 |
# Documentation |
168 |
rm -rf "${D}"/usr/share/doc/dovecot |
169 |
dodoc AUTHORS NEWS README TODO dovecot-example.conf |
170 |
use managesieve && newdoc ${MANAGESIEVE_S}/README README.managesieve |
171 |
if use doc; then |
172 |
dodoc doc/*.txt |
173 |
else |
174 |
local x= n= |
175 |
for x in doc/*.txt; do |
176 |
n=$(basename "${x}" .txt) |
177 |
[[ " ${DEVDOCS} " != *" ${n} "* ]] && dodoc "${x}" |
178 |
done |
179 |
fi |
180 |
|
181 |
# Create the dovecot.conf file from the dovecot-example.conf file that |
182 |
# the dovecot folks nicely left for us.... |
183 |
local conf="${D}/etc/dovecot/dovecot.conf" |
184 |
mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf |
185 |
|
186 |
# .maildir is the Gentoo default, but we need to support mbox to |
187 |
local mail_location="maildir:~/.maildir" |
188 |
if use mbox; then |
189 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
190 |
keepdir /var/dovecot |
191 |
sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}" |
192 |
fi |
193 |
sed -i -e \ |
194 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \ |
195 |
|| die "failed to update mail location settings in dovecot.conf" |
196 |
|
197 |
# We're using pam files (imap and pop3) provided by mailbase |
198 |
if use pam; then |
199 |
sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
200 |
"${conf}" || die "failed to update PAM settings in dovecot.conf" |
201 |
# mailbase does not provide a managesieve pam file |
202 |
use managesieve && dosym imap /etc/pam.d/managesieve |
203 |
fi |
204 |
|
205 |
# Listen on ipv6 and ipv4 |
206 |
if use ipv6; then |
207 |
sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \ |
208 |
|| die "failed to update listen settings in dovecot.conf" |
209 |
fi |
210 |
|
211 |
# Update ssl cert locations |
212 |
if use ssl; then |
213 |
sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ |
214 |
-e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ |
215 |
"${conf}" || die "failed to update SSL settings in dovecot.conf" |
216 |
fi |
217 |
|
218 |
# Install SQL configuration |
219 |
if use mysql || use postgres; then |
220 |
cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf |
221 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
222 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \ |
223 |
|| die "failed to update SQL settings in dovecot-sql.conf" |
224 |
dodoc doc/dovecot-sql-example.conf |
225 |
fi |
226 |
|
227 |
# Install LDAP configuration |
228 |
if use ldap; then |
229 |
cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf |
230 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
231 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \ |
232 |
|| die "failed to update LDAP settings in dovecot-ldap.conf" |
233 |
dodoc doc/dovecot-ldap-example.conf |
234 |
fi |
235 |
|
236 |
# Install sieve plugin |
237 |
if use sieve; then |
238 |
make -C "${SIEVE_S}" DESTDIR="${D}" install \ |
239 |
|| die "make install failed (sieve)" |
240 |
fi |
241 |
|
242 |
# Install managesieve |
243 |
if use managesieve; then |
244 |
make -C "${MANAGESIEVE_S}" DESTDIR="${D}" install \ |
245 |
|| die "make install failed (managesieve)" |
246 |
fi |
247 |
|
248 |
dodir /var/run/dovecot |
249 |
fowners root:0 /var/run/dovecot |
250 |
fperms 0755 /var/run/dovecot |
251 |
keepdir /var/run/dovecot/login |
252 |
fowners root:dovecot /var/run/dovecot/login |
253 |
fperms 0750 /var/run/dovecot/login |
254 |
} |
255 |
|
256 |
get_config_var() { |
257 |
local varname=${1} |
258 |
if [[ -z ${varname} ]]; then |
259 |
die "${FUNCNAME}: variable name missing" |
260 |
fi |
261 |
sed -n 's/^[[:space:]]\?'"${varname}"'[[:space:]]*="*\([^#"]\+\)"*/\1/p' \ |
262 |
"${ROOT}"/etc/dovecot/dovecot.conf |
263 |
} |
264 |
|
265 |
pkg_postinst() { |
266 |
elog "The Dovecot configuration has vastly changed since 0.99." |
267 |
elog "You are encouraged to start afresh with a new configuration file." |
268 |
elog "see http://wiki.dovecot.org/ for configuration examples." |
269 |
|
270 |
if [[ -e "${ROOT}"/etc/dovecot.conf ]]; then |
271 |
echo |
272 |
ewarn "The Dovecot configuration now resides in ${ROOT}/etc/dovecot" |
273 |
fi |
274 |
|
275 |
local base_dir="$(get_config_var base_dir)" |
276 |
base_dir="${base_dir:-/var/run/dovecot}" |
277 |
if use ssl; then |
278 |
# Let's not make a new certificate if we already have one |
279 |
if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
280 |
-e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
281 |
einfo "Creating SSL certificate" |
282 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
283 |
install_cert /etc/ssl/dovecot/server |
284 |
chown dovecot:mail "${ROOT}"/etc/ssl/dovecot/server.{key,pem} |
285 |
fi |
286 |
if [[ ! -e "${ROOT}${base_dir}/login/ssl-parameters.dat" ]]; then |
287 |
echo |
288 |
elog "Dovecot requires DH SSL Parameters if you use SSL connections" |
289 |
elog "These take some time to make, and dovecot will create them before" |
290 |
elog "it allows any SSL connections." |
291 |
elog "You can create them now before starting dovecot like so" |
292 |
elog " emerge --config =${PF}" |
293 |
fi |
294 |
fi |
295 |
|
296 |
if grep -q '^ssl_key_password' "${ROOT}"/etc/dovecot/dovecot.conf; then |
297 |
echo |
298 |
ewarn "*** ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ***" |
299 |
ewarn |
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-example.conf regarding sensible handling" |
303 |
ewarn "of that password, as it might be readable by any" |
304 |
ewarn "user on your system who can access that file!" |
305 |
ewarn |
306 |
ewarn "*** ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ***" |
307 |
echo |
308 |
fi |
309 |
} |
310 |
|
311 |
pkg_config() { |
312 |
local base_dir="$(get_config_var base_dir)" |
313 |
base_dir="${base_dir:-/var/run/dovecot}" |
314 |
|
315 |
if use ssl; then |
316 |
einfo "Regenerating SSL parameters. This will take some time." |
317 |
"${ROOT}"/usr/libexec/dovecot/ssl-build-param "${base_dir}/login/ssl-parameters.dat" |
318 |
fi |
319 |
} |