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: Tue, 22 Jun 2021 11:47:04
Message-Id: 1624362411.9c780f4dbf6b8decf88015c43fbcd5ccd4fedc04.eras@gentoo
1 commit: 9c780f4dbf6b8decf88015c43fbcd5ccd4fedc04
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 22 11:46:25 2021 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 22 11:46:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c780f4d
7
8 net-mail/dovecot: bump to 2.3.15
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
12
13 net-mail/dovecot/Manifest | 2 +
14 net-mail/dovecot/dovecot-2.3.15.ebuild | 301 +++++++++++++++++++++
15 .../files/dovecot-autoconf-lua-version-v2.patch | 15 +
16 3 files changed, 318 insertions(+)
17
18 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
19 index 0005fd74913..1a54583afcc 100644
20 --- a/net-mail/dovecot/Manifest
21 +++ b/net-mail/dovecot/Manifest
22 @@ -1,5 +1,7 @@
23 DIST dovecot-2.3-pigeonhole-0.5.13.tar.gz 1908839 BLAKE2B 37fbd9d9b41ca1893c19ac546dd9b272b361752c70eed0596bbb743cd8c30d942427d5814ab551bb39eb844c7bd05074bb49b11a6b81747e2fc535b0f9993f14 SHA512 fcbc13d71af4e6dd4e34192484e203d755e5015da76a4774b11a79182b2baad36cab5a471346093111ace36a7775dfe8294555f8b777786dde386820b3ec5cd3
24 DIST dovecot-2.3-pigeonhole-0.5.14.tar.gz 1910607 BLAKE2B 5c08214535d298ce2b8defd8c945e96597a98bda6493a3e27481fdadc0e149e6dd01c6ececaa583dd331614669bd8e033cd1b91d64d03a9e0cdcef67fa9c27b8 SHA512 c5d5d309769eabe2c0971646d0c14d166b6b524acf59e1069eca803f764544fa2535c09c9a630ca706aa70442b688ee26af831d29e674823bac7ea7c0e1f33cc
25 +DIST dovecot-2.3-pigeonhole-0.5.15.tar.gz 1935601 BLAKE2B e26405cc9a93681206e27c2b548e3409ae4444c1c011127b27eda364fec27d572dc01c7ea63688693bde10a8b4086bf67e14bb67e917d62db426d8871d6af0ec SHA512 521070080802bf2a50cd0ff0af5dc991c04d70b807abc2cd9aa567444a4869f5f42800f19d9b740a519bd4069437139e70ca6ae4b905479fcec8faa133ac5f54
26 DIST dovecot-2.3.13.tar.gz 7456073 BLAKE2B 6cf3e7d9c6cf90279e0d72782cca88a11617f3f08e3c27da7948f46b8796575e42c776323cd56bc4208474831d4480afcac35ebe0b74d99db40acd4cda2279be SHA512 758a169fba8925637ed18fa7522a6f06c9fe01a1707b1ca0d0a4d8757c578a8e117c91733e8314403839f9a484bbcac71ce3532c82379eb583b480756d556a95
27 DIST dovecot-2.3.14.1.tar.gz 7534719 BLAKE2B 1ba5143711fe340b9fad61db41ba658485e42be52f3b0f196eeb9b8e4b7c1b865b6a08f879dadeb2db3979b17be34699ce5febc4545887307f62bd5b72076f86 SHA512 b71b82c2918ac9940ef6bc274bc9c2b3e56a08cf5054244d80547ad89c421b9180c5afa8b5b140831239fbe2cbeeceb83a0052e037eb198d8fc27d07cba4ba35
28 DIST dovecot-2.3.14.tar.gz 7483769 BLAKE2B bf2606ed64bef66fdeb165da65295031e692b7ba5186847c027adbd50093a9684b57eb724595c27838d91769e097ab2a82978ba845bf4e026dcfd78aa1372501 SHA512 69df234cb739c7ee7ae3acfb9756bc22481e94c95463d32bfac315c7ec4b1ba0dfbff552b769f2ab7ee554087ca2ebbe331aa008d3af26417016612dc7cad103
29 +DIST dovecot-2.3.15.tar.gz 7608561 BLAKE2B 85134064dbff0b4f50831a835fb6eafc92081d75d91ab331fa0ae79c453382a88485bad8c774491968b879478dc66841a9c6170e5931d562cf5eaa6af755440b SHA512 75bbdbeac663da109f78dba06c42bb5193e911c6b3c64f055fc4473ae9afaf0c8304c49fc7f06c5c6b61e67dd13dc21fbed6ff160a99f38f547c88ba05e6b03a
30
31 diff --git a/net-mail/dovecot/dovecot-2.3.15.ebuild b/net-mail/dovecot/dovecot-2.3.15.ebuild
32 new file mode 100644
33 index 00000000000..e249ee27c2d
34 --- /dev/null
35 +++ b/net-mail/dovecot/dovecot-2.3.15.ebuild
36 @@ -0,0 +1,301 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +LUA_COMPAT=( lua5-1 lua5-3 )
43 +# do not add a ssl USE flag. ssl is mandatory
44 +SSL_DEPS_SKIP=1
45 +inherit autotools lua-single ssl-cert systemd toolchain-funcs
46 +
47 +MY_P="${P/_/.}"
48 +#MY_S="${PN}-ce-${PV}"
49 +major_minor="$(ver_cut 1-2)"
50 +sieve_version="0.5.15"
51 +if [[ ${PV} == *_rc* ]]; then
52 + rc_dir="rc/"
53 +else
54 + rc_dir=""
55 +fi
56 +SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
57 + sieve? (
58 + https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
59 + )
60 + managesieve? (
61 + https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
62 + ) "
63 +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
64 +HOMEPAGE="https://www.dovecot.org/"
65 +
66 +SLOT="0"
67 +LICENSE="LGPL-2.1 MIT"
68 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
69 +
70 +IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite"
71 +IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib zstd"
72 +IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 lucene managesieve rpc
73 + selinux sieve solr static-libs suid systemd tcpd textcat unwind"
74 +
75 +IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
76 +
77 +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
78 +
79 +DEPEND="
80 + dev-libs/icu:=
81 + dev-libs/openssl:0=
82 + virtual/libiconv
83 + argon2? ( dev-libs/libsodium )
84 + bzip2? ( app-arch/bzip2 )
85 + caps? ( sys-libs/libcap )
86 + kerberos? ( virtual/krb5 )
87 + ldap? ( net-nds/openldap )
88 + lua? ( ${LUA_DEPS} )
89 + lucene? ( >=dev-cpp/clucene-2.3 )
90 + lz4? ( app-arch/lz4 )
91 + lzma? ( app-arch/xz-utils )
92 + mysql? ( dev-db/mysql-connector-c:0= )
93 + pam? ( sys-libs/pam )
94 + postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
95 + rpc? ( net-libs/libtirpc net-libs/rpcsvc-proto )
96 + selinux? ( sec-policy/selinux-dovecot )
97 + solr? ( net-misc/curl dev-libs/expat )
98 + sqlite? ( dev-db/sqlite:* )
99 + suid? ( acct-group/mail )
100 + systemd? ( sys-apps/systemd:= )
101 + tcpd? ( sys-apps/tcp-wrappers )
102 + textcat? ( app-text/libexttextcat )
103 + unwind? ( sys-libs/libunwind )
104 + zlib? ( sys-libs/zlib )
105 + zstd? ( app-arch/zstd )
106 + "
107 +
108 +RDEPEND="
109 + ${DEPEND}
110 + acct-group/dovecot
111 + acct-group/dovenull
112 + acct-user/dovecot
113 + acct-user/dovenull
114 + net-mail/mailbase
115 + "
116 +
117 +S="${WORKDIR}/${MY_P}"
118 +
119 +PATCHES=(
120 + "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch
121 + "${FILESDIR}/${PN}"-socket-name-too-long.patch
122 +)
123 +
124 +pkg_setup() {
125 + use lua && lua-single_pkg_setup
126 + if use managesieve && ! use sieve; then
127 + ewarn "managesieve USE flag selected but sieve USE flag unselected"
128 + ewarn "sieve USE flag will be turned on"
129 + fi
130 +}
131 +
132 +src_prepare() {
133 + default
134 + # bug 657108
135 + #elibtoolize
136 + eautoreconf
137 +}
138 +
139 +src_configure() {
140 + local conf=""
141 +
142 + if use postgres || use mysql || use sqlite; then
143 + conf="${conf} --with-sql"
144 + fi
145 +
146 + # turn valgrind tests off. Bug #340791
147 + VALGRIND=no \
148 + LUAPC="${ELUA}" \
149 + systemdsystemunitdir="$(systemd_get_systemunitdir)" \
150 + econf \
151 + --with-rundir="${EPREFIX}/run/dovecot" \
152 + --with-statedir="${EPREFIX}/var/lib/dovecot" \
153 + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
154 + --without-stemmer \
155 + --disable-rpath \
156 + --without-libbsd \
157 + --with-icu \
158 + --with-ssl \
159 + $( use_with argon2 sodium ) \
160 + $( use_with bzip2 bzlib ) \
161 + $( use_with caps libcap ) \
162 + $( use_with kerberos gssapi ) \
163 + $( use_with lua ) \
164 + $( use_with ldap ) \
165 + $( use_with lucene ) \
166 + $( use_with lz4 ) \
167 + $( use_with lzma ) \
168 + $( use_with mysql ) \
169 + $( use_with pam ) \
170 + $( use_with postgres pgsql ) \
171 + $( use_with sqlite ) \
172 + $( use_with solr ) \
173 + $( use_with systemd ) \
174 + $( use_with tcpd libwrap ) \
175 + $( use_with textcat ) \
176 + $( use_with unwind libunwind ) \
177 + $( use_with zlib ) \
178 + $( use_with zstd ) \
179 + $( use_enable static-libs static ) \
180 + ${conf}
181 +
182 + if use sieve || use managesieve; then
183 + # The sieve plugin needs this file to be build to determine the plugin
184 + # directory and the list of libraries to link to.
185 + emake dovecot-config
186 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
187 + econf \
188 + $( use_enable static-libs static ) \
189 + --localstatedir="${EPREFIX}/var" \
190 + --enable-shared \
191 + --with-dovecot="${S}" \
192 + $( use_with managesieve )
193 + fi
194 +}
195 +
196 +src_compile() {
197 + default
198 + if use sieve || use managesieve; then
199 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
200 + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
201 + fi
202 +}
203 +
204 +src_test() {
205 + default
206 + if use sieve || use managesieve; then
207 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
208 + default
209 + fi
210 +}
211 +
212 +src_install() {
213 + default
214 +
215 + # insecure:
216 + # use suid && fperms u+s /usr/libexec/dovecot/deliver
217 + # better:
218 + if use suid; then
219 + einfo "Changing perms to allow deliver to be suided"
220 + fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
221 + fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
222 + fi
223 +
224 + newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
225 +
226 + rm -rf "${ED}"/usr/share/doc/dovecot
227 +
228 + dodoc AUTHORS NEWS README TODO
229 + dodoc doc/*.{txt,cnf,xml,sh}
230 + docinto example-config
231 + dodoc doc/example-config/*.{conf,ext}
232 + docinto example-config/conf.d
233 + dodoc doc/example-config/conf.d/*.{conf,ext}
234 + docinto wiki
235 + dodoc doc/wiki/*
236 + doman doc/man/*.{1,7}
237 +
238 + # Create the dovecot.conf file from the dovecot-example.conf file that
239 + # the dovecot folks nicely left for us....
240 + local conf="${ED}/etc/dovecot/dovecot.conf"
241 + local confd="${ED}/etc/dovecot/conf.d"
242 +
243 + insinto /etc/dovecot
244 + doins doc/example-config/*.{conf,ext}
245 + insinto /etc/dovecot/conf.d
246 + doins doc/example-config/conf.d/*.{conf,ext}
247 + fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
248 + rm -f "${confd}/../README"
249 +
250 + # .maildir is the Gentoo default
251 + local mail_location="maildir:~/.maildir"
252 + sed -i -e \
253 + "s|#mail_location =|mail_location = ${mail_location}|" \
254 + "${confd}/10-mail.conf" \
255 + || die "failed to update mail location settings in 10-mail.conf"
256 +
257 + # We're using pam files (imap and pop3) provided by mailbase
258 + if use pam; then
259 + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
260 + "${confd}/auth-system.conf.ext" \
261 + || die "failed to update PAM settings in auth-system.conf.ext"
262 + # mailbase does not provide a sieve pam file
263 + use managesieve && dosym imap /etc/pam.d/sieve
264 + sed -i -e \
265 + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
266 + "${confd}/10-auth.conf" \
267 + || die "failed to update PAM settings in 10-auth.conf"
268 + fi
269 +
270 + # Disable ipv6 if necessary
271 + if ! use ipv6; then
272 + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
273 + || die "failed to update listen settings in dovecot.conf"
274 + fi
275 +
276 + # Update ssl cert locations
277 + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
278 + || die "ssl conf failed"
279 + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
280 + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
281 + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
282 +
283 + # Install SQL configuration
284 + if use mysql || use postgres; then
285 + sed -i -e \
286 + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
287 + "${confd}/10-auth.conf" || die "failed to update SQL settings in \
288 + 10-auth.conf"
289 + fi
290 +
291 + # Install LDAP configuration
292 + if use ldap; then
293 + sed -i -e \
294 + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
295 + "${confd}/10-auth.conf" \
296 + || die "failed to update ldap settings in 10-auth.conf"
297 + fi
298 +
299 + if use sieve || use managesieve; then
300 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
301 + emake DESTDIR="${ED}" install
302 + sed -i -e \
303 + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
304 + || die "failed to update sieve settings in 15-lda.conf"
305 + rm -rf "${ED}"/usr/share/doc/dovecot
306 + docinto example-config/conf.d
307 + dodoc doc/example-config/conf.d/*.conf
308 + insinto /etc/dovecot/conf.d
309 + doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
310 + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
311 + docinto sieve/rfc
312 + dodoc doc/rfc/*.txt
313 + docinto sieve/devel
314 + dodoc doc/devel/DESIGN
315 + docinto plugins
316 + dodoc doc/plugins/*.txt
317 + docinto extensions
318 + dodoc doc/extensions/*.txt
319 + docinto locations
320 + dodoc doc/locations/*.txt
321 + doman doc/man/*.{1,7}
322 + fi
323 +
324 + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
325 +}
326 +
327 +pkg_postinst() {
328 + # Let's not make a new certificate if we already have one
329 + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
330 + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
331 + einfo "Creating SSL certificate"
332 + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
333 + install_cert /etc/ssl/dovecot/server
334 + fi
335 +
336 + elog "Please read https://doc.dovecot.org/installation_guide/upgrading/ for upgrade notes."
337 +}
338
339 diff --git a/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch
340 new file mode 100644
341 index 00000000000..7ba19a4c74a
342 --- /dev/null
343 +++ b/net-mail/dovecot/files/dovecot-autoconf-lua-version-v2.patch
344 @@ -0,0 +1,15 @@
345 +--- a/m4/want_lua.m4 2021-06-14 16:40:37.000000000 +0300
346 ++++ b/m4/want_lua.m4 2021-06-22 10:24:39.036095013 +0300
347 +@@ -16,12 +16,10 @@
348 + AS_IF([test -n "$LUA_CFLAGS" -o -n "$LUA_LIBS"], [
349 + with_lua=yes
350 + ], [
351 +- for LUAPC in lua5.3 lua-5.3 lua53 lua5.1 lua-5.1 lua51 lua; do
352 + PKG_CHECK_MODULES([LUA], [$LUAPC >= 5.1 $LUAPC != 5.2] , [
353 + with_lua=yes
354 + ], [LUAPC=""]) # otherwise pkg_check will fail
355 + if test "x$LUA_LIBS" != "x"; then break; fi
356 +- done
357 + ])
358 + ])
359 +