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