~alpine/aports

[alpine-aports] [PATCH v2] community/exim: upgrade to 4.92

Paul Bredbury <brebs@sent.com>
Details
Message ID
<20190307225240.20530-1-brebs@sent.com>
Sender timestamp
1551999160
DKIM signature
missing
Download raw message
Patch: +65 -24
Switch from sed to patch files.

Fix under-quoting of variables.

Update bounce-charset.patch for new version.

Add transport patch, as in Debian Buster.
---
 community/exim/APKBUILD             | 35 ++++++++++++++---------------
 community/exim/bounce-charset.patch | 13 ++++++-----
 community/exim/makefile-linux.patch | 21 +++++++++++++++++
 community/exim/transport.patch      | 20 +++++++++++++++++
 4 files changed, 65 insertions(+), 24 deletions(-)
 create mode 100644 community/exim/makefile-linux.patch
 create mode 100644 community/exim/transport.patch

diff --git a/community/exim/APKBUILD b/community/exim/APKBUILD
index 5e0e13e39b..bbf8cc0a62 100644
--- a/community/exim/APKBUILD
+++ b/community/exim/APKBUILD
@@ -5,8 +5,8 @@
# Contributor: Jesse Young <jlyo@jlyo.org>
# Maintainer: Jesse Young <jlyo@jlyo.org>
pkgname=exim
pkgver=4.91
pkgrel=3
pkgver=4.92
pkgrel=0
pkgdesc="Message Transfer Agent"
url="https://www.exim.org"
arch="all"
@@ -21,7 +21,9 @@ install="exim.pre-install"
subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql $pkgname-postgresql
	$pkgname-utils $pkgname-scripts::noarch $pkgname-doc $pkgname-openrc"
source="https://ftp.exim.org/pub/exim/exim4/$pkgname-$pkgver.tar.xz
	makefile-linux.patch
	bounce-charset.patch
	transport.patch
	exim.Makefile
	exim.confd
	exim.initd
@@ -43,12 +45,7 @@ builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare

	cp "$srcdir"/$pkgname.Makefile Local/Makefile
	sed -i \
		-e 's/-lnsl//g' \
		-e 's/^HAVE_ICONV.*$//' \
		OS/Makefile-Linux
	cp "$srcdir/$pkgname.Makefile" Local/Makefile
}

build() {
@@ -66,19 +63,19 @@ package() {
	mv exim-${pkgver%.*}* exim
	chmod u+s exim
	local i; for i in mailq rmail rsmtp runq sendmail newaliases; do
		ln -s exim $i
		ln -s exim "$i"
	done
	install -Dm644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
	install -Dm644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
	install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
	# Fix clamav local socket path, Add variant to spamd address
	sed -i \
		-e 's~# av_scanner = clamd:/tmp/clamd~# av_scanner = clamd:/run/clamav/clamd.sock~' \
		-e '/# spamd_address = 127.0.0.1 783/a# spamd_address = 127.0.0.1 11333 variant=rspamd' \
		"$pkgdir"/etc/$pkgname/$pkgname.conf
		"$pkgdir/etc/$pkgname/$pkgname.conf"
	# Create subdirs for logs and extensions
	install -dm750 -o $pkgname -g mail "$pkgdir"/var/log/$pkgname
	mkdir -p "$pkgdir"/usr/lib/$pkgname
	install -dm750 -o "$pkgname" -g mail "$pkgdir/var/log/$pkgname"
	mkdir -p "$pkgdir/usr/lib/$pkgname"
}

scripts() {
@@ -105,7 +102,7 @@ utils() {
_mv_ext() {
	pkgdesc="EXIM extension: $1"
	depends="$pkgname"
	install -D -m755 "$builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so
	install -D -m755 "$builddir"/build-Linux-*/lookups/"$1".so "$subpkgdir/usr/lib/$pkgname/$1.so"
}

sqlite() { _mv_ext sqlite; }
@@ -115,8 +112,10 @@ cdb() { _mv_ext cdb; }
dbmdb() { _mv_ext dbmdb; }
dnsdb() { _mv_ext dnsdb; }

sha512sums="35b34dda8dd0f27c0429e6eb8409756ecd3cf9e535bac421d696b1560db0ff3bf4cd0e4a00bc0b7e32137d31bb5de20776c7c1830ec125aa36b5c4376b0c71a2  exim-4.91.tar.xz
517447ac989a8de27cca74d544bdbeed6667442d1a229efaaef0a2b2878afb754602ece7c5e9983778224cc052f6d38209a65ef95712a16309d7b72c0e277fa8  bounce-charset.patch
sha512sums="62c327e6184a358ba7f0dbc38b44d2537234be91727a5bfac97e74af64a8d77e376b3221dcfdd8f6eca7d812f9233595503dc6e50e2972bed40a1b74eb209c31  exim-4.92.tar.xz
a23851e60ffb31ac1ff4b8b41d2b8fe29079d32a4f865408c40e2f5d0b5da141a163a381c27ecc5c98542783ce376f5c784e40f7f9cbbc5113d1b34ebf5d00fd  makefile-linux.patch
dc8c1a9e830b1dd6fc9ae97f6c9429da792b1d10d0991552b6d32a9fe2082e4f9405969340f9042dffbbcae3139da892dde75276e487ee4f6a84f5a4e01c088c  bounce-charset.patch
9836e2520e9634aad710bf1961ea43633bcb5c05545703d52849704d87e66f38c2c2c7b0ae68a746301638d80d71ec8138afcb00c37e7e1e001da71c1ad9d826  transport.patch
f764a09ac7b6dfa34a5cd8bf5ad8b5fea355ac3b21a14f7218c84804bce420c6212cbebd2811fa40b0034dba626f0c9b293de77dbd634432edd31b237003515e  exim.Makefile
bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66  exim.confd
3769e74a54566362bcdf57c45fbf7d130d7a7529fbc40befce431eef0387df117c71a5b57779c507e30d5b125913b5f26c9d16b17995521a1d94997be6dc3e02  exim.initd
diff --git a/community/exim/bounce-charset.patch b/community/exim/bounce-charset.patch
index ce4be0324b..9d9d138a79 100644
--- a/community/exim/bounce-charset.patch
+++ b/community/exim/bounce-charset.patch
@@ -1,6 +1,7 @@
--- a/src/deliver.c	2018-04-15 02:18:10.000000000 +0300
+++ b/src/deliver.c	2018-06-15 14:01:58.196926447 +0300
@@ -7291,7 +7291,7 @@
diff -Naur a/src/deliver.c b/src/deliver.c
--- a/src/deliver.c	2019-01-30 13:59:52.000000000 +0000
+++ b/src/deliver.c	2019-03-07 07:34:42.179128671 +0000
@@ -7373,7 +7373,7 @@
 	"MIME-Version: 1.0\n\n"
 
 	"--%s\n"
@@ -9,16 +10,16 @@
 
 	"This message was created automatically by mail delivery software.\n"
 	" ----- The following addresses had successful delivery notifications -----\n",
@@ -7560,7 +7560,7 @@
@@ -7644,7 +7644,7 @@
 
       /* output human readable part as text/plain section */
       fprintf(f, "--%s\n"
       fprintf(fp, "--%s\n"
-	  "Content-type: text/plain; charset=us-ascii\n\n",
+	  "Content-type: text/plain; charset=utf-8\n\n",
 	bound);
 
       if ((emf_text = next_emf(emf, US"intro")))
@@ -8163,7 +8163,7 @@
@@ -8252,7 +8252,7 @@
 
         /* output human readable part as text/plain section */
         fprintf(f, "--%s\n"
diff --git a/community/exim/makefile-linux.patch b/community/exim/makefile-linux.patch
new file mode 100644
index 0000000000..ec2ac56afb
--- /dev/null
+++ b/community/exim/makefile-linux.patch
@@ -0,0 +1,21 @@
diff -Naur a/OS/Makefile-Linux b/OS/Makefile-Linux
--- a/OS/Makefile-Linux	2019-01-30 13:59:52.000000000 +0000
+++ b/OS/Makefile-Linux	2019-03-07 07:34:20.329254503 +0000
@@ -5,8 +5,6 @@
 # used is ?= which is actually portable to other maintained Make variants,
 # just is not POSIX.
 
-HAVE_ICONV=yes
-
 BASENAME_COMMAND=look_for_it
 CHOWN_COMMAND=look_for_it
 CHGRP_COMMAND=look_for_it
@@ -19,7 +17,7 @@
 DBMLIB = -ldb
 USE_DB = yes
 
-LIBS = -lnsl -lcrypt -lm
+LIBS =  -lcrypt -lm
 LIBRESOLV = -lresolv
 
 X11=/usr/X11R6
diff --git a/community/exim/transport.patch b/community/exim/transport.patch
new file mode 100644
index 0000000000..c4d4fd0c3d
--- /dev/null
+++ b/community/exim/transport.patch
@@ -0,0 +1,20 @@
diff --git a/src/src/transport.c b/src/src/transport.c
index 0fa90cb04..f34db0914 100644
--- a/src/transport.c
+++ b/src/transport.c
@@ -1108,13 +1108,13 @@ DEBUG(D_transport)
 
 if (!(tctx->options & topt_no_body))
   {
-  int size = size_limit;
+  unsigned long size = size_limit > 0 ? size_limit : ULONG_MAX;
 
   nl_check_length = abs(nl_check_length);
   nl_partial_match = 0;
   if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0)
     return FALSE;
-  while (  (len = MAX(DELIVER_IN_BUFFER_SIZE, size)) > 0
+  while (  (len = MIN(DELIVER_IN_BUFFER_SIZE, size)) > 0
 	&& (len = read(deliver_datafile, deliver_in_buffer, len)) > 0)
     {
     if (!write_chunk(tctx, deliver_in_buffer, len))
-- 
2.21.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)