summaryrefslogtreecommitdiff
path: root/filesystems
diff options
context:
space:
mode:
authormanu <manu@pkgsrc.org>2011-08-09 07:15:42 +0000
committermanu <manu@pkgsrc.org>2011-08-09 07:15:42 +0000
commite5959ea0169182dc870b7cf779968348f8a4c9ca (patch)
tree09beea4c660ebb76b9e2a191b8c737a84ae27a90 /filesystems
parentf900f4f26250a173f3d6c23d160941a184f818b7 (diff)
downloadpkgsrc-e5959ea0169182dc870b7cf779968348f8a4c9ca.tar.gz
- Use linkat(2) if available. This fixes a EPERM error when using rename(2)
on a symlink within a glusterfs volume that uses DHT - Consider gfid changes as nn fatal. Glustefs will fix instead of panic.
Diffstat (limited to 'filesystems')
-rw-r--r--filesystems/glusterfs/Makefile4
-rw-r--r--filesystems/glusterfs/PLIST.georeplication1
-rw-r--r--filesystems/glusterfs/distinfo10
-rwxr-xr-xfilesystems/glusterfs/files/glusterd.sh2
-rwxr-xr-xfilesystems/glusterfs/files/glusterfsd.sh2
-rwxr-xr-xfilesystems/glusterfs/files/xattr-init.sh2
-rw-r--r--filesystems/glusterfs/options.mk2
-rw-r--r--filesystems/glusterfs/patches/patch-an25
-rw-r--r--filesystems/glusterfs/patches/patch-ao134
-rw-r--r--filesystems/glusterfs/patches/patch-bl2
-rw-r--r--filesystems/glusterfs/patches/patch-bm2
-rw-r--r--filesystems/glusterfs/patches/patch-bn2
-rw-r--r--filesystems/glusterfs/patches/patch-bo2
-rw-r--r--filesystems/glusterfs/patches/patch-bp2
-rw-r--r--filesystems/glusterfs/patches/patch-bq2
-rw-r--r--filesystems/glusterfs/patches/patch-br62
-rw-r--r--filesystems/glusterfs/patches/patch-bs2
-rw-r--r--filesystems/glusterfs/patches/patch-bt2
-rw-r--r--filesystems/glusterfs/patches/patch-bu24
-rw-r--r--filesystems/glusterfs/patches/patch-bv18
20 files changed, 269 insertions, 33 deletions
diff --git a/filesystems/glusterfs/Makefile b/filesystems/glusterfs/Makefile
index 765e3993597..6a9856457dd 100644
--- a/filesystems/glusterfs/Makefile
+++ b/filesystems/glusterfs/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2011/07/23 01:14:43 manu Exp $
+# $NetBSD: Makefile,v 1.15 2011/08/09 07:15:42 manu Exp $
#
DISTNAME= glusterfs-3.2.2
-#PKGREVISION= 1
+PKGREVISION= 1
CATEGORIES= filesystems
MASTER_SITES= http://download.gluster.com/pub/gluster/glusterfs/3.2/3.2.2/
diff --git a/filesystems/glusterfs/PLIST.georeplication b/filesystems/glusterfs/PLIST.georeplication
index 1a154bbfeec..ef9e4f08a96 100644
--- a/filesystems/glusterfs/PLIST.georeplication
+++ b/filesystems/glusterfs/PLIST.georeplication
@@ -1,3 +1,4 @@
+@comment $NetBSD: PLIST.georeplication,v 1.2 2011/08/09 07:15:42 manu Exp $
libexec/glusterfs/python/syncdaemon/README.md
libexec/glusterfs/python/syncdaemon/__init__.py
libexec/glusterfs/python/syncdaemon/__init__.pyc
diff --git a/filesystems/glusterfs/distinfo b/filesystems/glusterfs/distinfo
index 5befc9f6a69..1efcc58b107 100644
--- a/filesystems/glusterfs/distinfo
+++ b/filesystems/glusterfs/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2011/07/23 01:14:43 manu Exp $
+$NetBSD: distinfo,v 1.10 2011/08/09 07:15:42 manu Exp $
SHA1 (glusterfs-3.2.2.tar.gz) = 6eb800edf49f99270490bff5e71078131efe4704
RMD160 (glusterfs-3.2.2.tar.gz) = 35fc13580136ef702c8a3bebd3521822c7c24020
@@ -8,8 +8,8 @@ SHA1 (patch-ab) = a0ea407cd7a6ef45669fe42fcfd5cd6310625193
SHA1 (patch-ac) = fc73cc2605baf0d85a00e3127e2fbd1985a3e47d
SHA1 (patch-ae) = dfb3410ca20858955bc4ecf31046753690021e91
SHA1 (patch-af) = 190862a357dcb584e18b8225a6969879319e6a34
-SHA1 (patch-an) = 2122bce6e6c87d5d805c658cda76a324d9e4e430
-SHA1 (patch-ao) = 4e606e0b98e23725d8a462aac6cf36a2642d8abf
+SHA1 (patch-an) = 356086c41ece146b7abd398a6a6aa3afcfd422ee
+SHA1 (patch-ao) = adf946d40909457e1cdd10a3a08dfa5a9c471531
SHA1 (patch-ar) = 60294ccb85e6c94d75c947287ff4d1a8ed723132
SHA1 (patch-as) = 1aa447fa12baafe8e737337e969090fe3c0b8bee
SHA1 (patch-ax) = fdeecce5e1de7816d490cde7bfd284e0a2c63b76
@@ -27,6 +27,8 @@ SHA1 (patch-bn) = 81860049e6c3effc797ab84c222b53091406323c
SHA1 (patch-bo) = 23a6858e97fb2f3ad82a0bf3d03a90adf884b5b2
SHA1 (patch-bp) = 1e22539ff37ff3fdf90b15151b88139eb67d5f1c
SHA1 (patch-bq) = 4c3a174473ba15f510389ffa135bcbb68ee4c2bc
-SHA1 (patch-br) = cab5604eeab953440a12fa0f27b4f69ddb75af06
+SHA1 (patch-br) = ba7a17469f4b9b964cd7b8ab2de46541a7238462
SHA1 (patch-bs) = 3946d339e86c9d575a6f39880644cf8115f5f145
SHA1 (patch-bt) = a0b4573dde307086caa6688d53cbfe9d81b2d910
+SHA1 (patch-bu) = 0859b3361018a08c26b44931c49cc8919c45f4a4
+SHA1 (patch-bv) = 52eea1b419b7169b1950ea6e5ec7ade9ce7529a2
diff --git a/filesystems/glusterfs/files/glusterd.sh b/filesystems/glusterfs/files/glusterd.sh
index 1c542cf0a0c..8f4b1edd8c3 100755
--- a/filesystems/glusterfs/files/glusterd.sh
+++ b/filesystems/glusterfs/files/glusterd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: glusterd.sh,v 1.6 2011/07/23 01:14:44 manu Exp $
+# $NetBSD: glusterd.sh,v 1.7 2011/08/09 07:15:42 manu Exp $
#
# PROVIDE: glusterd
diff --git a/filesystems/glusterfs/files/glusterfsd.sh b/filesystems/glusterfs/files/glusterfsd.sh
index f21a8f330e0..93ad02bc9ff 100755
--- a/filesystems/glusterfs/files/glusterfsd.sh
+++ b/filesystems/glusterfs/files/glusterfsd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: glusterfsd.sh,v 1.6 2011/07/23 01:14:44 manu Exp $
+# $NetBSD: glusterfsd.sh,v 1.7 2011/08/09 07:15:42 manu Exp $
#
# PROVIDE: glusterfsd
diff --git a/filesystems/glusterfs/files/xattr-init.sh b/filesystems/glusterfs/files/xattr-init.sh
index 33b5fa58216..a00f3daba61 100755
--- a/filesystems/glusterfs/files/xattr-init.sh
+++ b/filesystems/glusterfs/files/xattr-init.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-# $NetBSD: xattr-init.sh,v 1.7 2011/07/23 01:14:44 manu Exp $
+# $NetBSD: xattr-init.sh,v 1.8 2011/08/09 07:15:42 manu Exp $
GLUSTERFS_XATTR="
trusted.distribute.linkinfo
diff --git a/filesystems/glusterfs/options.mk b/filesystems/glusterfs/options.mk
index 15cb472ca7d..6a92de51cf1 100644
--- a/filesystems/glusterfs/options.mk
+++ b/filesystems/glusterfs/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2011/07/19 07:54:31 manu Exp $
+# $NetBSD: options.mk,v 1.2 2011/08/09 07:15:42 manu Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.glusterfs
PKG_SUPPORTED_OPTIONS= georeplication
diff --git a/filesystems/glusterfs/patches/patch-an b/filesystems/glusterfs/patches/patch-an
index 3b59667ca24..b717ac40ce3 100644
--- a/filesystems/glusterfs/patches/patch-an
+++ b/filesystems/glusterfs/patches/patch-an
@@ -1,9 +1,10 @@
-$NetBSD: patch-an,v 1.6 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-an,v 1.7 2011/08/09 07:15:42 manu Exp $
NetBSD uses libperfuse(3). Also enable debugging (-g) for now,
and let it build georeplication.
+
--- configure.ac.orig 2011-07-14 14:21:10.000000000 +0200
-+++ configure.ac 2011-07-22 08:59:39.000000000 +0200
++++ configure.ac 2011-08-02 11:17:51.000000000 +0200
@@ -291,8 +291,11 @@
case $host_os in
linux*)
@@ -16,14 +17,28 @@ and let it build georeplication.
#disabling geo replication for non-linux platforms
enable_georeplication=no
;;
-@@ -414,8 +417,19 @@
+@@ -346,8 +349,13 @@
+ dnl Linux, Solaris, Cygwin
+ AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
+ dnl FreeBSD, NetBSD
+ AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec])
++AC_CHECK_FUNC([linkat], [have_linkat=yes])
++if test "x${have_linkat}" = "xyes"; then
++ AC_DEFINE(HAVE_LINKAT, 1, [define if found linkat])
++fi
++AC_SUBST(HAVE_LINKAT)
+
+ dnl Check for argp
+ AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
+ AC_CONFIG_SUBDIRS(argp-standalone)
+@@ -414,8 +422,19 @@
GF_GLUSTERFS_LDFLAGS="-lnsl -lresolv -lsocket"
BUILD_FUSE_CLIENT=no
FUSE_CLIENT_SUBDIR=""
;;
+ *netbsd*)
+ GF_HOST_OS="GF_BSD_HOST_OS"
-+ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS}"
++ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_INCOMPLETE_XOPEN_C063"
+ GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
+ GF_LDADD="${ARGP_STANDALONE_LDADD}"
+ if test "x$ac_cv_header_execinfo_h" = "xyes"; then
@@ -36,7 +51,7 @@ and let it build georeplication.
GF_HOST_OS="GF_BSD_HOST_OS"
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
-@@ -450,8 +464,9 @@
+@@ -450,8 +469,9 @@
AC_SUBST(GF_GLUSTERFS_CFLAGS)
AC_SUBST(GF_CFLAGS)
AC_SUBST(GF_LDFLAGS)
diff --git a/filesystems/glusterfs/patches/patch-ao b/filesystems/glusterfs/patches/patch-ao
index 0807055aba8..320c0fe9e1f 100644
--- a/filesystems/glusterfs/patches/patch-ao
+++ b/filesystems/glusterfs/patches/patch-ao
@@ -1,16 +1,17 @@
-$NetBSD: patch-ao,v 1.6 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-ao,v 1.7 2011/08/09 07:15:42 manu Exp $
NetBSD uses libperfuse(3). Also enable debugging (-g) for now,
and let it build georeplication
+
--- configure.orig 2011-07-14 14:21:15.000000000 +0200
-+++ configure 2011-07-22 08:59:47.000000000 +0200
++++ configure 2011-08-02 11:13:53.000000000 +0200
@@ -464,9 +464,9 @@
# include <unistd.h>
#endif"
ac_subdirs_all="$ac_subdirs_all argp-standalone"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL mountutildir initdir launchddir LEX LEXLIB LEX_OUTPUT_ROOT YACC LD ac_ct_LD HAVE_SPINLOCK HAVE_STRNLEN FUSE_CLIENT_SUBDIR FUSERMOUNT_SUBDIR IBVERBS_SUBDIR RDMA_SUBDIR PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir SYNCDAEMON_COMPILE SYNCDAEMON_SUBDIR HAVE_BACKTRACE HAVE_MALLOC_STATS subdirs ARGP_STANDALONE_CPPFLAGS ARGP_STANDALONE_LDADD GF_DISTRIBUTION GF_HOST_OS GF_GLUSTERFS_LDFLAGS GF_GLUSTERFS_CFLAGS GF_CFLAGS GF_LDFLAGS GF_LDADD GF_FUSE_CFLAGS RLLIBS CONTRIBDIR INCLUDES GF_DARWIN_HOST_OS_TRUE GF_DARWIN_HOST_OS_FALSE LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL mountutildir initdir launchddir LEX LEXLIB LEX_OUTPUT_ROOT YACC LD ac_ct_LD HAVE_SPINLOCK HAVE_STRNLEN FUSE_CLIENT_SUBDIR FUSERMOUNT_SUBDIR IBVERBS_SUBDIR RDMA_SUBDIR PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir SYNCDAEMON_COMPILE SYNCDAEMON_SUBDIR HAVE_BACKTRACE HAVE_MALLOC_STATS subdirs ARGP_STANDALONE_CPPFLAGS ARGP_STANDALONE_LDADD GF_DISTRIBUTION GF_HOST_OS GF_GLUSTERFS_LDFLAGS GF_GLUSTERFS_CFLAGS GF_CFLAGS GF_LDFLAGS GF_LDADD GF_FUSE_LDADD GF_FUSE_CFLAGS RLLIBS CONTRIBDIR INCLUDES GF_DARWIN_HOST_OS_TRUE GF_DARWIN_HOST_OS_FALSE LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL mountutildir initdir launchddir LEX LEXLIB LEX_OUTPUT_ROOT YACC LD ac_ct_LD HAVE_SPINLOCK HAVE_STRNLEN FUSE_CLIENT_SUBDIR FUSERMOUNT_SUBDIR IBVERBS_SUBDIR RDMA_SUBDIR PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pyexecdir pkgpyexecdir SYNCDAEMON_COMPILE SYNCDAEMON_SUBDIR HAVE_BACKTRACE HAVE_MALLOC_STATS HAVE_LINKAT subdirs ARGP_STANDALONE_CPPFLAGS ARGP_STANDALONE_LDADD GF_DISTRIBUTION GF_HOST_OS GF_GLUSTERFS_LDFLAGS GF_GLUSTERFS_CFLAGS GF_CFLAGS GF_LDFLAGS GF_LDADD GF_FUSE_LDADD GF_FUSE_CFLAGS RLLIBS CONTRIBDIR INCLUDES GF_DARWIN_HOST_OS_TRUE GF_DARWIN_HOST_OS_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -27,14 +28,125 @@ and let it build georeplication
#disabling geo replication for non-linux platforms
enable_georeplication=no
;;
-@@ -21731,8 +21734,19 @@
+@@ -20907,8 +20910,110 @@
+
+ fi
+
+
++echo "$as_me:$LINENO: checking for linkat" >&5
++echo $ECHO_N "checking for linkat... $ECHO_C" >&6
++if test "${ac_cv_func_linkat+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++/* Define linkat to an innocuous variant, in case <limits.h> declares linkat.
++ For example, HP-UX 11i <limits.h> declares gettimeofday. */
++#define linkat innocuous_linkat
++
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char linkat (); below.
++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
++ <limits.h> exists even on freestanding compilers. */
++
++#ifdef __STDC__
++# include <limits.h>
++#else
++# include <assert.h>
++#endif
++
++#undef linkat
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++{
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char linkat ();
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_linkat) || defined (__stub___linkat)
++choke me
++#else
++char (*f) () = linkat;
++#endif
++#ifdef __cplusplus
++}
++#endif
++
++int
++main ()
++{
++return f != linkat;
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_func_linkat=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_func_linkat=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++fi
++echo "$as_me:$LINENO: result: $ac_cv_func_linkat" >&5
++echo "${ECHO_T}$ac_cv_func_linkat" >&6
++if test $ac_cv_func_linkat = yes; then
++ have_linkat=yes
++fi
++
++if test "x${have_linkat}" = "xyes"; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_LINKAT 1
++_ACEOF
++
++fi
++
+ echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5
+ echo $ECHO_N "checking for struct stat.st_atim.tv_nsec... $ECHO_C" >&6
+ if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -21731,8 +21836,19 @@
GF_GLUSTERFS_LDFLAGS="-lnsl -lresolv -lsocket"
BUILD_FUSE_CLIENT=no
FUSE_CLIENT_SUBDIR=""
;;
+ *netbsd*)
+ GF_HOST_OS="GF_BSD_HOST_OS"
-+ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS}"
++ GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_INCOMPLETE_XOPEN_C063"
+ GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
+ GF_LDADD="${ARGP_STANDALONE_LDADD}"
+ if test "x$ac_cv_header_execinfo_h" = "xyes"; then
@@ -47,7 +159,17 @@ and let it build georeplication
GF_HOST_OS="GF_BSD_HOST_OS"
GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -O0"
GF_GLUSTERFS_CFLAGS="${GF_CFLAGS}"
-@@ -22854,8 +22868,9 @@
+@@ -22844,8 +22960,9 @@
+ s,@SYNCDAEMON_COMPILE@,$SYNCDAEMON_COMPILE,;t t
+ s,@SYNCDAEMON_SUBDIR@,$SYNCDAEMON_SUBDIR,;t t
+ s,@HAVE_BACKTRACE@,$HAVE_BACKTRACE,;t t
+ s,@HAVE_MALLOC_STATS@,$HAVE_MALLOC_STATS,;t t
++s,@HAVE_LINKAT@,$HAVE_LINKAT,;t t
+ s,@subdirs@,$subdirs,;t t
+ s,@ARGP_STANDALONE_CPPFLAGS@,$ARGP_STANDALONE_CPPFLAGS,;t t
+ s,@ARGP_STANDALONE_LDADD@,$ARGP_STANDALONE_LDADD,;t t
+ s,@GF_DISTRIBUTION@,$GF_DISTRIBUTION,;t t
+@@ -22854,8 +22971,9 @@
s,@GF_GLUSTERFS_CFLAGS@,$GF_GLUSTERFS_CFLAGS,;t t
s,@GF_CFLAGS@,$GF_CFLAGS,;t t
s,@GF_LDFLAGS@,$GF_LDFLAGS,;t t
diff --git a/filesystems/glusterfs/patches/patch-bl b/filesystems/glusterfs/patches/patch-bl
index 2a08f3b9b82..32fff1b79d7 100644
--- a/filesystems/glusterfs/patches/patch-bl
+++ b/filesystems/glusterfs/patches/patch-bl
@@ -1,4 +1,4 @@
-$NetBSD: patch-bl,v 1.4 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bl,v 1.5 2011/08/09 07:15:42 manu Exp $
#include <signal.h> for SIGTERM
diff --git a/filesystems/glusterfs/patches/patch-bm b/filesystems/glusterfs/patches/patch-bm
index 44a6f70272f..33b398a089a 100644
--- a/filesystems/glusterfs/patches/patch-bm
+++ b/filesystems/glusterfs/patches/patch-bm
@@ -1,4 +1,4 @@
-$NetBSD: patch-bm,v 1.4 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bm,v 1.5 2011/08/09 07:15:42 manu Exp $
Add xdr-sizeof() to the build
diff --git a/filesystems/glusterfs/patches/patch-bn b/filesystems/glusterfs/patches/patch-bn
index ab8dbeee33d..028d64c22b4 100644
--- a/filesystems/glusterfs/patches/patch-bn
+++ b/filesystems/glusterfs/patches/patch-bn
@@ -1,4 +1,4 @@
-$NetBSD: patch-bn,v 1.4 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bn,v 1.5 2011/08/09 07:15:42 manu Exp $
Add xdr-sizeof() to the build
diff --git a/filesystems/glusterfs/patches/patch-bo b/filesystems/glusterfs/patches/patch-bo
index 37d463cdbdd..9e8681e6389 100644
--- a/filesystems/glusterfs/patches/patch-bo
+++ b/filesystems/glusterfs/patches/patch-bo
@@ -1,4 +1,4 @@
-$NetBSD: patch-bo,v 1.2 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bo,v 1.3 2011/08/09 07:15:42 manu Exp $
Build fix
diff --git a/filesystems/glusterfs/patches/patch-bp b/filesystems/glusterfs/patches/patch-bp
index cfc44e86df4..37022979662 100644
--- a/filesystems/glusterfs/patches/patch-bp
+++ b/filesystems/glusterfs/patches/patch-bp
@@ -1,4 +1,4 @@
-$NetBSD: patch-bp,v 1.4 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bp,v 1.5 2011/08/09 07:15:42 manu Exp $
NetBSD does not have umount(2), but unmount(2)
diff --git a/filesystems/glusterfs/patches/patch-bq b/filesystems/glusterfs/patches/patch-bq
index 89860900a65..496317e4551 100644
--- a/filesystems/glusterfs/patches/patch-bq
+++ b/filesystems/glusterfs/patches/patch-bq
@@ -1,4 +1,4 @@
-$NetBSD: patch-bq,v 1.4 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bq,v 1.5 2011/08/09 07:15:42 manu Exp $
Make sure glusterfsd listens on the same address family as glusterd: if
glusterd uses inet, glusterfsd should not use inet6
diff --git a/filesystems/glusterfs/patches/patch-br b/filesystems/glusterfs/patches/patch-br
index 3dffa53467c..b5d2b575af9 100644
--- a/filesystems/glusterfs/patches/patch-br
+++ b/filesystems/glusterfs/patches/patch-br
@@ -1,10 +1,64 @@
-$NetBSD: patch-br,v 1.3 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-br,v 1.4 2011/08/09 07:15:42 manu Exp $
-Hide .attribute to glusterfs clients in order to make sure it will
+- Hide .attribute to glusterfs clients in order to make sure it will
not be distributed by the cluster/dht xlator
+
+- Use mkfifo for creating fifo, as it will fail with mknod.
+
+- Use linkat(2) when linking on object that can be symlinks to
+directories and non existing paths.
+
--- xlators/storage/posix/src/posix.c.orig 2011-07-14 14:21:10.000000000 +0200
-+++ xlators/storage/posix/src/posix.c 2011-07-22 09:01:30.000000000 +0200
-@@ -4313,8 +4313,21 @@
++++ xlators/storage/posix/src/posix.c 2011-08-03 10:05:22.000000000 +0200
+@@ -36,8 +36,12 @@
+ #ifndef GF_BSD_HOST_OS
+ #include <alloca.h>
+ #endif /* GF_BSD_HOST_OS */
+
++#ifdef HAVE_LINKAT
++#include <fcntl.h>
++#endif /* HAVE_LINKAT */
++
+ #include "glusterfs.h"
+ #include "md5.h"
+ #include "checksum.h"
+ #include "dict.h"
+@@ -1229,8 +1233,13 @@
+ loc->path, strerror (op_errno));
+ goto out;
+ }
+
++#ifdef __NetBSD__
++ if (S_ISFIFO(mode))
++ op_ret = mkfifo (real_path, mode);
++ else
++#endif /* __NetBSD__ */
+ op_ret = mknod (real_path, mode, dev);
+
+ if (op_ret == -1) {
+ op_errno = errno;
+@@ -2122,9 +2131,20 @@
+ newparentpath, strerror (op_errno));
+ goto out;
+ }
+
++#ifdef HAVE_LINKAT
++ /*
++ * On most systems (Linux being the notable exception), link(2)
++ * first resolves symlinks. If the target is a directory or
++ * is nonexistent, it will fail. linkat(2) operates on the
++ * symlink instead of its target when the AT_SYMLINK_FOLLOW
++ * flag is not supplied.
++ */
++ op_ret = linkat (AT_FDCWD, real_oldpath, AT_FDCWD, real_newpath, 0);
++#else
+ op_ret = link (real_oldpath, real_newpath);
++#endif
+ if (op_ret == -1) {
+ op_errno = errno;
+ gf_log (this->name, GF_LOG_ERROR,
+ "link %s to %s failed: %s",
+@@ -4313,8 +4333,21 @@
if ((!strcmp(real_path, base_path))
&& (!strcmp(entry->d_name, GF_REPLICATE_TRASH_DIR)))
diff --git a/filesystems/glusterfs/patches/patch-bs b/filesystems/glusterfs/patches/patch-bs
index 41d00800db6..d7396733d5c 100644
--- a/filesystems/glusterfs/patches/patch-bs
+++ b/filesystems/glusterfs/patches/patch-bs
@@ -1,4 +1,4 @@
-$NetBSD: patch-bs,v 1.3 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bs,v 1.4 2011/08/09 07:15:42 manu Exp $
Actually use the Linux [lf]?(set|get|list|remove)xattr reimplementation
we have in libglusterfs/src/compat.c
diff --git a/filesystems/glusterfs/patches/patch-bt b/filesystems/glusterfs/patches/patch-bt
index 76dd3570c11..45eeea27d19 100644
--- a/filesystems/glusterfs/patches/patch-bt
+++ b/filesystems/glusterfs/patches/patch-bt
@@ -1,4 +1,4 @@
-$NetBSD: patch-bt,v 1.3 2011/07/23 01:14:44 manu Exp $
+$NetBSD: patch-bt,v 1.4 2011/08/09 07:15:42 manu Exp $
Fix the io-threads xlator, which forgot to initialize its pthread
condition and mutex.
diff --git a/filesystems/glusterfs/patches/patch-bu b/filesystems/glusterfs/patches/patch-bu
new file mode 100644
index 00000000000..f10d0200933
--- /dev/null
+++ b/filesystems/glusterfs/patches/patch-bu
@@ -0,0 +1,24 @@
+$NetBSD: patch-bu,v 1.1 2011/08/09 07:15:42 manu Exp $
+
+Avoid fatal error if gfid changed. Patch not committed upstream yet,
+but it helps.
+
+--- xlators/protocol/client/src/client3_1-fops.c.orig 2011-07-14 14:21:10.000000000 +0200
++++ xlators/protocol/client/src/client3_1-fops.c 2011-07-22 09:38:35.000000000 +0200
+@@ -2208,13 +2208,11 @@
+ }
+
+ if ((!uuid_is_null (inode->gfid))
+ && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
+- gf_log (frame->this->name, GF_LOG_DEBUG,
+- "gfid changed for %s", local->loc.path);
+- rsp.op_ret = -1;
+- op_errno = ESTALE;
+- goto out;
++ gf_log (frame->this->name, GF_LOG_WARNING,
++ "gfid changed for %s", local->loc.path);
++ memcpy(&stbuf.ia_gfid, &inode->gfid, sizeof(inode->gfid));
+ }
+
+ rsp.op_ret = 0;
+
diff --git a/filesystems/glusterfs/patches/patch-bv b/filesystems/glusterfs/patches/patch-bv
new file mode 100644
index 00000000000..af2181b7025
--- /dev/null
+++ b/filesystems/glusterfs/patches/patch-bv
@@ -0,0 +1,18 @@
+$NetBSD: patch-bv,v 1.1 2011/08/09 07:15:42 manu Exp $
+
+Check for linkat()
+
+--- config.h.in.orig 2011-08-03 09:18:25.000000000 +0200
++++ config.h.in 2011-08-03 09:18:44.000000000 +0200
+@@ -35,8 +35,11 @@
+
+ /* define if found malloc_stats */
+ #undef HAVE_MALLOC_STATS
+
++/* define if found linkat */
++#undef HAVE_LINKAT
++
+ /* Define to 1 if you have the <memory.h> header file. */
+ #undef HAVE_MEMORY_H
+
+ /* readline enabled CLI */