Gentoo Archives: gentoo-commits

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