1 |
commit: 56c25600633c2dc610e82f9d3d324face655e7cd |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 4 07:33:03 2017 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 4 07:33:03 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56c25600 |
7 |
|
8 |
net-mail/dovecot: remove vulnerable versions |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
net-mail/dovecot/Manifest | 4 - |
13 |
net-mail/dovecot/dovecot-2.2.27.ebuild | 307 --------------------------------- |
14 |
net-mail/dovecot/dovecot-2.2.28.ebuild | 307 --------------------------------- |
15 |
3 files changed, 618 deletions(-) |
16 |
|
17 |
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest |
18 |
index 7d880422d11..443adbf17fe 100644 |
19 |
--- a/net-mail/dovecot/Manifest |
20 |
+++ b/net-mail/dovecot/Manifest |
21 |
@@ -1,8 +1,4 @@ |
22 |
-DIST dovecot-2.2-pigeonhole-0.4.16.tar.gz 1713634 SHA256 8f0b98f18062d6e241eef74ebe16cc167cd246361cbe6657d94f0ecc5d7d3234 SHA512 5f59fb35dbe638f8ddd19c0fd0f3fbd6fec1fa238f3781b94c50a8f7ce72a53ac1381a6f8ad9bcc90df1edfa2b263a6dfba88521578e55ce4b3d840bed022b79 WHIRLPOOL 5e037d1e271b9c12a111966306c30536035126e9ba1213697804614d8a3d38996b117b37a744cb5b97873e136bddf110177c501d46c5ce0ffd2110932b911f00 |
23 |
-DIST dovecot-2.2-pigeonhole-0.4.17.tar.gz 1787177 SHA256 74d869c7532cbf4fe41e3cc95a1aa6ce32e98f4d423f0d099da1e0fba022dae3 SHA512 3ea6faebf04154649c32612f204e909aa131582c99867865bff3d3a78a75593d96109586eeb6403bc915046b8b6f02e8bacbf6cb6733ea186d2e1a209a7e2b79 WHIRLPOOL bccf0c679c627cd791af69e8f7efa232b6448d7246af0108c3917ab9f65fc16ca860240c8b69fa8dda23d7b3b485fc9527bfca33bc49b42a10d84a29897a2a3b |
24 |
DIST dovecot-2.2-pigeonhole-0.4.18.tar.gz 1742357 SHA256 dd871bb57fad22795460f613f3c9484a8bf229272ac00956d837a34444f1c3a9 SHA512 6f49a6a6435b0e4dcbe29f852ce17c016df2f367f5460301a2a2c6bd5f5ba6260b23bfe1c5e78b91c6041554ee67d1ce14ad3adf219505f692c61681d9e70cc4 WHIRLPOOL 809ca6efbdf8688087bbfa48902d7c5467a5313135ce23d621eb84541854140e48c94e7ce8180f9e64816df8c1faf85a8cb42c29bf749da1eb7ebfb125469080 |
25 |
DIST dovecot-2.2-pigeonhole-0.4.9.tar.gz 1577127 SHA256 82892f876d26008a076973dfddf1cffaf5a0451825fd44e06287e94b89078649 SHA512 9e7a18b43d59ed955b142d16696ca221822a547ea59ac70c1bb374eedb28b6ed99ea49f34ead1f9a16ded4573605e410a5cc8e038e1bdf5f943a65588b5d3af2 WHIRLPOOL be309436b43af82a7cb8eff205e1638b2c59751927fdab187e6fde72330e4abd99878cbfa94ca50440ec8de1f9b569bf334d426891ddc73d5f647ee2040c193f |
26 |
DIST dovecot-2.2.19.tar.gz 5256627 SHA256 759e1e3f9d907cdaabad1f5fbacc793ca191d234c084bec3bba42966952a4e9f SHA512 1b9d605a6a5862ade9d1ca634a9e0171b7c212ab025fc2059051c3795470685b66516fa9fbe5ad91d84388268ea15795f2dcd70ffdf81736ce4d80fd284835e9 WHIRLPOOL 30dbe70bfeef10dbe414ebf3f091041ad66926a8748cd401ecaf9ed5c7602939e86943d98bfb839f32c0aa1d0081ab71adacf23bb4adba34e828ee296e9a7278 |
27 |
-DIST dovecot-2.2.27.tar.gz 5794668 SHA256 897f92a87cda4b27b243f8149ce0ba7b7e71a2be8fb7994eb0a025e54cde18e9 SHA512 faab441bb2afa1e6de3e6ec6207c92a333773941bbc10c4761483ef6ccc193d3a4983de1acc73325122c22b197ea25c1e54886cccfb6b060ede90936a69b71f2 WHIRLPOOL dd17a079118a300a56b26c48c152e44267f69a2138af066944a207ca5851c4b430a40c8553a794061321b67b2e5d7f721ba897b7a17826651c884db72e6d4424 |
28 |
-DIST dovecot-2.2.28.tar.gz 5921992 SHA256 e0288f59e326ab87cb3881fdabadafe542f4dc7ab9996db13863a439ebbc1f25 SHA512 3f40eb52413130dd47da98470d797ede63db3296923c2888b48f1a021e473cfcad064671ad804037d101990457ee57def30f2c27010ede2d758f3d3cfd8ef741 WHIRLPOOL cb92cdafcbfa2d42d9a7c16d20495e3d6828c8f836341a736d740df51e246c40f75417d8959bd5c9a4429f2217790f0edde262806d62a643a8d0da8b76db9600 |
29 |
DIST dovecot-2.2.29.1.tar.gz 5972119 SHA256 ccfa9ffb7eb91e9e87c21c108324b911250c9ffa838bffb64b1caafadcb0f388 SHA512 1e5ea6080ebe7dd4afe6fcfe8e98ed6d2ad2735655a18cc96e439dd044ccc3a1a6a80428bc746b4d6250820895d6a62121562e97e4b46c8b1cf88a19443bc111 WHIRLPOOL 97a3b45191a32e78a08b4113a6e8b34e0bc538ec8359210d0bdf63990246af89be25cdaf9017c46f3107a7ec82758fa25820d61c25eda94f14ce7351d3aaea7a |
30 |
|
31 |
diff --git a/net-mail/dovecot/dovecot-2.2.27.ebuild b/net-mail/dovecot/dovecot-2.2.27.ebuild |
32 |
deleted file mode 100644 |
33 |
index 8ea052c39dd..00000000000 |
34 |
--- a/net-mail/dovecot/dovecot-2.2.27.ebuild |
35 |
+++ /dev/null |
36 |
@@ -1,307 +0,0 @@ |
37 |
-# Copyright 1999-2017 Gentoo Foundation |
38 |
-# Distributed under the terms of the GNU General Public License v2 |
39 |
- |
40 |
-EAPI=6 |
41 |
-inherit ssl-cert systemd user versionator |
42 |
- |
43 |
-MY_P="${P/_/.}" |
44 |
-major_minor="$(get_version_component_range 1-2)" |
45 |
-sieve_version="0.4.16" |
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}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
54 |
- ) |
55 |
- managesieve? ( |
56 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${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 ppc ppc64 ~s390 x86" |
64 |
- |
65 |
-IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail" |
66 |
-IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox" |
67 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib" |
68 |
-IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat" |
69 |
- |
70 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
71 |
- |
72 |
-DEPEND="bzip2? ( app-arch/bzip2 ) |
73 |
- caps? ( sys-libs/libcap ) |
74 |
- kerberos? ( virtual/krb5 ) |
75 |
- ldap? ( net-nds/openldap ) |
76 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
77 |
- lzma? ( app-arch/xz-utils ) |
78 |
- lz4? ( app-arch/lz4 ) |
79 |
- mysql? ( virtual/mysql ) |
80 |
- pam? ( virtual/pam ) |
81 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
82 |
- selinux? ( sec-policy/selinux-dovecot ) |
83 |
- solr? ( net-misc/curl dev-libs/expat ) |
84 |
- sqlite? ( dev-db/sqlite:* ) |
85 |
- ssl? ( |
86 |
- !libressl? ( dev-libs/openssl:0 ) |
87 |
- libressl? ( dev-libs/libressl ) |
88 |
- ) |
89 |
- tcpd? ( sys-apps/tcp-wrappers ) |
90 |
- textcat? ( app-text/libexttextcat ) |
91 |
- vpopmail? ( net-mail/vpopmail ) |
92 |
- zlib? ( sys-libs/zlib ) |
93 |
- virtual/libiconv |
94 |
- dev-libs/icu:=" |
95 |
- |
96 |
-RDEPEND="${DEPEND} |
97 |
- net-mail/mailbase" |
98 |
- |
99 |
-S=${WORKDIR}/${MY_P} |
100 |
- |
101 |
-pkg_setup() { |
102 |
- if use managesieve && ! use sieve; then |
103 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
104 |
- ewarn "sieve USE flag will be turned on" |
105 |
- fi |
106 |
- # default internal user |
107 |
- enewgroup dovecot 97 |
108 |
- enewuser dovecot 97 -1 /dev/null dovecot |
109 |
- # default login user |
110 |
- enewuser dovenull -1 -1 /dev/null |
111 |
- # add "mail" group for suid'ing. Better security isolation. |
112 |
- if use suid; then |
113 |
- enewgroup mail |
114 |
- fi |
115 |
-} |
116 |
- |
117 |
-src_prepare() { |
118 |
- eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch" |
119 |
- eapply_user |
120 |
-} |
121 |
- |
122 |
-src_configure() { |
123 |
- local conf="" |
124 |
- |
125 |
- if use postgres || use mysql || use sqlite; then |
126 |
- conf="${conf} --with-sql" |
127 |
- fi |
128 |
- |
129 |
- local storages="" |
130 |
- for storage in ${IUSE_DOVECOT_STORAGE//+/}; do |
131 |
- use ${storage} && storages="${storage} ${storages}" |
132 |
- done |
133 |
- [ "${storages}" ] || storages="maildir" |
134 |
- |
135 |
- # turn valgrind tests off. Bug #340791 |
136 |
- VALGRIND=no econf \ |
137 |
- --localstatedir="${EPREFIX}/var" \ |
138 |
- --runstatedir="${EPREFIX}/run" \ |
139 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
140 |
- --without-stemmer \ |
141 |
- --with-storages="${storages}" \ |
142 |
- --disable-rpath \ |
143 |
- --with-icu \ |
144 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
145 |
- $( use_with bzip2 bzlib ) \ |
146 |
- $( use_with caps libcap ) \ |
147 |
- $( use_with kerberos gssapi ) \ |
148 |
- $( use_with ldap ) \ |
149 |
- $( use_with lucene ) \ |
150 |
- $( use_with lz4 ) \ |
151 |
- $( use_with lzma ) \ |
152 |
- $( use_with mysql ) \ |
153 |
- $( use_with pam ) \ |
154 |
- $( use_with postgres pgsql ) \ |
155 |
- $( use_with sqlite ) \ |
156 |
- $( use_with solr ) \ |
157 |
- $( use_with ssl ) \ |
158 |
- $( use_with tcpd libwrap ) \ |
159 |
- $( use_with textcat ) \ |
160 |
- $( use_with vpopmail ) \ |
161 |
- $( use_with zlib ) \ |
162 |
- $( use_enable static-libs static ) \ |
163 |
- ${conf} |
164 |
- |
165 |
- if use sieve || use managesieve ; then |
166 |
- # The sieve plugin needs this file to be build to determine the plugin |
167 |
- # directory and the list of libraries to link to. |
168 |
- emake dovecot-config |
169 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
170 |
- econf \ |
171 |
- $( use_enable static-libs static ) \ |
172 |
- --localstatedir="${EPREFIX}/var" \ |
173 |
- --enable-shared \ |
174 |
- --with-dovecot="../${MY_P}" \ |
175 |
- $( use_with managesieve ) |
176 |
- fi |
177 |
-} |
178 |
- |
179 |
-src_compile() { |
180 |
- default |
181 |
- if use sieve || use managesieve ; then |
182 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
183 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
184 |
- fi |
185 |
-} |
186 |
- |
187 |
-src_test() { |
188 |
- default |
189 |
- if use sieve || use managesieve ; then |
190 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
191 |
- default |
192 |
- fi |
193 |
-} |
194 |
- |
195 |
-src_install () { |
196 |
- default |
197 |
- |
198 |
- # insecure: |
199 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
200 |
- # better: |
201 |
- if use suid;then |
202 |
- einfo "Changing perms to allow deliver to be suided" |
203 |
- fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" |
204 |
- fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" |
205 |
- fi |
206 |
- |
207 |
- newinitd "${FILESDIR}"/dovecot.init-r4 dovecot |
208 |
- |
209 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
210 |
- |
211 |
- dodoc AUTHORS NEWS README TODO |
212 |
- dodoc doc/*.{txt,cnf,xml,sh} |
213 |
- docinto example-config |
214 |
- dodoc doc/example-config/*.{conf,ext} |
215 |
- docinto example-config/conf.d |
216 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
217 |
- docinto wiki |
218 |
- dodoc doc/wiki/* |
219 |
- doman doc/man/*.{1,7} |
220 |
- |
221 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
222 |
- # the dovecot folks nicely left for us.... |
223 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
224 |
- local confd="${ED}/etc/dovecot/conf.d" |
225 |
- |
226 |
- insinto /etc/dovecot |
227 |
- doins doc/example-config/*.{conf,ext} |
228 |
- insinto /etc/dovecot/conf.d |
229 |
- doins doc/example-config/conf.d/*.{conf,ext} |
230 |
- fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext |
231 |
- rm -f "${confd}/../README" |
232 |
- |
233 |
- # .maildir is the Gentoo default |
234 |
- local mail_location="maildir:~/.maildir" |
235 |
- if ! use maildir; then |
236 |
- if use mbox; then |
237 |
- mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
238 |
- keepdir /var/dovecot |
239 |
- sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \ |
240 |
- "${confd}/10-mail.conf" || die "sed failed" |
241 |
- elif use mdbox ; then |
242 |
- mail_location="mdbox:~/.mdbox" |
243 |
- elif use sdbox ; then |
244 |
- mail_location="sdbox:~/.sdbox" |
245 |
- fi |
246 |
- fi |
247 |
- sed -i -e \ |
248 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
249 |
- "${confd}/10-mail.conf" \ |
250 |
- || die "failed to update mail location settings in 10-mail.conf" |
251 |
- |
252 |
- # We're using pam files (imap and pop3) provided by mailbase |
253 |
- if use pam; then |
254 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
255 |
- "${confd}/auth-system.conf.ext" \ |
256 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
257 |
- # mailbase does not provide a sieve pam file |
258 |
- use managesieve && dosym imap /etc/pam.d/sieve |
259 |
- sed -i -e \ |
260 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
261 |
- "${confd}/10-auth.conf" \ |
262 |
- || die "failed to update PAM settings in 10-auth.conf" |
263 |
- fi |
264 |
- |
265 |
- # Disable ipv6 if necessary |
266 |
- if ! use ipv6; then |
267 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
268 |
- || die "failed to update listen settings in dovecot.conf" |
269 |
- fi |
270 |
- |
271 |
- # Update ssl cert locations |
272 |
- if use ssl; then |
273 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
274 |
- || die "ssl conf failed" |
275 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
276 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
277 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
278 |
- fi |
279 |
- |
280 |
- # Install SQL configuration |
281 |
- if use mysql || use postgres; then |
282 |
- sed -i -e \ |
283 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
284 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
285 |
- 10-auth.conf" |
286 |
- fi |
287 |
- |
288 |
- # Install LDAP configuration |
289 |
- if use ldap; then |
290 |
- sed -i -e \ |
291 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
292 |
- "${confd}/10-auth.conf" \ |
293 |
- || die "failed to update ldap settings in 10-auth.conf" |
294 |
- fi |
295 |
- |
296 |
- if use vpopmail; then |
297 |
- sed -i -e \ |
298 |
- 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
299 |
- "${confd}/10-auth.conf" \ |
300 |
- || die "failed to update vpopmail settings in 10-auth.conf" |
301 |
- fi |
302 |
- |
303 |
- if use sieve || use managesieve ; then |
304 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
305 |
- emake DESTDIR="${ED}" install |
306 |
- sed -i -e \ |
307 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
308 |
- || die "failed to update sieve settings in 15-lda.conf" |
309 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
310 |
- docinto example-config/conf.d |
311 |
- dodoc doc/example-config/conf.d/*.conf |
312 |
- insinto /etc/dovecot/conf.d |
313 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
314 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
315 |
- docinto sieve/rfc |
316 |
- dodoc doc/rfc/*.txt |
317 |
- docinto sieve/devel |
318 |
- dodoc doc/devel/DESIGN |
319 |
- docinto plugins |
320 |
- dodoc doc/plugins/*.txt |
321 |
- docinto extensions |
322 |
- dodoc doc/extensions/*.txt |
323 |
- docinto locations |
324 |
- dodoc doc/locations/*.txt |
325 |
- doman doc/man/*.{1,7} |
326 |
- fi |
327 |
- |
328 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
329 |
-} |
330 |
- |
331 |
-pkg_postinst() { |
332 |
- if use ssl; then |
333 |
- # Let's not make a new certificate if we already have one |
334 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
335 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
336 |
- einfo "Creating SSL certificate" |
337 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
338 |
- install_cert /etc/ssl/dovecot/server |
339 |
- fi |
340 |
- fi |
341 |
- |
342 |
- elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes." |
343 |
-} |
344 |
|
345 |
diff --git a/net-mail/dovecot/dovecot-2.2.28.ebuild b/net-mail/dovecot/dovecot-2.2.28.ebuild |
346 |
deleted file mode 100644 |
347 |
index cc8d45d58f6..00000000000 |
348 |
--- a/net-mail/dovecot/dovecot-2.2.28.ebuild |
349 |
+++ /dev/null |
350 |
@@ -1,307 +0,0 @@ |
351 |
-# Copyright 1999-2017 Gentoo Foundation |
352 |
-# Distributed under the terms of the GNU General Public License v2 |
353 |
- |
354 |
-EAPI=6 |
355 |
-inherit ssl-cert systemd user versionator |
356 |
- |
357 |
-MY_P="${P/_/.}" |
358 |
-major_minor="$(get_version_component_range 1-2)" |
359 |
-sieve_version="0.4.17" |
360 |
-if [[ ${PV} == *_rc* ]] ; then |
361 |
- rc_dir="rc/" |
362 |
-else |
363 |
- rc_dir="" |
364 |
-fi |
365 |
-SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz |
366 |
- sieve? ( |
367 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
368 |
- ) |
369 |
- managesieve? ( |
370 |
- https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz |
371 |
- ) " |
372 |
-DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
373 |
-HOMEPAGE="http://www.dovecot.org/" |
374 |
- |
375 |
-SLOT="0" |
376 |
-LICENSE="LGPL-2.1 MIT" |
377 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~s390 ~x86" |
378 |
- |
379 |
-IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail" |
380 |
-IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox" |
381 |
-IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib" |
382 |
-IUSE_DOVECOT_OTHER="caps doc ipv6 libressl lucene managesieve selinux sieve solr +ssl static-libs suid tcpd textcat" |
383 |
- |
384 |
-IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" |
385 |
- |
386 |
-DEPEND="bzip2? ( app-arch/bzip2 ) |
387 |
- caps? ( sys-libs/libcap ) |
388 |
- kerberos? ( virtual/krb5 ) |
389 |
- ldap? ( net-nds/openldap ) |
390 |
- lucene? ( >=dev-cpp/clucene-2.3 ) |
391 |
- lzma? ( app-arch/xz-utils ) |
392 |
- lz4? ( app-arch/lz4 ) |
393 |
- mysql? ( virtual/mysql ) |
394 |
- pam? ( virtual/pam ) |
395 |
- postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) |
396 |
- selinux? ( sec-policy/selinux-dovecot ) |
397 |
- solr? ( net-misc/curl dev-libs/expat ) |
398 |
- sqlite? ( dev-db/sqlite:* ) |
399 |
- ssl? ( |
400 |
- !libressl? ( dev-libs/openssl:0 ) |
401 |
- libressl? ( dev-libs/libressl ) |
402 |
- ) |
403 |
- tcpd? ( sys-apps/tcp-wrappers ) |
404 |
- textcat? ( app-text/libexttextcat ) |
405 |
- vpopmail? ( net-mail/vpopmail ) |
406 |
- zlib? ( sys-libs/zlib ) |
407 |
- virtual/libiconv |
408 |
- dev-libs/icu:=" |
409 |
- |
410 |
-RDEPEND="${DEPEND} |
411 |
- net-mail/mailbase" |
412 |
- |
413 |
-S=${WORKDIR}/${MY_P} |
414 |
- |
415 |
-pkg_setup() { |
416 |
- if use managesieve && ! use sieve; then |
417 |
- ewarn "managesieve USE flag selected but sieve USE flag unselected" |
418 |
- ewarn "sieve USE flag will be turned on" |
419 |
- fi |
420 |
- # default internal user |
421 |
- enewgroup dovecot 97 |
422 |
- enewuser dovecot 97 -1 /dev/null dovecot |
423 |
- # default login user |
424 |
- enewuser dovenull -1 -1 /dev/null |
425 |
- # add "mail" group for suid'ing. Better security isolation. |
426 |
- if use suid; then |
427 |
- enewgroup mail |
428 |
- fi |
429 |
-} |
430 |
- |
431 |
-src_prepare() { |
432 |
- eapply -p0 "${FILESDIR}/${PN}-10-ssl.patch" |
433 |
- eapply_user |
434 |
-} |
435 |
- |
436 |
-src_configure() { |
437 |
- local conf="" |
438 |
- |
439 |
- if use postgres || use mysql || use sqlite; then |
440 |
- conf="${conf} --with-sql" |
441 |
- fi |
442 |
- |
443 |
- local storages="" |
444 |
- for storage in ${IUSE_DOVECOT_STORAGE//+/}; do |
445 |
- use ${storage} && storages="${storage} ${storages}" |
446 |
- done |
447 |
- [ "${storages}" ] || storages="maildir" |
448 |
- |
449 |
- # turn valgrind tests off. Bug #340791 |
450 |
- VALGRIND=no econf \ |
451 |
- --localstatedir="${EPREFIX}/var" \ |
452 |
- --runstatedir="${EPREFIX}/run" \ |
453 |
- --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ |
454 |
- --without-stemmer \ |
455 |
- --with-storages="${storages}" \ |
456 |
- --disable-rpath \ |
457 |
- --with-icu \ |
458 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
459 |
- $( use_with bzip2 bzlib ) \ |
460 |
- $( use_with caps libcap ) \ |
461 |
- $( use_with kerberos gssapi ) \ |
462 |
- $( use_with ldap ) \ |
463 |
- $( use_with lucene ) \ |
464 |
- $( use_with lz4 ) \ |
465 |
- $( use_with lzma ) \ |
466 |
- $( use_with mysql ) \ |
467 |
- $( use_with pam ) \ |
468 |
- $( use_with postgres pgsql ) \ |
469 |
- $( use_with sqlite ) \ |
470 |
- $( use_with solr ) \ |
471 |
- $( use_with ssl ) \ |
472 |
- $( use_with tcpd libwrap ) \ |
473 |
- $( use_with textcat ) \ |
474 |
- $( use_with vpopmail ) \ |
475 |
- $( use_with zlib ) \ |
476 |
- $( use_enable static-libs static ) \ |
477 |
- ${conf} |
478 |
- |
479 |
- if use sieve || use managesieve ; then |
480 |
- # The sieve plugin needs this file to be build to determine the plugin |
481 |
- # directory and the list of libraries to link to. |
482 |
- emake dovecot-config |
483 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
484 |
- econf \ |
485 |
- $( use_enable static-libs static ) \ |
486 |
- --localstatedir="${EPREFIX}/var" \ |
487 |
- --enable-shared \ |
488 |
- --with-dovecot="../${MY_P}" \ |
489 |
- $( use_with managesieve ) |
490 |
- fi |
491 |
-} |
492 |
- |
493 |
-src_compile() { |
494 |
- default |
495 |
- if use sieve || use managesieve ; then |
496 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
497 |
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" |
498 |
- fi |
499 |
-} |
500 |
- |
501 |
-src_test() { |
502 |
- default |
503 |
- if use sieve || use managesieve ; then |
504 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
505 |
- default |
506 |
- fi |
507 |
-} |
508 |
- |
509 |
-src_install () { |
510 |
- default |
511 |
- |
512 |
- # insecure: |
513 |
- # use suid && fperms u+s /usr/libexec/dovecot/deliver |
514 |
- # better: |
515 |
- if use suid;then |
516 |
- einfo "Changing perms to allow deliver to be suided" |
517 |
- fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" |
518 |
- fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" |
519 |
- fi |
520 |
- |
521 |
- newinitd "${FILESDIR}"/dovecot.init-r4 dovecot |
522 |
- |
523 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
524 |
- |
525 |
- dodoc AUTHORS NEWS README TODO |
526 |
- dodoc doc/*.{txt,cnf,xml,sh} |
527 |
- docinto example-config |
528 |
- dodoc doc/example-config/*.{conf,ext} |
529 |
- docinto example-config/conf.d |
530 |
- dodoc doc/example-config/conf.d/*.{conf,ext} |
531 |
- docinto wiki |
532 |
- dodoc doc/wiki/* |
533 |
- doman doc/man/*.{1,7} |
534 |
- |
535 |
- # Create the dovecot.conf file from the dovecot-example.conf file that |
536 |
- # the dovecot folks nicely left for us.... |
537 |
- local conf="${ED}/etc/dovecot/dovecot.conf" |
538 |
- local confd="${ED}/etc/dovecot/conf.d" |
539 |
- |
540 |
- insinto /etc/dovecot |
541 |
- doins doc/example-config/*.{conf,ext} |
542 |
- insinto /etc/dovecot/conf.d |
543 |
- doins doc/example-config/conf.d/*.{conf,ext} |
544 |
- fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext |
545 |
- rm -f "${confd}/../README" |
546 |
- |
547 |
- # .maildir is the Gentoo default |
548 |
- local mail_location="maildir:~/.maildir" |
549 |
- if ! use maildir; then |
550 |
- if use mbox; then |
551 |
- mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
552 |
- keepdir /var/dovecot |
553 |
- sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \ |
554 |
- "${confd}/10-mail.conf" || die "sed failed" |
555 |
- elif use mdbox ; then |
556 |
- mail_location="mdbox:~/.mdbox" |
557 |
- elif use sdbox ; then |
558 |
- mail_location="sdbox:~/.sdbox" |
559 |
- fi |
560 |
- fi |
561 |
- sed -i -e \ |
562 |
- "s|#mail_location =|mail_location = ${mail_location}|" \ |
563 |
- "${confd}/10-mail.conf" \ |
564 |
- || die "failed to update mail location settings in 10-mail.conf" |
565 |
- |
566 |
- # We're using pam files (imap and pop3) provided by mailbase |
567 |
- if use pam; then |
568 |
- sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
569 |
- "${confd}/auth-system.conf.ext" \ |
570 |
- || die "failed to update PAM settings in auth-system.conf.ext" |
571 |
- # mailbase does not provide a sieve pam file |
572 |
- use managesieve && dosym imap /etc/pam.d/sieve |
573 |
- sed -i -e \ |
574 |
- 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
575 |
- "${confd}/10-auth.conf" \ |
576 |
- || die "failed to update PAM settings in 10-auth.conf" |
577 |
- fi |
578 |
- |
579 |
- # Disable ipv6 if necessary |
580 |
- if ! use ipv6; then |
581 |
- sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
582 |
- || die "failed to update listen settings in dovecot.conf" |
583 |
- fi |
584 |
- |
585 |
- # Update ssl cert locations |
586 |
- if use ssl; then |
587 |
- sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
588 |
- || die "ssl conf failed" |
589 |
- sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
590 |
- -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
591 |
- "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
592 |
- fi |
593 |
- |
594 |
- # Install SQL configuration |
595 |
- if use mysql || use postgres; then |
596 |
- sed -i -e \ |
597 |
- 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
598 |
- "${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
599 |
- 10-auth.conf" |
600 |
- fi |
601 |
- |
602 |
- # Install LDAP configuration |
603 |
- if use ldap; then |
604 |
- sed -i -e \ |
605 |
- 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
606 |
- "${confd}/10-auth.conf" \ |
607 |
- || die "failed to update ldap settings in 10-auth.conf" |
608 |
- fi |
609 |
- |
610 |
- if use vpopmail; then |
611 |
- sed -i -e \ |
612 |
- 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
613 |
- "${confd}/10-auth.conf" \ |
614 |
- || die "failed to update vpopmail settings in 10-auth.conf" |
615 |
- fi |
616 |
- |
617 |
- if use sieve || use managesieve ; then |
618 |
- cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
619 |
- emake DESTDIR="${ED}" install |
620 |
- sed -i -e \ |
621 |
- 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
622 |
- || die "failed to update sieve settings in 15-lda.conf" |
623 |
- rm -rf "${ED}"/usr/share/doc/dovecot |
624 |
- docinto example-config/conf.d |
625 |
- dodoc doc/example-config/conf.d/*.conf |
626 |
- insinto /etc/dovecot/conf.d |
627 |
- doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf |
628 |
- use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
629 |
- docinto sieve/rfc |
630 |
- dodoc doc/rfc/*.txt |
631 |
- docinto sieve/devel |
632 |
- dodoc doc/devel/DESIGN |
633 |
- docinto plugins |
634 |
- dodoc doc/plugins/*.txt |
635 |
- docinto extensions |
636 |
- dodoc doc/extensions/*.txt |
637 |
- docinto locations |
638 |
- dodoc doc/locations/*.txt |
639 |
- doman doc/man/*.{1,7} |
640 |
- fi |
641 |
- |
642 |
- use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete |
643 |
-} |
644 |
- |
645 |
-pkg_postinst() { |
646 |
- if use ssl; then |
647 |
- # Let's not make a new certificate if we already have one |
648 |
- if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
649 |
- -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
650 |
- einfo "Creating SSL certificate" |
651 |
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
652 |
- install_cert /etc/ssl/dovecot/server |
653 |
- fi |
654 |
- fi |
655 |
- |
656 |
- elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes." |
657 |
-} |