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