Gentoo Archives: gentoo-commits

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