Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in mail-mta/exim: exim-4.82.1.ebuild ChangeLog
Date: Wed, 28 May 2014 12:56:52
Message-Id: 20140528125648.A13D62004E@flycatcher.gentoo.org
1 grobian 14/05/28 12:56:48
2
3 Modified: ChangeLog
4 Added: exim-4.82.1.ebuild
5 Log:
6 Version bump for CVE-2014-2957
7
8 (Portage version: HEAD/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89)
9
10 Revision Changes Path
11 1.275 mail-mta/exim/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/exim/ChangeLog?rev=1.275&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/exim/ChangeLog?rev=1.275&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/exim/ChangeLog?r1=1.274&r2=1.275
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/mail-mta/exim/ChangeLog,v
20 retrieving revision 1.274
21 retrieving revision 1.275
22 diff -u -r1.274 -r1.275
23 --- ChangeLog 4 Mar 2014 21:22:02 -0000 1.274
24 +++ ChangeLog 28 May 2014 12:56:48 -0000 1.275
25 @@ -1,6 +1,11 @@
26 # ChangeLog for mail-mta/exim
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/ChangeLog,v 1.274 2014/03/04 21:22:02 naota Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/ChangeLog,v 1.275 2014/05/28 12:56:48 grobian Exp $
30 +
31 +*exim-4.82.1 (28 May 2014)
32 +
33 + 28 May 2014; Fabian Groffen <grobian@g.o> +exim-4.82.1.ebuild:
34 + Version bump for CVE-2014-2957
35
36 04 Mar 2014; Naohiro Aota <naota@g.o> exim-4.82-r1.ebuild:
37 Add ~x86-fbsd #489736
38
39
40
41 1.1 mail-mta/exim/exim-4.82.1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/exim/exim-4.82.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-mta/exim/exim-4.82.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: exim-4.82.1.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/exim-4.82.1.ebuild,v 1.1 2014/05/28 12:56:48 grobian Exp $
51
52 EAPI="5"
53
54 inherit eutils toolchain-funcs multilib pam systemd
55
56 IUSE="dcc +dkim dlfunc dmarc dnsdb doc dovecot-sasl dsn exiscan-acl gnutls ipv6 ldap lmtp maildir mbx mysql nis pam perl pkcs11 postgres prdr radius redis sasl selinux spf sqlite srs ssl syslog tcpd tpda X"
57 REQUIRED_USE="spf? ( exiscan-acl ) srs? ( exiscan-acl ) dmarc? ( spf dkim ) pkcs11? ( gnutls )"
58
59 DSN_EXIM_V=482 # local version patched by us
60 DSN_V=1_3
61 COMM_URI="ftp://ftp.exim.org/pub/exim/exim4$([[ ${PV} == *_rc* ]] && echo /test)"
62
63 DESCRIPTION="A highly configurable, drop-in replacement for sendmail"
64 SRC_URI="${COMM_URI}/${P//rc/RC}.tar.bz2
65 mirror://gentoo/system_filter.exim.gz
66 doc? ( ${COMM_URI}/${PN}-html-${PV//rc/RC}.tar.bz2 )"
67 #dsn? ( mirror://sourceforge/eximdsn/eximdsn-patch-1.3/exim_${DSN_EXIM_V}_dsn_${DSN_V}.patch )
68 HOMEPAGE="http://www.exim.org/"
69
70 SLOT="0"
71 LICENSE="GPL-2"
72 KEYWORDS="~amd64 ~hppa ~x86-fbsd ~x86-solaris"
73
74 COMMON_DEPEND=">=sys-apps/sed-4.0.5
75 >=sys-libs/db-3.2
76 dev-libs/libpcre
77 perl? ( sys-devel/libperl )
78 pam? ( virtual/pam )
79 tcpd? ( sys-apps/tcp-wrappers )
80 ssl? ( dev-libs/openssl )
81 gnutls? ( net-libs/gnutls[pkcs11?]
82 dev-libs/libtasn1 )
83 ldap? ( >=net-nds/openldap-2.0.7 )
84 mysql? ( virtual/mysql )
85 postgres? ( dev-db/postgresql-base )
86 sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r2 )
87 redis? ( dev-libs/hiredis )
88 selinux? ( sec-policy/selinux-exim )
89 spf? ( >=mail-filter/libspf2-1.2.5-r1 )
90 dmarc? ( mail-filter/opendmarc )
91 srs? ( mail-filter/libsrs_alt )
92 X? ( x11-proto/xproto
93 x11-libs/libX11
94 x11-libs/libXmu
95 x11-libs/libXt
96 x11-libs/libXaw
97 )
98 sqlite? ( dev-db/sqlite )
99 radius? ( net-dialup/radiusclient )
100 virtual/libiconv
101 "
102 # added X check for #57206
103 DEPEND="${COMMON_DEPEND}
104 virtual/pkgconfig"
105 RDEPEND="${COMMON_DEPEND}
106 !mail-mta/courier
107 !mail-mta/esmtp
108 !mail-mta/mini-qmail
109 !<mail-mta/msmtp-1.4.19-r1
110 !>=mail-mta/msmtp-1.4.19-r1[mta]
111 !mail-mta/netqmail
112 !mail-mta/nullmailer
113 !mail-mta/postfix
114 !mail-mta/qmail-ldap
115 !mail-mta/sendmail
116 !mail-mta/opensmtpd
117 !<mail-mta/ssmtp-2.64-r2
118 !>=mail-mta/ssmtp-2.64-r2[mta]
119 !net-mail/mailwrapper
120 >=net-mail/mailbase-0.00-r5
121 virtual/logger
122 dcc? ( mail-filter/dcc )
123 "
124
125 S=${WORKDIR}/${P//rc/RC}
126
127 src_prepare() {
128 epatch "${FILESDIR}"/exim-4.14-tail.patch
129 epatch "${FILESDIR}"/exim-4.74-localscan_dlopen.patch
130 epatch "${FILESDIR}"/exim-4.69-r1.27021.patch
131 epatch "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426
132 epatch "${FILESDIR}"/exim-4.82-makefile-freebsd.patch # 235785
133 epatch "${FILESDIR}"/exim-4.77-as-needed-ldflags.patch # 352265, 391279
134 epatch "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591
135
136 if use maildir ; then
137 epatch "${FILESDIR}"/exim-4.20-maildir.patch
138 else
139 epatch "${FILESDIR}"/exim-4.80-spool-mail-group.patch # 438606
140 fi
141
142 if use dsn ; then
143 epatch "${FILESDIR}"/exim_${DSN_EXIM_V}_dsn_${DSN_V}.patch
144 fi
145
146 # user Exim believes it should be
147 MAILUSER=mail
148 MAILGROUP=mail
149 if use prefix && [[ ${EUID} != 0 ]] ; then
150 MAILUSER=$(id -un)
151 MAILGROUP=$(id -gn)
152 fi
153 }
154
155 src_configure() {
156 local myconf
157
158 sed -i "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${EPREFIX}/etc/mail/aliases'" "${S}"/src/configure.default
159 cp "${S}"/src/configure.default "${S}"/src/configure.default.orig
160
161 sed -i -e 's/^buildname=.*/buildname=exim-gentoo/g' Makefile
162
163 sed -e "48i\CFLAGS=${CFLAGS}" \
164 -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \
165 -e "s:CONFIGURE_FILE=/usr/exim/configure:CONFIGURE_FILE=${EPREFIX}/etc/exim/exim.conf:" \
166 -e "s:# INFO_DIRECTORY=/usr/local/info:INFO_DIRECTORY=${EPREFIX}/usr/share/info:" \
167 -e "s:# LOG_FILE_PATH=/var/log/exim_%slog:LOG_FILE_PATH=${EPREFIX}/var/log/exim/exim_%s.log:" \
168 -e "s:# PID_FILE_PATH=/var/lock/exim.pid:PID_FILE_PATH=${EPREFIX}/run/exim.pid:" \
169 -e "s:# SPOOL_DIRECTORY=/var/spool/exim:SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim:" \
170 -e "s:# SUPPORT_MAILDIR=yes:SUPPORT_MAILDIR=yes:" \
171 -e "s:# SUPPORT_MAILSTORE=yes:SUPPORT_MAILSTORE=yes:" \
172 -e "s:EXIM_USER=:EXIM_USER=${MAILUSER}:" \
173 -e "s:# AUTH_SPA=yes:AUTH_SPA=yes:" \
174 -e "s:# AUTH_CRAM_MD5=yes:AUTH_CRAM_MD5=yes:" \
175 -e "s:# AUTH_PLAINTEXT=yes:AUTH_PLAINTEXT=yes:" \
176 -e "s:# LOOKUP_PASSWD=yes:LOOKUP_PASSWD=yes:" \
177 -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \
178 -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \
179 -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \
180 src/EDITME > Local/Makefile
181
182 cd Local
183
184 # exiscan-acl is now integrated - enable it when use-flag set
185 if use exiscan-acl; then
186 sed -i "s:# WITH_CONTENT_SCAN=yes:WITH_CONTENT_SCAN=yes:" Makefile
187 sed -i "s:# WITH_OLD_DEMIME=yes:WITH_OLD_DEMIME=yes:" Makefile
188 fi
189
190 if use spf; then
191 myconf="${myconf} -lspf2"
192 sed -i "s:# EXPERIMENTAL_SPF=yes:EXPERIMENTAL_SPF=yes:" Makefile
193 mycflags="${mycflags} -DEXPERIMENTAL_SPF"
194 fi
195 if use dmarc; then
196 myconf="${myconf} -lopendmarc"
197 sed -i "s:# EXPERIMENTAL_DMARC=yes:EXPERIMENTAL_DMARC=yes:" Makefile
198 mycflags="${mycflags} -DEXPERIMENTAL_DMARC"
199 fi
200 if use srs; then
201 myconf="${myconf} -lsrs_alt"
202 sed -i "s:# EXPERIMENTAL_SRS=yes:EXPERIMENTAL_SRS=yes:" Makefile
203 fi
204
205 # enable optional exim_monitor support via X use flag bug #46778
206 if use X; then
207 einfo "Configuring eximon"
208 cp ../exim_monitor/EDITME eximon.conf
209 sed -i "s:# EXIM_MONITOR=eximon.bin:EXIM_MONITOR=eximon.bin:" Makefile
210 fi
211 if use perl; then
212 sed -i "s:# EXIM_PERL=perl.o:EXIM_PERL=perl.o:" Makefile
213 fi
214 # mbox useflag renamed, see bug #110741
215 if use mbx; then
216 sed -i "s:# SUPPORT_MBX=yes:SUPPORT_MBX=yes:" Makefile
217 fi
218 if use pam; then
219 sed -i "s:# \(SUPPORT_PAM=yes\):\1:" Makefile
220 myconf="${myconf} -lpam"
221 fi
222 if use sasl; then
223 sed -i "s:# CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/var/state/saslauthd/mux:CYRUS_SASLAUTHD_SOCKET=${EPREFIX}/run/saslauthd/mux:" Makefile
224 sed -i "s:# AUTH_CYRUS_SASL=yes:AUTH_CYRUS_SASL=yes:" Makefile
225 myconf="${myconf} -lsasl2"
226 fi
227 if use tcpd; then
228 sed -i "s:# \(USE_TCP_WRAPPERS=yes\):\1:" Makefile
229 myconf="${myconf} -lwrap"
230 fi
231 if use lmtp; then
232 sed -i "s:# TRANSPORT_LMTP=yes:TRANSPORT_LMTP=yes:" Makefile
233 fi
234 if use ipv6; then
235 echo "HAVE_IPV6=YES" >> Makefile
236 # to fix bug #41196
237 echo "IPV6_USE_INET_PTON=yes" >> Makefile
238 fi
239 if use dovecot-sasl; then
240 sed -i "s:# AUTH_DOVECOT=yes:AUTH_DOVECOT=yes:" Makefile
241 fi
242 if use radius; then
243 myconf="${myconf} -lradiusclient"
244 sed -i "s:# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf:RADIUS_CONFIG_FILE=${EPREFIX}/etc/radiusclient/radiusclient.conf:" Makefile
245 sed -i "s:# RADIUS_LIB_TYPE=RADIUSCLIENT$:RADIUS_LIB_TYPE=RADIUSCLIENT:" Makefile
246 fi
247 echo "EXTRALIBS=${myconf}" >> Makefile
248
249 # make iconv usage explicit
250 echo "HAVE_ICONV=yes" >> Makefile
251 # if we use libiconv, now is the time to tell so
252 use !elibc_glibc && echo "EXTRALIBS_EXIM=-liconv" >> Makefile
253
254 if use ssl; then
255 echo "SUPPORT_TLS=yes" >> Makefile
256 if use gnutls; then
257 echo "USE_GNUTLS=yes" >> Makefile
258 echo "USE_GNUTLS_PC=gnutls" >> Makefile
259 use pkcs11 || echo "AVOID_GNUTLS_PKCS11=yes" >> Makefile
260 else
261 echo "USE_OPENSSL_PC=openssl" >> Makefile
262 fi
263 fi
264
265 LOOKUP_INCLUDE=
266 LOOKUP_LIBS=
267
268 if use ldap; then
269 sed -i \
270 -e "s:# \(LOOKUP_LDAP=yes\):\1:" \
271 -e "s:# \(LDAP_LIB_TYPE=OPENLDAP2\):\1:" Makefile
272 LOOKUP_INCLUDE="-I${EROOT}usr/include/ldap"
273 LOOKUP_LIBS="-lldap -llber"
274 fi
275
276 if use redis; then
277 sed -i "s:# EXPERIMENTAL_REDIS=yes:EXPERIMENTAL_REDIS=yes:" Makefile
278 LOOKUP_LIBS="$LOOKUP_LIBS -lhiredis"
279 fi
280
281 if use mysql; then
282 sed -i "s:# LOOKUP_MYSQL=yes:LOOKUP_MYSQL=yes:" Makefile
283 LOOKUP_INCLUDE="$LOOKUP_INCLUDE $(mysql_config --include)"
284 LOOKUP_LIBS="$LOOKUP_LIBS $(mysql_config --libs)"
285 fi
286
287 if use postgres; then
288 sed -i "s:# LOOKUP_PGSQL=yes:LOOKUP_PGSQL=yes:" Makefile
289 LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I$(pg_config --includedir)"
290 LOOKUP_LIBS="$LOOKUP_LIBS -L$(pg_config --libdir) -lpq"
291 fi
292
293 if use sqlite; then
294 echo "LOOKUP_SQLITE=yes" >> Makefile
295 echo "LOOKUP_SQLITE_PC=sqlite3" >> Makefile
296 fi
297
298 if [[ -n ${LOOKUP_INCLUDE} ]]; then
299 sed -i "s:# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include:LOOKUP_INCLUDE=$LOOKUP_INCLUDE:" \
300 Makefile
301 fi
302
303 if [[ -n ${LOOKUP_LIBS} ]]; then
304 sed -i "s:# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3:LOOKUP_LIBS=$LOOKUP_LIBS:" \
305 Makefile
306 fi
307
308 sed -i "s:# LOOKUP_DSEARCH=yes:LOOKUP_DSEARCH=yes:" Makefile
309
310 if use dnsdb; then
311 sed -i "s:# LOOKUP_DNSDB=yes:LOOKUP_DNSDB=yes:" Makefile
312 fi
313 sed -i "s:# LOOKUP_CDB=yes:LOOKUP_CDB=yes:" Makefile
314
315 if use nis; then
316 sed -i -e "s:# LOOKUP_NIS=yes:LOOKUP_NIS=yes:" \
317 -e "s:# LOOKUP_NISPLUS=yes:LOOKUP_NISPLUS=yes:" Makefile
318 fi
319 if use syslog; then
320 sed -i "s:LOG_FILE_PATH=/var/log/exim/exim_%s.log:LOG_FILE_PATH=syslog:" Makefile
321 fi
322 if ! use dkim; then
323 # DKIM is enabled by default. We have to explicitly disable it.
324 echo "DISABLE_DKIM=yes">> Makefile
325 fi
326 if use dcc; then
327 echo "EXPERIMENTAL_DCC=yes">> Makefile
328 fi
329 if use dsn; then
330 sed -i -e "s:#define SUPPORT_DSN:define SUPPORT_DSN:" Makefile
331 fi
332 if use dlfunc; then
333 sed -i -e "/^# EXPAND_DLFUNC=yes/s/^# //" Makefile
334 fi
335 if use prdr; then
336 sed -i -e "s:# EXPERIMENTAL_PRDR=yes:EXPERIMENTAL_PRDR=yes:" Makefile
337 fi
338 if use tpda; then
339 sed -i -e "s:# EXPERIMENTAL_TPDA=yes:EXPERIMENTAL_TPDA=yes:" Makefile
340 fi
341
342 # use the "native" interface to the DBM library
343 echo "USE_DB=yes" >> Makefile
344 echo "DBMLIB=-ldb" >> Makefile
345 }
346
347 src_compile() {
348 emake -j1 CC="$(tc-getCC)" HOSTCC="$(tc-getCC $CBUILD)" \
349 AR="$(tc-getAR) cq" RANLIB="$(tc-getRANLIB)" FULLECHO='' \
350 || die "make failed"
351 }
352
353 src_install () {
354 cd "${S}"/build-exim-gentoo
355 exeinto /usr/sbin
356 doexe exim
357 if use X; then
358 doexe eximon.bin
359 doexe eximon
360 fi
361 fperms 4755 /usr/sbin/exim
362
363 dodir /usr/bin /usr/sbin /usr/lib
364
365 dosym exim /usr/sbin/sendmail
366 dosym exim /usr/sbin/rsmtp
367 dosym exim /usr/sbin/rmail
368 dosym /usr/sbin/exim /usr/bin/mailq
369 dosym /usr/sbin/exim /usr/bin/newaliases
370 dosym /usr/sbin/sendmail /usr/lib/sendmail
371
372 exeinto /usr/sbin
373 for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \
374 exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \
375 convert4r3 convert4r4 exipick
376 do
377 doexe $i
378 done
379
380 dodoc "${S}"/doc/*
381 doman "${S}"/doc/exim.8
382 use dsn && dodoc "${S}"/README.DSN
383 use doc && dohtml -r "${WORKDIR}"/${PN}-html-${PV//rc/RC}/doc/html/spec_html/*
384
385 # conf files
386 insinto /etc/exim
387 newins "${S}"/src/configure.default.orig exim.conf.dist
388 if use exiscan-acl; then
389 newins "${S}"/src/configure.default exim.conf.exiscan-acl
390 fi
391 doins "${WORKDIR}"/system_filter.exim
392 doins "${FILESDIR}"/auth_conf.sub
393
394 pamd_mimic system-auth exim auth account
395
396 # headers, #436406
397 if use dlfunc ; then
398 # fixup includes so they actually can be found when including
399 sed -i \
400 -e '/#include "\(config\|store\|mytypes\).h"/s:"\(.\+\)":<exim/\1>:' \
401 local_scan.h || die
402 insinto /usr/include/exim
403 doins {config,local_scan}.h ../src/{mytypes,store}.h
404 fi
405
406 insinto /etc/logrotate.d
407 newins "${FILESDIR}/exim.logrotate" exim
408
409 newinitd "${FILESDIR}"/exim.rc8 exim
410 newconfd "${FILESDIR}"/exim.confd exim
411
412 systemd_dounit "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket}
413 systemd_newunit "${FILESDIR}"/exim_at.service 'exim@.service'
414 systemd_newunit "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service'
415
416 DIROPTIONS="-m 0750 -o ${MAILUSER} -g ${MAILGROUP}"
417 dodir /var/log/${PN}
418 }
419
420 pkg_postinst() {
421 if [[ ! -f ${EROOT}etc/exim/exim.conf ]] ; then
422 einfo "${EROOT}etc/exim/system_filter.exim is a sample system_filter."
423 einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub for using smtp auth."
424 einfo "Please create ${EROOT}etc/exim/exim.conf from ${EROOT}etc/exim/exim.conf.dist."
425 fi
426 if use dcc ; then
427 einfo "DCC support is experimental, you can find some limited"
428 einfo "documentation at the bottom of this prerelease message:"
429 einfo "http://article.gmane.org/gmane.mail.exim.devel/3579"
430 fi
431 if use dmarc ; then
432 einfo "DMARC support is experimental. See global settings to"
433 einfo "configure DMARC, for usage see the documentation at "
434 einfo "experimental-spec.txt."
435 fi
436 einfo "Exim maintains some db files under its spool directory that need"
437 einfo "cleaning from time to time. (${EROOT}var/spool/exim/db)"
438 einfo "Please use the exim_tidydb tool as documented in the Exim manual:"
439 einfo "http://www.exim.org/exim-html-current/doc/html/spec_html/ch-exim_utilities.html#SECThindatmai"
440 }