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: Tue, 28 Feb 2017 07:16:31
Message-Id: 1488266168.b02b9838544a06850fbd2be691cf2c37b420b7e5.eras@gentoo
1 commit: b02b9838544a06850fbd2be691cf2c37b420b7e5
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 07:16:08 2017 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 07:16:08 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b02b9838
7
8 net-mail/dovecot: version bump to 2.2.28
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 net-mail/dovecot/Manifest | 2 +
13 net-mail/dovecot/dovecot-2.2.28.ebuild | 308 +++++++++++++++++++++++++++++++++
14 2 files changed, 310 insertions(+)
15
16 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
17 index f2785f54cd..2b80d67a6f 100644
18 --- a/net-mail/dovecot/Manifest
19 +++ b/net-mail/dovecot/Manifest
20 @@ -1,4 +1,6 @@
21 DIST dovecot-2.2-pigeonhole-0.4.16.tar.gz 1713634 SHA256 8f0b98f18062d6e241eef74ebe16cc167cd246361cbe6657d94f0ecc5d7d3234 SHA512 5f59fb35dbe638f8ddd19c0fd0f3fbd6fec1fa238f3781b94c50a8f7ce72a53ac1381a6f8ad9bcc90df1edfa2b263a6dfba88521578e55ce4b3d840bed022b79 WHIRLPOOL 5e037d1e271b9c12a111966306c30536035126e9ba1213697804614d8a3d38996b117b37a744cb5b97873e136bddf110177c501d46c5ce0ffd2110932b911f00
22 +DIST dovecot-2.2-pigeonhole-0.4.17.tar.gz 1787177 SHA256 74d869c7532cbf4fe41e3cc95a1aa6ce32e98f4d423f0d099da1e0fba022dae3 SHA512 3ea6faebf04154649c32612f204e909aa131582c99867865bff3d3a78a75593d96109586eeb6403bc915046b8b6f02e8bacbf6cb6733ea186d2e1a209a7e2b79 WHIRLPOOL bccf0c679c627cd791af69e8f7efa232b6448d7246af0108c3917ab9f65fc16ca860240c8b69fa8dda23d7b3b485fc9527bfca33bc49b42a10d84a29897a2a3b
23 DIST dovecot-2.2-pigeonhole-0.4.9.tar.gz 1577127 SHA256 82892f876d26008a076973dfddf1cffaf5a0451825fd44e06287e94b89078649 SHA512 9e7a18b43d59ed955b142d16696ca221822a547ea59ac70c1bb374eedb28b6ed99ea49f34ead1f9a16ded4573605e410a5cc8e038e1bdf5f943a65588b5d3af2 WHIRLPOOL be309436b43af82a7cb8eff205e1638b2c59751927fdab187e6fde72330e4abd99878cbfa94ca50440ec8de1f9b569bf334d426891ddc73d5f647ee2040c193f
24 DIST dovecot-2.2.19.tar.gz 5256627 SHA256 759e1e3f9d907cdaabad1f5fbacc793ca191d234c084bec3bba42966952a4e9f SHA512 1b9d605a6a5862ade9d1ca634a9e0171b7c212ab025fc2059051c3795470685b66516fa9fbe5ad91d84388268ea15795f2dcd70ffdf81736ce4d80fd284835e9 WHIRLPOOL 30dbe70bfeef10dbe414ebf3f091041ad66926a8748cd401ecaf9ed5c7602939e86943d98bfb839f32c0aa1d0081ab71adacf23bb4adba34e828ee296e9a7278
25 DIST dovecot-2.2.27.tar.gz 5794668 SHA256 897f92a87cda4b27b243f8149ce0ba7b7e71a2be8fb7994eb0a025e54cde18e9 SHA512 faab441bb2afa1e6de3e6ec6207c92a333773941bbc10c4761483ef6ccc193d3a4983de1acc73325122c22b197ea25c1e54886cccfb6b060ede90936a69b71f2 WHIRLPOOL dd17a079118a300a56b26c48c152e44267f69a2138af066944a207ca5851c4b430a40c8553a794061321b67b2e5d7f721ba897b7a17826651c884db72e6d4424
26 +DIST dovecot-2.2.28.tar.gz 5921992 SHA256 e0288f59e326ab87cb3881fdabadafe542f4dc7ab9996db13863a439ebbc1f25 SHA512 3f40eb52413130dd47da98470d797ede63db3296923c2888b48f1a021e473cfcad064671ad804037d101990457ee57def30f2c27010ede2d758f3d3cfd8ef741 WHIRLPOOL cb92cdafcbfa2d42d9a7c16d20495e3d6828c8f836341a736d740df51e246c40f75417d8959bd5c9a4429f2217790f0edde262806d62a643a8d0da8b76db9600
27
28 diff --git a/net-mail/dovecot/dovecot-2.2.28.ebuild b/net-mail/dovecot/dovecot-2.2.28.ebuild
29 new file mode 100644
30 index 0000000000..563809c262
31 --- /dev/null
32 +++ b/net-mail/dovecot/dovecot-2.2.28.ebuild
33 @@ -0,0 +1,308 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id: 959e57aa22fc41f7b2db595bee5abc8765ec6999 $
37 +
38 +EAPI=6
39 +inherit ssl-cert systemd user versionator
40 +
41 +MY_P="${P/_/.}"
42 +major_minor="$(get_version_component_range 1-2)"
43 +sieve_version="0.4.17"
44 +if [[ ${PV} == *_rc* ]] ; then
45 + rc_dir="rc/"
46 +else
47 + rc_dir=""
48 +fi
49 +SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
50 + sieve? (
51 + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
52 + )
53 + managesieve? (
54 + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
55 + ) "
56 +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
57 +HOMEPAGE="http://www.dovecot.org/"
58 +
59 +SLOT="0"
60 +LICENSE="LGPL-2.1 MIT"
61 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~x86"
62 +
63 +IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
64 +IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
65 +IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
66 +IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl 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? ( virtual/mysql )
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 + ssl? (
84 + !libressl? ( dev-libs/openssl:0 )
85 + libressl? ( dev-libs/libressl )
86 + )
87 + tcpd? ( sys-apps/tcp-wrappers )
88 + textcat? ( app-text/libexttextcat )
89 + vpopmail? ( net-mail/vpopmail )
90 + zlib? ( sys-libs/zlib )
91 + virtual/libiconv
92 + dev-libs/icu:="
93 +
94 +RDEPEND="${DEPEND}
95 + net-mail/mailbase"
96 +
97 +S=${WORKDIR}/${MY_P}
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 + eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
117 + eapply_user
118 +}
119 +
120 +src_configure() {
121 + local conf=""
122 +
123 + if use postgres || use mysql || use sqlite; then
124 + conf="${conf} --with-sql"
125 + fi
126 +
127 + local storages=""
128 + for storage in ${IUSE_DOVECOT_STORAGE//+/}; do
129 + use ${storage} && storages="${storage} ${storages}"
130 + done
131 + [ "${storages}" ] || storages="maildir"
132 +
133 + # turn valgrind tests off. Bug #340791
134 + VALGRIND=no econf \
135 + --localstatedir="${EPREFIX}/var" \
136 + --runstatedir="${EPREFIX}/run" \
137 + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
138 + --without-stemmer \
139 + --with-storages="${storages}" \
140 + --disable-rpath \
141 + --with-icu \
142 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
143 + $( use_with bzip2 bzlib ) \
144 + $( use_with caps libcap ) \
145 + $( use_with kerberos gssapi ) \
146 + $( use_with ldap ) \
147 + $( use_with lucene ) \
148 + $( use_with lz4 ) \
149 + $( use_with lzma ) \
150 + $( use_with mysql ) \
151 + $( use_with pam ) \
152 + $( use_with postgres pgsql ) \
153 + $( use_with sqlite ) \
154 + $( use_with solr ) \
155 + $( use_with ssl ) \
156 + $( use_with tcpd libwrap ) \
157 + $( use_with textcat ) \
158 + $( use_with vpopmail ) \
159 + $( use_with zlib ) \
160 + $( use_enable static-libs static ) \
161 + ${conf}
162 +
163 + if use sieve || use managesieve ; then
164 + # The sieve plugin needs this file to be build to determine the plugin
165 + # directory and the list of libraries to link to.
166 + emake dovecot-config
167 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
168 + econf \
169 + $( use_enable static-libs static ) \
170 + --localstatedir="${EPREFIX}/var" \
171 + --enable-shared \
172 + --with-dovecot="../${MY_P}" \
173 + $( use_with managesieve )
174 + fi
175 +}
176 +
177 +src_compile() {
178 + default
179 + if use sieve || use managesieve ; then
180 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
181 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
182 + fi
183 +}
184 +
185 +src_test() {
186 + default
187 + if use sieve || use managesieve ; then
188 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
189 + default
190 + fi
191 +}
192 +
193 +src_install () {
194 + default
195 +
196 + # insecure:
197 + # use suid && fperms u+s /usr/libexec/dovecot/deliver
198 + # better:
199 + if use suid;then
200 + einfo "Changing perms to allow deliver to be suided"
201 + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
202 + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
203 + fi
204 +
205 + newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
206 +
207 + rm -rf "${ED}"/usr/share/doc/dovecot
208 +
209 + dodoc AUTHORS NEWS README TODO
210 + dodoc doc/*.{txt,cnf,xml,sh}
211 + docinto example-config
212 + dodoc doc/example-config/*.{conf,ext}
213 + docinto example-config/conf.d
214 + dodoc doc/example-config/conf.d/*.{conf,ext}
215 + docinto wiki
216 + dodoc doc/wiki/*
217 + doman doc/man/*.{1,7}
218 +
219 + # Create the dovecot.conf file from the dovecot-example.conf file that
220 + # the dovecot folks nicely left for us....
221 + local conf="${ED}/etc/dovecot/dovecot.conf"
222 + local confd="${ED}/etc/dovecot/conf.d"
223 +
224 + insinto /etc/dovecot
225 + doins doc/example-config/*.{conf,ext}
226 + insinto /etc/dovecot/conf.d
227 + doins doc/example-config/conf.d/*.{conf,ext}
228 + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
229 + rm -f "${confd}/../README"
230 +
231 + # .maildir is the Gentoo default
232 + local mail_location="maildir:~/.maildir"
233 + if ! use maildir; then
234 + if use mbox; then
235 + mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
236 + keepdir /var/dovecot
237 + sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
238 + "${confd}/10-mail.conf" || die "sed failed"
239 + elif use mdbox ; then
240 + mail_location="mdbox:~/.mdbox"
241 + elif use sdbox ; then
242 + mail_location="sdbox:~/.sdbox"
243 + fi
244 + fi
245 + sed -i -e \
246 + "s|#mail_location =|mail_location = ${mail_location}|" \
247 + "${confd}/10-mail.conf" \
248 + || die "failed to update mail location settings in 10-mail.conf"
249 +
250 + # We're using pam files (imap and pop3) provided by mailbase
251 + if use pam; then
252 + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
253 + "${confd}/auth-system.conf.ext" \
254 + || die "failed to update PAM settings in auth-system.conf.ext"
255 + # mailbase does not provide a sieve pam file
256 + use managesieve && dosym imap /etc/pam.d/sieve
257 + sed -i -e \
258 + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
259 + "${confd}/10-auth.conf" \
260 + || die "failed to update PAM settings in 10-auth.conf"
261 + fi
262 +
263 + # Disable ipv6 if necessary
264 + if ! use ipv6; then
265 + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
266 + || die "failed to update listen settings in dovecot.conf"
267 + fi
268 +
269 + # Update ssl cert locations
270 + if use ssl; then
271 + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
272 + || die "ssl conf failed"
273 + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
274 + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
275 + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
276 + fi
277 +
278 + # Install SQL configuration
279 + if use mysql || use postgres; then
280 + sed -i -e \
281 + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
282 + "${confd}/10-auth.conf" || die "failed to update SQL settings in \
283 + 10-auth.conf"
284 + fi
285 +
286 + # Install LDAP configuration
287 + if use ldap; then
288 + sed -i -e \
289 + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
290 + "${confd}/10-auth.conf" \
291 + || die "failed to update ldap settings in 10-auth.conf"
292 + fi
293 +
294 + if use vpopmail; then
295 + sed -i -e \
296 + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
297 + "${confd}/10-auth.conf" \
298 + || die "failed to update vpopmail settings in 10-auth.conf"
299 + fi
300 +
301 + if use sieve || use managesieve ; then
302 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
303 + emake DESTDIR="${ED}" install
304 + sed -i -e \
305 + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
306 + || die "failed to update sieve settings in 15-lda.conf"
307 + rm -rf "${ED}"/usr/share/doc/dovecot
308 + docinto example-config/conf.d
309 + dodoc doc/example-config/conf.d/*.conf
310 + insinto /etc/dovecot/conf.d
311 + doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
312 + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
313 + docinto sieve/rfc
314 + dodoc doc/rfc/*.txt
315 + docinto sieve/devel
316 + dodoc doc/devel/DESIGN
317 + docinto plugins
318 + dodoc doc/plugins/*.txt
319 + docinto extensions
320 + dodoc doc/extensions/*.txt
321 + docinto locations
322 + dodoc doc/locations/*.txt
323 + doman doc/man/*.{1,7}
324 + fi
325 +
326 + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
327 +}
328 +
329 +pkg_postinst() {
330 + if use ssl; then
331 + # Let's not make a new certificate if we already have one
332 + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
333 + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
334 + einfo "Creating SSL certificate"
335 + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
336 + install_cert /etc/ssl/dovecot/server
337 + fi
338 + fi
339 +
340 + elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
341 +}