[autofs/f16] - fix libtirpc name clash.

Ian Kent iankent at fedoraproject.org
Thu Aug 30 09:58:42 UTC 2012


commit 3c45270f80369e72b472a3da2f51a6ff0a81f8fa
Author: Ian Kent <ikent at redhat.com>
Date:   Thu Aug 30 17:58:21 2012 +0800

    - fix libtirpc name clash.

 ...6-fix-initialization-in-rpc-create_client.patch |   18 ++------
 autofs-5.0.6-fix-libtirpc-name-clash.patch         |   45 ++++++++++++++++++++
 autofs.spec                                        |    3 +
 3 files changed, 53 insertions(+), 13 deletions(-)
---
diff --git a/autofs-5.0.6-fix-initialization-in-rpc-create_client.patch b/autofs-5.0.6-fix-initialization-in-rpc-create_client.patch
index 2b39dc2..8fcbc96 100644
--- a/autofs-5.0.6-fix-initialization-in-rpc-create_client.patch
+++ b/autofs-5.0.6-fix-initialization-in-rpc-create_client.patch
@@ -8,8 +8,8 @@ the passed in variable.
 ---
 
  CHANGELOG      |    1 +
- lib/rpc_subs.c |   11 ++++++++---
- 2 files changed, 9 insertions(+), 3 deletions(-)
+ lib/rpc_subs.c |   10 +++++++---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
 
 
 --- autofs-5.0.6.orig/CHANGELOG
@@ -24,15 +24,7 @@ the passed in variable.
  -----------------------
 --- autofs-5.0.6.orig/lib/rpc_subs.c
 +++ autofs-5.0.6/lib/rpc_subs.c
-@@ -333,6 +333,7 @@ static CLIENT *create_client(struct conn
- 	int fd, ret;
- 
- 	fd = RPC_ANYSOCK;
-+	*client = NULL;
- 
- 	if (info->client) {
- 		if (!clnt_control(info->client, CLGET_FD, (char *) &fd)) {
-@@ -359,7 +360,10 @@ static CLIENT *create_client(struct conn
+@@ -359,7 +359,10 @@ static CLIENT *create_client(struct conn
  	memset(&hints, 0, sizeof(hints));
  	hints.ai_flags = AI_ADDRCONFIG;
  	hints.ai_family = AF_UNSPEC;
@@ -44,7 +36,7 @@ the passed in variable.
  
  	ret = getaddrinfo(info->host, NULL, &hints, &ai);
  	if (ret) {
-@@ -390,11 +394,12 @@ static CLIENT *create_client(struct conn
+@@ -390,11 +393,12 @@ static CLIENT *create_client(struct conn
  
  	freeaddrinfo(ai);
  
@@ -58,7 +50,7 @@ the passed in variable.
  	/* Close socket fd on destroy, as is default for rpcowned fds */
  	if  (!clnt_control(client, CLSET_FD_CLOSE, NULL)) {
  		clnt_destroy(client);
-@@ -799,7 +804,7 @@ static int rpc_get_exports_proto(struct
+@@ -799,7 +803,7 @@ static int rpc_get_exports_proto(struct
  				 (xdrproc_t) xdr_void, NULL,
  				 (xdrproc_t) xdr_exports, (caddr_t) exp,
  				 info->timeout);
diff --git a/autofs-5.0.6-fix-libtirpc-name-clash.patch b/autofs-5.0.6-fix-libtirpc-name-clash.patch
new file mode 100644
index 0000000..068484c
--- /dev/null
+++ b/autofs-5.0.6-fix-libtirpc-name-clash.patch
@@ -0,0 +1,45 @@
+autofs-5.0.6 - fix libtirpc name clash
+
+From: Ian Kent <ikent at redhat.com>
+
+The tirpc function auth_destroy() is a macro definition in tirpc/rpc/auth.h
+which includes an unconditional call to a function log_debug() which clashes
+with an autofs function of the same name and has a different call signature.
+
+To fix it redefine auth_destroy() and exclude the debug log call.
+---
+
+ CHANGELOG      |    1 +
+ lib/rpc_subs.c |   10 ++++++++++
+ 2 files changed, 11 insertions(+)
+
+
+--- autofs-5.0.6.orig/CHANGELOG
++++ autofs-5.0.6/CHANGELOG
+@@ -20,6 +20,7 @@
+ - fix nfs4 contacts portmap.
+ - fix ipv6 proximity calculation.
+ - fix initialization in rpc create_client().
++- fix libtirpc name clash.
+ 
+ 28/06/2011 autofs-5.0.6
+ -----------------------
+--- autofs-5.0.6.orig/lib/rpc_subs.c
++++ autofs-5.0.6/lib/rpc_subs.c
+@@ -34,6 +34,16 @@
+ #include <pthread.h>
+ #include <poll.h>
+ 
++#ifdef WITH_LIBTIRPC
++#undef auth_destroy
++#define auth_destroy(auth)                                              \
++                do {                                                    \
++                        int refs;                                       \
++                        if ((refs = auth_put((auth))) == 0)             \
++                                ((*((auth)->ah_ops->ah_destroy))(auth));\
++                } while (0)
++#endif
++
+ #include "mount.h"
+ #include "rpc_subs.h"
+ #include "automount.h"
diff --git a/autofs.spec b/autofs.spec
index 25c2850..2814c04 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -31,6 +31,7 @@ Patch19: autofs-5.0.6-fix-ipv6-configure-check.patch
 Patch20: autofs-5.0.6-fix-nfs4-contacts-portmap.patch
 Patch21: autofs-5.0.7-fix-ipv6-proximity-calculation.patch
 Patch22: autofs-5.0.6-fix-initialization-in-rpc-create_client.patch
+Patch23: autofs-5.0.6-fix-libtirpc-name-clash.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
 Conflicts: cyrus-sasl-lib < 2.1.23-9
@@ -95,6 +96,7 @@ echo %{version}-%{release} > .version
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
+%patch23 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -151,6 +153,7 @@ fi
 %changelog
 * Wed Aug 30 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-8
 - fix initialization in rpc create_client() (bz852827).
+- fix libtirpc name clash (bz852827).
 
 * Fri Aug 10 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-7
 - fix the fix ipv6 proximity calculation (bz711844).


More information about the scm-commits mailing list