From be49c58d77ce855f902728b0c68fc10bafee6257 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 6 Dec 2015 10:24:52 +0100 Subject: libtirpc: update to latest stable version --- package/libtirpc/patches/patch-Makefile_am | 54 +++++++++++ package/libtirpc/patches/patch-configure_ac | 23 +++++ package/libtirpc/patches/patch-src_Makefile_am | 34 +++---- package/libtirpc/patches/patch-src_clnt_bcast_c | 18 ++++ package/libtirpc/patches/patch-src_rpc_soc_c | 105 +++++++++++++++++++--- package/libtirpc/patches/patch-src_svc_auth_c | 12 +++ package/libtirpc/patches/patch-src_svc_c | 36 ++++++++ package/libtirpc/patches/patch-tirpc_rpc_rpcent_h | 6 +- 8 files changed, 256 insertions(+), 32 deletions(-) create mode 100644 package/libtirpc/patches/patch-Makefile_am create mode 100644 package/libtirpc/patches/patch-configure_ac create mode 100644 package/libtirpc/patches/patch-src_clnt_bcast_c create mode 100644 package/libtirpc/patches/patch-src_svc_auth_c create mode 100644 package/libtirpc/patches/patch-src_svc_c (limited to 'package/libtirpc/patches') diff --git a/package/libtirpc/patches/patch-Makefile_am b/package/libtirpc/patches/patch-Makefile_am new file mode 100644 index 000000000..80bc6991c --- /dev/null +++ b/package/libtirpc/patches/patch-Makefile_am @@ -0,0 +1,54 @@ +--- libtirpc-1.0.1.orig/Makefile.am 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/Makefile.am 2015-11-29 16:38:58.340674483 +0100 +@@ -1,6 +1,12 @@ +-SUBDIRS = src man doc ++SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + ++GENFILES = tirpc/rpcsvc/crypt.h \ ++ tirpc/rpcsvc/mount.h \ ++ tirpc/rpcsvc/nfs_prot.h \ ++ tirpc/rpcsvc/rquota.h \ ++ tirpc/rpc/rpcb_prot.h ++ + noinst_HEADERS = tirpc/reentrant.h \ + tirpc/getpeereid.h \ + tirpc/libc_private.h \ +@@ -8,7 +14,9 @@ noinst_HEADERS = tirpc/reentrant. + + nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpcsvc/crypt.x \ +- tirpc/rpcsvc/crypt.h \ ++ tirpc/rpcsvc/mount.x \ ++ tirpc/rpcsvc/nfs_prot.x \ ++ tirpc/rpcsvc/rquota.x \ + tirpc/rpc/xdr.h \ + tirpc/rpc/types.h \ + tirpc/rpc/svc_soc.h \ +@@ -21,7 +29,6 @@ nobase_include_HEADERS = tirpc/netconfig + tirpc/rpc/rpcent.h \ + tirpc/rpc/rpc_com.h \ + tirpc/rpc/rpcb_prot.x \ +- tirpc/rpc/rpcb_prot.h \ + tirpc/rpc/rpcb_clnt.h \ + tirpc/rpc/raw.h \ + tirpc/rpc/pmap_rmt.h \ +@@ -48,5 +55,17 @@ endif + pkgconfigdir=$(libdir)/pkgconfig + pkgconfig_DATA = libtirpc.pc + +-CLEANFILES = cscope.* *~ ++nobase_nodist_include_HEADERS = $(GENFILES) ++BUILT_SOURCES = $(GENFILES) ++ ++$(GENFILES): %.h: %.x $(top_builddir)/rpcgen/rpcgen ++ mkdir -p $(dir $@) ++ $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ ++$(top_builddir)/rpcgen/rpcgen: force ++ cd rpcgen && $(MAKE) ++ ++force: ++ ++CLEANFILES = cscope.* *~ $(GENFILES) + DISTCLEANFILES = Makefile.in libtirpc*.tar.gz diff --git a/package/libtirpc/patches/patch-configure_ac b/package/libtirpc/patches/patch-configure_ac new file mode 100644 index 000000000..659bdad8c --- /dev/null +++ b/package/libtirpc/patches/patch-configure_ac @@ -0,0 +1,23 @@ +--- libtirpc-1.0.1.orig/configure.ac 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/configure.ac 2015-11-29 16:38:38.817971632 +0100 +@@ -89,7 +89,19 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h li + AC_CHECK_LIB([pthread], [pthread_create]) + AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) + +-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) ++AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) ++ ++AC_MSG_CHECKING([for a C compiler for build tools]) ++if test $cross_compiling = yes; then ++ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) ++else ++ CC_FOR_BUILD=$CC ++fi ++AC_MSG_RESULT([$CC_FOR_BUILD]) ++AC_SUBST(CC_FOR_BUILD) ++ ++AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile rpcgen/Makefile]) ++ + AC_OUTPUT(libtirpc.pc) + + diff --git a/package/libtirpc/patches/patch-src_Makefile_am b/package/libtirpc/patches/patch-src_Makefile_am index 5c8e5dccb..2188984f9 100644 --- a/package/libtirpc/patches/patch-src_Makefile_am +++ b/package/libtirpc/patches/patch-src_Makefile_am @@ -1,31 +1,33 @@ ---- libtirpc-0.3.2.orig/src/Makefile.am 2015-06-16 17:35:08.000000000 +0200 -+++ libtirpc-0.3.2/src/Makefile.am 2015-06-27 12:05:34.000000000 +0200 -@@ -41,7 +41,7 @@ lib_LTLIBRARIES = libtirpc.la - # release number of your package. This is an abuse that only fosters - # misunderstanding of the purpose of library versions." - # --libtirpc_la_LDFLAGS = -lpthread -version-info 1:10:0 -+libtirpc_la_LDFLAGS = -no-undefined -lpthread -version-info 1:10:0 +--- libtirpc-1.0.1.orig/src/Makefile.am 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/src/Makefile.am 2015-11-29 16:39:17.803381320 +0100 +@@ -8,7 +8,7 @@ + noinst_HEADERS = rpc_com.h debug.h - libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \ - clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \ -@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_u + AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ +- -D_GNU_SOURCE -Wall -pipe ++ -D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc + + lib_LTLIBRARIES = libtirpc.la + +@@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_u + pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \ rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ +- svc_auth_des.c \ svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ - auth_time.c auth_des.c authdes_prot.c debug.c + debug.c ## XDR - libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c -@@ -68,8 +68,8 @@ if GSS + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c +@@ -41,8 +40,8 @@ if GSS libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS) endif -libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c --libtirpc_la_SOURCES += netname.c netnamer.c rtime.c -+libtirpc_la_SOURCES += key_call.c key_prot_xdr.c -+libtirpc_la_SOURCES += rtime.c +-libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c ++#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c ++#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c CLEANFILES = cscope.* *~ DISTCLEANFILES = Makefile.in diff --git a/package/libtirpc/patches/patch-src_clnt_bcast_c b/package/libtirpc/patches/patch-src_clnt_bcast_c new file mode 100644 index 000000000..7472e6272 --- /dev/null +++ b/package/libtirpc/patches/patch-src_clnt_bcast_c @@ -0,0 +1,18 @@ +--- libtirpc-1.0.1.orig/src/clnt_bcast.c 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/src/clnt_bcast.c 2015-11-29 16:50:32.363665821 +0100 +@@ -40,7 +40,6 @@ + */ + #include + #include +-#include + + #include + #include +@@ -62,6 +61,7 @@ + #include + #include + ++#include "sys/queue.h" + #include "rpc_com.h" + #include "debug.h" + diff --git a/package/libtirpc/patches/patch-src_rpc_soc_c b/package/libtirpc/patches/patch-src_rpc_soc_c index a03858799..b43a80877 100644 --- a/package/libtirpc/patches/patch-src_rpc_soc_c +++ b/package/libtirpc/patches/patch-src_rpc_soc_c @@ -1,18 +1,97 @@ ---- libtirpc-0.3.2.orig/src/rpc_soc.c 2015-06-16 17:35:08.000000000 +0200 -+++ libtirpc-0.3.2/src/rpc_soc.c 2015-06-27 11:37:58.000000000 +0200 -@@ -520,6 +520,7 @@ clnt_broadcast(prog, vers, proc, xargs, - (resultproc_t) rpc_wrap_bcast, "udp"); - } +--- libtirpc-1.0.1.orig/src/rpc_soc.c 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/src/rpc_soc.c 2015-11-29 16:39:17.831379460 +0100 +@@ -61,7 +61,6 @@ + #include + #include + #include +-#include -+#if 0 - /* - * Create the client des authentication object. Obsoleted by - * authdes_seccreate(). -@@ -551,6 +552,7 @@ fallback: - dummy = authdes_seccreate(servername, window, NULL, ckey); - return (dummy); + #include "rpc_com.h" + +@@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs, } -+#endif /* +- * Create the client des authentication object. Obsoleted by +- * authdes_seccreate(). +- */ +-AUTH * +-authdes_create(servername, window, syncaddr, ckey) +- char *servername; /* network name of server */ +- u_int window; /* time to live */ +- struct sockaddr *syncaddr; /* optional hostaddr to sync with */ +- des_block *ckey; /* optional conversation key to use */ +-{ +- AUTH *nauth; +- char hostname[NI_MAXHOST]; +- +- if (syncaddr) { +- /* +- * Change addr to hostname, because that is the way +- * new interface takes it. +- */ +- switch (syncaddr->sa_family) { +- case AF_INET: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- case AF_INET6: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- default: +- goto fallback; +- } +- nauth = authdes_seccreate(servername, window, hostname, ckey); +- return (nauth); +- } +-fallback: +- return authdes_seccreate(servername, window, NULL, ckey); +-} +- +-/* +- * Create the client des authentication object. Obsoleted by +- * authdes_pk_seccreate(). +- */ +-extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *, +- const des_block *, nis_server *); +- +-AUTH * +-authdes_pk_create(servername, pkey, window, syncaddr, ckey) +- char *servername; /* network name of server */ +- netobj *pkey; /* public key */ +- u_int window; /* time to live */ +- struct sockaddr *syncaddr; /* optional hostaddr to sync with */ +- des_block *ckey; /* optional conversation key to use */ +-{ +- AUTH *nauth; +- char hostname[NI_MAXHOST]; +- +- if (syncaddr) { +- /* +- * Change addr to hostname, because that is the way +- * new interface takes it. +- */ +- switch (syncaddr->sa_family) { +- case AF_INET: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- default: +- goto fallback; +- } +- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL); +- return (nauth); +- } +-fallback: +- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL); +-} +- +- +-/* * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() + */ + CLIENT * diff --git a/package/libtirpc/patches/patch-src_svc_auth_c b/package/libtirpc/patches/patch-src_svc_auth_c new file mode 100644 index 000000000..05436f3b7 --- /dev/null +++ b/package/libtirpc/patches/patch-src_svc_auth_c @@ -0,0 +1,12 @@ +--- libtirpc-1.0.1.orig/src/svc_auth.c 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/src/svc_auth.c 2015-11-29 16:39:17.807381054 +0100 +@@ -114,9 +114,6 @@ _gss_authenticate(rqst, msg, no_dispatch + case AUTH_SHORT: + dummy = _svcauth_short(rqst, msg); + return (dummy); +- case AUTH_DES: +- dummy = _svcauth_des(rqst, msg); +- return (dummy); + #ifdef HAVE_RPCSEC_GSS + case RPCSEC_GSS: + dummy = _svcauth_gss(rqst, msg, no_dispatch); diff --git a/package/libtirpc/patches/patch-src_svc_c b/package/libtirpc/patches/patch-src_svc_c new file mode 100644 index 000000000..b2ce784ca --- /dev/null +++ b/package/libtirpc/patches/patch-src_svc_c @@ -0,0 +1,36 @@ +--- libtirpc-1.0.1.orig/src/svc.c 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/src/svc.c 2015-11-29 16:39:24.994903493 +0100 +@@ -99,7 +99,7 @@ xprt_register (xprt) + { + __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *)); + if (__svc_xports == NULL) +- return; ++ goto unlock; + } + if (sock < _rpc_dtablesize()) + { +@@ -120,14 +120,14 @@ xprt_register (xprt) + svc_pollfd[i].fd = sock; + svc_pollfd[i].events = (POLLIN | POLLPRI | + POLLRDNORM | POLLRDBAND); +- return; ++ goto unlock; + } + + new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd, + sizeof (struct pollfd) + * (svc_max_pollfd + 1)); + if (new_svc_pollfd == NULL) /* Out of memory */ +- return; ++ goto unlock; + svc_pollfd = new_svc_pollfd; + ++svc_max_pollfd; + +@@ -135,6 +135,7 @@ xprt_register (xprt) + svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI | + POLLRDNORM | POLLRDBAND); + } ++unlock: + rwlock_unlock (&svc_fd_lock); + } + diff --git a/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h b/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h index 73c8ef727..46dd86d8b 100644 --- a/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h +++ b/package/libtirpc/patches/patch-tirpc_rpc_rpcent_h @@ -1,5 +1,5 @@ ---- libtirpc-0.3.1.orig/tirpc/rpc/rpcent.h 2015-06-01 14:13:24.000000000 +0200 -+++ libtirpc-0.3.1/tirpc/rpc/rpcent.h 2015-06-17 22:09:32.000000000 +0200 +--- libtirpc-1.0.1.orig/tirpc/rpc/rpcent.h 2015-10-30 16:15:14.000000000 +0100 ++++ libtirpc-1.0.1/tirpc/rpc/rpcent.h 2015-11-29 16:38:28.630648509 +0100 @@ -48,8 +48,9 @@ extern "C" { #endif @@ -8,7 +8,7 @@ -#if !defined(__GLIBC__) +/* 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__) ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) struct rpcent { char *r_name; /* name of server for this rpc program */ char **r_aliases; /* alias list */ -- cgit v1.2.3