Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/dovecot/
Date: Wed, 28 Jun 2017 06:52:42
Message-Id: 1498632735.36dff6cbaec39cf44784d5b77c69ae9155e3090f.eras@gentoo
1 commit: 36dff6cbaec39cf44784d5b77c69ae9155e3090f
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 28 06:52:15 2017 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 28 06:52:15 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36dff6cb
7
8 net-mail/dovecot: bump to 2.2.31
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 net-mail/dovecot/Manifest | 2 +
13 net-mail/dovecot/dovecot-2.2.31.ebuild | 290 +++++++++++++++++++++++++++++++++
14 2 files changed, 292 insertions(+)
15
16 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
17 index ec89e081449..27158bf1c90 100644
18 --- a/net-mail/dovecot/Manifest
19 +++ b/net-mail/dovecot/Manifest
20 @@ -1,6 +1,8 @@
21 DIST dovecot-2.2-pigeonhole-0.4.18.tar.gz 1742357 SHA256 dd871bb57fad22795460f613f3c9484a8bf229272ac00956d837a34444f1c3a9 SHA512 6f49a6a6435b0e4dcbe29f852ce17c016df2f367f5460301a2a2c6bd5f5ba6260b23bfe1c5e78b91c6041554ee67d1ce14ad3adf219505f692c61681d9e70cc4 WHIRLPOOL 809ca6efbdf8688087bbfa48902d7c5467a5313135ce23d621eb84541854140e48c94e7ce8180f9e64816df8c1faf85a8cb42c29bf749da1eb7ebfb125469080
22 +DIST dovecot-2.2-pigeonhole-0.4.19.tar.gz 1743025 SHA256 629204bfbdcd3480e1ebcdc246da438323c3ea5fea57480ab859e8b201ad8793 SHA512 c1211a3c65b25995770309c427ec5cd888ddb962f2f64884640163b492a11ffa8937aac1eb66d25e48f0e00131da1cc98c1cb307781576780de47b8816333ff1 WHIRLPOOL 67867f93b5b4e0c1d73d9312ec47b135ffacdfd7e74329bdcb94cdbfbe2f5309189b562719db8b79c6a5581796627155f57fccddf2775110209ab536f85d8289
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.29.1.tar.gz 5972119 SHA256 ccfa9ffb7eb91e9e87c21c108324b911250c9ffa838bffb64b1caafadcb0f388 SHA512 1e5ea6080ebe7dd4afe6fcfe8e98ed6d2ad2735655a18cc96e439dd044ccc3a1a6a80428bc746b4d6250820895d6a62121562e97e4b46c8b1cf88a19443bc111 WHIRLPOOL 97a3b45191a32e78a08b4113a6e8b34e0bc538ec8359210d0bdf63990246af89be25cdaf9017c46f3107a7ec82758fa25820d61c25eda94f14ce7351d3aaea7a
26 DIST dovecot-2.2.30.1.tar.gz 6004223 SHA256 9049db49f7ccd76850a17872896dfb8778676bab38454575f59bb39f16b083a4 SHA512 f95e85093e1f671b1e9d067974880eaaf8ab021df1f6d298977c40146a1db2a2b71b4029842785ffaae1aeedec83b2218ff03112537045e08dfc7c845f9e27c3 WHIRLPOOL c4c180b3f92c5af832e6da95173eacf52e16680221968d03c62cec59d96fde84975c81687a2bd256c4f2ed4720690b278f4f706bc0d16710f6b043a6bb348797
27 DIST dovecot-2.2.30.2.tar.gz 6008134 SHA256 f3dba79c1ceeaa9dd0633f648d3a607704bf3d0591e7d48168084c8add87189e SHA512 740118e3081864234168593bd83f2f5e7b9f5c7cefff3a3a7795369cf791f300c0881fbfacae2c76c0bb42e366ad26e7613c487708d113b19887ebe869d711ea WHIRLPOOL 34eaa59d3cbd837ae92aa9e7e3640cfd181ff2ce01ab80aa27143cb70987e4e5e1369ace7f5d7f2cf7f564a3e26e8c31368d0e60a1716abfed250dc812af0dcb
28 +DIST dovecot-2.2.31.tar.gz 5993283 SHA256 034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1 SHA512 071797e260a75de9117b03c0fa9d903de82b1f1c039c2aece2d7313587e6673c49174bfce17b80fe3f3725fcbc42ed3a1bd1f1c22efef5bc016752277eff3266 WHIRLPOOL cc54758f65cc1f6295cc5533dd784b888d53d9b884016de08ddd16d893f3dc43df2cff87e474dd9f0f4b9df1c90f62330f7c70f051497f34729829849b39e519
29
30 diff --git a/net-mail/dovecot/dovecot-2.2.31.ebuild b/net-mail/dovecot/dovecot-2.2.31.ebuild
31 new file mode 100644
32 index 00000000000..f5c76655ad2
33 --- /dev/null
34 +++ b/net-mail/dovecot/dovecot-2.2.31.ebuild
35 @@ -0,0 +1,290 @@
36 +# Copyright 1999-2017 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +inherit ssl-cert systemd user versionator
41 +
42 +MY_P="${P/_/.}"
43 +major_minor="$(get_version_component_range 1-2)"
44 +sieve_version="0.4.19"
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="http://www.dovecot.org/"
59 +
60 +SLOT="0"
61 +LICENSE="LGPL-2.1 MIT"
62 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~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 +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 +# Dovecot does not support building without ssl. Force it for now
98 +REQUIRED_USE="ssl"
99 +
100 +S=${WORKDIR}/${MY_P}
101 +
102 +pkg_setup() {
103 + if use managesieve && ! use sieve; then
104 + ewarn "managesieve USE flag selected but sieve USE flag unselected"
105 + ewarn "sieve USE flag will be turned on"
106 + fi
107 + # default internal user
108 + enewgroup dovecot 97
109 + enewuser dovecot 97 -1 /dev/null dovecot
110 + # default login user
111 + enewuser dovenull -1 -1 /dev/null
112 + # add "mail" group for suid'ing. Better security isolation.
113 + if use suid; then
114 + enewgroup mail
115 + fi
116 +}
117 +
118 +src_prepare() {
119 + eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch"
120 + eapply_user
121 +}
122 +
123 +src_configure() {
124 + local conf=""
125 +
126 + if use postgres || use mysql || use sqlite; then
127 + conf="${conf} --with-sql"
128 + fi
129 +
130 + # turn valgrind tests off. Bug #340791
131 + VALGRIND=no econf \
132 + --localstatedir="${EPREFIX}/var" \
133 + --runstatedir="${EPREFIX}/run" \
134 + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
135 + --without-stemmer \
136 + --disable-rpath \
137 + --with-icu \
138 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
139 + $( use_with bzip2 bzlib ) \
140 + $( use_with caps libcap ) \
141 + $( use_with kerberos gssapi ) \
142 + $( use_with ldap ) \
143 + $( use_with lucene ) \
144 + $( use_with lz4 ) \
145 + $( use_with lzma ) \
146 + $( use_with mysql ) \
147 + $( use_with pam ) \
148 + $( use_with postgres pgsql ) \
149 + $( use_with sqlite ) \
150 + $( use_with solr ) \
151 + $( use_with ssl ) \
152 + $( use_with tcpd libwrap ) \
153 + $( use_with textcat ) \
154 + $( use_with vpopmail ) \
155 + $( use_with zlib ) \
156 + $( use_enable static-libs static ) \
157 + ${conf}
158 +
159 + if use sieve || use managesieve ; then
160 + # The sieve plugin needs this file to be build to determine the plugin
161 + # directory and the list of libraries to link to.
162 + emake dovecot-config
163 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
164 + econf \
165 + $( use_enable static-libs static ) \
166 + --localstatedir="${EPREFIX}/var" \
167 + --enable-shared \
168 + --with-dovecot="../${MY_P}" \
169 + $( use_with managesieve )
170 + fi
171 +}
172 +
173 +src_compile() {
174 + default
175 + if use sieve || use managesieve ; then
176 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
177 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
178 + fi
179 +}
180 +
181 +src_test() {
182 + default
183 + if use sieve || use managesieve ; then
184 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
185 + default
186 + fi
187 +}
188 +
189 +src_install () {
190 + default
191 +
192 + # insecure:
193 + # use suid && fperms u+s /usr/libexec/dovecot/deliver
194 + # better:
195 + if use suid;then
196 + einfo "Changing perms to allow deliver to be suided"
197 + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
198 + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
199 + fi
200 +
201 + newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
202 +
203 + rm -rf "${ED}"/usr/share/doc/dovecot
204 +
205 + dodoc AUTHORS NEWS README TODO
206 + dodoc doc/*.{txt,cnf,xml,sh}
207 + docinto example-config
208 + dodoc doc/example-config/*.{conf,ext}
209 + docinto example-config/conf.d
210 + dodoc doc/example-config/conf.d/*.{conf,ext}
211 + docinto wiki
212 + dodoc doc/wiki/*
213 + doman doc/man/*.{1,7}
214 +
215 + # Create the dovecot.conf file from the dovecot-example.conf file that
216 + # the dovecot folks nicely left for us....
217 + local conf="${ED}/etc/dovecot/dovecot.conf"
218 + local confd="${ED}/etc/dovecot/conf.d"
219 +
220 + insinto /etc/dovecot
221 + doins doc/example-config/*.{conf,ext}
222 + insinto /etc/dovecot/conf.d
223 + doins doc/example-config/conf.d/*.{conf,ext}
224 + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
225 + rm -f "${confd}/../README"
226 +
227 + # .maildir is the Gentoo default
228 + local mail_location="maildir:~/.maildir"
229 + sed -i -e \
230 + "s|#mail_location =|mail_location = ${mail_location}|" \
231 + "${confd}/10-mail.conf" \
232 + || die "failed to update mail location settings in 10-mail.conf"
233 +
234 + # We're using pam files (imap and pop3) provided by mailbase
235 + if use pam; then
236 + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
237 + "${confd}/auth-system.conf.ext" \
238 + || die "failed to update PAM settings in auth-system.conf.ext"
239 + # mailbase does not provide a sieve pam file
240 + use managesieve && dosym imap /etc/pam.d/sieve
241 + sed -i -e \
242 + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
243 + "${confd}/10-auth.conf" \
244 + || die "failed to update PAM settings in 10-auth.conf"
245 + fi
246 +
247 + # Disable ipv6 if necessary
248 + if ! use ipv6; then
249 + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
250 + || die "failed to update listen settings in dovecot.conf"
251 + fi
252 +
253 + # Update ssl cert locations
254 + if use ssl; then
255 + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
256 + || die "ssl conf failed"
257 + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
258 + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
259 + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
260 + fi
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 + if use ssl; then
315 + # Let's not make a new certificate if we already have one
316 + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
317 + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
318 + einfo "Creating SSL certificate"
319 + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
320 + install_cert /etc/ssl/dovecot/server
321 + fi
322 + fi
323 +
324 + elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
325 +}