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/, net-mail/dovecot/files/
Date: Thu, 29 Aug 2019 05:39:40
Message-Id: 1567057169.d60cbaaa0a76ce52ffb67ee816a831e17bdc108e.eras@gentoo
1 commit: d60cbaaa0a76ce52ffb67ee816a831e17bdc108e
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 29 05:39:11 2019 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 29 05:39:29 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d60cbaaa
7
8 net-mail/dovecot: cleanup
9
10 Package-Manager: Portage-2.3.73, Repoman-2.3.17
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 net-mail/dovecot/Manifest | 2 -
14 net-mail/dovecot/dovecot-2.2.36.3.ebuild | 287 --------------------
15 net-mail/dovecot/dovecot-2.3.6-r1.ebuild | 291 ---------------------
16 .../files/dovecot-no-log-error-tcp_nodelay.patch | 31 ---
17 4 files changed, 611 deletions(-)
18
19 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
20 index 0a46bd2e538..0c8c6cbed5c 100644
21 --- a/net-mail/dovecot/Manifest
22 +++ b/net-mail/dovecot/Manifest
23 @@ -1,6 +1,4 @@
24 -DIST dovecot-2.2-pigeonhole-0.4.24.1.tar.gz 1810959 BLAKE2B f24b28dc7422ea4f379e372adf33ebbf7cbb146d55b01dbf40580767a14adf695b0a2726f591c0c34436bd93a8b48ee8a8c4307fffc6b082d9c028ce93e29a0a SHA512 99af8a1f4588d821c7000133c5c173ab05640d3411b826a0978db2d60c9a59d5b330ca2d38aa25aa1163f6d1b669dc97b8303e2bceda554f67d0029d5d0b34fd
25 DIST dovecot-2.2-pigeonhole-0.4.24.2.tar.gz 1833284 BLAKE2B bee45fd129aee3d5126bd48b27829e7e266a5c1043411b6b23655bbf32e2f684763b82bff476a954bf7f0c7aae4e038c0892be70776726c7b324e409a8f89d78 SHA512 a51de88bcbac83ced7d314a560bd44f119dd80bf58f350da522501f072c0a4c02ff8c11152e2b858f14bb8ca9a9b665960cbe37a0c8ef4600b430e65ddbf3bf4
26 -DIST dovecot-2.2.36.3.tar.gz 6270735 BLAKE2B 90bd6f7cd3769040215f574bb368c1ad835041fff54273e2477be2d2e057c1700472b08a24ed3a7cad469bd39449d94986bc6801373bb97a63975ddbb54cefa5 SHA512 47611dbde7ee854ad323dcdb726757c7172376761fa774f28fce3f9d74ed590319d812f0555abed5f8178c326c3cb7661ac0b708ca5982914e255cec60f72e35
27 DIST dovecot-2.2.36.4.tar.gz 6257899 BLAKE2B 3260e96f369e85f2dfd5ece0d9b12902c7192d057369e8a151cc6ab7b4f2033d4e1029fb862d412f2837fd384d7fe729cf1ab15cac9ac335e943bb1fdb532b51 SHA512 e33ab2f6c5f7b4ffca3d57580329f1df8e1655c755a1a6b575a4e49d57ea94d1ab67df2419033c9d68acf5959c6edfa596815dc2bc43798e9aef3d17d271cc4d
28 DIST dovecot-2.3-pigeonhole-0.5.6.tar.gz 1854287 BLAKE2B a26edf2a298d8c3de0d9977d56583bd2e0933495c5f554871a38d7b9e31701ebf3587d221c5ec398721a9c34816918c41b069de39c13f879334f9776fede1a17 SHA512 998a046d2eb5ff7bba615fd1a3efdfb1e7e1dabf191257f7fa2882074acc1735a0a4c11c5f31bab1e964b0118f1a8e9e51b3d5529b8fff6d1312c9a8257d9c20
29 DIST dovecot-2.3-pigeonhole-0.5.7.1.tar.gz 1857291 BLAKE2B 09763c87099ac50fbe86870855b100379a9b2a72d6077438bbf1f76ff3aed162ad781be27e6587a9742819137f6636f142a220f3b46d3c46115b10cbf4cb2efc SHA512 121eac4ad8bc1ddc55c554d00338bb553590b6aedffcb11e34f6cba102d59bd34580cb7218bd5fe820038c004d12db73f7a27ca135c3d4a12c4449bae3216355
30
31 diff --git a/net-mail/dovecot/dovecot-2.2.36.3.ebuild b/net-mail/dovecot/dovecot-2.2.36.3.ebuild
32 deleted file mode 100644
33 index 9e06b4534ad..00000000000
34 --- a/net-mail/dovecot/dovecot-2.2.36.3.ebuild
35 +++ /dev/null
36 @@ -1,287 +0,0 @@
37 -# Copyright 1999-2019 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=6
41 -
42 -# do not add a ssl USE flag. ssl is mandatory
43 -SSL_DEPS_SKIP=1
44 -inherit autotools eapi7-ver ssl-cert systemd user versionator
45 -
46 -MY_P="${P/_/.}"
47 -major_minor="$(ver_cut 1-2)"
48 -sieve_version="0.4.24.1"
49 -if [[ ${PV} == *_rc* ]] ; then
50 - rc_dir="rc/"
51 -else
52 - rc_dir=""
53 -fi
54 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
55 - sieve? (
56 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
57 - )
58 - managesieve? (
59 - https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
60 - ) "
61 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
62 -HOMEPAGE="https://www.dovecot.org/"
63 -
64 -SLOT="0"
65 -LICENSE="LGPL-2.1 MIT"
66 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
67 -
68 -IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
69 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
70 -IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr 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? ( dev-db/mysql-connector-c:0= )
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 - !libressl? ( dev-libs/openssl:0 )
88 - libressl? ( dev-libs/libressl )
89 - tcpd? ( sys-apps/tcp-wrappers )
90 - textcat? ( app-text/libexttextcat )
91 - vpopmail? ( net-mail/vpopmail )
92 - zlib? ( sys-libs/zlib )
93 - virtual/libiconv
94 - dev-libs/icu:="
95 -
96 -RDEPEND="${DEPEND}
97 - net-mail/mailbase"
98 -
99 -PATCHES=(
100 - "${FILESDIR}/${PN}-userdb-passwd-fix.patch"
101 -)
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 - default
121 - # bug 657108
122 - elibtoolize
123 -}
124 -
125 -src_configure() {
126 - local conf=""
127 -
128 - if use postgres || use mysql || use sqlite; then
129 - conf="${conf} --with-sql"
130 - fi
131 -
132 - # turn valgrind tests off. Bug #340791
133 - VALGRIND=no econf \
134 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
135 - --with-rundir="${EPREFIX}/run/dovecot" \
136 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
137 - --without-stemmer \
138 - --disable-rpath \
139 - --with-icu \
140 - --with-ssl \
141 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
142 - $( use_with bzip2 bzlib ) \
143 - $( use_with caps libcap ) \
144 - $( use_with kerberos gssapi ) \
145 - $( use_with ldap ) \
146 - $( use_with lucene ) \
147 - $( use_with lz4 ) \
148 - $( use_with lzma ) \
149 - $( use_with mysql ) \
150 - $( use_with pam ) \
151 - $( use_with postgres pgsql ) \
152 - $( use_with sqlite ) \
153 - $( use_with solr ) \
154 - $( use_with tcpd libwrap ) \
155 - $( use_with textcat ) \
156 - $( use_with vpopmail ) \
157 - $( use_with zlib ) \
158 - $( use_enable static-libs static ) \
159 - ${conf}
160 -
161 - if use sieve || use managesieve ; then
162 - # The sieve plugin needs this file to be build to determine the plugin
163 - # directory and the list of libraries to link to.
164 - emake dovecot-config
165 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
166 - econf \
167 - $( use_enable static-libs static ) \
168 - --localstatedir="${EPREFIX}/var" \
169 - --enable-shared \
170 - --with-dovecot="${S}" \
171 - $( use_with managesieve )
172 - fi
173 -}
174 -
175 -src_compile() {
176 - default
177 - if use sieve || use managesieve ; then
178 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
179 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
180 - fi
181 -}
182 -
183 -src_test() {
184 - default
185 - if use sieve || use managesieve ; then
186 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
187 - default
188 - fi
189 -}
190 -
191 -src_install () {
192 - default
193 -
194 - # insecure:
195 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
196 - # better:
197 - if use suid;then
198 - einfo "Changing perms to allow deliver to be suided"
199 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
200 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
201 - fi
202 -
203 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
204 -
205 - rm -rf "${ED}"/usr/share/doc/dovecot
206 -
207 - dodoc AUTHORS NEWS README TODO
208 - dodoc doc/*.{txt,cnf,xml,sh}
209 - docinto example-config
210 - dodoc doc/example-config/*.{conf,ext}
211 - docinto example-config/conf.d
212 - dodoc doc/example-config/conf.d/*.{conf,ext}
213 - docinto wiki
214 - dodoc doc/wiki/*
215 - doman doc/man/*.{1,7}
216 -
217 - # Create the dovecot.conf file from the dovecot-example.conf file that
218 - # the dovecot folks nicely left for us....
219 - local conf="${ED}/etc/dovecot/dovecot.conf"
220 - local confd="${ED}/etc/dovecot/conf.d"
221 -
222 - insinto /etc/dovecot
223 - doins doc/example-config/*.{conf,ext}
224 - insinto /etc/dovecot/conf.d
225 - doins doc/example-config/conf.d/*.{conf,ext}
226 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
227 - rm -f "${confd}/../README"
228 -
229 - # .maildir is the Gentoo default
230 - local mail_location="maildir:~/.maildir"
231 - sed -i -e \
232 - "s|#mail_location =|mail_location = ${mail_location}|" \
233 - "${confd}/10-mail.conf" \
234 - || die "failed to update mail location settings in 10-mail.conf"
235 -
236 - # We're using pam files (imap and pop3) provided by mailbase
237 - if use pam; then
238 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
239 - "${confd}/auth-system.conf.ext" \
240 - || die "failed to update PAM settings in auth-system.conf.ext"
241 - # mailbase does not provide a sieve pam file
242 - use managesieve && dosym imap /etc/pam.d/sieve
243 - sed -i -e \
244 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
245 - "${confd}/10-auth.conf" \
246 - || die "failed to update PAM settings in 10-auth.conf"
247 - fi
248 -
249 - # Disable ipv6 if necessary
250 - if ! use ipv6; then
251 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
252 - || die "failed to update listen settings in dovecot.conf"
253 - fi
254 -
255 - # Update ssl cert locations
256 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
257 - || die "ssl conf failed"
258 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
259 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
260 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
261 -
262 - # Install SQL configuration
263 - if use mysql || use postgres; then
264 - sed -i -e \
265 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
266 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
267 - 10-auth.conf"
268 - fi
269 -
270 - # Install LDAP configuration
271 - if use ldap; then
272 - sed -i -e \
273 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
274 - "${confd}/10-auth.conf" \
275 - || die "failed to update ldap settings in 10-auth.conf"
276 - fi
277 -
278 - if use vpopmail; then
279 - sed -i -e \
280 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
281 - "${confd}/10-auth.conf" \
282 - || die "failed to update vpopmail settings in 10-auth.conf"
283 - fi
284 -
285 - if use sieve || use managesieve ; then
286 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
287 - emake DESTDIR="${ED}" install
288 - sed -i -e \
289 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
290 - || die "failed to update sieve settings in 15-lda.conf"
291 - rm -rf "${ED}"/usr/share/doc/dovecot
292 - docinto example-config/conf.d
293 - dodoc doc/example-config/conf.d/*.conf
294 - insinto /etc/dovecot/conf.d
295 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
296 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
297 - docinto sieve/rfc
298 - dodoc doc/rfc/*.txt
299 - docinto sieve/devel
300 - dodoc doc/devel/DESIGN
301 - docinto plugins
302 - dodoc doc/plugins/*.txt
303 - docinto extensions
304 - dodoc doc/extensions/*.txt
305 - docinto locations
306 - dodoc doc/locations/*.txt
307 - doman doc/man/*.{1,7}
308 - fi
309 -
310 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
311 -}
312 -
313 -pkg_postinst() {
314 - # Let's not make a new certificate if we already have one
315 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
316 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
317 - einfo "Creating SSL certificate"
318 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
319 - install_cert /etc/ssl/dovecot/server
320 - fi
321 -
322 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
323 -}
324
325 diff --git a/net-mail/dovecot/dovecot-2.3.6-r1.ebuild b/net-mail/dovecot/dovecot-2.3.6-r1.ebuild
326 deleted file mode 100644
327 index 20f2b5332e0..00000000000
328 --- a/net-mail/dovecot/dovecot-2.3.6-r1.ebuild
329 +++ /dev/null
330 @@ -1,291 +0,0 @@
331 -# Copyright 1999-2019 Gentoo Authors
332 -# Distributed under the terms of the GNU General Public License v2
333 -
334 -EAPI=6
335 -
336 -# do not add a ssl USE flag. ssl is mandatory
337 -SSL_DEPS_SKIP=1
338 -inherit autotools eapi7-ver ssl-cert systemd user
339 -
340 -MY_P="${P/_/.}"
341 -#MY_S="${PN}-ce-${PV}"
342 -major_minor="$(ver_cut 1-2)"
343 -sieve_version="0.5.6"
344 -if [[ ${PV} == *_rc* ]] ; then
345 - rc_dir="rc/"
346 -else
347 - rc_dir=""
348 -fi
349 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
350 - sieve? (
351 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
352 - )
353 - managesieve? (
354 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
355 - ) "
356 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
357 -HOMEPAGE="https://www.dovecot.org/"
358 -
359 -SLOT="0"
360 -LICENSE="LGPL-2.1 MIT"
361 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
362 -
363 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail"
364 -IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
365 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat"
366 -
367 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
368 -
369 -DEPEND="argon2? ( dev-libs/libsodium )
370 - bzip2? ( app-arch/bzip2 )
371 - caps? ( sys-libs/libcap )
372 - kerberos? ( virtual/krb5 )
373 - ldap? ( net-nds/openldap )
374 - lua? ( dev-lang/lua:* )
375 - lucene? ( >=dev-cpp/clucene-2.3 )
376 - lzma? ( app-arch/xz-utils )
377 - lz4? ( app-arch/lz4 )
378 - mysql? ( dev-db/mysql-connector-c:0= )
379 - pam? ( virtual/pam )
380 - postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
381 - selinux? ( sec-policy/selinux-dovecot )
382 - solr? ( net-misc/curl dev-libs/expat )
383 - sqlite? ( dev-db/sqlite:* )
384 - !libressl? ( dev-libs/openssl:0 )
385 - libressl? ( dev-libs/libressl )
386 - suid? ( acct-group/mail )
387 - tcpd? ( sys-apps/tcp-wrappers )
388 - textcat? ( app-text/libexttextcat )
389 - vpopmail? ( net-mail/vpopmail )
390 - zlib? ( sys-libs/zlib )
391 - virtual/libiconv
392 - dev-libs/icu:="
393 -
394 -RDEPEND="${DEPEND}
395 - net-mail/mailbase"
396 -
397 -PATCHES=(
398 - "${FILESDIR}/${PN}-userdb-passwd-fix.patch"
399 -)
400 -
401 -pkg_setup() {
402 - if use managesieve && ! use sieve; then
403 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
404 - ewarn "sieve USE flag will be turned on"
405 - fi
406 - # default internal user
407 - enewgroup dovecot 97
408 - enewuser dovecot 97 -1 /dev/null dovecot
409 - # default login user
410 - enewuser dovenull -1 -1 /dev/null
411 -}
412 -
413 -src_prepare() {
414 - default
415 - # bug 657108
416 - elibtoolize
417 - #eautoreconf
418 -}
419 -
420 -src_configure() {
421 - local conf=""
422 -
423 - if use postgres || use mysql || use sqlite; then
424 - conf="${conf} --with-sql"
425 - fi
426 -
427 - # turn valgrind tests off. Bug #340791
428 - VALGRIND=no econf \
429 - --with-rundir="${EPREFIX}/run/dovecot" \
430 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
431 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
432 - --without-stemmer \
433 - --disable-rpath \
434 - --without-libbsd \
435 - --with-icu \
436 - --with-ssl \
437 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
438 - $( use_with argon2 sodium ) \
439 - $( use_with bzip2 bzlib ) \
440 - $( use_with caps libcap ) \
441 - $( use_with kerberos gssapi ) \
442 - $( use_with lua ) \
443 - $( use_with ldap ) \
444 - $( use_with lucene ) \
445 - $( use_with lz4 ) \
446 - $( use_with lzma ) \
447 - $( use_with mysql ) \
448 - $( use_with pam ) \
449 - $( use_with postgres pgsql ) \
450 - $( use_with sqlite ) \
451 - $( use_with solr ) \
452 - $( use_with tcpd libwrap ) \
453 - $( use_with textcat ) \
454 - $( use_with vpopmail ) \
455 - $( use_with zlib ) \
456 - $( use_enable static-libs static ) \
457 - ${conf}
458 -
459 - if use sieve || use managesieve ; then
460 - # The sieve plugin needs this file to be build to determine the plugin
461 - # directory and the list of libraries to link to.
462 - emake dovecot-config
463 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
464 - econf \
465 - $( use_enable static-libs static ) \
466 - --localstatedir="${EPREFIX%/}/var" \
467 - --enable-shared \
468 - --with-dovecot="${S}" \
469 - $( use_with managesieve )
470 - fi
471 -}
472 -
473 -src_compile() {
474 - default
475 - if use sieve || use managesieve ; then
476 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
477 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
478 - fi
479 -}
480 -
481 -src_test() {
482 - default
483 - if use sieve || use managesieve ; then
484 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
485 - default
486 - fi
487 -}
488 -
489 -src_install () {
490 - default
491 -
492 - # insecure:
493 - # use suid && fperms u+s /usr/libexec/dovecot/deliver
494 - # better:
495 - if use suid;then
496 - einfo "Changing perms to allow deliver to be suided"
497 - fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
498 - fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
499 - fi
500 -
501 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
502 -
503 - rm -rf "${ED}"/usr/share/doc/dovecot
504 -
505 - dodoc AUTHORS NEWS README TODO
506 - dodoc doc/*.{txt,cnf,xml,sh}
507 - docinto example-config
508 - dodoc doc/example-config/*.{conf,ext}
509 - docinto example-config/conf.d
510 - dodoc doc/example-config/conf.d/*.{conf,ext}
511 - docinto wiki
512 - dodoc doc/wiki/*
513 - doman doc/man/*.{1,7}
514 -
515 - # Create the dovecot.conf file from the dovecot-example.conf file that
516 - # the dovecot folks nicely left for us....
517 - local conf="${ED}/etc/dovecot/dovecot.conf"
518 - local confd="${ED}/etc/dovecot/conf.d"
519 -
520 - insinto /etc/dovecot
521 - doins doc/example-config/*.{conf,ext}
522 - insinto /etc/dovecot/conf.d
523 - doins doc/example-config/conf.d/*.{conf,ext}
524 - fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
525 - rm -f "${confd}/../README"
526 -
527 - # .maildir is the Gentoo default
528 - local mail_location="maildir:~/.maildir"
529 - sed -i -e \
530 - "s|#mail_location =|mail_location = ${mail_location}|" \
531 - "${confd}/10-mail.conf" \
532 - || die "failed to update mail location settings in 10-mail.conf"
533 -
534 - # We're using pam files (imap and pop3) provided by mailbase
535 - if use pam; then
536 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
537 - "${confd}/auth-system.conf.ext" \
538 - || die "failed to update PAM settings in auth-system.conf.ext"
539 - # mailbase does not provide a sieve pam file
540 - use managesieve && dosym imap /etc/pam.d/sieve
541 - sed -i -e \
542 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
543 - "${confd}/10-auth.conf" \
544 - || die "failed to update PAM settings in 10-auth.conf"
545 - fi
546 -
547 - # Disable ipv6 if necessary
548 - if ! use ipv6; then
549 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
550 - || die "failed to update listen settings in dovecot.conf"
551 - fi
552 -
553 - # Update ssl cert locations
554 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
555 - || die "ssl conf failed"
556 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
557 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
558 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
559 -
560 - # Install SQL configuration
561 - if use mysql || use postgres; then
562 - sed -i -e \
563 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
564 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
565 - 10-auth.conf"
566 - fi
567 -
568 - # Install LDAP configuration
569 - if use ldap; then
570 - sed -i -e \
571 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
572 - "${confd}/10-auth.conf" \
573 - || die "failed to update ldap settings in 10-auth.conf"
574 - fi
575 -
576 - if use vpopmail; then
577 - sed -i -e \
578 - 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
579 - "${confd}/10-auth.conf" \
580 - || die "failed to update vpopmail settings in 10-auth.conf"
581 - fi
582 -
583 - if use sieve || use managesieve ; then
584 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
585 - emake DESTDIR="${ED}" install
586 - sed -i -e \
587 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
588 - || die "failed to update sieve settings in 15-lda.conf"
589 - rm -rf "${ED}"/usr/share/doc/dovecot
590 - docinto example-config/conf.d
591 - dodoc doc/example-config/conf.d/*.conf
592 - insinto /etc/dovecot/conf.d
593 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
594 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
595 - docinto sieve/rfc
596 - dodoc doc/rfc/*.txt
597 - docinto sieve/devel
598 - dodoc doc/devel/DESIGN
599 - docinto plugins
600 - dodoc doc/plugins/*.txt
601 - docinto extensions
602 - dodoc doc/extensions/*.txt
603 - docinto locations
604 - dodoc doc/locations/*.txt
605 - doman doc/man/*.{1,7}
606 - fi
607 -
608 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
609 -}
610 -
611 -pkg_postinst() {
612 - # Let's not make a new certificate if we already have one
613 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
614 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
615 - einfo "Creating SSL certificate"
616 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
617 - install_cert /etc/ssl/dovecot/server
618 - fi
619 -
620 - elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
621 -}
622
623 diff --git a/net-mail/dovecot/files/dovecot-no-log-error-tcp_nodelay.patch b/net-mail/dovecot/files/dovecot-no-log-error-tcp_nodelay.patch
624 deleted file mode 100644
625 index 3a2acd74fb6..00000000000
626 --- a/net-mail/dovecot/files/dovecot-no-log-error-tcp_nodelay.patch
627 +++ /dev/null
628 @@ -1,31 +0,0 @@
629 -diff --git a/src/lib/ostream-file.c b/src/lib/ostream-file.c
630 -index e7e6f62d12..82bf729ac0 100644
631 ---- a/src/lib/ostream-file.c
632 -+++ b/src/lib/ostream-file.c
633 -@@ -333,17 +333,17 @@ static int buffer_flush(struct file_ostream *fstream)
634 - static void o_stream_tcp_flush_via_nodelay(struct file_ostream *fstream)
635 - {
636 - if (net_set_tcp_nodelay(fstream->fd, TRUE) < 0) {
637 -- if (errno != ENOTSUP && errno != ENOTSOCK &&
638 -- errno != ENOPROTOOPT) {
639 -- i_error("file_ostream.net_set_tcp_nodelay(%s, TRUE) failed: %m",
640 -- o_stream_get_name(&fstream->ostream.ostream));
641 -- }
642 -+ /* Don't bother logging errors. There are quite a lot of
643 -+ different errors that need to be ignored, and it differs
644 -+ between OSes. At least:
645 -+ Linux: ENOTSUP, ENOTSOCK, ENOPROTOOPT
646 -+ FreeBSD: EINVAL, ECONNRESET */
647 - fstream->no_socket_nodelay = TRUE;
648 - } else if (net_set_tcp_nodelay(fstream->fd, FALSE) < 0) {
649 -- /* We already successfully enabled TCP_NODELAY, so we're really
650 -- not expecting any errors here. */
651 -- i_error("file_ostream.net_set_tcp_nodelay(%s, FALSE) failed: %m",
652 -- o_stream_get_name(&fstream->ostream.ostream));
653 -+ /* We already successfully enabled TCP_NODELAY, so there
654 -+ shouldn't really be errors. Except ECONNRESET can possibly
655 -+ still happen between these two calls, so again don't log
656 -+ errors. */
657 - fstream->no_socket_nodelay = TRUE;
658 - }
659 - }