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