From 2a8cc332411a193f3ef3406a791c9c6a0a29c4f0 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 11 Jun 2024 08:29:51 +0200 Subject: [PATCH] libtirpc: Update to 1.3.4 Sync patches from cygwin --- libtirpc/1.0.2-cygwin-bindresvport.patch | 38 ------------- ...rpcent.patch => 1.3.2-cygwin-rpcent.patch} | 8 +-- libtirpc/1.3.2-cygwin-types.patch | 11 ++++ libtirpc/1.3.3-cygwin-bindresvport.patch | 53 +++++++++++++++++++ ...ncludedir.patch => 1.3.3-includedir.patch} | 23 ++------ libtirpc/1.3.4-no-errqueue.patch | 14 +++++ libtirpc/PKGBUILD | 53 ++++++++++--------- 7 files changed, 115 insertions(+), 85 deletions(-) delete mode 100644 libtirpc/1.0.2-cygwin-bindresvport.patch rename libtirpc/{0.3.2-cygwin-rpcent.patch => 1.3.2-cygwin-rpcent.patch} (50%) create mode 100644 libtirpc/1.3.2-cygwin-types.patch create mode 100644 libtirpc/1.3.3-cygwin-bindresvport.patch rename libtirpc/{1.0.2-includedir.patch => 1.3.3-includedir.patch} (68%) create mode 100644 libtirpc/1.3.4-no-errqueue.patch diff --git a/libtirpc/1.0.2-cygwin-bindresvport.patch b/libtirpc/1.0.2-cygwin-bindresvport.patch deleted file mode 100644 index 757876ad..00000000 --- a/libtirpc/1.0.2-cygwin-bindresvport.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- origsrc/libtirpc-1.3.3/configure.ac.orig 2022-12-29 09:37:45.342837000 +0100 -+++ src/libtirpc-1.3.3/configure.ac 2022-12-29 09:39:05.827381500 +0100 -@@ -100,7 +100,7 @@ - AC_PREFIX_DEFAULT(/usr) - AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h]) - AX_PTHREAD --AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) -+AC_CHECK_FUNCS([bindresvport getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) - - AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) - AC_OUTPUT(libtirpc.pc) ---- origsrc/libtirpc-1.0.2/src/bindresvport.c 2018-02-06 21:45:16.038017400 -0600 -+++ src/libtirpc-1.0.2/src/bindresvport.c 2018-02-07 10:29:18.679180800 -0600 -@@ -32,6 +32,10 @@ - * - * Portions Copyright(C) 1996, Jason Downs. All rights reserved. - */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif - - #include - #include -@@ -49,6 +53,8 @@ - #include - #include - -+#if !HAVE_BINDRESVPORT -+ - extern pthread_mutex_t port_lock; - - /* -@@ -246,3 +252,4 @@ bindresvport_sa(sd, sa) - return (error); - } - #endif -+#endif /* !HAVE_BINDRESVPORT */ diff --git a/libtirpc/0.3.2-cygwin-rpcent.patch b/libtirpc/1.3.2-cygwin-rpcent.patch similarity index 50% rename from libtirpc/0.3.2-cygwin-rpcent.patch rename to libtirpc/1.3.2-cygwin-rpcent.patch index 8eac5edd..a51bcee6 100644 --- a/libtirpc/0.3.2-cygwin-rpcent.patch +++ b/libtirpc/1.3.2-cygwin-rpcent.patch @@ -1,11 +1,11 @@ ---- origsrc/libtirpc-0.3.2/tirpc/rpc/rpcent.h 2015-06-16 10:35:08.000000000 -0500 -+++ src/libtirpc-0.3.2/tirpc/rpc/rpcent.h 2015-10-13 16:51:15.548500000 -0500 -@@ -49,7 +49,7 @@ extern "C" { +--- origsrc/libtirpc-1.3.2/tirpc/rpc/rpcent.h 2021-05-10 19:59:15.000000000 +0200 ++++ src/libtirpc-1.3.2/tirpc/rpc/rpcent.h 2022-01-26 21:48:15.398905000 +0100 +@@ -50,7 +50,7 @@ extern "C" { /* These are defined in /usr/include/rpc/netdb.h, unless we are using the C library without RPC support. */ -#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) -+#if (defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__)) || (!defined(__GLIBC__) && !defined(__CYGWIN__)) ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) && !defined(__CYGWIN__) struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ diff --git a/libtirpc/1.3.2-cygwin-types.patch b/libtirpc/1.3.2-cygwin-types.patch new file mode 100644 index 00000000..1147f9cc --- /dev/null +++ b/libtirpc/1.3.2-cygwin-types.patch @@ -0,0 +1,11 @@ +--- origsrc/libtirpc-1.3.2/tirpc/rpc/types.h 2022-01-26 21:44:56.018912000 +0100 ++++ src/libtirpc-1.3.2/tirpc/rpc/types.h 2022-01-26 21:55:20.751367400 +0100 +@@ -71,7 +71,7 @@ typedef int32_t rpc_inline_t; + #define mem_free(ptr, bsize) free(ptr) + + +-#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined (__GLIBC__) ++#if defined __APPLE_CC__ || defined __FreeBSD__ || defined __CYGWIN__ || !defined (__GLIBC__) + # define __u_char_defined + # define __daddr_t_defined + #endif diff --git a/libtirpc/1.3.3-cygwin-bindresvport.patch b/libtirpc/1.3.3-cygwin-bindresvport.patch new file mode 100644 index 00000000..e17531b8 --- /dev/null +++ b/libtirpc/1.3.3-cygwin-bindresvport.patch @@ -0,0 +1,53 @@ +--- origsrc/libtirpc-1.3.3/configure.ac 2022-08-10 08:25:16.416044500 +0200 ++++ configure.ac 2022-08-10 12:19:20.214909400 +0200 +@@ -100,9 +100,9 @@ AC_HEADER_DIRENT + AC_PREFIX_DEFAULT(/usr) + AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h]) + AX_PTHREAD +-AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) ++AC_CHECK_FUNCS([bindresvport getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) + +-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) ++AC_CONFIG_FILES([Makefile tirpc/Makefile src/Makefile man/Makefile doc/Makefile]) + AC_OUTPUT(libtirpc.pc) + + +--- origsrc/libtirpc-1.3.3/src/bindresvport.c 2022-08-02 20:55:33.000000000 +0200 ++++ src/bindresvport.c 2022-08-10 12:14:00.218916600 +0200 +@@ -33,6 +33,10 @@ + * Portions Copyright(C) 1996, Jason Downs. All rights reserved. + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include + #include + +@@ -51,6 +55,8 @@ + #include + #include + ++#if !HAVE_BINDRESVPORT ++ + extern pthread_mutex_t port_lock; + + /* +@@ -335,3 +341,4 @@ bindresvport_sa(sd, sa) + return (error); + } + #endif ++#endif /* !HAVE_BINDRESVPORT */ +--- origsrc/libtirpc-1.3.3/config.h.in 2022-08-07 18:59:28.000000000 +0200 ++++ config.h.in 2022-08-10 12:20:15.639463600 +0200 +@@ -6,6 +6,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_ARPA_INET_H + ++/* Define to 1 if you have the `bindresvport' function. */ ++#undef HAVE_BINDRESVPORT ++ + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #undef HAVE_DIRENT_H diff --git a/libtirpc/1.0.2-includedir.patch b/libtirpc/1.3.3-includedir.patch similarity index 68% rename from libtirpc/1.0.2-includedir.patch rename to libtirpc/1.3.3-includedir.patch index 998d9b48..8e2770b7 100644 --- a/libtirpc/1.0.2-includedir.patch +++ b/libtirpc/1.3.3-includedir.patch @@ -1,5 +1,5 @@ ---- origsrc/libtirpc-1.0.2/Makefile.am 2017-07-05 10:02:23.000000000 -0500 -+++ src/libtirpc-1.0.2/Makefile.am 2018-02-06 21:58:49.569565500 -0600 +--- origsrc/libtirpc-1.3.3/Makefile.am 2022-08-02 20:55:33.000000000 +0200 ++++ Makefile.am 2022-08-10 08:33:43.851108700 +0200 @@ -1,50 +1,6 @@ -SUBDIRS = src man doc +SUBDIRS = tirpc src man doc @@ -52,23 +52,8 @@ pkgconfigdir=$(libdir)/pkgconfig pkgconfig_DATA = libtirpc.pc ---- origsrc/libtirpc-1.0.2/configure.ac 2018-02-06 21:45:15.467634500 -0600 -+++ src/libtirpc-1.0.2/configure.ac 2018-02-06 21:59:51.687928500 -0600 -@@ -96,3 +96,3 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li - --AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) -+AC_CONFIG_FILES([Makefile tirpc/Makefile src/Makefile man/Makefile doc/Makefile]) - AC_OUTPUT(libtirpc.pc) ---- origsrc/libtirpc-1.3.3/libtirpc.pc.in.orig 2022-12-29 09:40:09.854859500 +0100 -+++ src/libtirpc-1.3.3/libtirpc.pc.in 2022-12-29 09:41:01.227230000 +0100 -@@ -9,4 +9,4 @@ - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -ltirpc - Libs.private: @PTHREAD_LIBS@ --Cflags: -I${includedir}/tirpc -+Cflags: -I${includedir} ---- origsrc/libtirpc-1.0.2/tirpc/Makefile.am 1969-12-31 18:00:00.000000000 -0600 -+++ src/libtirpc-1.0.2/tirpc/Makefile.am 2018-02-06 21:59:10.087938200 -0600 +--- origsrc/libtirpc-1.3.3/tirpc/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ tirpc/Makefile.am 2022-08-10 08:23:59.200552000 +0200 @@ -0,0 +1,43 @@ +noinst_HEADERS = reentrant.h \ + getpeereid.h \ diff --git a/libtirpc/1.3.4-no-errqueue.patch b/libtirpc/1.3.4-no-errqueue.patch new file mode 100644 index 00000000..b60bd40a --- /dev/null +++ b/libtirpc/1.3.4-no-errqueue.patch @@ -0,0 +1,14 @@ +--- origsrc/libtirpc-1.3.4/src/clnt_dg.c 2023-10-07 09:54:42.000000000 +0200 ++++ src/clnt_dg.c 2024-01-27 23:16:30.348368400 +0100 +@@ -55,6 +55,11 @@ + #include "rpc_com.h" + #include "clnt_fd_locks.h" + ++/* on Cygwin we have IP_RECVERR but not linux/errqueue.h */ ++#ifdef __CYGWIN__ ++ #undef IP_RECVERR ++#endif ++ + #ifdef IP_RECVERR + #include + #include diff --git a/libtirpc/PKGBUILD b/libtirpc/PKGBUILD index 23cadc7e..038240b7 100644 --- a/libtirpc/PKGBUILD +++ b/libtirpc/PKGBUILD @@ -2,8 +2,8 @@ pkgbase=libtirpc pkgname=('libtirpc' 'libtirpc-devel') -pkgver=1.3.3 -pkgrel=2 +pkgver=1.3.4 +pkgrel=1 pkgdesc="A port of Sun's Transport-Independent RPC library" arch=('i686' 'x86_64') license=('BSD') @@ -14,37 +14,42 @@ msys2_references=( ) makedepends=('gcc' 'patch' 'heimdal-devel' 'autotools') source=(https://downloads.sourceforge.net/libtirpc/libtirpc-${pkgver}.tar.bz2 - 0.3.2-no-undefined.patch - 0.2.4-cygwin-rpc-types.patch - 0.2.4-cygwin-pthread.patch - 1.0.2-cygwin-bindresvport.patch 0.2.4-cygwin-ipv6.patch 0.2.4-cygwin-poll.patch - 0.3.2-cygwin-rpcent.patch - 1.0.2-includedir.patch - 1000-disable-linux-only.patch) -sha256sums=('6474e98851d9f6f33871957ddee9714fdcd9d8a5ee9abb5a98d63ea2e60e12f3' - '19f6c539781476c5ac7fd58f080ca587c4c70c69dd82d57e30d69d39b9c7ac9f' - 'c247c94a431c0548610c6e97b620a3f81767a31f894b14027737b8afbade95f8' - 'd45ae803c401ca5a37e5084da822ff7f448241be38d457ef981692322e7fd057' - 'cb5ac736a398d469815ecb82f775fb82d8d825ebde29f6d9b160203270156248' + 0.2.4-cygwin-pthread.patch + 0.2.4-cygwin-rpc-types.patch + 0.3.2-no-undefined.patch + 1.3.2-cygwin-rpcent.patch + 1.3.2-cygwin-types.patch + 1.3.3-cygwin-bindresvport.patch + 1.3.3-includedir.patch + 1.3.4-no-errqueue.patch) +sha256sums=('1e0b0c7231c5fa122e06c0609a76723664d068b0dba3b8219b63e6340b347860' '24d8f179812434e3be91800eb4387fec38d9050f3d1902ee1e66246c776fac11' '90cedf3f930bf44dbbed2e520305df1a53daddac464d1d68edf501466578ac0c' - 'fe6af160a7fa983fa772f6fa0d84d930c94250424289665625ebad7dd33c191c' - '3d76303b104124b700e6d7b49f0d3755b11176577b672fa0a365e21c36e0403e' - '2dfb0e2ba5e8230a3c94b489976ccea03ba2add5f412f127ba87afb442c87563') + 'd45ae803c401ca5a37e5084da822ff7f448241be38d457ef981692322e7fd057' + 'c247c94a431c0548610c6e97b620a3f81767a31f894b14027737b8afbade95f8' + '19f6c539781476c5ac7fd58f080ca587c4c70c69dd82d57e30d69d39b9c7ac9f' + '46039746d183cc7d8c26f87ed6529578720589d0257f4bb3305318073d0b7964' + '6a93776a8a1a40c67455b35ebec9452d36da6752ab9defbc84e147e3edb33150' + 'e7e3eea865c48638d86a91d56a1b1626173f542b86367b82222a04b6b9c15db0' + '46ee748de1794775f03f049f6e8cfb24f9f2760b0efae8a4258c13bc3ec80f6d' + '56b25ddbfbee6eaa204151c77ce15d897ed4e9fb938e91048998127cb3deb373') prepare() { cd libtirpc-${pkgver} - patch -p2 -i ${srcdir}/0.3.2-no-undefined.patch - patch -p2 -i ${srcdir}/0.2.4-cygwin-rpc-types.patch - patch -p2 -i ${srcdir}/0.2.4-cygwin-pthread.patch - patch -p2 -i ${srcdir}/1.0.2-cygwin-bindresvport.patch + + # from cygwin: https://cygwin.com/cgit/cygwin-packages/libtirpc patch -p2 -i ${srcdir}/0.2.4-cygwin-ipv6.patch patch -p2 -i ${srcdir}/0.2.4-cygwin-poll.patch - patch -p2 -i ${srcdir}/0.3.2-cygwin-rpcent.patch - patch -p2 -i ${srcdir}/1.0.2-includedir.patch - patch -p1 -i ${srcdir}/1000-disable-linux-only.patch + patch -p2 -i ${srcdir}/0.2.4-cygwin-pthread.patch + patch -p2 -i ${srcdir}/0.2.4-cygwin-rpc-types.patch + patch -p2 -i ${srcdir}/0.3.2-no-undefined.patch + patch -p2 -i ${srcdir}/1.3.2-cygwin-rpcent.patch + patch -p2 -i ${srcdir}/1.3.2-cygwin-types.patch + patch -p2 -i ${srcdir}/1.3.3-cygwin-bindresvport.patch + patch -p2 -i ${srcdir}/1.3.3-includedir.patch + patch -p2 -i ${srcdir}/1.3.4-no-errqueue.patch autoreconf -fiv }