Diff exim-4.94.2-r12 with a exim-4.96-r4

/usr/portage/mail-mta/exim/exim-4.96-r4.ebuild 2023-10-09 14:52:31.588368403 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI="7"
......
6 6
inherit db-use toolchain-funcs pam systemd
7 7

  
8 8
IUSE="arc berkdb +dane dcc +dkim dlfunc dmarc +dnsdb doc dovecot-sasl
9
dsn exiscan-acl gdbm gnutls idn ipv6 ldap lmtp maildir mbx
9
dsn gdbm gnutls idn ipv6 ldap lmtp maildir mbx
10 10
mysql nis pam perl pkcs11 postgres +prdr proxy radius redis sasl selinux
11
socks5 spf sqlite srs +srs-alt srs-native +ssl syslog tdb tcpd +tpda X"
11
socks5 spf sqlite srs +ssl syslog tdb tcpd +tpda X"
12 12
REQUIRED_USE="
13 13
	arc? ( dkim spf )
14 14
	dane? ( ssl !gnutls )
......
16 16
	dkim? ( ssl !gnutls )
17 17
	gnutls? ( ssl )
18 18
	pkcs11? ( ssl )
19
	spf? ( exiscan-acl )
20
	srs? (
21
		exiscan-acl
22
		^^ ( srs-alt srs-native )
23
	)
24 19
	|| ( berkdb gdbm tdb )
25 20
"
26 21
# NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked
......
37 32
	 [[ ${PV} == *.*.*.* ]] && echo /fixes)
38 33
COMM_URI="https://downloads.exim.org/exim4${SDIR}"
39 34

  
35
GPV="r0"
40 36
DESCRIPTION="A highly configurable, drop-in replacement for sendmail"
41 37
SRC_URI="${COMM_URI}/${P//_rc/-RC}.tar.xz
38
	https://dev.gentoo.org/~grobian/distfiles/${P}-gentoo-patches-${GPV}.tar.xz
42 39
	mirror://gentoo/system_filter.exim.gz
43 40
	doc? ( ${COMM_URI}/${PN}-pdf-${PV//_rc/-RC}.tar.xz )"
44 41
HOMEPAGE="https://www.exim.org/"
45 42

  
46 43
SLOT="0"
47 44
LICENSE="GPL-2"
48
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
45
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~sparc x86"
49 46

  
50 47
COMMON_DEPEND=">=sys-apps/sed-4.0.5
51
	dev-libs/libpcre:=
48
	dev-libs/libpcre2:=
52 49
	tdb? ( sys-libs/tdb:= )
53 50
	!tdb? ( berkdb? ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) )
54 51
	!tdb? ( !berkdb? ( sys-libs/gdbm:= ) )
......
79 76
	redis? ( dev-libs/hiredis:= )
80 77
	spf? ( >=mail-filter/libspf2-1.2.5-r1 )
81 78
	dmarc? ( mail-filter/opendmarc:= )
82
	srs? ( srs-alt? ( mail-filter/libsrs_alt ) )
83 79
	X? (
84 80
		x11-libs/libX11
85 81
		x11-libs/libXmu
......
119 115
	eapply     "${FILESDIR}"/exim-4.93-as-needed-ldflags.patch # 352265, 391279
120 116
	eapply -p0 "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591
121 117
	eapply     "${FILESDIR}"/exim-4.69-r1.27021.patch
122
	eapply     "${FILESDIR}"/exim-4.94-localscan_dlopen.patch
123
	eapply     "${FILESDIR}"/exim-4.94.2-fix-crash-resolve.patch # 799368 upstr
124
	eapply     "${FILESDIR}"/exim-4.94-CVE-2022-3559.patch  # 877607 upstr
125
	eapply     "${FILESDIR}"/exim-4.94.2-openssl3.patch # 888619 backports
126

  
127
	# for this reason we have a := dep on opendmarc, they changed their
128
	# API in a minor release
129
	if use dmarc && has_version ">=mail-filter/opendmarc-1.4" ; then
130
		eapply "${FILESDIR}"/exim-4.94-opendmarc-1.4.patch
131
	fi
118
	eapply     "${FILESDIR}"/exim-4.95-localscan_dlopen.patch
119

  
120
	# Upstream post-release fixes :(
121
	local GPVDIR=${WORKDIR}/${P}-gentoo-patches-${GPV}
122
	eapply     "${GPVDIR}"/exim-4.96-rewrite-malformed-addr-fix.patch # upstr
123
	eapply     "${GPVDIR}"/exim-4.96-spf-memory-error-fix.patch # upstr
124
	eapply     "${GPVDIR}"/exim-4.96-regex-use-after-free.patch # upstr
125
	eapply -p2 "${GPVDIR}"/exim-4.96-dmarc_use_after_free.patch # upstr
126
	eapply     "${GPVDIR}"/exim-4.96-deamon-startup-fix.patch # upstr
127
	eapply     "${GPVDIR}"/exim-4.96-openssl-verify-ocsp.patch # upstr
128
	eapply     "${GPVDIR}"/exim-4.96-openssl-double-expansion.patch # upstr
129
	eapply     "${GPVDIR}"/exim-4.96-recursion-dns_again.patch # upstr
130
	eapply     "${GPVDIR}"/exim-4.96-openssl-tls_eccurve-setting.patch # upstr
131
	eapply     "${GPVDIR}"/exim-4.96-openssl-tls_eccurve-lt-3.patch # upstr
132
	eapply     "${GPVDIR}"/exim-4.96-openssl-bad-alpn.patch # upstr
133
	eapply     "${GPVDIR}"/exim-4.96-dane-dns_again.patch # upstr
134
	eapply     "${GPVDIR}"/exim-4.96-expansion-crash.patch # upstr
135
	eapply     "${GPVDIR}"/exim-4.96-transport-crash.patch # upstr
136

  
137
	# oddity, they disable berkdb as hack, and then throw an error when
138
	# berkdb isn't enabled
139
	sed -i \
140
		-e 's/_DB_/_DONTMESS_/' \
141
		-e 's/define DB void/define DONTMESS void/' \
142
		src/auths/call_radius.c || die
143

  
144
	# API changed from 1.3 to 1.4, upstream doesn't think 1.4 should be
145
	# used, but 1.3 has a CVE and Gentoo (like most downstreams) only
146
	# has 1.4 available
147
	eapply "${FILESDIR}"/exim-4.94-opendmarc-1.4.patch
132 148

  
133 149
	if use maildir ; then
134 150
		eapply "${FILESDIR}"/exim-4.94-maildir.patch
......
178 194
		PID_FILE_PATH=${EPREFIX}/run/exim.pid
179 195
		SPOOL_DIRECTORY=${EPREFIX}/var/spool/exim
180 196
		HAVE_ICONV=yes
197
		WITH_CONTENT_SCAN=yes
181 198
	EOC
182 199

  
183 200
	# configure db implementation, Exim always needs one for its hints
......
190 207
		EOC
191 208
		sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die
192 209
		sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die
193
	elif use berkdb ; then
210
	elif use gdbm ; then
211
		cat >> Makefile <<- EOC
212
			USE_GDBM=yes
213
			DBMLIB = -lgdbm
214
		EOC
215
		sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die
216
		sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die
217
	else # must be berkdb via required_use
194 218
		# use the "native" interfaces to the DBM and CDB libraries, support
195 219
		# passwd and directory lookups by default
196 220
		local DB_VERS="5.3 5.1 4.8 4.7 4.6 4.5 4.4 4.3 4.2 3.2"
......
202 226
		EOC
203 227
		sed -i -e 's:^USE_GDBM=yes:# USE_GDBM=yes:' Makefile || die
204 228
		sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die
205
	else # must be gdbm via required_use
206
		cat >> Makefile <<- EOC
207
			USE_GDBM=yes
208
			DBMLIB = -lgdbm
209
		EOC
210
		sed -i -e 's:^USE_DB=yes:# USE_DB=yes:' Makefile || die
211
		sed -i -e 's:^USE_TDB=yes:# USE_TDB=yes:' Makefile || die
212 229
	fi
213 230

  
214 231
	# if we use libiconv, now is the time to tell so
......
338 355
	# features
339 356
	#
340 357

  
341
	# content scanning support
342
	if use exiscan-acl; then
343
		cat >> Makefile <<- EOC
344
			WITH_CONTENT_SCAN=yes
345
		EOC
346
	fi
347

  
348 358
	# DomainKeys Identified Mail, RFC4871
349 359
	if ! use dkim; then
350 360
		# DKIM is enabled by default
......
482 492

  
483 493
	# Sender Rewriting Scheme
484 494
	if use srs; then
485
		# NOTE: we currently USE-default to srs-alt, because this is
486
		# what USE=srs used to be.  Eventually we want to rid ourselves
487
		# of this external implementation.
488
		if use srs-alt; then
489
			# historical default, from 4.95 this becomes
490
			# EXPERIMENTAL_SRS_ALT
491
			cat >> Makefile <<- EOC
492
				EXPERIMENTAL_SRS=yes
493
				EXTRALIBS_EXIM += -lsrs_alt
494
			EOC
495
		fi
496
		if use srs-native; then
497
			# this one becomes SUPPORT_SRS in 4.95
498
			cat >> Makefile <<- EOC
499
				EXPERIMENTAL_SRS_NATIVE=yes
500
			EOC
501
		fi
495
		# this one is the default/supported variant since 4.95, and the
496
		# only variant available since 4.96
497
		cat >> Makefile <<- EOC
498
			SUPPORT_SRS=yes
499
		EOC
502 500
	fi
503 501

  
504 502
	# Delivery Sender Notifications extra information in fail message
......
589 587
	# conf files
590 588
	insinto /etc/exim
591 589
	newins "${S}"/src/configure.default exim.conf.dist
592
	if use exiscan-acl; then
593
		newins "${S}"/src/configure.default exim.conf.exiscan-acl
594
	fi
595 590
	doins "${WORKDIR}"/system_filter.exim
596 591
	doins "${FILESDIR}"/auth_conf.sub
597 592

  
......
634 629
		einfo "Please create ${EROOT}/etc/exim/exim.conf from"
635 630
		einfo "  ${EROOT}/etc/exim/exim.conf.dist."
636 631
	fi
632
	if use berkdb && ( use gdbm || use tdb ) ; then
633
		ewarn "USE=berkdb is ignored because USE=gdbm or USE=tdb is enabled!"
634
	fi
637 635
	if use dmarc ; then
638 636
		einfo "DMARC support requires ${EROOT}/etc/exim/opendmarc.tlds"
639 637
		einfo "you can populate this file with the contents downloaded from"
......
644 642
		einfo "documentation at the bottom of this prerelease message:"
645 643
		einfo "  http://article.gmane.org/gmane.mail.exim.devel/3579"
646 644
	fi
647
	if use srs ; then
648
		einfo "SRS support is experimental in this release of Exim"
649
		if use srs-alt; then
650
			elog "You are using libsrs_alt to implement SRS support."
651
			elog "In future release of Exim, the native SRS implementation"
652
			elog "(USE=srs-native) will become the default.  Please prepare"
653
			elog "your package.use or switch to USE=srs-native now."
654
		fi
645
	if use srs; then
646
		einfo "SRS support using libsrs_alt was dropped in this"
647
		einfo "release of Exim, you are now using the native SRS implementation"
655 648
	fi
656 649
	use dsn && einfo "extra information in fail DSN message is experimental"
657 650
	einfo
Thank you!