[arch-commits] Commit in libmilter/repos/extra-x86_64 (5 files)

Allan McRae allan at archlinux.org
Wed May 20 06:00:33 UTC 2020


    Date: Wednesday, May 20, 2020 @ 06:00:33
  Author: allan
Revision: 386984

archrelease: copy trunk to extra-x86_64

Added:
  libmilter/repos/extra-x86_64/PKGBUILD
    (from rev 386983, libmilter/trunk/PKGBUILD)
  libmilter/repos/extra-x86_64/fd-passing-libmilter.patch
    (from rev 386983, libmilter/trunk/fd-passing-libmilter.patch)
  libmilter/repos/extra-x86_64/sendmail-8.15.2-glibc-2.30.patch
    (from rev 386983, libmilter/trunk/sendmail-8.15.2-glibc-2.30.patch)
Deleted:
  libmilter/repos/extra-x86_64/PKGBUILD
  libmilter/repos/extra-x86_64/fd-passing-libmilter.patch

----------------------------------+
 PKGBUILD                         |  109 +++++++++++++------------
 fd-passing-libmilter.patch       |  160 ++++++++++++++++++-------------------
 sendmail-8.15.2-glibc-2.30.patch |   57 +++++++++++++
 3 files changed, 195 insertions(+), 131 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-20 06:00:05 UTC (rev 386983)
+++ PKGBUILD	2020-05-20 06:00:33 UTC (rev 386984)
@@ -1,51 +0,0 @@
-# Maintainer: Gaetan Bisson <bisson at archlinux.org>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: mutantmonkey <mutantmonkey at gmail.com>
-
-pkgname=libmilter
-_pkgname=sendmail
-pkgver=8.15.2
-pkgrel=2
-pkgdesc='Implementation of the sendmail Mail Filter API'
-url='https://www.proofpoint.com/us/sendmail-open-source'
-arch=('x86_64')
-options=('staticlibs')
-license=('custom:Sendmail open source license')
-validpgpkeys=('30BCA74705FA415455731D7BAAF5B5DE05BDCC53')
-source=("http://ftp.sendmail.org/${_pkgname}.${pkgver}.tar.gz"{,.sig}
-        'fd-passing-libmilter.patch')
-sha256sums=('24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439'
-            'SKIP'
-            'b856ebc17e39151652bda93f40f79756ac83eb4a0b67e6d55c049f3ebde42983')
-
-prepare() {
-	cd "${srcdir}/${_pkgname}-${pkgver}"
-	patch -p1 -i ../fd-passing-libmilter.patch # FS#49421
-
-	# From http://www.j-chkmail.org/wiki/doku.php/doc/installation/start#libmilter
-	cat >> devtools/Site/site.config.m4 <<EOF
-dnl Include our flags
-APPENDDEF(\`conf_libmilter_ENVDEF',\`${CPPFLAGS} ${CFLAGS}')
-dnl Enable libmilter with a pool of workers
-APPENDDEF(\`conf_libmilter_ENVDEF',\`-D_FFR_WORKERS_POOL=1 -DMIN_WORKERS=4')
-dnl Use poll instead of select
-APPENDDEF(\`conf_libmilter_ENVDEF',\`-DSM_CONF_POLL=1')
-dnl Enable IPv6
-APPENDDEF(\`conf_libmilter_ENVDEF',\`-DNETINET6=1')
-dnl Add -fPIC
-APPENDDEF(\`conf_libmilter_ENVDEF',\`-fPIC')
-EOF
-}
-
-build() {
-	cd "${srcdir}/${_pkgname}-${pkgver}/${pkgname}"
-	./Build
-}
-
-package() {
-	cd "${srcdir}/${_pkgname}-${pkgver}/${pkgname}"
-	install -d "${pkgdir}/usr/lib"
-	./Build DESTDIR="${pkgdir}" install
-	install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-	chown -R root:root "${pkgdir}"
-}

Copied: libmilter/repos/extra-x86_64/PKGBUILD (from rev 386983, libmilter/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-05-20 06:00:33 UTC (rev 386984)
@@ -0,0 +1,58 @@
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: mutantmonkey <mutantmonkey at gmail.com>
+
+pkgname=libmilter
+_pkgname=sendmail
+pkgver=8.15.2
+pkgrel=3
+pkgdesc='Implementation of the sendmail Mail Filter API'
+url='https://www.proofpoint.com/us/sendmail-open-source'
+arch=('x86_64')
+options=('staticlibs')
+license=('custom:Sendmail open source license')
+validpgpkeys=('30BCA74705FA415455731D7BAAF5B5DE05BDCC53')
+source=("https://ftp.sendmail.org/${_pkgname}.${pkgver}.tar.gz"{,.sig}
+        'fd-passing-libmilter.patch'
+        'sendmail-8.15.2-glibc-2.30.patch')
+sha256sums=('24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439'
+            'SKIP'
+            'b856ebc17e39151652bda93f40f79756ac83eb4a0b67e6d55c049f3ebde42983'
+            'f5378261028782c95014b0c91546e87132c13d4a39d81f61fc6039a0738a0c71')
+
+
+prepare() {
+	cd "${srcdir}/${_pkgname}-${pkgver}"
+	patch -p1 -i ../fd-passing-libmilter.patch # FS#49421
+	patch -p0 -i ../sendmail-8.15.2-glibc-2.30.patch
+
+	# From http://www.j-chkmail.org/wiki/doku.php/doc/installation/start#libmilter
+	cat >> devtools/Site/site.config.m4 <<EOF
+dnl Include our flags
+APPENDDEF(\`conf_libmilter_ENVDEF',\`${CPPFLAGS} ${CFLAGS}')
+dnl Enable libmilter with a pool of workers
+APPENDDEF(\`conf_libmilter_ENVDEF',\`-D_FFR_WORKERS_POOL=1 -DMIN_WORKERS=4')
+dnl Use poll instead of select
+APPENDDEF(\`conf_libmilter_ENVDEF',\`-DSM_CONF_POLL=1')
+dnl Enable IPv6
+APPENDDEF(\`conf_libmilter_ENVDEF',\`-DNETINET6=1')
+dnl Add -fPIC
+APPENDDEF(\`conf_libmilter_ENVDEF',\`-fPIC')
+dnl Permissions
+APPENDDEF(\`confINCGRP',\`root')
+APPENDDEF(\`confLIBGRP',\`root')
+EOF
+}
+
+build() {
+	cd "${srcdir}/${_pkgname}-${pkgver}/${pkgname}"
+	./Build
+}
+
+package() {
+	cd "${srcdir}/${_pkgname}-${pkgver}/${pkgname}"
+	install -d "${pkgdir}/usr/lib"
+	./Build DESTDIR="${pkgdir}" install
+	install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+	chown -R root:root "${pkgdir}"
+}

Deleted: fd-passing-libmilter.patch
===================================================================
--- fd-passing-libmilter.patch	2020-05-20 06:00:05 UTC (rev 386983)
+++ fd-passing-libmilter.patch	2020-05-20 06:00:33 UTC (rev 386984)
@@ -1,80 +0,0 @@
-Description: systemd-like socket activation support for libmilter
-Author: Mikhail Gusarov <dottedmag at debian.org
-diff --git a/libmilter/docs/smfi_setconn.html b/libmilter/docs/smfi_setconn.html
-index 70a510e..013f04e 100644
---- a/libmilter/docs/smfi_setconn.html
-+++ b/libmilter/docs/smfi_setconn.html
-@@ -43,6 +43,7 @@ Set the socket through which this filter should communicate with sendmail.
- 	<LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe.
- 	<LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket.
- 	<LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket.
-+	<LI><CODE>fd:number</CODE> -- Pre-opened file descriptor.
- 	</UL>
- 	</TD></TR>
-     </TABLE>
-diff --git a/libmilter/listener.c b/libmilter/listener.c
-index 48c552f..2249a1f 100644
---- a/libmilter/listener.c
-+++ b/libmilter/listener.c
-@@ -197,6 +197,11 @@ mi_milteropen(conn, backlog, rmsocket, name)
- 			L_socksize = sizeof addr.sin6;
- 		}
- #endif /* NETINET6 */
-+		else if (strcasecmp(p, "fd") == 0)
-+		{
-+			addr.sa.sa_family = AF_UNSPEC;
-+			L_socksize = sizeof (_SOCK_ADDR);
-+		}
- 		else
- 		{
- 			smi_log(SMI_LOG_ERR, "%s: unknown socket type %s",
-@@ -443,7 +448,21 @@ mi_milteropen(conn, backlog, rmsocket, name)
- 	}
- #endif /* NETINET || NETINET6 */
- 
--	sock = socket(addr.sa.sa_family, SOCK_STREAM, 0);
-+	if (addr.sa.sa_family == AF_UNSPEC)
-+	{
-+		char *end;
-+		sock = strtol(colon, &end, 10);
-+		if (*end != '\0' || sock < 0)
-+		{
-+			smi_log(SMI_LOG_ERR, "%s: expected positive integer as fd, got %s", name, colon);
-+			return INVALID_SOCKET;
-+		}
-+	}
-+	else
-+	{
-+		sock = socket(addr.sa.sa_family, SOCK_STREAM, 0);
-+	}
-+
- 	if (!ValidSocket(sock))
- 	{
- 		smi_log(SMI_LOG_ERR,
-@@ -466,6 +485,7 @@ mi_milteropen(conn, backlog, rmsocket, name)
- #if NETUNIX
- 	    addr.sa.sa_family != AF_UNIX &&
- #endif /* NETUNIX */
-+	    addr.sa.sa_family != AF_UNSPEC &&
- 	    setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &sockopt,
- 		       sizeof(sockopt)) == -1)
- 	{
-@@ -511,7 +531,8 @@ mi_milteropen(conn, backlog, rmsocket, name)
- 	}
- #endif /* NETUNIX */
- 
--	if (bind(sock, &addr.sa, L_socksize) < 0)
-+	if (addr.sa.sa_family != AF_UNSPEC &&
-+	    bind(sock, &addr.sa, L_socksize) < 0)
- 	{
- 		smi_log(SMI_LOG_ERR,
- 			"%s: Unable to bind to port %s: %s",
-@@ -817,7 +838,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog)
- # ifdef BSD4_4_SOCKADDR
- 		     cliaddr.sa.sa_len == 0 ||
- # endif /* BSD4_4_SOCKADDR */
--		     cliaddr.sa.sa_family != L_family))
-+		     (L_family != AF_UNSPEC && cliaddr.sa.sa_family != L_family)))
- 		{
- 			(void) closesocket(connfd);
- 			connfd = INVALID_SOCKET;

Copied: libmilter/repos/extra-x86_64/fd-passing-libmilter.patch (from rev 386983, libmilter/trunk/fd-passing-libmilter.patch)
===================================================================
--- fd-passing-libmilter.patch	                        (rev 0)
+++ fd-passing-libmilter.patch	2020-05-20 06:00:33 UTC (rev 386984)
@@ -0,0 +1,80 @@
+Description: systemd-like socket activation support for libmilter
+Author: Mikhail Gusarov <dottedmag at debian.org
+diff --git a/libmilter/docs/smfi_setconn.html b/libmilter/docs/smfi_setconn.html
+index 70a510e..013f04e 100644
+--- a/libmilter/docs/smfi_setconn.html
++++ b/libmilter/docs/smfi_setconn.html
+@@ -43,6 +43,7 @@ Set the socket through which this filter should communicate with sendmail.
+ 	<LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe.
+ 	<LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket.
+ 	<LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket.
++	<LI><CODE>fd:number</CODE> -- Pre-opened file descriptor.
+ 	</UL>
+ 	</TD></TR>
+     </TABLE>
+diff --git a/libmilter/listener.c b/libmilter/listener.c
+index 48c552f..2249a1f 100644
+--- a/libmilter/listener.c
++++ b/libmilter/listener.c
+@@ -197,6 +197,11 @@ mi_milteropen(conn, backlog, rmsocket, name)
+ 			L_socksize = sizeof addr.sin6;
+ 		}
+ #endif /* NETINET6 */
++		else if (strcasecmp(p, "fd") == 0)
++		{
++			addr.sa.sa_family = AF_UNSPEC;
++			L_socksize = sizeof (_SOCK_ADDR);
++		}
+ 		else
+ 		{
+ 			smi_log(SMI_LOG_ERR, "%s: unknown socket type %s",
+@@ -443,7 +448,21 @@ mi_milteropen(conn, backlog, rmsocket, name)
+ 	}
+ #endif /* NETINET || NETINET6 */
+ 
+-	sock = socket(addr.sa.sa_family, SOCK_STREAM, 0);
++	if (addr.sa.sa_family == AF_UNSPEC)
++	{
++		char *end;
++		sock = strtol(colon, &end, 10);
++		if (*end != '\0' || sock < 0)
++		{
++			smi_log(SMI_LOG_ERR, "%s: expected positive integer as fd, got %s", name, colon);
++			return INVALID_SOCKET;
++		}
++	}
++	else
++	{
++		sock = socket(addr.sa.sa_family, SOCK_STREAM, 0);
++	}
++
+ 	if (!ValidSocket(sock))
+ 	{
+ 		smi_log(SMI_LOG_ERR,
+@@ -466,6 +485,7 @@ mi_milteropen(conn, backlog, rmsocket, name)
+ #if NETUNIX
+ 	    addr.sa.sa_family != AF_UNIX &&
+ #endif /* NETUNIX */
++	    addr.sa.sa_family != AF_UNSPEC &&
+ 	    setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &sockopt,
+ 		       sizeof(sockopt)) == -1)
+ 	{
+@@ -511,7 +531,8 @@ mi_milteropen(conn, backlog, rmsocket, name)
+ 	}
+ #endif /* NETUNIX */
+ 
+-	if (bind(sock, &addr.sa, L_socksize) < 0)
++	if (addr.sa.sa_family != AF_UNSPEC &&
++	    bind(sock, &addr.sa, L_socksize) < 0)
+ 	{
+ 		smi_log(SMI_LOG_ERR,
+ 			"%s: Unable to bind to port %s: %s",
+@@ -817,7 +838,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog)
+ # ifdef BSD4_4_SOCKADDR
+ 		     cliaddr.sa.sa_len == 0 ||
+ # endif /* BSD4_4_SOCKADDR */
+-		     cliaddr.sa.sa_family != L_family))
++		     (L_family != AF_UNSPEC && cliaddr.sa.sa_family != L_family)))
+ 		{
+ 			(void) closesocket(connfd);
+ 			connfd = INVALID_SOCKET;

Copied: libmilter/repos/extra-x86_64/sendmail-8.15.2-glibc-2.30.patch (from rev 386983, libmilter/trunk/sendmail-8.15.2-glibc-2.30.patch)
===================================================================
--- sendmail-8.15.2-glibc-2.30.patch	                        (rev 0)
+++ sendmail-8.15.2-glibc-2.30.patch	2020-05-20 06:00:33 UTC (rev 386984)
@@ -0,0 +1,57 @@
+The former deprecated macro RES_USE_INET6 is gone with glibc 2.30
+
+---
+ libmilter/sm_gethost.c |    6 ++++--
+ sendmail/conf.c        |    6 ++++--
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+--- libmilter/sm_gethost.c
++++ libmilter/sm_gethost.c	2019-09-28 07:27:46.512228011 +0000
+@@ -51,18 +51,20 @@ sm_getipnodebyname(name, family, flags,
+ {
+ 	bool resv6 = true;
+ 	struct hostent *h;
+-
++#ifdef RES_USE_INET6
+ 	if (family == AF_INET6)
+ 	{
+ 		/* From RFC2133, section 6.1 */
+ 		resv6 = bitset(RES_USE_INET6, _res.options);
+ 		_res.options |= RES_USE_INET6;
+ 	}
++#endif
+ 	SM_SET_H_ERRNO(0);
+ 	h = gethostbyname(name);
++#ifdef RES_USE_INET6
+ 	if (family == AF_INET6 && !resv6)
+ 		_res.options &= ~RES_USE_INET6;
+-
++#endif
+ 	/* the function is supposed to return only the requested family */
+ 	if (h != NULL && h->h_addrtype != family)
+ 	{
+--- sendmail/conf.c
++++ sendmail/conf.c	2019-09-28 07:28:39.103245002 +0000
+@@ -4242,18 +4242,20 @@ sm_getipnodebyname(name, family, flags,
+ 
+ # else /* HAS_GETHOSTBYNAME2 */
+ 	bool resv6 = true;
+-
++#ifdef RES_USE_INET6
+ 	if (family == AF_INET6)
+ 	{
+ 		/* From RFC2133, section 6.1 */
+ 		resv6 = bitset(RES_USE_INET6, _res.options);
+ 		_res.options |= RES_USE_INET6;
+ 	}
++#endif
+ 	SM_SET_H_ERRNO(0);
+ 	h = gethostbyname(name);
++#ifdef RES_USE_INET6
+ 	if (!resv6)
+ 		_res.options &= ~RES_USE_INET6;
+-
++#endif
+ 	/* the function is supposed to return only the requested family */
+ 	if (h != NULL && h->h_addrtype != family)
+ 	{


More information about the arch-commits mailing list