- fix ipv6 name lookup check. - fix ipv6 rpc calls. - fix ipv6 configure check. - add piddir to configure. - add systemd unit support. - fix MNT_DETACH define.
186 lines
5.1 KiB
Diff
186 lines
5.1 KiB
Diff
autofs-5.0.6 - fix ipv6 configure check
|
|
|
|
From: Ian Kent <ikent@redhat.com>
|
|
|
|
Since the functions clntudp6_bufcreate() and clnttcp6_create() of
|
|
libtirpc were never actually included in the library our reference
|
|
to clntudp6_bufcreate() in configure needs to be removed.
|
|
|
|
Having redone the libtirpc interface (after realizing these functions
|
|
were defined but not actually included in the library) checking for
|
|
IPv6 support can't be done now and we need to rely on the transport
|
|
independent nature of libtirpc to take care of this. So the INET6
|
|
checks have been replaced with WITH_LIBTIRPC checks instead.
|
|
---
|
|
|
|
CHANGELOG | 1 +
|
|
aclocal.m4 | 36 ------------------------------------
|
|
configure | 46 ----------------------------------------------
|
|
include/config.h.in | 3 ---
|
|
modules/replicated.c | 10 +++++++---
|
|
5 files changed, 8 insertions(+), 88 deletions(-)
|
|
|
|
|
|
--- autofs-5.0.6.orig/CHANGELOG
|
|
+++ autofs-5.0.6/CHANGELOG
|
|
@@ -15,6 +15,7 @@
|
|
- add disable move mount configure option.
|
|
- fix ipv6 name lookup check.
|
|
- fix ipv6 rpc calls.
|
|
+- fix ipv6 configure check.
|
|
|
|
28/06/2011 autofs-5.0.6
|
|
-----------------------
|
|
--- autofs-5.0.6.orig/aclocal.m4
|
|
+++ autofs-5.0.6/aclocal.m4
|
|
@@ -324,41 +324,6 @@ LIBS="$af_check_ldap_parse_page_control_
|
|
])
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
-dnl AF_CHECK_LIBTIRPC_IPV6
|
|
-dnl
|
|
-dnl Use libtirpc for rpc transport
|
|
-dnl --------------------------------------------------------------------------
|
|
-AC_DEFUN([AF_CHECK_LIBTIRPC_IPV6],
|
|
-[AC_MSG_CHECKING(if libtirpc has IPv6 support)
|
|
-
|
|
-# save current flags
|
|
-af_check_libtirpc_ipv6_save_cflags="$CFLAGS"
|
|
-af_check_libtirpc_ipv6_save_ldflags="$LDFLAGS"
|
|
-CFLAGS="$CFLAGS -I/usr/include/tirpc"
|
|
-LDFLAGS="$LDFLAGS -ltirpc"
|
|
-
|
|
-AC_TRY_LINK(
|
|
- [ #define INET6
|
|
- #include <rpc/rpc.h> ],
|
|
- [ CLIENT *cl;
|
|
- struct sockaddr_in6 addr;
|
|
- int fd;
|
|
- unsigned long ul; struct timeval t; unsigned int ui;
|
|
- cl = clntudp6_bufcreate(&addr,ul,ul,t,&fd,ui,ui); ],
|
|
- [ af_have_libtirpc_ipv6=yes
|
|
- AC_MSG_RESULT(yes) ],
|
|
- [ AC_MSG_RESULT(no) ])
|
|
-
|
|
-if test "$af_have_libtirpc_ipv6" = "yes"; then
|
|
- AC_DEFINE(INET6,1, [Use IPv6 with libtirpc])
|
|
-fi
|
|
-
|
|
-# restore flags
|
|
-CFLAGS="$af_check_libtirpc_ipv6_save_cflags"
|
|
-LDFLAGS="$af_check_libtirpc_ipv6_save_ldflags"
|
|
-])
|
|
-
|
|
-dnl --------------------------------------------------------------------------
|
|
dnl AF_CHECK_LIBTIRPC
|
|
dnl
|
|
dnl Use libtirpc for rpc transport
|
|
@@ -399,7 +364,6 @@ AC_ARG_WITH(libtirpc,
|
|
[ --with-libtirpc use libtirpc if available],
|
|
[if test "$withval" = yes; then
|
|
AF_CHECK_LIBTIRPC()
|
|
- AF_CHECK_LIBTIRPC_IPV6()
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
fi], [AC_MSG_RESULT(no)])
|
|
--- autofs-5.0.6.orig/configure
|
|
+++ autofs-5.0.6/configure
|
|
@@ -3087,52 +3087,6 @@ fi
|
|
CFLAGS="$af_check_libtirpc_save_cflags"
|
|
LDFLAGS="$af_check_libtirpc_save_ldflags"
|
|
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtirpc has IPv6 support" >&5
|
|
-$as_echo_n "checking if libtirpc has IPv6 support... " >&6; }
|
|
-
|
|
-# save current flags
|
|
-af_check_libtirpc_ipv6_save_cflags="$CFLAGS"
|
|
-af_check_libtirpc_ipv6_save_ldflags="$LDFLAGS"
|
|
-CFLAGS="$CFLAGS -I/usr/include/tirpc"
|
|
-LDFLAGS="$LDFLAGS -ltirpc"
|
|
-
|
|
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
-/* end confdefs.h. */
|
|
- #define INET6
|
|
- #include <rpc/rpc.h>
|
|
-int
|
|
-main ()
|
|
-{
|
|
- CLIENT *cl;
|
|
- struct sockaddr_in6 addr;
|
|
- int fd;
|
|
- unsigned long ul; struct timeval t; unsigned int ui;
|
|
- cl = clntudp6_bufcreate(&addr,ul,ul,t,&fd,ui,ui);
|
|
- ;
|
|
- return 0;
|
|
-}
|
|
-_ACEOF
|
|
-if ac_fn_c_try_link "$LINENO"; then :
|
|
- af_have_libtirpc_ipv6=yes
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
-$as_echo "yes" >&6; }
|
|
-else
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
-$as_echo "no" >&6; }
|
|
-fi
|
|
-rm -f core conftest.err conftest.$ac_objext \
|
|
- conftest$ac_exeext conftest.$ac_ext
|
|
-
|
|
-if test "$af_have_libtirpc_ipv6" = "yes"; then
|
|
-
|
|
-$as_echo "#define INET6 1" >>confdefs.h
|
|
-
|
|
-fi
|
|
-
|
|
-# restore flags
|
|
-CFLAGS="$af_check_libtirpc_ipv6_save_cflags"
|
|
-LDFLAGS="$af_check_libtirpc_ipv6_save_ldflags"
|
|
-
|
|
else
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
$as_echo "no" >&6; }
|
|
--- autofs-5.0.6.orig/include/config.h.in
|
|
+++ autofs-5.0.6/include/config.h.in
|
|
@@ -72,9 +72,6 @@
|
|
/* Define to 1 if you have the <unistd.h> header file. */
|
|
#undef HAVE_UNISTD_H
|
|
|
|
-/* Use IPv6 with libtirpc */
|
|
-#undef INET6
|
|
-
|
|
/* Use libxml2 tsd usage workaround */
|
|
#undef LIBXML2_WORKAROUND
|
|
|
|
--- autofs-5.0.6.orig/modules/replicated.c
|
|
+++ autofs-5.0.6/modules/replicated.c
|
|
@@ -180,7 +180,7 @@ static unsigned int get_proximity(struct
|
|
break;
|
|
|
|
case AF_INET6:
|
|
-#ifndef INET6
|
|
+#ifndef WITH_LIBTIRPC
|
|
return PROXIMITY_UNSUPPORTED;
|
|
#else
|
|
addr6 = (struct sockaddr_in6 *) host_addr;
|
|
@@ -229,7 +229,9 @@ static unsigned int get_proximity(struct
|
|
break;
|
|
|
|
case AF_INET6:
|
|
-#ifdef INET6
|
|
+#ifndef WITH_LIBTIRPC
|
|
+ return PROXIMITY_UNSUPPORTED;
|
|
+#else
|
|
if (host_addr->sa_family == AF_INET)
|
|
break;
|
|
|
|
@@ -309,7 +311,9 @@ static unsigned int get_proximity(struct
|
|
break;
|
|
|
|
case AF_INET6:
|
|
-#ifdef INET6
|
|
+#ifndef WITH_LIBTIRPC
|
|
+ return PROXIMITY_UNSUPPORTED;
|
|
+#else
|
|
if (host_addr->sa_family == AF_INET)
|
|
break;
|
|
|