Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/dovecot/
Date: Wed, 27 Apr 2016 07:26:13
Message-Id: 1461741944.a98d5eab08784ed16a105a46d94916ef12e36a2f.eras@gentoo
1 commit: a98d5eab08784ed16a105a46d94916ef12e36a2f
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 27 07:25:44 2016 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 27 07:25:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a98d5eab
7
8 net-mail/dovecot: Version bump to 2.2.24
9
10 Package-Manager: portage-2.2.28
11
12 net-mail/dovecot/Manifest | 2 +
13 net-mail/dovecot/dovecot-2.2.24.ebuild | 308 +++++++++++++++++++++++++++++++++
14 2 files changed, 310 insertions(+)
15
16 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
17 index dd091b4..ac1930c 100644
18 --- a/net-mail/dovecot/Manifest
19 +++ b/net-mail/dovecot/Manifest
20 @@ -2,8 +2,10 @@ DIST dovecot-2.2-pigeonhole-0.4.10.tar.gz 1605634 SHA256 e9dfe7160fd3b465d6d5068
21 DIST dovecot-2.2-pigeonhole-0.4.11.tar.gz 1660922 SHA256 5168b4ac4e173b563dd71f4024452da5a578aa8d5d047d98903489ab4d84ad72 SHA512 c01b23e90431da8c57f8e384d52bee0a608ce5de5a2e8cc304ab482b17473d637126704d549fbd3bc1ffffdeb41eff94e2587d1e6707a9249c15fff65631814d WHIRLPOOL d901c2b9e4fa2d7b59d77fae42beb42e51d12999a937979aed6b6b705238d2a3d8fad4243f3bee7bbe954e4c033861d9d5f731a9793899d211842627e71009a0
22 DIST dovecot-2.2-pigeonhole-0.4.12.tar.gz 1681327 SHA256 98a2fd79b0d9effd08c0caf04d483b1caa5e4503dae811e6d436948557bfb702 SHA512 68b2bcc8bd2a8c039ff116a441ff8795917b280f89ad60819638d5903010611bbd5966567d0d33ae305f9ae4db9f6756b2a72ccd8305124cfe846d64bbdd08c5 WHIRLPOOL 7e5bca584219ed2c9dbfe7056c137ced7a1a56cfa7eb6940fa882d3683ef67ec103e9cf5788f0869175c5d4bf4804fb979951836f70755d4752af441d50afbbc
23 DIST dovecot-2.2-pigeonhole-0.4.13.tar.gz 1706253 SHA256 7fd187b8393a5048b302f90ad84adc7bf6e73bf79fd8d22a1c1aaa71f836a910 SHA512 4e25a406b888fd8cbc9a4f4f7a7364f10ab47e932550970cede34c964d50a6fe697c4b6d61cc83846b97901368ac63d1e22aa4d1d2002f24540766c5fbbebbf5 WHIRLPOOL 4669079c5f6c727b2436b86c506984dc17a07851a3d95a8a9b00e30c1bf48da7438cc6376d710676258b7898b6fac4b9c38eee7f13c67933321e327ccf25e14b
24 +DIST dovecot-2.2-pigeonhole-0.4.14.tar.gz 1752101 SHA256 dff30a636c1516158f3e159c669a254569c9dabaa6ecfa3669379101ea5b3300 SHA512 97e72a3046a5975d416e49a900a9d801224c6de944aea4fd80b0e9c571af68d4e11c4a152ab6048abd9867a31eb4d8e3e648165489fb4a2b57a9a2929760247e WHIRLPOOL 2456faed24117f8fcb93f924617462756c8eac0312e450e2671e6a11cfed2a52fdc8d23954c28399b46632b1959f1eb733825a43042895d4da2bf9d81b7f60d5
25 DIST dovecot-2.2-pigeonhole-0.4.9.tar.gz 1577127 SHA256 82892f876d26008a076973dfddf1cffaf5a0451825fd44e06287e94b89078649 SHA512 9e7a18b43d59ed955b142d16696ca221822a547ea59ac70c1bb374eedb28b6ed99ea49f34ead1f9a16ded4573605e410a5cc8e038e1bdf5f943a65588b5d3af2 WHIRLPOOL be309436b43af82a7cb8eff205e1638b2c59751927fdab187e6fde72330e4abd99878cbfa94ca50440ec8de1f9b569bf334d426891ddc73d5f647ee2040c193f
26 DIST dovecot-2.2.19.tar.gz 5256627 SHA256 759e1e3f9d907cdaabad1f5fbacc793ca191d234c084bec3bba42966952a4e9f SHA512 1b9d605a6a5862ade9d1ca634a9e0171b7c212ab025fc2059051c3795470685b66516fa9fbe5ad91d84388268ea15795f2dcd70ffdf81736ce4d80fd284835e9 WHIRLPOOL 30dbe70bfeef10dbe414ebf3f091041ad66926a8748cd401ecaf9ed5c7602939e86943d98bfb839f32c0aa1d0081ab71adacf23bb4adba34e828ee296e9a7278
27 DIST dovecot-2.2.21.tar.gz 4985686 SHA256 7ab7139e59e1f0353bf9c24251f13c893cf1a6ef4bcc47e2d44de437108d0b20 SHA512 0d246d44e0c908ea40d324982fb279b19424ddcb642e51796078f600fc5bf530898d2fa387fcfd971d43758cff22590e5ea6918c31e9f4a63f13a8c525a23d9b WHIRLPOOL 242026e876a12b9ecd50a76849cb16161f625791bc9d1a54270f38f24e66bc31b6ddf90acf119af2bd4c94e392c875a0c29be08b84a5f25d080a7e1b13d52175
28 DIST dovecot-2.2.22.tar.gz 5318023 SHA256 c7a9db3c4ae9d9b4da920d2c82669700a0d407934501b405f37f89cc0b706ec7 SHA512 ea02ae491e90c0b9de7c7320901c8f7235193303fb194805564582d30e630002f21f7195e5c5b99ff3ea1fadf95ddd43c2f7bb4d24067e0e5f40a66e9eb90012 WHIRLPOOL c03ac91b79e7bb2f42027a3da653d4a4fac857d52e50f8439ec25e80ff4ba716e64c8b7015b6bf70e099aa9afdfe775748920ab4a5865051cbf48da588e2f9a2
29 DIST dovecot-2.2.23.tar.gz 5291365 SHA256 5d834be43fe8f6f61d9b0fb139bf1db2a4da313aeebd7bf09e4bf6bcb1c9e441 SHA512 704d86dcef8b217a54db1d1ae3c1e0d6303827fedd7150aec83e805512cd1c5befc88da44660e7a40765ad6800c14d399f8c7621e84125a7732d68fee7f18d82 WHIRLPOOL eda6fb007ac07f70a6120d74deae80248f87fffe33ffae49f636b6506c4e8097ad6e4818e5f88446362d8fcd89ea3b8dcc58a2c67eb12d0a556bca3021e51153
30 +DIST dovecot-2.2.24.tar.gz 5345872 SHA256 71c86891ea8deb5703d3dbbc3ea31ce2cbf7638f1aa395d9e8794d3ff7aebeb7 SHA512 90d98996e75353ae631c1e2da2520cc340928f427276c757316714892d7b281745284bf4cb30459eecdb9c96b7d9450eb6801e002e6acafc8669deb2b5e65a81 WHIRLPOOL ba071f8759df50082a40231dd8e883d001ff280f962ddbb4bc894447ac1215b79403d702feb3327e9f9a8d68c1227e0649c823f86916531f30c2c5c084cc5029
31
32 diff --git a/net-mail/dovecot/dovecot-2.2.24.ebuild b/net-mail/dovecot/dovecot-2.2.24.ebuild
33 new file mode 100644
34 index 0000000..86c3d68
35 --- /dev/null
36 +++ b/net-mail/dovecot/dovecot-2.2.24.ebuild
37 @@ -0,0 +1,308 @@
38 +# Copyright 1999-2016 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +# $Id$
41 +
42 +EAPI=6
43 +inherit ssl-cert systemd user versionator
44 +
45 +MY_P="${P/_/.}"
46 +major_minor="$(get_version_component_range 1-2)"
47 +sieve_version="0.4.14"
48 +if [[ ${PV} == *_rc* ]] ; then
49 + rc_dir="rc/"
50 +else
51 + rc_dir=""
52 +fi
53 +SRC_URI="http://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
54 + sieve? (
55 + http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
56 + )
57 + managesieve? (
58 + http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
59 + ) "
60 +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
61 +HOMEPAGE="http://www.dovecot.org/"
62 +
63 +SLOT="0"
64 +LICENSE="LGPL-2.1 MIT"
65 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~x86"
66 +
67 +IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
68 +IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
69 +IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
70 +IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat"
71 +
72 +IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
73 +
74 +DEPEND="bzip2? ( app-arch/bzip2 )
75 + caps? ( sys-libs/libcap )
76 + kerberos? ( virtual/krb5 )
77 + ldap? ( net-nds/openldap )
78 + lucene? ( >=dev-cpp/clucene-2.3 )
79 + lzma? ( app-arch/xz-utils )
80 + lz4? ( app-arch/lz4 )
81 + mysql? ( virtual/mysql )
82 + pam? ( virtual/pam )
83 + postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
84 + selinux? ( sec-policy/selinux-dovecot )
85 + solr? ( net-misc/curl dev-libs/expat )
86 + sqlite? ( dev-db/sqlite:* )
87 + ssl? (
88 + !libressl? ( dev-libs/openssl:0 )
89 + libressl? ( dev-libs/libressl )
90 + )
91 + tcpd? ( sys-apps/tcp-wrappers )
92 + textcat? ( app-text/libexttextcat )
93 + vpopmail? ( net-mail/vpopmail )
94 + zlib? ( sys-libs/zlib )
95 + virtual/libiconv
96 + dev-libs/icu:="
97 +
98 +RDEPEND="${DEPEND}
99 + net-mail/mailbase"
100 +
101 +S=${WORKDIR}/${MY_P}
102 +
103 +pkg_setup() {
104 + if use managesieve && ! use sieve; then
105 + ewarn "managesieve USE flag selected but sieve USE flag unselected"
106 + ewarn "sieve USE flag will be turned on"
107 + fi
108 + # default internal user
109 + enewgroup dovecot 97
110 + enewuser dovecot 97 -1 /dev/null dovecot
111 + # default login user
112 + enewuser dovenull -1 -1 /dev/null
113 + # add "mail" group for suid'ing. Better security isolation.
114 + if use suid; then
115 + enewgroup mail
116 + fi
117 +}
118 +
119 +src_prepare() {
120 + eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
121 + eapply_user
122 +}
123 +
124 +src_configure() {
125 + local conf=""
126 +
127 + if use postgres || use mysql || use sqlite; then
128 + conf="${conf} --with-sql"
129 + fi
130 +
131 + local storages=""
132 + for storage in ${IUSE_DOVECOT_STORAGE//+/}; do
133 + use ${storage} && storages="${storage} ${storages}"
134 + done
135 + [ "${storages}" ] || storages="maildir"
136 +
137 + # turn valgrind tests off. Bug #340791
138 + VALGRIND=no econf \
139 + --localstatedir="${EPREFIX}/var" \
140 + --runstatedir="${EPREFIX}/run" \
141 + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
142 + --without-stemmer \
143 + --with-storages="${storages}" \
144 + --disable-rpath \
145 + --with-icu \
146 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
147 + $( use_with bzip2 bzlib ) \
148 + $( use_with caps libcap ) \
149 + $( use_with kerberos gssapi ) \
150 + $( use_with ldap ) \
151 + $( use_with lucene ) \
152 + $( use_with lz4 ) \
153 + $( use_with lzma ) \
154 + $( use_with mysql ) \
155 + $( use_with pam ) \
156 + $( use_with postgres pgsql ) \
157 + $( use_with sqlite ) \
158 + $( use_with solr ) \
159 + $( use_with ssl ) \
160 + $( use_with tcpd libwrap ) \
161 + $( use_with textcat ) \
162 + $( use_with vpopmail ) \
163 + $( use_with zlib ) \
164 + $( use_enable static-libs static ) \
165 + ${conf}
166 +
167 + if use sieve || use managesieve ; then
168 + # The sieve plugin needs this file to be build to determine the plugin
169 + # directory and the list of libraries to link to.
170 + emake dovecot-config
171 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
172 + econf \
173 + $( use_enable static-libs static ) \
174 + --localstatedir="${EPREFIX}/var" \
175 + --enable-shared \
176 + --with-dovecot="../${MY_P}" \
177 + $( use_with managesieve )
178 + fi
179 +}
180 +
181 +src_compile() {
182 + default
183 + if use sieve || use managesieve ; then
184 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
185 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
186 + fi
187 +}
188 +
189 +src_test() {
190 + default
191 + if use sieve || use managesieve ; then
192 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
193 + default
194 + fi
195 +}
196 +
197 +src_install () {
198 + default
199 +
200 + # insecure:
201 + # use suid && fperms u+s /usr/libexec/dovecot/deliver
202 + # better:
203 + if use suid;then
204 + einfo "Changing perms to allow deliver to be suided"
205 + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
206 + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
207 + fi
208 +
209 + newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
210 +
211 + rm -rf "${ED}"/usr/share/doc/dovecot
212 +
213 + dodoc AUTHORS NEWS README TODO
214 + dodoc doc/*.{txt,cnf,xml,sh}
215 + docinto example-config
216 + dodoc doc/example-config/*.{conf,ext}
217 + docinto example-config/conf.d
218 + dodoc doc/example-config/conf.d/*.{conf,ext}
219 + docinto wiki
220 + dodoc doc/wiki/*
221 + doman doc/man/*.{1,7}
222 +
223 + # Create the dovecot.conf file from the dovecot-example.conf file that
224 + # the dovecot folks nicely left for us....
225 + local conf="${ED}/etc/dovecot/dovecot.conf"
226 + local confd="${ED}/etc/dovecot/conf.d"
227 +
228 + insinto /etc/dovecot
229 + doins doc/example-config/*.{conf,ext}
230 + insinto /etc/dovecot/conf.d
231 + doins doc/example-config/conf.d/*.{conf,ext}
232 + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
233 + rm -f "${confd}/../README"
234 +
235 + # .maildir is the Gentoo default
236 + local mail_location="maildir:~/.maildir"
237 + if ! use maildir; then
238 + if use mbox; then
239 + mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
240 + keepdir /var/dovecot
241 + sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
242 + "${confd}/10-mail.conf" || die "sed failed"
243 + elif use mdbox ; then
244 + mail_location="mdbox:~/.mdbox"
245 + elif use sdbox ; then
246 + mail_location="sdbox:~/.sdbox"
247 + fi
248 + fi
249 + sed -i -e \
250 + "s|#mail_location =|mail_location = ${mail_location}|" \
251 + "${confd}/10-mail.conf" \
252 + || die "failed to update mail location settings in 10-mail.conf"
253 +
254 + # We're using pam files (imap and pop3) provided by mailbase
255 + if use pam; then
256 + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
257 + "${confd}/auth-system.conf.ext" \
258 + || die "failed to update PAM settings in auth-system.conf.ext"
259 + # mailbase does not provide a sieve pam file
260 + use managesieve && dosym imap /etc/pam.d/sieve
261 + sed -i -e \
262 + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
263 + "${confd}/10-auth.conf" \
264 + || die "failed to update PAM settings in 10-auth.conf"
265 + fi
266 +
267 + # Disable ipv6 if necessary
268 + if ! use ipv6; then
269 + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
270 + || die "failed to update listen settings in dovecot.conf"
271 + fi
272 +
273 + # Update ssl cert locations
274 + if use ssl; then
275 + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
276 + || die "ssl conf failed"
277 + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
278 + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
279 + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
280 + fi
281 +
282 + # Install SQL configuration
283 + if use mysql || use postgres; then
284 + sed -i -e \
285 + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
286 + "${confd}/10-auth.conf" || die "failed to update SQL settings in \
287 + 10-auth.conf"
288 + fi
289 +
290 + # Install LDAP configuration
291 + if use ldap; then
292 + sed -i -e \
293 + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
294 + "${confd}/10-auth.conf" \
295 + || die "failed to update ldap settings in 10-auth.conf"
296 + fi
297 +
298 + if use vpopmail; then
299 + sed -i -e \
300 + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
301 + "${confd}/10-auth.conf" \
302 + || die "failed to update vpopmail settings in 10-auth.conf"
303 + fi
304 +
305 + if use sieve || use managesieve ; then
306 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
307 + emake DESTDIR="${ED}" install
308 + sed -i -e \
309 + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
310 + || die "failed to update sieve settings in 15-lda.conf"
311 + rm -rf "${ED}"/usr/share/doc/dovecot
312 + docinto example-config/conf.d
313 + dodoc doc/example-config/conf.d/*.conf
314 + insinto /etc/dovecot/conf.d
315 + doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
316 + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
317 + docinto sieve/rfc
318 + dodoc doc/rfc/*.txt
319 + docinto sieve/devel
320 + dodoc doc/devel/DESIGN
321 + docinto plugins
322 + dodoc doc/plugins/*.txt
323 + docinto extensions
324 + dodoc doc/extensions/*.txt
325 + docinto locations
326 + dodoc doc/locations/*.txt
327 + doman doc/man/*.{1,7}
328 + fi
329 +
330 + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
331 +}
332 +
333 +pkg_postinst() {
334 + if use ssl; then
335 + # Let's not make a new certificate if we already have one
336 + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
337 + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
338 + einfo "Creating SSL certificate"
339 + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
340 + install_cert /etc/ssl/dovecot/server
341 + fi
342 + fi
343 +
344 + elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
345 +}