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