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/files/, net-mail/dovecot/
Date: Thu, 29 Mar 2018 07:59:58
Message-Id: 1522310380.ec87b2a77224e22ec814636658e7e0c26c526e36.eras@gentoo
1 commit: ec87b2a77224e22ec814636658e7e0c26c526e36
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 29 07:59:40 2018 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 29 07:59:40 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec87b2a7
7
8 net-mail/dovecot: remove old
9
10 Package-Manager: Portage-2.3.26, Repoman-2.3.7
11
12 net-mail/dovecot/Manifest | 3 -
13 net-mail/dovecot/dovecot-2.2.33.2-r1.ebuild | 291 --------------------
14 net-mail/dovecot/dovecot-2.2.33.2-r2.ebuild | 292 ---------------------
15 net-mail/dovecot/dovecot-2.2.33.2.ebuild | 290 --------------------
16 net-mail/dovecot/dovecot-2.3.0-r1.ebuild | 284 --------------------
17 net-mail/dovecot/dovecot-2.3.0-r2.ebuild | 286 --------------------
18 net-mail/dovecot/dovecot-2.3.0-r3.ebuild | 289 --------------------
19 net-mail/dovecot/dovecot-2.3.0.ebuild | 284 --------------------
20 .../dovecot-2.2.33.2-CVE-2017-15132-fixup.patch | 37 ---
21 .../files/dovecot-2.2.33.2-CVE-2017-15132.patch | 14 -
22 10 files changed, 2070 deletions(-)
23
24 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
25 index 80c6c3f4b79..7ccfc0af69a 100644
26 --- a/net-mail/dovecot/Manifest
27 +++ b/net-mail/dovecot/Manifest
28 @@ -6,12 +6,9 @@ DIST dovecot-2.2-pigeonhole-0.4.9.tar.gz 1577127 BLAKE2B 7e6f11bf74d56887b640ab5
29 DIST dovecot-2.2.19.tar.gz 5256627 BLAKE2B 0b7fe57ced1b1f7eb5e29e8d6723d237cc107752286995d8e5f6857f24b45ab40c4a38b03935b228e8530c3b254509124a7b6ce4e0a8a9be0ea87f0c529db935 SHA512 1b9d605a6a5862ade9d1ca634a9e0171b7c212ab025fc2059051c3795470685b66516fa9fbe5ad91d84388268ea15795f2dcd70ffdf81736ce4d80fd284835e9
30 DIST dovecot-2.2.29.1.tar.gz 5972119 BLAKE2B 9b05e9976369757de07471c2e499a863efbd94b51d8aefdeb2144c01596f03f9ea02670ee9cac9590615e4139dc754c11eb4777d791f87a2e6031302155d9f05 SHA512 1e5ea6080ebe7dd4afe6fcfe8e98ed6d2ad2735655a18cc96e439dd044ccc3a1a6a80428bc746b4d6250820895d6a62121562e97e4b46c8b1cf88a19443bc111
31 DIST dovecot-2.2.32.tar.gz 6100268 BLAKE2B e7d79f81fe06565d254c46de5cd7f4565883a029f4fa409d9f3c6ff75d599fb3f1ce5f8a32b96b9bebe4654de2be4998d0e178f1784e00d246186727324c6e80 SHA512 a26ce763fdea7d72ff9801d3b7d57a1f0d00278e4a1aa60d1be070fe5a6d2c6a15f266a519119492bee7a3e7a6b7d0732e9879e5c5841adbab8c0952cd1b7c7c
32 -DIST dovecot-2.2.33.2.tar.gz 6131086 BLAKE2B 5bfa9f52e7263e778b717d52f540682574e4bbcb04fc003e78b9ce94562d092f1c5360f835ee8cea912afbed7351be9f06dd321df3f7893d27544ede00c682ca SHA512 028910a4d02b1630f1ada4d1c45fcc3ea2057969db7078a78d46e2a578b4dceaf8be0ac8de4a613b4890019e721871f2d366ec651db658da4cc72977d3e09931
33 DIST dovecot-2.2.34.tar.gz 6181270 BLAKE2B dfdb1e6812574e79595202e830167400569adf61155aa5ddaae443e798c4a05ccec2acd2975e00e9e7ffc63ee1dcf7e4e2a9288b1e6e1e1427d1e89790a8fa13 SHA512 9f08a7116a08a08495aa0e7b4cb6b11a924ea61006970487946e338bc79bba7fd7619c345cbf278a74de285d548af04fc66eaaee508185b8b9d7335cf5612055
34 DIST dovecot-2.2.35.tar.gz 6185237 BLAKE2B 7ad08816553683126c4c8d494770730c49c2912a5437ba6dcb21e418d636c0d03280425e8a55b420a4500ebcf459da8be11deffccefdbc60811393e2044a4e4d SHA512 002ceea7f17018bcd438edda5a36a782606f291264ef63cebb8b4f72b094e812bf5553686c9e1e0d8c1354af54c1174f3670d1b1fc498ec4cddb3f731bf00c56
35 DIST dovecot-2.3-pigeonhole-0.5.0.1.tar.gz 1783039 BLAKE2B 8452c11d1c5f26d2ee9a0c54a2c30642bce5117f1ad140db8a8509a2bcc03236361a99c6f622267279eb75c19c68de7d96947557b595c345db34e34a135b492c SHA512 60016145caa444eeba13b49735f87ab2ebe7f178f104ad57283b5aa7e5119920d9f579032b775547e0866e86045a4ab653fd084068187d0cbe2e088cc15fc288
36 -DIST dovecot-2.3-pigeonhole-0.5.0.tar.gz 1782375 BLAKE2B ecbf20ec3a12d72d6040d4d4fffc63e44dd80c28d3b5ad62a97bfefffc0d3063114cd46cacfd1e24f1000829f28d457d3b68773cdecf151ef20e5e0ccb899c3b SHA512 c338a94ff5db1cc34cac10da2854cd2905567addf5e40f36fe24958abeae1ae9900461f0aeda4f2133eecb2762005c0d6414a109538a1da7aabdd7a4a8eeb127
37 DIST dovecot-2.3-pigeonhole-0.5.1.tar.gz 1792702 BLAKE2B 219bc6b3182e303b7f3784cca0fb7fcc9d9aae62e60cc490d7f0a94fa4f9b805933d9fd67c4927cd8f9c864c3b73e28bfde1866848960c71dc47d5e36196b748 SHA512 5d65c3c9f3131c4e82287d054bd8b963d7c56c3e0677d7384881cf109ca82080d6222f672d8f973447d98be823a4df5bf43760d4ba87b76447d13abab30130c4
38 DIST dovecot-2.3.0.1.tar.gz 6499984 BLAKE2B 4bfb38ba8bed154e58db03c53c0a6958632841fd66a118571c341be90f9d20a570a22699d4b8d117b72d4599fe074248c96cf4e7fc78ddd65c69662b4275cf97 SHA512 2b30c46c1660f425f6303a15cf638388439fd7a8065c91d28caf41d9a6403a4fccb530df3f69037a634bc3b0b9e498037da6b0b93c176f5e3b5808907d3f759d
39 -DIST dovecot-2.3.0.tar.gz 6635541 BLAKE2B 3c76ccc0fac19511c9852aabd5d86c2fb815893b983b8bdf74a48c4c9040efe95fceff49189d6ed7eb4b1c2cbc47472630a367891950690feec68190d518a565 SHA512 8d8591e371ba2ebf8d3c1561af49b970d8351c4acdde8a97ff0ab403bf4cad6e4d96e9556c9be747a85085552449cab4c52bb41bda36e1a822594ec87661ce7f
40 DIST dovecot-2.3.1.tar.gz 6703089 BLAKE2B a9a021531241f86083cd5bf31f7b9211df77b2423ad213ca35904e23002121631e81a6419e3b07a838eb699faff615dcb35f3b95a1da537f74068b3c15795b35 SHA512 fe664ab771145f2390fef45839ff2756e36731c61e571dfa6975014f9cea43144e2aca0acf1a83b1dac55ad50042d0fa170b83570aa411228557861ada410b79
41
42 diff --git a/net-mail/dovecot/dovecot-2.2.33.2-r1.ebuild b/net-mail/dovecot/dovecot-2.2.33.2-r1.ebuild
43 deleted file mode 100644
44 index 219b6c0ea43..00000000000
45 --- a/net-mail/dovecot/dovecot-2.2.33.2-r1.ebuild
46 +++ /dev/null
47 @@ -1,291 +0,0 @@
48 -# Copyright 1999-2018 Gentoo Foundation
49 -# Distributed under the terms of the GNU General Public License v2
50 -
51 -EAPI=6
52 -inherit ssl-cert systemd user versionator
53 -
54 -MY_P="${P/_/.}"
55 -major_minor="$(get_version_component_range 1-2)"
56 -sieve_version="0.4.21"
57 -if [[ ${PV} == *_rc* ]] ; then
58 - rc_dir="rc/"
59 -else
60 - rc_dir=""
61 -fi
62 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
63 - sieve? (
64 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
65 - )
66 - managesieve? (
67 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
68 - ) "
69 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
70 -HOMEPAGE="https://www.dovecot.org/"
71 -
72 -SLOT="0"
73 -LICENSE="LGPL-2.1 MIT"
74 -KEYWORDS="~alpha amd64 arm ~hppa ia64 ~ppc ~ppc64 ~s390 ~sparc x86"
75 -
76 -IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
77 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
78 -IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat"
79 -
80 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
81 -
82 -DEPEND="bzip2? ( app-arch/bzip2 )
83 - caps? ( sys-libs/libcap )
84 - kerberos? ( virtual/krb5 )
85 - ldap? ( net-nds/openldap )
86 - lucene? ( >=dev-cpp/clucene-2.3 )
87 - lzma? ( app-arch/xz-utils )
88 - lz4? ( app-arch/lz4 )
89 - mysql? ( virtual/mysql )
90 - pam? ( virtual/pam )
91 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
92 - selinux? ( sec-policy/selinux-dovecot )
93 - solr? ( net-misc/curl dev-libs/expat )
94 - sqlite? ( dev-db/sqlite:* )
95 - ssl? (
96 - !libressl? ( dev-libs/openssl:0 )
97 - libressl? ( dev-libs/libressl )
98 - )
99 - tcpd? ( sys-apps/tcp-wrappers )
100 - textcat? ( app-text/libexttextcat )
101 - vpopmail? ( net-mail/vpopmail )
102 - zlib? ( sys-libs/zlib )
103 - virtual/libiconv
104 - dev-libs/icu:="
105 -
106 -RDEPEND="${DEPEND}
107 - net-mail/mailbase"
108 -
109 -# Dovecot does not support building without ssl. Force it for now
110 -REQUIRED_USE="ssl"
111 -
112 -S=${WORKDIR}/${MY_P}
113 -
114 -pkg_setup() {
115 - if use managesieve && ! use sieve; then
116 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
117 - ewarn "sieve USE flag will be turned on"
118 - fi
119 - # default internal user
120 - enewgroup dovecot 97
121 - enewuser dovecot 97 -1 /dev/null dovecot
122 - # default login user
123 - enewuser dovenull -1 -1 /dev/null
124 - # add "mail" group for suid'ing. Better security isolation.
125 - if use suid; then
126 - enewgroup mail
127 - fi
128 -}
129 -
130 -src_prepare() {
131 - eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
132 - eapply "${FILESDIR}/${PN}-2.2.33.2-CVE-2017-15132.patch"
133 - eapply_user
134 -}
135 -
136 -src_configure() {
137 - local conf=""
138 -
139 - if use postgres || use mysql || use sqlite; then
140 - conf="${conf} --with-sql"
141 - fi
142 -
143 - # turn valgrind tests off. Bug #340791
144 - VALGRIND=no econf \
145 - --localstatedir="${EPREFIX}/var" \
146 - --runstatedir="${EPREFIX}/run" \
147 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
148 - --without-stemmer \
149 - --disable-rpath \
150 - --with-icu \
151 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
152 - $( use_with bzip2 bzlib ) \
153 - $( use_with caps libcap ) \
154 - $( use_with kerberos gssapi ) \
155 - $( use_with ldap ) \
156 - $( use_with lucene ) \
157 - $( use_with lz4 ) \
158 - $( use_with lzma ) \
159 - $( use_with mysql ) \
160 - $( use_with pam ) \
161 - $( use_with postgres pgsql ) \
162 - $( use_with sqlite ) \
163 - $( use_with solr ) \
164 - $( use_with ssl ) \
165 - $( use_with tcpd libwrap ) \
166 - $( use_with textcat ) \
167 - $( use_with vpopmail ) \
168 - $( use_with zlib ) \
169 - $( use_enable static-libs static ) \
170 - ${conf}
171 -
172 - if use sieve || use managesieve ; then
173 - # The sieve plugin needs this file to be build to determine the plugin
174 - # directory and the list of libraries to link to.
175 - emake dovecot-config
176 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
177 - econf \
178 - $( use_enable static-libs static ) \
179 - --localstatedir="${EPREFIX}/var" \
180 - --enable-shared \
181 - --with-dovecot="../${MY_P}" \
182 - $( use_with managesieve )
183 - fi
184 -}
185 -
186 -src_compile() {
187 - default
188 - if use sieve || use managesieve ; then
189 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
190 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
191 - fi
192 -}
193 -
194 -src_test() {
195 - default
196 - if use sieve || use managesieve ; then
197 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
198 - default
199 - fi
200 -}
201 -
202 -src_install () {
203 - default
204 -
205 - # insecure:
206 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
207 - # better:
208 - if use suid;then
209 - einfo "Changing perms to allow deliver to be suided"
210 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
211 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
212 - fi
213 -
214 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
215 -
216 - rm -rf "${ED}"/usr/share/doc/dovecot
217 -
218 - dodoc AUTHORS NEWS README TODO
219 - dodoc doc/*.{txt,cnf,xml,sh}
220 - docinto example-config
221 - dodoc doc/example-config/*.{conf,ext}
222 - docinto example-config/conf.d
223 - dodoc doc/example-config/conf.d/*.{conf,ext}
224 - docinto wiki
225 - dodoc doc/wiki/*
226 - doman doc/man/*.{1,7}
227 -
228 - # Create the dovecot.conf file from the dovecot-example.conf file that
229 - # the dovecot folks nicely left for us....
230 - local conf="${ED}/etc/dovecot/dovecot.conf"
231 - local confd="${ED}/etc/dovecot/conf.d"
232 -
233 - insinto /etc/dovecot
234 - doins doc/example-config/*.{conf,ext}
235 - insinto /etc/dovecot/conf.d
236 - doins doc/example-config/conf.d/*.{conf,ext}
237 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
238 - rm -f "${confd}/../README"
239 -
240 - # .maildir is the Gentoo default
241 - local mail_location="maildir:~/.maildir"
242 - sed -i -e \
243 - "s|#mail_location =|mail_location = ${mail_location}|" \
244 - "${confd}/10-mail.conf" \
245 - || die "failed to update mail location settings in 10-mail.conf"
246 -
247 - # We're using pam files (imap and pop3) provided by mailbase
248 - if use pam; then
249 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
250 - "${confd}/auth-system.conf.ext" \
251 - || die "failed to update PAM settings in auth-system.conf.ext"
252 - # mailbase does not provide a sieve pam file
253 - use managesieve && dosym imap /etc/pam.d/sieve
254 - sed -i -e \
255 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
256 - "${confd}/10-auth.conf" \
257 - || die "failed to update PAM settings in 10-auth.conf"
258 - fi
259 -
260 - # Disable ipv6 if necessary
261 - if ! use ipv6; then
262 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
263 - || die "failed to update listen settings in dovecot.conf"
264 - fi
265 -
266 - # Update ssl cert locations
267 - if use ssl; then
268 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
269 - || die "ssl conf failed"
270 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
271 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
272 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
273 - fi
274 -
275 - # Install SQL configuration
276 - if use mysql || use postgres; then
277 - sed -i -e \
278 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
279 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
280 - 10-auth.conf"
281 - fi
282 -
283 - # Install LDAP configuration
284 - if use ldap; then
285 - sed -i -e \
286 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
287 - "${confd}/10-auth.conf" \
288 - || die "failed to update ldap settings in 10-auth.conf"
289 - fi
290 -
291 - if use vpopmail; then
292 - sed -i -e \
293 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
294 - "${confd}/10-auth.conf" \
295 - || die "failed to update vpopmail settings in 10-auth.conf"
296 - fi
297 -
298 - if use sieve || use managesieve ; then
299 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
300 - emake DESTDIR="${ED}" install
301 - sed -i -e \
302 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
303 - || die "failed to update sieve settings in 15-lda.conf"
304 - rm -rf "${ED}"/usr/share/doc/dovecot
305 - docinto example-config/conf.d
306 - dodoc doc/example-config/conf.d/*.conf
307 - insinto /etc/dovecot/conf.d
308 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
309 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
310 - docinto sieve/rfc
311 - dodoc doc/rfc/*.txt
312 - docinto sieve/devel
313 - dodoc doc/devel/DESIGN
314 - docinto plugins
315 - dodoc doc/plugins/*.txt
316 - docinto extensions
317 - dodoc doc/extensions/*.txt
318 - docinto locations
319 - dodoc doc/locations/*.txt
320 - doman doc/man/*.{1,7}
321 - fi
322 -
323 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
324 -}
325 -
326 -pkg_postinst() {
327 - if use ssl; then
328 - # Let's not make a new certificate if we already have one
329 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
330 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
331 - einfo "Creating SSL certificate"
332 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
333 - install_cert /etc/ssl/dovecot/server
334 - fi
335 - fi
336 -
337 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
338 -}
339
340 diff --git a/net-mail/dovecot/dovecot-2.2.33.2-r2.ebuild b/net-mail/dovecot/dovecot-2.2.33.2-r2.ebuild
341 deleted file mode 100644
342 index 41930e54e70..00000000000
343 --- a/net-mail/dovecot/dovecot-2.2.33.2-r2.ebuild
344 +++ /dev/null
345 @@ -1,292 +0,0 @@
346 -# Copyright 1999-2018 Gentoo Foundation
347 -# Distributed under the terms of the GNU General Public License v2
348 -
349 -EAPI=6
350 -inherit ssl-cert systemd user versionator
351 -
352 -MY_P="${P/_/.}"
353 -major_minor="$(get_version_component_range 1-2)"
354 -sieve_version="0.4.21"
355 -if [[ ${PV} == *_rc* ]] ; then
356 - rc_dir="rc/"
357 -else
358 - rc_dir=""
359 -fi
360 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
361 - sieve? (
362 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
363 - )
364 - managesieve? (
365 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
366 - ) "
367 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
368 -HOMEPAGE="https://www.dovecot.org/"
369 -
370 -SLOT="0"
371 -LICENSE="LGPL-2.1 MIT"
372 -KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ~ppc ~ppc64 ~s390 ~sparc x86"
373 -
374 -IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
375 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
376 -IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat"
377 -
378 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
379 -
380 -DEPEND="bzip2? ( app-arch/bzip2 )
381 - caps? ( sys-libs/libcap )
382 - kerberos? ( virtual/krb5 )
383 - ldap? ( net-nds/openldap )
384 - lucene? ( >=dev-cpp/clucene-2.3 )
385 - lzma? ( app-arch/xz-utils )
386 - lz4? ( app-arch/lz4 )
387 - mysql? ( virtual/mysql )
388 - pam? ( virtual/pam )
389 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
390 - selinux? ( sec-policy/selinux-dovecot )
391 - solr? ( net-misc/curl dev-libs/expat )
392 - sqlite? ( dev-db/sqlite:* )
393 - ssl? (
394 - !libressl? ( dev-libs/openssl:0 )
395 - libressl? ( dev-libs/libressl )
396 - )
397 - tcpd? ( sys-apps/tcp-wrappers )
398 - textcat? ( app-text/libexttextcat )
399 - vpopmail? ( net-mail/vpopmail )
400 - zlib? ( sys-libs/zlib )
401 - virtual/libiconv
402 - dev-libs/icu:="
403 -
404 -RDEPEND="${DEPEND}
405 - net-mail/mailbase"
406 -
407 -# Dovecot does not support building without ssl. Force it for now
408 -REQUIRED_USE="ssl"
409 -
410 -S=${WORKDIR}/${MY_P}
411 -
412 -pkg_setup() {
413 - if use managesieve && ! use sieve; then
414 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
415 - ewarn "sieve USE flag will be turned on"
416 - fi
417 - # default internal user
418 - enewgroup dovecot 97
419 - enewuser dovecot 97 -1 /dev/null dovecot
420 - # default login user
421 - enewuser dovenull -1 -1 /dev/null
422 - # add "mail" group for suid'ing. Better security isolation.
423 - if use suid; then
424 - enewgroup mail
425 - fi
426 -}
427 -
428 -src_prepare() {
429 - eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
430 - eapply "${FILESDIR}/${PN}-2.2.33.2-CVE-2017-15132.patch"
431 - eapply "${FILESDIR}/${PN}-2.2.33.2-CVE-2017-15132-fixup.patch"
432 - eapply_user
433 -}
434 -
435 -src_configure() {
436 - local conf=""
437 -
438 - if use postgres || use mysql || use sqlite; then
439 - conf="${conf} --with-sql"
440 - fi
441 -
442 - # turn valgrind tests off. Bug #340791
443 - VALGRIND=no econf \
444 - --localstatedir="${EPREFIX}/var" \
445 - --runstatedir="${EPREFIX}/run" \
446 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
447 - --without-stemmer \
448 - --disable-rpath \
449 - --with-icu \
450 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
451 - $( use_with bzip2 bzlib ) \
452 - $( use_with caps libcap ) \
453 - $( use_with kerberos gssapi ) \
454 - $( use_with ldap ) \
455 - $( use_with lucene ) \
456 - $( use_with lz4 ) \
457 - $( use_with lzma ) \
458 - $( use_with mysql ) \
459 - $( use_with pam ) \
460 - $( use_with postgres pgsql ) \
461 - $( use_with sqlite ) \
462 - $( use_with solr ) \
463 - $( use_with ssl ) \
464 - $( use_with tcpd libwrap ) \
465 - $( use_with textcat ) \
466 - $( use_with vpopmail ) \
467 - $( use_with zlib ) \
468 - $( use_enable static-libs static ) \
469 - ${conf}
470 -
471 - if use sieve || use managesieve ; then
472 - # The sieve plugin needs this file to be build to determine the plugin
473 - # directory and the list of libraries to link to.
474 - emake dovecot-config
475 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
476 - econf \
477 - $( use_enable static-libs static ) \
478 - --localstatedir="${EPREFIX}/var" \
479 - --enable-shared \
480 - --with-dovecot="../${MY_P}" \
481 - $( use_with managesieve )
482 - fi
483 -}
484 -
485 -src_compile() {
486 - default
487 - if use sieve || use managesieve ; then
488 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
489 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
490 - fi
491 -}
492 -
493 -src_test() {
494 - default
495 - if use sieve || use managesieve ; then
496 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
497 - default
498 - fi
499 -}
500 -
501 -src_install () {
502 - default
503 -
504 - # insecure:
505 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
506 - # better:
507 - if use suid;then
508 - einfo "Changing perms to allow deliver to be suided"
509 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
510 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
511 - fi
512 -
513 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
514 -
515 - rm -rf "${ED}"/usr/share/doc/dovecot
516 -
517 - dodoc AUTHORS NEWS README TODO
518 - dodoc doc/*.{txt,cnf,xml,sh}
519 - docinto example-config
520 - dodoc doc/example-config/*.{conf,ext}
521 - docinto example-config/conf.d
522 - dodoc doc/example-config/conf.d/*.{conf,ext}
523 - docinto wiki
524 - dodoc doc/wiki/*
525 - doman doc/man/*.{1,7}
526 -
527 - # Create the dovecot.conf file from the dovecot-example.conf file that
528 - # the dovecot folks nicely left for us....
529 - local conf="${ED}/etc/dovecot/dovecot.conf"
530 - local confd="${ED}/etc/dovecot/conf.d"
531 -
532 - insinto /etc/dovecot
533 - doins doc/example-config/*.{conf,ext}
534 - insinto /etc/dovecot/conf.d
535 - doins doc/example-config/conf.d/*.{conf,ext}
536 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
537 - rm -f "${confd}/../README"
538 -
539 - # .maildir is the Gentoo default
540 - local mail_location="maildir:~/.maildir"
541 - sed -i -e \
542 - "s|#mail_location =|mail_location = ${mail_location}|" \
543 - "${confd}/10-mail.conf" \
544 - || die "failed to update mail location settings in 10-mail.conf"
545 -
546 - # We're using pam files (imap and pop3) provided by mailbase
547 - if use pam; then
548 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
549 - "${confd}/auth-system.conf.ext" \
550 - || die "failed to update PAM settings in auth-system.conf.ext"
551 - # mailbase does not provide a sieve pam file
552 - use managesieve && dosym imap /etc/pam.d/sieve
553 - sed -i -e \
554 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
555 - "${confd}/10-auth.conf" \
556 - || die "failed to update PAM settings in 10-auth.conf"
557 - fi
558 -
559 - # Disable ipv6 if necessary
560 - if ! use ipv6; then
561 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
562 - || die "failed to update listen settings in dovecot.conf"
563 - fi
564 -
565 - # Update ssl cert locations
566 - if use ssl; then
567 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
568 - || die "ssl conf failed"
569 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
570 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
571 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
572 - fi
573 -
574 - # Install SQL configuration
575 - if use mysql || use postgres; then
576 - sed -i -e \
577 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
578 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
579 - 10-auth.conf"
580 - fi
581 -
582 - # Install LDAP configuration
583 - if use ldap; then
584 - sed -i -e \
585 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
586 - "${confd}/10-auth.conf" \
587 - || die "failed to update ldap settings in 10-auth.conf"
588 - fi
589 -
590 - if use vpopmail; then
591 - sed -i -e \
592 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
593 - "${confd}/10-auth.conf" \
594 - || die "failed to update vpopmail settings in 10-auth.conf"
595 - fi
596 -
597 - if use sieve || use managesieve ; then
598 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
599 - emake DESTDIR="${ED}" install
600 - sed -i -e \
601 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
602 - || die "failed to update sieve settings in 15-lda.conf"
603 - rm -rf "${ED}"/usr/share/doc/dovecot
604 - docinto example-config/conf.d
605 - dodoc doc/example-config/conf.d/*.conf
606 - insinto /etc/dovecot/conf.d
607 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
608 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
609 - docinto sieve/rfc
610 - dodoc doc/rfc/*.txt
611 - docinto sieve/devel
612 - dodoc doc/devel/DESIGN
613 - docinto plugins
614 - dodoc doc/plugins/*.txt
615 - docinto extensions
616 - dodoc doc/extensions/*.txt
617 - docinto locations
618 - dodoc doc/locations/*.txt
619 - doman doc/man/*.{1,7}
620 - fi
621 -
622 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
623 -}
624 -
625 -pkg_postinst() {
626 - if use ssl; then
627 - # Let's not make a new certificate if we already have one
628 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
629 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
630 - einfo "Creating SSL certificate"
631 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
632 - install_cert /etc/ssl/dovecot/server
633 - fi
634 - fi
635 -
636 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
637 -}
638
639 diff --git a/net-mail/dovecot/dovecot-2.2.33.2.ebuild b/net-mail/dovecot/dovecot-2.2.33.2.ebuild
640 deleted file mode 100644
641 index d1e1ba9d72b..00000000000
642 --- a/net-mail/dovecot/dovecot-2.2.33.2.ebuild
643 +++ /dev/null
644 @@ -1,290 +0,0 @@
645 -# Copyright 1999-2018 Gentoo Foundation
646 -# Distributed under the terms of the GNU General Public License v2
647 -
648 -EAPI=6
649 -inherit ssl-cert systemd user versionator
650 -
651 -MY_P="${P/_/.}"
652 -major_minor="$(get_version_component_range 1-2)"
653 -sieve_version="0.4.21"
654 -if [[ ${PV} == *_rc* ]] ; then
655 - rc_dir="rc/"
656 -else
657 - rc_dir=""
658 -fi
659 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
660 - sieve? (
661 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
662 - )
663 - managesieve? (
664 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
665 - ) "
666 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
667 -HOMEPAGE="https://www.dovecot.org/"
668 -
669 -SLOT="0"
670 -LICENSE="LGPL-2.1 MIT"
671 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
672 -
673 -IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
674 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
675 -IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat"
676 -
677 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
678 -
679 -DEPEND="bzip2? ( app-arch/bzip2 )
680 - caps? ( sys-libs/libcap )
681 - kerberos? ( virtual/krb5 )
682 - ldap? ( net-nds/openldap )
683 - lucene? ( >=dev-cpp/clucene-2.3 )
684 - lzma? ( app-arch/xz-utils )
685 - lz4? ( app-arch/lz4 )
686 - mysql? ( virtual/mysql )
687 - pam? ( virtual/pam )
688 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
689 - selinux? ( sec-policy/selinux-dovecot )
690 - solr? ( net-misc/curl dev-libs/expat )
691 - sqlite? ( dev-db/sqlite:* )
692 - ssl? (
693 - !libressl? ( dev-libs/openssl:0 )
694 - libressl? ( dev-libs/libressl )
695 - )
696 - tcpd? ( sys-apps/tcp-wrappers )
697 - textcat? ( app-text/libexttextcat )
698 - vpopmail? ( net-mail/vpopmail )
699 - zlib? ( sys-libs/zlib )
700 - virtual/libiconv
701 - dev-libs/icu:="
702 -
703 -RDEPEND="${DEPEND}
704 - net-mail/mailbase"
705 -
706 -# Dovecot does not support building without ssl. Force it for now
707 -REQUIRED_USE="ssl"
708 -
709 -S=${WORKDIR}/${MY_P}
710 -
711 -pkg_setup() {
712 - if use managesieve && ! use sieve; then
713 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
714 - ewarn "sieve USE flag will be turned on"
715 - fi
716 - # default internal user
717 - enewgroup dovecot 97
718 - enewuser dovecot 97 -1 /dev/null dovecot
719 - # default login user
720 - enewuser dovenull -1 -1 /dev/null
721 - # add "mail" group for suid'ing. Better security isolation.
722 - if use suid; then
723 - enewgroup mail
724 - fi
725 -}
726 -
727 -src_prepare() {
728 - eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
729 - eapply_user
730 -}
731 -
732 -src_configure() {
733 - local conf=""
734 -
735 - if use postgres || use mysql || use sqlite; then
736 - conf="${conf} --with-sql"
737 - fi
738 -
739 - # turn valgrind tests off. Bug #340791
740 - VALGRIND=no econf \
741 - --localstatedir="${EPREFIX}/var" \
742 - --runstatedir="${EPREFIX}/run" \
743 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
744 - --without-stemmer \
745 - --disable-rpath \
746 - --with-icu \
747 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
748 - $( use_with bzip2 bzlib ) \
749 - $( use_with caps libcap ) \
750 - $( use_with kerberos gssapi ) \
751 - $( use_with ldap ) \
752 - $( use_with lucene ) \
753 - $( use_with lz4 ) \
754 - $( use_with lzma ) \
755 - $( use_with mysql ) \
756 - $( use_with pam ) \
757 - $( use_with postgres pgsql ) \
758 - $( use_with sqlite ) \
759 - $( use_with solr ) \
760 - $( use_with ssl ) \
761 - $( use_with tcpd libwrap ) \
762 - $( use_with textcat ) \
763 - $( use_with vpopmail ) \
764 - $( use_with zlib ) \
765 - $( use_enable static-libs static ) \
766 - ${conf}
767 -
768 - if use sieve || use managesieve ; then
769 - # The sieve plugin needs this file to be build to determine the plugin
770 - # directory and the list of libraries to link to.
771 - emake dovecot-config
772 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
773 - econf \
774 - $( use_enable static-libs static ) \
775 - --localstatedir="${EPREFIX}/var" \
776 - --enable-shared \
777 - --with-dovecot="../${MY_P}" \
778 - $( use_with managesieve )
779 - fi
780 -}
781 -
782 -src_compile() {
783 - default
784 - if use sieve || use managesieve ; then
785 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
786 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
787 - fi
788 -}
789 -
790 -src_test() {
791 - default
792 - if use sieve || use managesieve ; then
793 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
794 - default
795 - fi
796 -}
797 -
798 -src_install () {
799 - default
800 -
801 - # insecure:
802 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
803 - # better:
804 - if use suid;then
805 - einfo "Changing perms to allow deliver to be suided"
806 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
807 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
808 - fi
809 -
810 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
811 -
812 - rm -rf "${ED}"/usr/share/doc/dovecot
813 -
814 - dodoc AUTHORS NEWS README TODO
815 - dodoc doc/*.{txt,cnf,xml,sh}
816 - docinto example-config
817 - dodoc doc/example-config/*.{conf,ext}
818 - docinto example-config/conf.d
819 - dodoc doc/example-config/conf.d/*.{conf,ext}
820 - docinto wiki
821 - dodoc doc/wiki/*
822 - doman doc/man/*.{1,7}
823 -
824 - # Create the dovecot.conf file from the dovecot-example.conf file that
825 - # the dovecot folks nicely left for us....
826 - local conf="${ED}/etc/dovecot/dovecot.conf"
827 - local confd="${ED}/etc/dovecot/conf.d"
828 -
829 - insinto /etc/dovecot
830 - doins doc/example-config/*.{conf,ext}
831 - insinto /etc/dovecot/conf.d
832 - doins doc/example-config/conf.d/*.{conf,ext}
833 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
834 - rm -f "${confd}/../README"
835 -
836 - # .maildir is the Gentoo default
837 - local mail_location="maildir:~/.maildir"
838 - sed -i -e \
839 - "s|#mail_location =|mail_location = ${mail_location}|" \
840 - "${confd}/10-mail.conf" \
841 - || die "failed to update mail location settings in 10-mail.conf"
842 -
843 - # We're using pam files (imap and pop3) provided by mailbase
844 - if use pam; then
845 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
846 - "${confd}/auth-system.conf.ext" \
847 - || die "failed to update PAM settings in auth-system.conf.ext"
848 - # mailbase does not provide a sieve pam file
849 - use managesieve && dosym imap /etc/pam.d/sieve
850 - sed -i -e \
851 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
852 - "${confd}/10-auth.conf" \
853 - || die "failed to update PAM settings in 10-auth.conf"
854 - fi
855 -
856 - # Disable ipv6 if necessary
857 - if ! use ipv6; then
858 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
859 - || die "failed to update listen settings in dovecot.conf"
860 - fi
861 -
862 - # Update ssl cert locations
863 - if use ssl; then
864 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
865 - || die "ssl conf failed"
866 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
867 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
868 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
869 - fi
870 -
871 - # Install SQL configuration
872 - if use mysql || use postgres; then
873 - sed -i -e \
874 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
875 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
876 - 10-auth.conf"
877 - fi
878 -
879 - # Install LDAP configuration
880 - if use ldap; then
881 - sed -i -e \
882 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
883 - "${confd}/10-auth.conf" \
884 - || die "failed to update ldap settings in 10-auth.conf"
885 - fi
886 -
887 - if use vpopmail; then
888 - sed -i -e \
889 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
890 - "${confd}/10-auth.conf" \
891 - || die "failed to update vpopmail settings in 10-auth.conf"
892 - fi
893 -
894 - if use sieve || use managesieve ; then
895 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
896 - emake DESTDIR="${ED}" install
897 - sed -i -e \
898 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
899 - || die "failed to update sieve settings in 15-lda.conf"
900 - rm -rf "${ED}"/usr/share/doc/dovecot
901 - docinto example-config/conf.d
902 - dodoc doc/example-config/conf.d/*.conf
903 - insinto /etc/dovecot/conf.d
904 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
905 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
906 - docinto sieve/rfc
907 - dodoc doc/rfc/*.txt
908 - docinto sieve/devel
909 - dodoc doc/devel/DESIGN
910 - docinto plugins
911 - dodoc doc/plugins/*.txt
912 - docinto extensions
913 - dodoc doc/extensions/*.txt
914 - docinto locations
915 - dodoc doc/locations/*.txt
916 - doman doc/man/*.{1,7}
917 - fi
918 -
919 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
920 -}
921 -
922 -pkg_postinst() {
923 - if use ssl; then
924 - # Let's not make a new certificate if we already have one
925 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
926 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
927 - einfo "Creating SSL certificate"
928 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
929 - install_cert /etc/ssl/dovecot/server
930 - fi
931 - fi
932 -
933 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
934 -}
935
936 diff --git a/net-mail/dovecot/dovecot-2.3.0-r1.ebuild b/net-mail/dovecot/dovecot-2.3.0-r1.ebuild
937 deleted file mode 100644
938 index 1cf1fe5683d..00000000000
939 --- a/net-mail/dovecot/dovecot-2.3.0-r1.ebuild
940 +++ /dev/null
941 @@ -1,284 +0,0 @@
942 -# Copyright 1999-2018 Gentoo Foundation
943 -# Distributed under the terms of the GNU General Public License v2
944 -
945 -EAPI=6
946 -# do not add a ssl USE flag. ssl is mandatory
947 -SSL_DEPS_SKIP=1
948 -inherit ssl-cert systemd user versionator
949 -
950 -MY_P="${P/_/.}"
951 -MY_S="${PN}-ce-${PV}"
952 -major_minor="$(get_version_component_range 1-2)"
953 -sieve_version="0.5.0.1"
954 -if [[ ${PV} == *_rc* ]] ; then
955 - rc_dir="rc/"
956 -else
957 - rc_dir=""
958 -fi
959 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
960 - sieve? (
961 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
962 - )
963 - managesieve? (
964 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
965 - ) "
966 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
967 -HOMEPAGE="https://www.dovecot.org/"
968 -
969 -SLOT="0"
970 -LICENSE="LGPL-2.1 MIT"
971 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
972 -
973 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
974 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
975 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
976 -
977 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
978 -
979 -DEPEND="argon2? ( dev-libs/libsodium )
980 - bzip2? ( app-arch/bzip2 )
981 - caps? ( sys-libs/libcap )
982 - kerberos? ( virtual/krb5 )
983 - ldap? ( net-nds/openldap )
984 - lua? ( dev-lang/lua:* )
985 - lucene? ( >=dev-cpp/clucene-2.3 )
986 - lzma? ( app-arch/xz-utils )
987 - lz4? ( app-arch/lz4 )
988 - mysql? ( virtual/mysql )
989 - pam? ( virtual/pam )
990 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
991 - selinux? ( sec-policy/selinux-dovecot )
992 - solr? ( net-misc/curl dev-libs/expat )
993 - sqlite? ( dev-db/sqlite:* )
994 - !libressl? ( dev-libs/openssl:0 )
995 - libressl? ( dev-libs/libressl )
996 - tcpd? ( sys-apps/tcp-wrappers )
997 - textcat? ( app-text/libexttextcat )
998 - vpopmail? ( net-mail/vpopmail )
999 - zlib? ( sys-libs/zlib )
1000 - virtual/libiconv
1001 - dev-libs/icu:="
1002 -
1003 -RDEPEND="${DEPEND}
1004 - net-mail/mailbase"
1005 -
1006 -S=${WORKDIR}/${MY_S}
1007 -
1008 -pkg_setup() {
1009 - if use managesieve && ! use sieve; then
1010 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
1011 - ewarn "sieve USE flag will be turned on"
1012 - fi
1013 - # default internal user
1014 - enewgroup dovecot 97
1015 - enewuser dovecot 97 -1 /dev/null dovecot
1016 - # default login user
1017 - enewuser dovenull -1 -1 /dev/null
1018 - # add "mail" group for suid'ing. Better security isolation.
1019 - if use suid; then
1020 - enewgroup mail
1021 - fi
1022 -}
1023 -
1024 -src_configure() {
1025 - local conf=""
1026 -
1027 - if use postgres || use mysql || use sqlite; then
1028 - conf="${conf} --with-sql"
1029 - fi
1030 -
1031 - # turn valgrind tests off. Bug #340791
1032 - VALGRIND=no econf \
1033 - --with-rundir="${EPREFIX}/run/dovecot" \
1034 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
1035 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
1036 - --without-stemmer \
1037 - --disable-rpath \
1038 - --without-libbsd \
1039 - --with-icu \
1040 - --with-ssl \
1041 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
1042 - $( use_with argon2 sodium ) \
1043 - $( use_with bzip2 bzlib ) \
1044 - $( use_with caps libcap ) \
1045 - $( use_with kerberos gssapi ) \
1046 - $( use_with lua ) \
1047 - $( use_with ldap ) \
1048 - $( use_with lucene ) \
1049 - $( use_with lz4 ) \
1050 - $( use_with lzma ) \
1051 - $( use_with mysql ) \
1052 - $( use_with pam ) \
1053 - $( use_with postgres pgsql ) \
1054 - $( use_with sqlite ) \
1055 - $( use_with solr ) \
1056 - $( use_with tcpd libwrap ) \
1057 - $( use_with textcat ) \
1058 - $( use_with vpopmail ) \
1059 - $( use_with zlib ) \
1060 - $( use_enable static-libs static ) \
1061 - ${conf}
1062 -
1063 - if use sieve || use managesieve ; then
1064 - # The sieve plugin needs this file to be build to determine the plugin
1065 - # directory and the list of libraries to link to.
1066 - emake dovecot-config
1067 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1068 - econf \
1069 - $( use_enable static-libs static ) \
1070 - --localstatedir="${EPREFIX}/var" \
1071 - --enable-shared \
1072 - --with-dovecot="../${MY_S}" \
1073 - $( use_with managesieve )
1074 - fi
1075 -}
1076 -
1077 -src_compile() {
1078 - default
1079 - if use sieve || use managesieve ; then
1080 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1081 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
1082 - fi
1083 -}
1084 -
1085 -src_test() {
1086 - default
1087 - if use sieve || use managesieve ; then
1088 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1089 - default
1090 - fi
1091 -}
1092 -
1093 -src_install () {
1094 - default
1095 -
1096 - # insecure:
1097 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
1098 - # better:
1099 - if use suid;then
1100 - einfo "Changing perms to allow deliver to be suided"
1101 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1102 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1103 - fi
1104 -
1105 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
1106 -
1107 - rm -rf "${ED}"/usr/share/doc/dovecot
1108 -
1109 - dodoc AUTHORS NEWS README TODO
1110 - dodoc doc/*.{txt,cnf,xml,sh}
1111 - docinto example-config
1112 - dodoc doc/example-config/*.{conf,ext}
1113 - docinto example-config/conf.d
1114 - dodoc doc/example-config/conf.d/*.{conf,ext}
1115 - docinto wiki
1116 - dodoc doc/wiki/*
1117 - doman doc/man/*.{1,7}
1118 -
1119 - # Create the dovecot.conf file from the dovecot-example.conf file that
1120 - # the dovecot folks nicely left for us....
1121 - local conf="${ED}/etc/dovecot/dovecot.conf"
1122 - local confd="${ED}/etc/dovecot/conf.d"
1123 -
1124 - insinto /etc/dovecot
1125 - doins doc/example-config/*.{conf,ext}
1126 - insinto /etc/dovecot/conf.d
1127 - doins doc/example-config/conf.d/*.{conf,ext}
1128 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
1129 - rm -f "${confd}/../README"
1130 -
1131 - # .maildir is the Gentoo default
1132 - local mail_location="maildir:~/.maildir"
1133 - sed -i -e \
1134 - "s|#mail_location =|mail_location = ${mail_location}|" \
1135 - "${confd}/10-mail.conf" \
1136 - || die "failed to update mail location settings in 10-mail.conf"
1137 -
1138 - # We're using pam files (imap and pop3) provided by mailbase
1139 - if use pam; then
1140 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
1141 - "${confd}/auth-system.conf.ext" \
1142 - || die "failed to update PAM settings in auth-system.conf.ext"
1143 - # mailbase does not provide a sieve pam file
1144 - use managesieve && dosym imap /etc/pam.d/sieve
1145 - sed -i -e \
1146 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
1147 - "${confd}/10-auth.conf" \
1148 - || die "failed to update PAM settings in 10-auth.conf"
1149 - fi
1150 -
1151 - # Disable ipv6 if necessary
1152 - if ! use ipv6; then
1153 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
1154 - || die "failed to update listen settings in dovecot.conf"
1155 - fi
1156 -
1157 - # Update ssl cert locations
1158 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
1159 - || die "ssl conf failed"
1160 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
1161 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
1162 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
1163 -
1164 - # Install SQL configuration
1165 - if use mysql || use postgres; then
1166 - sed -i -e \
1167 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
1168 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
1169 - 10-auth.conf"
1170 - fi
1171 -
1172 - # Install LDAP configuration
1173 - if use ldap; then
1174 - sed -i -e \
1175 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
1176 - "${confd}/10-auth.conf" \
1177 - || die "failed to update ldap settings in 10-auth.conf"
1178 - fi
1179 -
1180 - if use vpopmail; then
1181 - sed -i -e \
1182 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
1183 - "${confd}/10-auth.conf" \
1184 - || die "failed to update vpopmail settings in 10-auth.conf"
1185 - fi
1186 -
1187 - if use sieve || use managesieve ; then
1188 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1189 - emake DESTDIR="${ED}" install
1190 - sed -i -e \
1191 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
1192 - || die "failed to update sieve settings in 15-lda.conf"
1193 - rm -rf "${ED}"/usr/share/doc/dovecot
1194 - docinto example-config/conf.d
1195 - dodoc doc/example-config/conf.d/*.conf
1196 - insinto /etc/dovecot/conf.d
1197 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
1198 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
1199 - docinto sieve/rfc
1200 - dodoc doc/rfc/*.txt
1201 - docinto sieve/devel
1202 - dodoc doc/devel/DESIGN
1203 - docinto plugins
1204 - dodoc doc/plugins/*.txt
1205 - docinto extensions
1206 - dodoc doc/extensions/*.txt
1207 - docinto locations
1208 - dodoc doc/locations/*.txt
1209 - doman doc/man/*.{1,7}
1210 - fi
1211 -
1212 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
1213 -}
1214 -
1215 -pkg_postinst() {
1216 - # Let's not make a new certificate if we already have one
1217 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
1218 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
1219 - einfo "Creating SSL certificate"
1220 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
1221 - install_cert /etc/ssl/dovecot/server
1222 - fi
1223 -
1224 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
1225 -}
1226
1227 diff --git a/net-mail/dovecot/dovecot-2.3.0-r2.ebuild b/net-mail/dovecot/dovecot-2.3.0-r2.ebuild
1228 deleted file mode 100644
1229 index ed1c2326a5b..00000000000
1230 --- a/net-mail/dovecot/dovecot-2.3.0-r2.ebuild
1231 +++ /dev/null
1232 @@ -1,286 +0,0 @@
1233 -# Copyright 1999-2018 Gentoo Foundation
1234 -# Distributed under the terms of the GNU General Public License v2
1235 -
1236 -EAPI=6
1237 -# do not add a ssl USE flag. ssl is mandatory
1238 -SSL_DEPS_SKIP=1
1239 -inherit ssl-cert systemd user versionator
1240 -
1241 -MY_P="${P/_/.}"
1242 -MY_S="${PN}-ce-${PV}"
1243 -major_minor="$(get_version_component_range 1-2)"
1244 -sieve_version="0.5.0.1"
1245 -if [[ ${PV} == *_rc* ]] ; then
1246 - rc_dir="rc/"
1247 -else
1248 - rc_dir=""
1249 -fi
1250 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
1251 - sieve? (
1252 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1253 - )
1254 - managesieve? (
1255 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1256 - ) "
1257 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
1258 -HOMEPAGE="https://www.dovecot.org/"
1259 -
1260 -SLOT="0"
1261 -LICENSE="LGPL-2.1 MIT"
1262 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
1263 -
1264 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
1265 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
1266 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
1267 -
1268 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
1269 -
1270 -DEPEND="argon2? ( dev-libs/libsodium )
1271 - bzip2? ( app-arch/bzip2 )
1272 - caps? ( sys-libs/libcap )
1273 - kerberos? ( virtual/krb5 )
1274 - ldap? ( net-nds/openldap )
1275 - lua? ( dev-lang/lua:* )
1276 - lucene? ( >=dev-cpp/clucene-2.3 )
1277 - lzma? ( app-arch/xz-utils )
1278 - lz4? ( app-arch/lz4 )
1279 - mysql? ( virtual/mysql )
1280 - pam? ( virtual/pam )
1281 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
1282 - selinux? ( sec-policy/selinux-dovecot )
1283 - solr? ( net-misc/curl dev-libs/expat )
1284 - sqlite? ( dev-db/sqlite:* )
1285 - !libressl? ( dev-libs/openssl:0 )
1286 - libressl? ( dev-libs/libressl )
1287 - tcpd? ( sys-apps/tcp-wrappers )
1288 - textcat? ( app-text/libexttextcat )
1289 - vpopmail? ( net-mail/vpopmail )
1290 - zlib? ( sys-libs/zlib )
1291 - virtual/libiconv
1292 - dev-libs/icu:="
1293 -
1294 -RDEPEND="${DEPEND}
1295 - net-mail/mailbase"
1296 -
1297 -PATCHES=( "${FILESDIR}"/${PN}-2.2.33.2-CVE-2017-15132.patch )
1298 -
1299 -S=${WORKDIR}/${MY_S}
1300 -
1301 -pkg_setup() {
1302 - if use managesieve && ! use sieve; then
1303 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
1304 - ewarn "sieve USE flag will be turned on"
1305 - fi
1306 - # default internal user
1307 - enewgroup dovecot 97
1308 - enewuser dovecot 97 -1 /dev/null dovecot
1309 - # default login user
1310 - enewuser dovenull -1 -1 /dev/null
1311 - # add "mail" group for suid'ing. Better security isolation.
1312 - if use suid; then
1313 - enewgroup mail
1314 - fi
1315 -}
1316 -
1317 -src_configure() {
1318 - local conf=""
1319 -
1320 - if use postgres || use mysql || use sqlite; then
1321 - conf="${conf} --with-sql"
1322 - fi
1323 -
1324 - # turn valgrind tests off. Bug #340791
1325 - VALGRIND=no econf \
1326 - --with-rundir="${EPREFIX}/run/dovecot" \
1327 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
1328 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
1329 - --without-stemmer \
1330 - --disable-rpath \
1331 - --without-libbsd \
1332 - --with-icu \
1333 - --with-ssl \
1334 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
1335 - $( use_with argon2 sodium ) \
1336 - $( use_with bzip2 bzlib ) \
1337 - $( use_with caps libcap ) \
1338 - $( use_with kerberos gssapi ) \
1339 - $( use_with lua ) \
1340 - $( use_with ldap ) \
1341 - $( use_with lucene ) \
1342 - $( use_with lz4 ) \
1343 - $( use_with lzma ) \
1344 - $( use_with mysql ) \
1345 - $( use_with pam ) \
1346 - $( use_with postgres pgsql ) \
1347 - $( use_with sqlite ) \
1348 - $( use_with solr ) \
1349 - $( use_with tcpd libwrap ) \
1350 - $( use_with textcat ) \
1351 - $( use_with vpopmail ) \
1352 - $( use_with zlib ) \
1353 - $( use_enable static-libs static ) \
1354 - ${conf}
1355 -
1356 - if use sieve || use managesieve ; then
1357 - # The sieve plugin needs this file to be build to determine the plugin
1358 - # directory and the list of libraries to link to.
1359 - emake dovecot-config
1360 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1361 - econf \
1362 - $( use_enable static-libs static ) \
1363 - --localstatedir="${EPREFIX}/var" \
1364 - --enable-shared \
1365 - --with-dovecot="../${MY_S}" \
1366 - $( use_with managesieve )
1367 - fi
1368 -}
1369 -
1370 -src_compile() {
1371 - default
1372 - if use sieve || use managesieve ; then
1373 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1374 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
1375 - fi
1376 -}
1377 -
1378 -src_test() {
1379 - default
1380 - if use sieve || use managesieve ; then
1381 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1382 - default
1383 - fi
1384 -}
1385 -
1386 -src_install () {
1387 - default
1388 -
1389 - # insecure:
1390 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
1391 - # better:
1392 - if use suid;then
1393 - einfo "Changing perms to allow deliver to be suided"
1394 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1395 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1396 - fi
1397 -
1398 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
1399 -
1400 - rm -rf "${ED}"/usr/share/doc/dovecot
1401 -
1402 - dodoc AUTHORS NEWS README TODO
1403 - dodoc doc/*.{txt,cnf,xml,sh}
1404 - docinto example-config
1405 - dodoc doc/example-config/*.{conf,ext}
1406 - docinto example-config/conf.d
1407 - dodoc doc/example-config/conf.d/*.{conf,ext}
1408 - docinto wiki
1409 - dodoc doc/wiki/*
1410 - doman doc/man/*.{1,7}
1411 -
1412 - # Create the dovecot.conf file from the dovecot-example.conf file that
1413 - # the dovecot folks nicely left for us....
1414 - local conf="${ED}/etc/dovecot/dovecot.conf"
1415 - local confd="${ED}/etc/dovecot/conf.d"
1416 -
1417 - insinto /etc/dovecot
1418 - doins doc/example-config/*.{conf,ext}
1419 - insinto /etc/dovecot/conf.d
1420 - doins doc/example-config/conf.d/*.{conf,ext}
1421 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
1422 - rm -f "${confd}/../README"
1423 -
1424 - # .maildir is the Gentoo default
1425 - local mail_location="maildir:~/.maildir"
1426 - sed -i -e \
1427 - "s|#mail_location =|mail_location = ${mail_location}|" \
1428 - "${confd}/10-mail.conf" \
1429 - || die "failed to update mail location settings in 10-mail.conf"
1430 -
1431 - # We're using pam files (imap and pop3) provided by mailbase
1432 - if use pam; then
1433 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
1434 - "${confd}/auth-system.conf.ext" \
1435 - || die "failed to update PAM settings in auth-system.conf.ext"
1436 - # mailbase does not provide a sieve pam file
1437 - use managesieve && dosym imap /etc/pam.d/sieve
1438 - sed -i -e \
1439 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
1440 - "${confd}/10-auth.conf" \
1441 - || die "failed to update PAM settings in 10-auth.conf"
1442 - fi
1443 -
1444 - # Disable ipv6 if necessary
1445 - if ! use ipv6; then
1446 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
1447 - || die "failed to update listen settings in dovecot.conf"
1448 - fi
1449 -
1450 - # Update ssl cert locations
1451 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
1452 - || die "ssl conf failed"
1453 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
1454 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
1455 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
1456 -
1457 - # Install SQL configuration
1458 - if use mysql || use postgres; then
1459 - sed -i -e \
1460 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
1461 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
1462 - 10-auth.conf"
1463 - fi
1464 -
1465 - # Install LDAP configuration
1466 - if use ldap; then
1467 - sed -i -e \
1468 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
1469 - "${confd}/10-auth.conf" \
1470 - || die "failed to update ldap settings in 10-auth.conf"
1471 - fi
1472 -
1473 - if use vpopmail; then
1474 - sed -i -e \
1475 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
1476 - "${confd}/10-auth.conf" \
1477 - || die "failed to update vpopmail settings in 10-auth.conf"
1478 - fi
1479 -
1480 - if use sieve || use managesieve ; then
1481 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1482 - emake DESTDIR="${ED}" install
1483 - sed -i -e \
1484 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
1485 - || die "failed to update sieve settings in 15-lda.conf"
1486 - rm -rf "${ED}"/usr/share/doc/dovecot
1487 - docinto example-config/conf.d
1488 - dodoc doc/example-config/conf.d/*.conf
1489 - insinto /etc/dovecot/conf.d
1490 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
1491 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
1492 - docinto sieve/rfc
1493 - dodoc doc/rfc/*.txt
1494 - docinto sieve/devel
1495 - dodoc doc/devel/DESIGN
1496 - docinto plugins
1497 - dodoc doc/plugins/*.txt
1498 - docinto extensions
1499 - dodoc doc/extensions/*.txt
1500 - docinto locations
1501 - dodoc doc/locations/*.txt
1502 - doman doc/man/*.{1,7}
1503 - fi
1504 -
1505 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
1506 -}
1507 -
1508 -pkg_postinst() {
1509 - # Let's not make a new certificate if we already have one
1510 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
1511 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
1512 - einfo "Creating SSL certificate"
1513 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
1514 - install_cert /etc/ssl/dovecot/server
1515 - fi
1516 -
1517 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
1518 -}
1519
1520 diff --git a/net-mail/dovecot/dovecot-2.3.0-r3.ebuild b/net-mail/dovecot/dovecot-2.3.0-r3.ebuild
1521 deleted file mode 100644
1522 index 593750f50a3..00000000000
1523 --- a/net-mail/dovecot/dovecot-2.3.0-r3.ebuild
1524 +++ /dev/null
1525 @@ -1,289 +0,0 @@
1526 -# Copyright 1999-2018 Gentoo Foundation
1527 -# Distributed under the terms of the GNU General Public License v2
1528 -
1529 -EAPI=6
1530 -# do not add a ssl USE flag. ssl is mandatory
1531 -SSL_DEPS_SKIP=1
1532 -inherit ssl-cert systemd user versionator
1533 -
1534 -MY_P="${P/_/.}"
1535 -MY_S="${PN}-ce-${PV}"
1536 -major_minor="$(get_version_component_range 1-2)"
1537 -sieve_version="0.5.0.1"
1538 -if [[ ${PV} == *_rc* ]] ; then
1539 - rc_dir="rc/"
1540 -else
1541 - rc_dir=""
1542 -fi
1543 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
1544 - sieve? (
1545 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1546 - )
1547 - managesieve? (
1548 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1549 - ) "
1550 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
1551 -HOMEPAGE="https://www.dovecot.org/"
1552 -
1553 -SLOT="0"
1554 -LICENSE="LGPL-2.1 MIT"
1555 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
1556 -
1557 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
1558 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
1559 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
1560 -
1561 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
1562 -
1563 -DEPEND="argon2? ( dev-libs/libsodium )
1564 - bzip2? ( app-arch/bzip2 )
1565 - caps? ( sys-libs/libcap )
1566 - kerberos? ( virtual/krb5 )
1567 - ldap? ( net-nds/openldap )
1568 - lua? ( dev-lang/lua:* )
1569 - lucene? ( >=dev-cpp/clucene-2.3 )
1570 - lzma? ( app-arch/xz-utils )
1571 - lz4? ( app-arch/lz4 )
1572 - mysql? ( virtual/mysql )
1573 - pam? ( virtual/pam )
1574 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
1575 - selinux? ( sec-policy/selinux-dovecot )
1576 - solr? ( net-misc/curl dev-libs/expat )
1577 - sqlite? ( dev-db/sqlite:* )
1578 - !libressl? ( dev-libs/openssl:0 )
1579 - libressl? ( dev-libs/libressl )
1580 - tcpd? ( sys-apps/tcp-wrappers )
1581 - textcat? ( app-text/libexttextcat )
1582 - vpopmail? ( net-mail/vpopmail )
1583 - zlib? ( sys-libs/zlib )
1584 - virtual/libiconv
1585 - dev-libs/icu:="
1586 -
1587 -RDEPEND="${DEPEND}
1588 - net-mail/mailbase"
1589 -
1590 -PATCHES=(
1591 - "${FILESDIR}"/${PN}-2.2.33.2-CVE-2017-15132.patch
1592 - "${FILESDIR}"/${PN}-2.2.33.2-CVE-2017-15132-fixup.patch
1593 -)
1594 -
1595 -S=${WORKDIR}/${MY_S}
1596 -
1597 -pkg_setup() {
1598 - if use managesieve && ! use sieve; then
1599 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
1600 - ewarn "sieve USE flag will be turned on"
1601 - fi
1602 - # default internal user
1603 - enewgroup dovecot 97
1604 - enewuser dovecot 97 -1 /dev/null dovecot
1605 - # default login user
1606 - enewuser dovenull -1 -1 /dev/null
1607 - # add "mail" group for suid'ing. Better security isolation.
1608 - if use suid; then
1609 - enewgroup mail
1610 - fi
1611 -}
1612 -
1613 -src_configure() {
1614 - local conf=""
1615 -
1616 - if use postgres || use mysql || use sqlite; then
1617 - conf="${conf} --with-sql"
1618 - fi
1619 -
1620 - # turn valgrind tests off. Bug #340791
1621 - VALGRIND=no econf \
1622 - --with-rundir="${EPREFIX}/run/dovecot" \
1623 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
1624 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
1625 - --without-stemmer \
1626 - --disable-rpath \
1627 - --without-libbsd \
1628 - --with-icu \
1629 - --with-ssl \
1630 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
1631 - $( use_with argon2 sodium ) \
1632 - $( use_with bzip2 bzlib ) \
1633 - $( use_with caps libcap ) \
1634 - $( use_with kerberos gssapi ) \
1635 - $( use_with lua ) \
1636 - $( use_with ldap ) \
1637 - $( use_with lucene ) \
1638 - $( use_with lz4 ) \
1639 - $( use_with lzma ) \
1640 - $( use_with mysql ) \
1641 - $( use_with pam ) \
1642 - $( use_with postgres pgsql ) \
1643 - $( use_with sqlite ) \
1644 - $( use_with solr ) \
1645 - $( use_with tcpd libwrap ) \
1646 - $( use_with textcat ) \
1647 - $( use_with vpopmail ) \
1648 - $( use_with zlib ) \
1649 - $( use_enable static-libs static ) \
1650 - ${conf}
1651 -
1652 - if use sieve || use managesieve ; then
1653 - # The sieve plugin needs this file to be build to determine the plugin
1654 - # directory and the list of libraries to link to.
1655 - emake dovecot-config
1656 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1657 - econf \
1658 - $( use_enable static-libs static ) \
1659 - --localstatedir="${EPREFIX}/var" \
1660 - --enable-shared \
1661 - --with-dovecot="../${MY_S}" \
1662 - $( use_with managesieve )
1663 - fi
1664 -}
1665 -
1666 -src_compile() {
1667 - default
1668 - if use sieve || use managesieve ; then
1669 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1670 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
1671 - fi
1672 -}
1673 -
1674 -src_test() {
1675 - default
1676 - if use sieve || use managesieve ; then
1677 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1678 - default
1679 - fi
1680 -}
1681 -
1682 -src_install () {
1683 - default
1684 -
1685 - # insecure:
1686 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
1687 - # better:
1688 - if use suid;then
1689 - einfo "Changing perms to allow deliver to be suided"
1690 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1691 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1692 - fi
1693 -
1694 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
1695 -
1696 - rm -rf "${ED}"/usr/share/doc/dovecot
1697 -
1698 - dodoc AUTHORS NEWS README TODO
1699 - dodoc doc/*.{txt,cnf,xml,sh}
1700 - docinto example-config
1701 - dodoc doc/example-config/*.{conf,ext}
1702 - docinto example-config/conf.d
1703 - dodoc doc/example-config/conf.d/*.{conf,ext}
1704 - docinto wiki
1705 - dodoc doc/wiki/*
1706 - doman doc/man/*.{1,7}
1707 -
1708 - # Create the dovecot.conf file from the dovecot-example.conf file that
1709 - # the dovecot folks nicely left for us....
1710 - local conf="${ED}/etc/dovecot/dovecot.conf"
1711 - local confd="${ED}/etc/dovecot/conf.d"
1712 -
1713 - insinto /etc/dovecot
1714 - doins doc/example-config/*.{conf,ext}
1715 - insinto /etc/dovecot/conf.d
1716 - doins doc/example-config/conf.d/*.{conf,ext}
1717 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
1718 - rm -f "${confd}/../README"
1719 -
1720 - # .maildir is the Gentoo default
1721 - local mail_location="maildir:~/.maildir"
1722 - sed -i -e \
1723 - "s|#mail_location =|mail_location = ${mail_location}|" \
1724 - "${confd}/10-mail.conf" \
1725 - || die "failed to update mail location settings in 10-mail.conf"
1726 -
1727 - # We're using pam files (imap and pop3) provided by mailbase
1728 - if use pam; then
1729 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
1730 - "${confd}/auth-system.conf.ext" \
1731 - || die "failed to update PAM settings in auth-system.conf.ext"
1732 - # mailbase does not provide a sieve pam file
1733 - use managesieve && dosym imap /etc/pam.d/sieve
1734 - sed -i -e \
1735 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
1736 - "${confd}/10-auth.conf" \
1737 - || die "failed to update PAM settings in 10-auth.conf"
1738 - fi
1739 -
1740 - # Disable ipv6 if necessary
1741 - if ! use ipv6; then
1742 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
1743 - || die "failed to update listen settings in dovecot.conf"
1744 - fi
1745 -
1746 - # Update ssl cert locations
1747 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
1748 - || die "ssl conf failed"
1749 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
1750 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
1751 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
1752 -
1753 - # Install SQL configuration
1754 - if use mysql || use postgres; then
1755 - sed -i -e \
1756 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
1757 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
1758 - 10-auth.conf"
1759 - fi
1760 -
1761 - # Install LDAP configuration
1762 - if use ldap; then
1763 - sed -i -e \
1764 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
1765 - "${confd}/10-auth.conf" \
1766 - || die "failed to update ldap settings in 10-auth.conf"
1767 - fi
1768 -
1769 - if use vpopmail; then
1770 - sed -i -e \
1771 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
1772 - "${confd}/10-auth.conf" \
1773 - || die "failed to update vpopmail settings in 10-auth.conf"
1774 - fi
1775 -
1776 - if use sieve || use managesieve ; then
1777 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1778 - emake DESTDIR="${ED}" install
1779 - sed -i -e \
1780 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
1781 - || die "failed to update sieve settings in 15-lda.conf"
1782 - rm -rf "${ED}"/usr/share/doc/dovecot
1783 - docinto example-config/conf.d
1784 - dodoc doc/example-config/conf.d/*.conf
1785 - insinto /etc/dovecot/conf.d
1786 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
1787 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
1788 - docinto sieve/rfc
1789 - dodoc doc/rfc/*.txt
1790 - docinto sieve/devel
1791 - dodoc doc/devel/DESIGN
1792 - docinto plugins
1793 - dodoc doc/plugins/*.txt
1794 - docinto extensions
1795 - dodoc doc/extensions/*.txt
1796 - docinto locations
1797 - dodoc doc/locations/*.txt
1798 - doman doc/man/*.{1,7}
1799 - fi
1800 -
1801 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
1802 -}
1803 -
1804 -pkg_postinst() {
1805 - # Let's not make a new certificate if we already have one
1806 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
1807 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
1808 - einfo "Creating SSL certificate"
1809 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
1810 - install_cert /etc/ssl/dovecot/server
1811 - fi
1812 -
1813 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
1814 -}
1815
1816 diff --git a/net-mail/dovecot/dovecot-2.3.0.ebuild b/net-mail/dovecot/dovecot-2.3.0.ebuild
1817 deleted file mode 100644
1818 index 45f5afddc38..00000000000
1819 --- a/net-mail/dovecot/dovecot-2.3.0.ebuild
1820 +++ /dev/null
1821 @@ -1,284 +0,0 @@
1822 -# Copyright 1999-2018 Gentoo Foundation
1823 -# Distributed under the terms of the GNU General Public License v2
1824 -
1825 -EAPI=6
1826 -# do not add a ssl USE flag. ssl is mandatory
1827 -SSL_DEPS_SKIP=1
1828 -inherit ssl-cert systemd user versionator
1829 -
1830 -MY_P="${P/_/.}"
1831 -MY_S="${PN}-ce-${PV}"
1832 -major_minor="$(get_version_component_range 1-2)"
1833 -sieve_version="0.5.0"
1834 -if [[ ${PV} == *_rc* ]] ; then
1835 - rc_dir="rc/"
1836 -else
1837 - rc_dir=""
1838 -fi
1839 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
1840 - sieve? (
1841 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1842 - )
1843 - managesieve? (
1844 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
1845 - ) "
1846 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
1847 -HOMEPAGE="https://www.dovecot.org/"
1848 -
1849 -SLOT="0"
1850 -LICENSE="LGPL-2.1 MIT"
1851 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
1852 -
1853 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
1854 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
1855 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
1856 -
1857 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
1858 -
1859 -DEPEND="argon2? ( dev-libs/libsodium )
1860 - bzip2? ( app-arch/bzip2 )
1861 - caps? ( sys-libs/libcap )
1862 - kerberos? ( virtual/krb5 )
1863 - ldap? ( net-nds/openldap )
1864 - lua? ( dev-lang/lua:* )
1865 - lucene? ( >=dev-cpp/clucene-2.3 )
1866 - lzma? ( app-arch/xz-utils )
1867 - lz4? ( app-arch/lz4 )
1868 - mysql? ( virtual/mysql )
1869 - pam? ( virtual/pam )
1870 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
1871 - selinux? ( sec-policy/selinux-dovecot )
1872 - solr? ( net-misc/curl dev-libs/expat )
1873 - sqlite? ( dev-db/sqlite:* )
1874 - !libressl? ( dev-libs/openssl:0 )
1875 - libressl? ( dev-libs/libressl )
1876 - tcpd? ( sys-apps/tcp-wrappers )
1877 - textcat? ( app-text/libexttextcat )
1878 - vpopmail? ( net-mail/vpopmail )
1879 - zlib? ( sys-libs/zlib )
1880 - virtual/libiconv
1881 - dev-libs/icu:="
1882 -
1883 -RDEPEND="${DEPEND}
1884 - net-mail/mailbase"
1885 -
1886 -S=${WORKDIR}/${MY_S}
1887 -
1888 -pkg_setup() {
1889 - if use managesieve && ! use sieve; then
1890 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
1891 - ewarn "sieve USE flag will be turned on"
1892 - fi
1893 - # default internal user
1894 - enewgroup dovecot 97
1895 - enewuser dovecot 97 -1 /dev/null dovecot
1896 - # default login user
1897 - enewuser dovenull -1 -1 /dev/null
1898 - # add "mail" group for suid'ing. Better security isolation.
1899 - if use suid; then
1900 - enewgroup mail
1901 - fi
1902 -}
1903 -
1904 -src_configure() {
1905 - local conf=""
1906 -
1907 - if use postgres || use mysql || use sqlite; then
1908 - conf="${conf} --with-sql"
1909 - fi
1910 -
1911 - # turn valgrind tests off. Bug #340791
1912 - VALGRIND=no econf \
1913 - --with-rundir="${EPREFIX}/run/dovecot" \
1914 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
1915 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
1916 - --without-stemmer \
1917 - --disable-rpath \
1918 - --without-libbsd \
1919 - --with-icu \
1920 - --with-ssl \
1921 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
1922 - $( use_with argon2 sodium ) \
1923 - $( use_with bzip2 bzlib ) \
1924 - $( use_with caps libcap ) \
1925 - $( use_with kerberos gssapi ) \
1926 - $( use_with lua ) \
1927 - $( use_with ldap ) \
1928 - $( use_with lucene ) \
1929 - $( use_with lz4 ) \
1930 - $( use_with lzma ) \
1931 - $( use_with mysql ) \
1932 - $( use_with pam ) \
1933 - $( use_with postgres pgsql ) \
1934 - $( use_with sqlite ) \
1935 - $( use_with solr ) \
1936 - $( use_with tcpd libwrap ) \
1937 - $( use_with textcat ) \
1938 - $( use_with vpopmail ) \
1939 - $( use_with zlib ) \
1940 - $( use_enable static-libs static ) \
1941 - ${conf}
1942 -
1943 - if use sieve || use managesieve ; then
1944 - # The sieve plugin needs this file to be build to determine the plugin
1945 - # directory and the list of libraries to link to.
1946 - emake dovecot-config
1947 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1948 - econf \
1949 - $( use_enable static-libs static ) \
1950 - --localstatedir="${EPREFIX}/var" \
1951 - --enable-shared \
1952 - --with-dovecot="../${MY_S}" \
1953 - $( use_with managesieve )
1954 - fi
1955 -}
1956 -
1957 -src_compile() {
1958 - default
1959 - if use sieve || use managesieve ; then
1960 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1961 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
1962 - fi
1963 -}
1964 -
1965 -src_test() {
1966 - default
1967 - if use sieve || use managesieve ; then
1968 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
1969 - default
1970 - fi
1971 -}
1972 -
1973 -src_install () {
1974 - default
1975 -
1976 - # insecure:
1977 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
1978 - # better:
1979 - if use suid;then
1980 - einfo "Changing perms to allow deliver to be suided"
1981 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1982 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
1983 - fi
1984 -
1985 - newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
1986 -
1987 - rm -rf "${ED}"/usr/share/doc/dovecot
1988 -
1989 - dodoc AUTHORS NEWS README TODO
1990 - dodoc doc/*.{txt,cnf,xml,sh}
1991 - docinto example-config
1992 - dodoc doc/example-config/*.{conf,ext}
1993 - docinto example-config/conf.d
1994 - dodoc doc/example-config/conf.d/*.{conf,ext}
1995 - docinto wiki
1996 - dodoc doc/wiki/*
1997 - doman doc/man/*.{1,7}
1998 -
1999 - # Create the dovecot.conf file from the dovecot-example.conf file that
2000 - # the dovecot folks nicely left for us....
2001 - local conf="${ED}/etc/dovecot/dovecot.conf"
2002 - local confd="${ED}/etc/dovecot/conf.d"
2003 -
2004 - insinto /etc/dovecot
2005 - doins doc/example-config/*.{conf,ext}
2006 - insinto /etc/dovecot/conf.d
2007 - doins doc/example-config/conf.d/*.{conf,ext}
2008 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
2009 - rm -f "${confd}/../README"
2010 -
2011 - # .maildir is the Gentoo default
2012 - local mail_location="maildir:~/.maildir"
2013 - sed -i -e \
2014 - "s|#mail_location =|mail_location = ${mail_location}|" \
2015 - "${confd}/10-mail.conf" \
2016 - || die "failed to update mail location settings in 10-mail.conf"
2017 -
2018 - # We're using pam files (imap and pop3) provided by mailbase
2019 - if use pam; then
2020 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
2021 - "${confd}/auth-system.conf.ext" \
2022 - || die "failed to update PAM settings in auth-system.conf.ext"
2023 - # mailbase does not provide a sieve pam file
2024 - use managesieve && dosym imap /etc/pam.d/sieve
2025 - sed -i -e \
2026 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
2027 - "${confd}/10-auth.conf" \
2028 - || die "failed to update PAM settings in 10-auth.conf"
2029 - fi
2030 -
2031 - # Disable ipv6 if necessary
2032 - if ! use ipv6; then
2033 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
2034 - || die "failed to update listen settings in dovecot.conf"
2035 - fi
2036 -
2037 - # Update ssl cert locations
2038 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
2039 - || die "ssl conf failed"
2040 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
2041 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
2042 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
2043 -
2044 - # Install SQL configuration
2045 - if use mysql || use postgres; then
2046 - sed -i -e \
2047 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
2048 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
2049 - 10-auth.conf"
2050 - fi
2051 -
2052 - # Install LDAP configuration
2053 - if use ldap; then
2054 - sed -i -e \
2055 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
2056 - "${confd}/10-auth.conf" \
2057 - || die "failed to update ldap settings in 10-auth.conf"
2058 - fi
2059 -
2060 - if use vpopmail; then
2061 - sed -i -e \
2062 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
2063 - "${confd}/10-auth.conf" \
2064 - || die "failed to update vpopmail settings in 10-auth.conf"
2065 - fi
2066 -
2067 - if use sieve || use managesieve ; then
2068 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
2069 - emake DESTDIR="${ED}" install
2070 - sed -i -e \
2071 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
2072 - || die "failed to update sieve settings in 15-lda.conf"
2073 - rm -rf "${ED}"/usr/share/doc/dovecot
2074 - docinto example-config/conf.d
2075 - dodoc doc/example-config/conf.d/*.conf
2076 - insinto /etc/dovecot/conf.d
2077 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
2078 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
2079 - docinto sieve/rfc
2080 - dodoc doc/rfc/*.txt
2081 - docinto sieve/devel
2082 - dodoc doc/devel/DESIGN
2083 - docinto plugins
2084 - dodoc doc/plugins/*.txt
2085 - docinto extensions
2086 - dodoc doc/extensions/*.txt
2087 - docinto locations
2088 - dodoc doc/locations/*.txt
2089 - doman doc/man/*.{1,7}
2090 - fi
2091 -
2092 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
2093 -}
2094 -
2095 -pkg_postinst() {
2096 - # Let's not make a new certificate if we already have one
2097 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
2098 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
2099 - einfo "Creating SSL certificate"
2100 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
2101 - install_cert /etc/ssl/dovecot/server
2102 - fi
2103 -
2104 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
2105 -}
2106
2107 diff --git a/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132-fixup.patch b/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132-fixup.patch
2108 deleted file mode 100644
2109 index c30acf1fd6e..00000000000
2110 --- a/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132-fixup.patch
2111 +++ /dev/null
2112 @@ -1,37 +0,0 @@
2113 -Upstream: https://github.com/dovecot/core/commit/a9b135760aea6d1790d447d351c56b78889dac22
2114 -
2115 -Link: http://seclists.org/oss-sec/2018/q1/119
2116 -
2117 ---- a/src/lib-auth/auth-client-request.c
2118 -+++ b/src/lib-auth/auth-client-request.c
2119 -@@ -186,6 +186,8 @@ void auth_client_request_abort(struct auth_client_request **_request)
2120 -
2121 - auth_client_send_cancel(request->conn->client, request->id);
2122 - call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL);
2123 -+ /* remove the request */
2124 -+ auth_server_connection_remove_request(request->conn, request->id);
2125 - pool_unref(&request->pool);
2126 - }
2127 -
2128 ---- a/src/lib-auth/auth-server-connection.c
2129 -+++ b/src/lib-auth/auth-server-connection.c
2130 -@@ -483,3 +483,10 @@ auth_server_connection_add_request(struct auth_server_connection *conn,
2131 - hash_table_insert(conn->requests, POINTER_CAST(id), request);
2132 - return id;
2133 - }
2134 -+
2135 -+void auth_server_connection_remove_request(struct auth_server_connection *conn,
2136 -+ unsigned int id)
2137 -+{
2138 -+ i_assert(conn->handshake_received);
2139 -+ hash_table_remove(conn->requests, POINTER_CAST(id));
2140 -+}
2141 ---- a/src/lib-auth/auth-server-connection.h
2142 -+++ b/src/lib-auth/auth-server-connection.h
2143 -@@ -40,4 +40,6 @@ void auth_server_connection_disconnect(struct auth_server_connection *conn,
2144 - unsigned int
2145 - auth_server_connection_add_request(struct auth_server_connection *conn,
2146 - struct auth_client_request *request);
2147 -+void auth_server_connection_remove_request(struct auth_server_connection *conn,
2148 -+ unsigned int id);
2149 - #endif
2150
2151 diff --git a/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132.patch b/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132.patch
2152 deleted file mode 100644
2153 index 3f87e71b559..00000000000
2154 --- a/net-mail/dovecot/files/dovecot-2.2.33.2-CVE-2017-15132.patch
2155 +++ /dev/null
2156 @@ -1,14 +0,0 @@
2157 -CVE-2017-15132: dovecot: auth client leaks memory if SASL authentication is aborted.
2158 -
2159 -https://github.com/dovecot/core/commit/1a29ed2f96da1be22fa5a4d96c7583aa81b8b060
2160 -
2161 ---- a/src/lib-auth/auth-client-request.c
2162 -+++ b/src/lib-auth/auth-client-request.c
2163 -@@ -186,6 +186,7 @@ void auth_client_request_abort(struct auth_client_request **_request)
2164 -
2165 - auth_client_send_cancel(request->conn->client, request->id);
2166 - call_callback(request, AUTH_REQUEST_STATUS_ABORT, NULL, NULL);
2167 -+ pool_unref(&request->pool);
2168 - }
2169 -
2170 - unsigned int auth_client_request_get_id(struct auth_client_request *request)