Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/dovecot: dovecot-2.2.6.ebuild ChangeLog
Date: Fri, 27 Sep 2013 16:20:51
Message-Id: 20130927162046.CFFD62004C@flycatcher.gentoo.org
1 eras 13/09/27 16:20:46
2
3 Modified: ChangeLog
4 Added: dovecot-2.2.6.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x77F1F175586A3B1F)
9
10 Revision Changes Path
11 1.452 net-mail/dovecot/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.452&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.452&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.451&r2=1.452
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v
20 retrieving revision 1.451
21 retrieving revision 1.452
22 diff -u -r1.451 -r1.452
23 --- ChangeLog 27 Sep 2013 16:17:21 -0000 1.451
24 +++ ChangeLog 27 Sep 2013 16:20:46 -0000 1.452
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-mail/dovecot
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.451 2013/09/27 16:17:21 eras Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.452 2013/09/27 16:20:46 eras Exp $
30 +
31 +*dovecot-2.2.6 (27 Sep 2013)
32 +
33 + 27 Sep 2013; Eray Aslan <eras@g.o> +dovecot-2.2.6.ebuild,
34 + -files/cyrus-sasl.patch:
35 + Version bump
36
37 27 Sep 2013; Eray Aslan <eras@g.o> -dovecot-2.1.16-r1.ebuild,
38 -dovecot-2.2.1.ebuild, -dovecot-2.2.3.ebuild, -dovecot-2.2.4-r1.ebuild,
39
40
41
42 1.1 net-mail/dovecot/dovecot-2.2.6.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.2.6.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.2.6.ebuild?rev=1.1&content-type=text/plain
46
47 Index: dovecot-2.2.6.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.2.6.ebuild,v 1.1 2013/09/27 16:20:46 eras Exp $
52
53 EAPI=5
54 inherit eutils multilib ssl-cert systemd user versionator
55
56 MY_P="${P/_/.}"
57 major_minor="$(get_version_component_range 1-2)"
58 sieve_version="0.4.2"
59 SRC_URI="http://dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
60 sieve? (
61 http://www.rename-it.nl/dovecot/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
62 )
63 managesieve? (
64 http://www.rename-it.nl/dovecot/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
65 ) "
66 DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
67 HOMEPAGE="http://www.dovecot.org/"
68
69 SLOT="0"
70 LICENSE="LGPL-2.1 MIT"
71 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
72
73 IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
74 IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
75 IUSE_DOVECOT_OTHER="bzip2 caps doc ipv6 lucene managesieve selinux sieve solr +ssl static-libs suid tcpd zlib"
76
77 IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_OTHER}"
78
79 DEPEND="caps? ( sys-libs/libcap )
80 kerberos? ( virtual/krb5 )
81 ldap? ( net-nds/openldap )
82 lucene? ( >=dev-cpp/clucene-2.3 )
83 mysql? ( virtual/mysql )
84 pam? ( virtual/pam )
85 postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] )
86 selinux? ( sec-policy/selinux-dovecot )
87 solr? ( net-misc/curl dev-libs/expat )
88 sqlite? ( dev-db/sqlite )
89 ssl? ( dev-libs/openssl )
90 tcpd? ( sys-apps/tcp-wrappers )
91 vpopmail? ( net-mail/vpopmail )
92 virtual/libiconv"
93
94 RDEPEND="${DEPEND}
95 net-mail/mailbase"
96
97 S=${WORKDIR}/${MY_P}
98
99 pkg_setup() {
100 if use managesieve && ! use sieve; then
101 ewarn "managesieve USE flag selected but sieve USE flag unselected"
102 ewarn "sieve USE flag will be turned on"
103 fi
104 # default internal user
105 enewgroup dovecot 97
106 enewuser dovecot 97 -1 /dev/null dovecot
107 # default login user
108 enewuser dovenull -1 -1 /dev/null
109 # add "mail" group for suid'ing. Better security isolation.
110 if use suid; then
111 enewgroup mail
112 fi
113 }
114
115 src_configure() {
116 local conf=""
117
118 if use postgres || use mysql || use sqlite; then
119 conf="${conf} --with-sql"
120 fi
121
122 local storages=""
123 for storage in ${IUSE_DOVECOT_STORAGE//+/}; do
124 use ${storage} && storages="${storage} ${storages}"
125 done
126 [ "${storages}" ] || storages="maildir"
127
128 # turn valgrind tests off. Bug #340791
129 VALGRIND=no econf \
130 --localstatedir="${EPREFIX}/var" \
131 --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
132 --without-stemmer \
133 --with-storages="${storages}" \
134 --disable-rpath \
135 $( systemd_with_unitdir ) \
136 $( use_with bzip2 bzlib ) \
137 $( use_with caps libcap ) \
138 $( use_with kerberos gssapi ) \
139 $( use_with ldap ) \
140 $( use_with lucene ) \
141 $( use_with mysql ) \
142 $( use_with pam ) \
143 $( use_with postgres pgsql ) \
144 $( use_with sqlite ) \
145 $( use_with solr ) \
146 $( use_with ssl ) \
147 $( use_with tcpd libwrap ) \
148 $( use_with vpopmail ) \
149 $( use_with zlib ) \
150 $( use_enable static-libs static ) \
151 ${conf}
152
153 if use sieve || use managesieve ; then
154 # The sieve plugin needs this file to be build to determine the plugin
155 # directory and the list of libraries to link to.
156 emake dovecot-config
157 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
158 econf \
159 $( use_enable static-libs static ) \
160 --localstatedir="${EPREFIX}/var" \
161 --enable-shared \
162 --with-dovecot="../${MY_P}" \
163 $( use_with managesieve )
164 fi
165 }
166
167 src_compile() {
168 default
169 if use sieve || use managesieve ; then
170 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
171 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
172 fi
173 }
174
175 src_test() {
176 default
177 if use sieve || use managesieve ; then
178 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
179 default
180 fi
181 }
182
183 src_install () {
184 default
185
186 # insecure:
187 # use suid && fperms u+s /usr/libexec/dovecot/deliver
188 # better:
189 if use suid;then
190 einfo "Changing perms to allow deliver to be suided"
191 fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
192 fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
193 fi
194
195 newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
196
197 rm -rf "${ED}"/usr/share/doc/dovecot
198
199 dodoc AUTHORS NEWS README TODO
200 dodoc doc/*.{txt,cnf,xml,sh}
201 docinto example-config
202 dodoc doc/example-config/*.{conf,ext}
203 docinto example-config/conf.d
204 dodoc doc/example-config/conf.d/*.{conf,ext}
205 docinto wiki
206 dodoc doc/wiki/*
207 doman doc/man/*.{1,7}
208
209 # Create the dovecot.conf file from the dovecot-example.conf file that
210 # the dovecot folks nicely left for us....
211 local conf="${ED}/etc/dovecot/dovecot.conf"
212 local confd="${ED}/etc/dovecot/conf.d"
213
214 insinto /etc/dovecot
215 doins doc/example-config/*.{conf,ext}
216 insinto /etc/dovecot/conf.d
217 doins doc/example-config/conf.d/*.{conf,ext}
218 fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
219 rm -f "${confd}/../README"
220
221 # .maildir is the Gentoo default
222 local mail_location="maildir:~/.maildir"
223 if ! use maildir; then
224 if use mbox; then
225 mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
226 keepdir /var/dovecot
227 sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
228 "${confd}/10-mail.conf" || die "sed failed"
229 elif use mdbox ; then
230 mail_location="mdbox:~/.mdbox"
231 elif use sdbox ; then
232 mail_location="sdbox:~/.sdbox"
233 fi
234 fi
235 sed -i -e \
236 "s|#mail_location =|mail_location = ${mail_location}|" \
237 "${confd}/10-mail.conf" \
238 || die "failed to update mail location settings in 10-mail.conf"
239
240 # We're using pam files (imap and pop3) provided by mailbase
241 if use pam; then
242 sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
243 "${confd}/auth-system.conf.ext" \
244 || die "failed to update PAM settings in auth-system.conf.ext"
245 # mailbase does not provide a sieve pam file
246 use managesieve && dosym imap /etc/pam.d/sieve
247 sed -i -e \
248 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
249 "${confd}/10-auth.conf" \
250 || die "failed to update PAM settings in 10-auth.conf"
251 fi
252
253 # Disable ipv6 if necessary
254 if ! use ipv6; then
255 sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
256 || die "failed to update listen settings in dovecot.conf"
257 fi
258
259 # Update ssl cert locations
260 if use ssl; then
261 sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
262 || die "ssl conf failed"
263 sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
264 -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
265 "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
266 fi
267
268 # Install SQL configuration
269 if use mysql || use postgres; then
270 sed -i -e \
271 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
272 "${confd}/10-auth.conf" || die "failed to update SQL settings in \
273 10-auth.conf"
274 fi
275
276 # Install LDAP configuration
277 if use ldap; then
278 sed -i -e \
279 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
280 "${confd}/10-auth.conf" \
281 || die "failed to update ldap settings in 10-auth.conf"
282 fi
283
284 if use vpopmail; then
285 sed -i -e \
286 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
287 "${confd}/10-auth.conf" \
288 || die "failed to update vpopmail settings in 10-auth.conf"
289 fi
290
291 if use sieve || use managesieve ; then
292 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
293 emake DESTDIR="${ED}" install
294 sed -i -e \
295 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
296 || die "failed to update sieve settings in 15-lda.conf"
297 rm -rf "${ED}"/usr/share/doc/dovecot
298 dodoc doc/*.txt
299 docinto example-config/conf.d
300 dodoc doc/example-config/conf.d/*.conf
301 insinto /etc/dovecot/conf.d
302 doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
303 use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
304 docinto sieve/rfc
305 dodoc doc/rfc/*.txt
306 docinto sieve/devel
307 dodoc doc/devel/DESIGN
308 doman doc/man/*.{1,7}
309 fi
310
311 use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
312 }
313
314 pkg_postinst() {
315 if use ssl; then
316 # Let's not make a new certificate if we already have one
317 if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
318 -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
319 einfo "Creating SSL certificate"
320 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
321 install_cert /etc/ssl/dovecot/server
322 fi
323 fi
324
325 elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
326 }