summaryrefslogtreecommitdiff
path: root/filesystems
diff options
context:
space:
mode:
authormanu <manu@pkgsrc.org>2015-04-09 15:20:47 +0000
committermanu <manu@pkgsrc.org>2015-04-09 15:20:47 +0000
commit33584664777a850303d43e7ad533983e691eab5f (patch)
treeda4523c29cfd6502f0f847d1344460ed548c0160 /filesystems
parent923777651e1b02f35db0ad6997d58799159c7a93 (diff)
downloadpkgsrc-33584664777a850303d43e7ad533983e691eab5f.tar.gz
Update glusterfs to 3.6.2
This is a maintenance release, complete Changelog can be found here: http://blog.gluster.org/2015/01/glusterfs-3-6-2-ga-released/
Diffstat (limited to 'filesystems')
-rw-r--r--filesystems/glusterfs/Makefile9
-rw-r--r--filesystems/glusterfs/PLIST137
-rw-r--r--filesystems/glusterfs/distinfo18
-rw-r--r--filesystems/glusterfs/patches/patch-900655
-rw-r--r--filesystems/glusterfs/patches/patch-901072
-rw-r--r--filesystems/glusterfs/patches/patch-904543
-rw-r--r--filesystems/glusterfs/patches/patch-9080264
-rw-r--r--filesystems/glusterfs/patches/patch-9084350
-rw-r--r--filesystems/glusterfs/patches/patch-configure61
-rw-r--r--filesystems/glusterfs/patches/patch-xlator_cluster_dht_src_dht-common.c17
-rw-r--r--filesystems/glusterfs/patches/patch-xlator_features_glupy_src_Makefile.in28
-rw-r--r--filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_Makefile.in10
12 files changed, 81 insertions, 983 deletions
diff --git a/filesystems/glusterfs/Makefile b/filesystems/glusterfs/Makefile
index b15f33d7e0f..009f31b4395 100644
--- a/filesystems/glusterfs/Makefile
+++ b/filesystems/glusterfs/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.48 2015/03/12 16:35:39 tnn Exp $
+# $NetBSD: Makefile,v 1.49 2015/04/09 15:20:47 manu Exp $
-DISTNAME= glusterfs-3.6.0
+DISTNAME= glusterfs-3.6.2
#PKGREVISION= 1
CATEGORIES= filesystems
MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/
@@ -96,11 +96,6 @@ CONFIGURE_ARGS+= --enable-debug
.include "../../mk/bsd.prefs.mk"
-PLIST_VARS+= mmx
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-PLIST.mmx= yes
-.endif
-
#.include "../../devel/argp/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../textproc/libxml2/buildlink3.mk"
diff --git a/filesystems/glusterfs/PLIST b/filesystems/glusterfs/PLIST
index 9077ce53489..55f8b9a7058 100644
--- a/filesystems/glusterfs/PLIST
+++ b/filesystems/glusterfs/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.21 2015/01/11 23:07:01 joerg Exp $
+@comment $NetBSD: PLIST,v 1.22 2015/04/09 15:20:47 manu Exp $
${PYSITELIB}/gluster/__init__.py
${PYSITELIB}/gluster/__init__.pyc
${PYSITELIB}/gluster/__init__.pyo
@@ -15,74 +15,72 @@ etc/glusterfs/logger.conf.example
include/glusterfs/api/glfs-handles.h
include/glusterfs/api/glfs.h
include/glusterfs/gfchangelog/changelog.h
-lib/glusterfs/3.6.0/auth/addr.la
-lib/glusterfs/3.6.0/auth/login.la
-lib/glusterfs/3.6.0/rpc-transport/socket.la
-lib/glusterfs/3.6.0/xlator/cluster/afr.la
-lib/glusterfs/3.6.0/xlator/cluster/dht.la
-${PLIST.mmx}lib/glusterfs/3.6.0/xlator/cluster/disperse.so
-lib/glusterfs/3.6.0/xlator/cluster/distribute.so
-${PLIST.mmx}lib/glusterfs/3.6.0/xlator/cluster/ec.la
-lib/glusterfs/3.6.0/xlator/cluster/nufa.la
-lib/glusterfs/3.6.0/xlator/cluster/pump.la
-lib/glusterfs/3.6.0/xlator/cluster/replicate.so
-lib/glusterfs/3.6.0/xlator/cluster/stripe.la
-lib/glusterfs/3.6.0/xlator/cluster/switch.la
-lib/glusterfs/3.6.0/xlator/debug/error-gen.la
-lib/glusterfs/3.6.0/xlator/debug/io-stats.la
-lib/glusterfs/3.6.0/xlator/debug/trace.la
-lib/glusterfs/3.6.0/xlator/encryption/crypt.la
-lib/glusterfs/3.6.0/xlator/encryption/rot-13.la
-lib/glusterfs/3.6.0/xlator/features/access-control.so
-lib/glusterfs/3.6.0/xlator/features/barrier.la
-lib/glusterfs/3.6.0/xlator/features/cdc.la
-lib/glusterfs/3.6.0/xlator/features/changelog.la
-lib/glusterfs/3.6.0/xlator/features/gfid-access.la
-lib/glusterfs/3.6.0/xlator/features/glupy.la
-lib/glusterfs/3.6.0/xlator/features/glupy/debug-trace.py
-lib/glusterfs/3.6.0/xlator/features/glupy/debug-trace.pyc
-lib/glusterfs/3.6.0/xlator/features/glupy/debug-trace.pyo
-lib/glusterfs/3.6.0/xlator/features/glupy/helloworld.py
-lib/glusterfs/3.6.0/xlator/features/glupy/helloworld.pyc
-lib/glusterfs/3.6.0/xlator/features/glupy/helloworld.pyo
-lib/glusterfs/3.6.0/xlator/features/glupy/negative.py
-lib/glusterfs/3.6.0/xlator/features/glupy/negative.pyc
-lib/glusterfs/3.6.0/xlator/features/glupy/negative.pyo
-lib/glusterfs/3.6.0/xlator/features/index.la
-lib/glusterfs/3.6.0/xlator/features/locks.la
-lib/glusterfs/3.6.0/xlator/features/mac-compat.la
-lib/glusterfs/3.6.0/xlator/features/marker.la
-lib/glusterfs/3.6.0/xlator/features/posix-locks.so
-lib/glusterfs/3.6.0/xlator/features/prot_client.la
-lib/glusterfs/3.6.0/xlator/features/prot_dht.la
-lib/glusterfs/3.6.0/xlator/features/prot_server.la
-lib/glusterfs/3.6.0/xlator/features/quiesce.la
-lib/glusterfs/3.6.0/xlator/features/quota.la
-lib/glusterfs/3.6.0/xlator/features/quotad.la
-lib/glusterfs/3.6.0/xlator/features/read-only.la
-lib/glusterfs/3.6.0/xlator/features/snapview-client.la
-lib/glusterfs/3.6.0/xlator/features/snapview-server.la
-lib/glusterfs/3.6.0/xlator/features/worm.la
-lib/glusterfs/3.6.0/xlator/meta.la
-lib/glusterfs/3.6.0/xlator/mgmt/glusterd.la
-lib/glusterfs/3.6.0/xlator/mount/api.la
-lib/glusterfs/3.6.0/xlator/mount/fuse.la
-lib/glusterfs/3.6.0/xlator/nfs/server.la
-lib/glusterfs/3.6.0/xlator/performance/io-cache.la
-lib/glusterfs/3.6.0/xlator/performance/io-threads.la
-lib/glusterfs/3.6.0/xlator/performance/md-cache.la
-lib/glusterfs/3.6.0/xlator/performance/open-behind.la
-lib/glusterfs/3.6.0/xlator/performance/quick-read.la
-lib/glusterfs/3.6.0/xlator/performance/read-ahead.la
-lib/glusterfs/3.6.0/xlator/performance/readdir-ahead.la
-lib/glusterfs/3.6.0/xlator/performance/stat-prefetch.so
-lib/glusterfs/3.6.0/xlator/performance/write-behind.la
-lib/glusterfs/3.6.0/xlator/protocol/client.la
-lib/glusterfs/3.6.0/xlator/protocol/server.la
-lib/glusterfs/3.6.0/xlator/storage/posix.la
-lib/glusterfs/3.6.0/xlator/system/posix-acl.la
-lib/glusterfs/3.6.0/xlator/testing/features/template.la
-lib/glusterfs/3.6.0/xlator/testing/performance/symlink-cache.la
+lib/glusterfs/3.6.2/auth/addr.la
+lib/glusterfs/3.6.2/auth/login.la
+lib/glusterfs/3.6.2/rpc-transport/socket.la
+lib/glusterfs/3.6.2/xlator/cluster/afr.la
+lib/glusterfs/3.6.2/xlator/cluster/dht.la
+lib/glusterfs/3.6.2/xlator/cluster/distribute.so
+lib/glusterfs/3.6.2/xlator/cluster/nufa.la
+lib/glusterfs/3.6.2/xlator/cluster/pump.la
+lib/glusterfs/3.6.2/xlator/cluster/replicate.so
+lib/glusterfs/3.6.2/xlator/cluster/stripe.la
+lib/glusterfs/3.6.2/xlator/cluster/switch.la
+lib/glusterfs/3.6.2/xlator/debug/error-gen.la
+lib/glusterfs/3.6.2/xlator/debug/io-stats.la
+lib/glusterfs/3.6.2/xlator/debug/trace.la
+lib/glusterfs/3.6.2/xlator/encryption/crypt.la
+lib/glusterfs/3.6.2/xlator/encryption/rot-13.la
+lib/glusterfs/3.6.2/xlator/features/access-control.so
+lib/glusterfs/3.6.2/xlator/features/barrier.la
+lib/glusterfs/3.6.2/xlator/features/cdc.la
+lib/glusterfs/3.6.2/xlator/features/changelog.la
+lib/glusterfs/3.6.2/xlator/features/gfid-access.la
+lib/glusterfs/3.6.2/xlator/features/glupy.la
+lib/glusterfs/3.6.2/xlator/features/glupy/debug-trace.py
+lib/glusterfs/3.6.2/xlator/features/glupy/debug-trace.pyc
+lib/glusterfs/3.6.2/xlator/features/glupy/debug-trace.pyo
+lib/glusterfs/3.6.2/xlator/features/glupy/helloworld.py
+lib/glusterfs/3.6.2/xlator/features/glupy/helloworld.pyc
+lib/glusterfs/3.6.2/xlator/features/glupy/helloworld.pyo
+lib/glusterfs/3.6.2/xlator/features/glupy/negative.py
+lib/glusterfs/3.6.2/xlator/features/glupy/negative.pyc
+lib/glusterfs/3.6.2/xlator/features/glupy/negative.pyo
+lib/glusterfs/3.6.2/xlator/features/index.la
+lib/glusterfs/3.6.2/xlator/features/locks.la
+lib/glusterfs/3.6.2/xlator/features/mac-compat.la
+lib/glusterfs/3.6.2/xlator/features/marker.la
+lib/glusterfs/3.6.2/xlator/features/posix-locks.so
+lib/glusterfs/3.6.2/xlator/features/prot_client.la
+lib/glusterfs/3.6.2/xlator/features/prot_dht.la
+lib/glusterfs/3.6.2/xlator/features/prot_server.la
+lib/glusterfs/3.6.2/xlator/features/quiesce.la
+lib/glusterfs/3.6.2/xlator/features/quota.la
+lib/glusterfs/3.6.2/xlator/features/quotad.la
+lib/glusterfs/3.6.2/xlator/features/read-only.la
+lib/glusterfs/3.6.2/xlator/features/snapview-client.la
+lib/glusterfs/3.6.2/xlator/features/snapview-server.la
+lib/glusterfs/3.6.2/xlator/features/worm.la
+lib/glusterfs/3.6.2/xlator/meta.la
+lib/glusterfs/3.6.2/xlator/mgmt/glusterd.la
+lib/glusterfs/3.6.2/xlator/mount/api.la
+lib/glusterfs/3.6.2/xlator/mount/fuse.la
+lib/glusterfs/3.6.2/xlator/nfs/server.la
+lib/glusterfs/3.6.2/xlator/performance/io-cache.la
+lib/glusterfs/3.6.2/xlator/performance/io-threads.la
+lib/glusterfs/3.6.2/xlator/performance/md-cache.la
+lib/glusterfs/3.6.2/xlator/performance/open-behind.la
+lib/glusterfs/3.6.2/xlator/performance/quick-read.la
+lib/glusterfs/3.6.2/xlator/performance/read-ahead.la
+lib/glusterfs/3.6.2/xlator/performance/readdir-ahead.la
+lib/glusterfs/3.6.2/xlator/performance/stat-prefetch.so
+lib/glusterfs/3.6.2/xlator/performance/write-behind.la
+lib/glusterfs/3.6.2/xlator/protocol/client.la
+lib/glusterfs/3.6.2/xlator/protocol/server.la
+lib/glusterfs/3.6.2/xlator/storage/posix.la
+lib/glusterfs/3.6.2/xlator/system/posix-acl.la
+lib/glusterfs/3.6.2/xlator/testing/features/template.la
+lib/glusterfs/3.6.2/xlator/testing/performance/symlink-cache.la
lib/libgfapi.la
lib/libgfchangelog.la
lib/libgfrpc.la
@@ -142,6 +140,7 @@ man/man8/glusterd.8
man/man8/glusterfs.8
man/man8/glusterfsd.8
man/man8/mount.glusterfs.8
+sbin/glfsheal
sbin/gluster
sbin/glusterd
sbin/glusterfs
diff --git a/filesystems/glusterfs/distinfo b/filesystems/glusterfs/distinfo
index ef91760b51a..6de5afc8141 100644
--- a/filesystems/glusterfs/distinfo
+++ b/filesystems/glusterfs/distinfo
@@ -1,16 +1,8 @@
-$NetBSD: distinfo,v 1.36 2014/12/11 22:08:22 joerg Exp $
+$NetBSD: distinfo,v 1.37 2015/04/09 15:20:47 manu Exp $
-SHA1 (glusterfs-3.6.0.tar.gz) = fe19bf7128c955207f633261b9f0f87ac7341cfc
-RMD160 (glusterfs-3.6.0.tar.gz) = a0078c5a08617f981e09e96eed6eaa2f622dc4b5
-Size (glusterfs-3.6.0.tar.gz) = 5924875 bytes
-SHA1 (patch-9006) = 18ac4e9d58b587bd202f94323a2fb9a168aade80
-SHA1 (patch-9010) = 8d46f4c32c3a14da0724b65c9592196a2439dbea
-SHA1 (patch-9045) = 93cb986d8a2675a714ded956269ffa73f9495827
-SHA1 (patch-9080) = a5be37a2834859afc4cf2daab3bd8c68581ab221
-SHA1 (patch-9084) = bc24386464df02e2e6e7d0f42892881dd5d9ef3a
-SHA1 (patch-configure) = 51de89ba391cb699f34f11882dca0ca67c98e0a6
+SHA1 (glusterfs-3.6.2.tar.gz) = 83aefa6b118f03bf3f78cbe0d8a8b8cc1634078a
+RMD160 (glusterfs-3.6.2.tar.gz) = 941d4e59ab3ed5faf216cc2c9267207aab0fb31a
+Size (glusterfs-3.6.2.tar.gz) = 6018636 bytes
SHA1 (patch-rpc_rpc-lib_src_rpcsvc.c) = a174a78d3daec9b784966b4c4502b335e4561558
-SHA1 (patch-xlator_cluster_dht_src_dht-common.c) = 835a240358948f310205c19514088cf93930b888
-SHA1 (patch-xlator_features_glupy_src_Makefile.in) = b338b98789d70f7c896ee29534a8dbae0ee93f08
SHA1 (patch-xlator_storage_posix_src_posix.c) = 1ca56830afac7cda2fb4fc119fdd6161134eb8b5
-SHA1 (patch-xlators_mgmt_glusterd_src_Makefile.in) = 48f2cbb46ad9d08c3500e23ce93586b265e1f5f5
+SHA1 (patch-xlators_mgmt_glusterd_src_Makefile.in) = 78a2b9d6c406744cb415904030d60aa09b636463
diff --git a/filesystems/glusterfs/patches/patch-9006 b/filesystems/glusterfs/patches/patch-9006
deleted file mode 100644
index a2464263bd8..00000000000
--- a/filesystems/glusterfs/patches/patch-9006
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD: patch-9006,v 1.1 2014/11/18 14:38:15 manu Exp $
-From 4f97f9e26663f03da1ca675b16943544e39399a3 Mon Sep 17 00:00:00 2001
-From: Emmanuel Dreyfus <manu@netbsd.org>
-Date: Thu, 30 Oct 2014 09:50:41 +0100
-Subject: [PATCH] Lazy umount emulation: deal with stopped volumes
-
-On non Linux systems, lazy umount is emulated using contrib/umountd.
-It first check that the path given to unmount exists, but it should
-not give up on ENOTCONN as it is what happens when a volume is mounted
-but stopped.
-
-This lets NetBSD pass tests/bugs/bug-1049323.t
-
-Backport of: http://review.gluster.org/8991
-
-BUG: 1138897
-Change-Id: I39941577021c0b39f545f9777fe75cd39637427b
-Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
----
- contrib/umountd/umountd.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git contrib/umountd/umountd.c contrib/umountd/umountd.c
-index 42f867d..0d2c6f2 100644
---- contrib/umountd/umountd.c
-+++ contrib/umountd/umountd.c
-@@ -49,14 +49,20 @@ sanity_check (char *path, dev_t *devp)
- if (path == NULL)
- usage ();
-
-- if (stat (path, &st) != 0) {
-- gf_log ("umountd", GF_LOG_ERROR,
-- "Cannot access %s\n", path, strerror (errno));
-- goto out;
-+ if ((ret = stat (path, &st)) != 0) {
-+ switch (errno) {
-+ case ENOTCONN:
-+ /* volume is stopped */
-+ break;
-+ default:
-+ gf_log ("umountd", GF_LOG_ERROR,
-+ "Cannot access %s\n", path, strerror (errno));
-+ goto out;
-+ }
- }
-
- /* If dev was not specified, get it from path */
-- if (*devp == -1)
-+ if (*devp == -1 && ret == 0)
- *devp = st.st_dev;
-
- strncpy (pathtmp, path, PATH_MAX);
---
-1.8.2.3
-
diff --git a/filesystems/glusterfs/patches/patch-9010 b/filesystems/glusterfs/patches/patch-9010
deleted file mode 100644
index 62457a1968e..00000000000
--- a/filesystems/glusterfs/patches/patch-9010
+++ /dev/null
@@ -1,72 +0,0 @@
-$NetBSD: patch-9010,v 1.1 2014/11/18 14:38:15 manu Exp $
-From 70e4f2935ac858f2e83d0c3887b584af8fa0bd5b Mon Sep 17 00:00:00 2001
-From: Emmanuel Dreyfus <manu@netbsd.org>
-Date: Thu, 30 Oct 2014 10:54:24 +0100
-Subject: [PATCH] Use F_CLOSEM if available
-
-Use F_CLOSEM to close all file descriptors if available.
-
-Backport of Ib3c682825b89c163ebb152848f2533b3cb62cdce
-
-BUG: 1138897
-Change-Id: Ie44c8e07c77ca5509766e0addbb17c1979df68e7
-Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
----
- contrib/uuid/gen_uuid.c | 7 +++++++
- libglusterfs/src/run.c | 8 ++++++--
- 2 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git contrib/uuid/gen_uuid.c contrib/uuid/gen_uuid.c
-index 79923cd..e69995a 100644
---- contrib/uuid/gen_uuid.c
-+++ contrib/uuid/gen_uuid.c
-@@ -465,6 +465,12 @@ static ssize_t read_all(int fd, char *buf, size_t count)
- #if defined(USE_UUIDD) && defined(HAVE_SYS_UN_H)
- static void close_all_fds(void)
- {
-+#ifdef F_CLOSEM
-+ (void)fcntl(0, F_CLOSEM);
-+ (void)open("/dev/null", O_RDWR); /* stdin */
-+ (void)open("/dev/null", O_RDWR); /* stdout */
-+ (void)open("/dev/null", O_RDWR); /* stderr */
-+#else /* F_CLOSEM */
- int i, max;
-
- #if defined(HAVE_SYSCONF) && defined(_SC_OPEN_MAX)
-@@ -485,6 +491,7 @@ static void close_all_fds(void)
- if (i <= 2)
- open("/dev/null", O_RDWR);
- }
-+#endif /* F_CLOSEM */
- }
- #endif
-
-diff --git libglusterfs/src/run.c libglusterfs/src/run.c
-index 4fd2a3a..93fe12a 100644
---- libglusterfs/src/run.c
-+++ libglusterfs/src/run.c
-@@ -289,7 +289,10 @@ runner_start (runner_t *runner)
- closedir (d);
- } else
- ret = -1;
--#else
-+#else /* !GF_LINUX_HOST_OS */
-+#ifdef F_CLOSEM /* NetBSD */
-+ (void)fcntl(3, F_CLOSEM);
-+#else /* !F_CLOSEM */
- struct rlimit rl;
- ret = getrlimit (RLIMIT_NOFILE, &rl);
- GF_ASSERT (ret == 0);
-@@ -298,7 +301,8 @@ runner_start (runner_t *runner)
- if (i != xpi[1])
- close (i);
- }
--#endif
-+#endif /* !F_CLOSEM */
-+#endif /* !GF_LINUX_HOST_OS */
- }
-
- if (ret != -1) {
---
-1.8.2.3
-
diff --git a/filesystems/glusterfs/patches/patch-9045 b/filesystems/glusterfs/patches/patch-9045
deleted file mode 100644
index 0bd82d235ac..00000000000
--- a/filesystems/glusterfs/patches/patch-9045
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-9045,v 1.1 2014/11/18 14:38:15 manu Exp $
-From fb36dbea2f492317a744b828d8ba8bdaab78ae3a Mon Sep 17 00:00:00 2001
-From: Emmanuel Dreyfus <manu@netbsd.org>
-Date: Tue, 4 Nov 2014 15:57:59 +0100
-Subject: [PATCH] Portability fix: mount.glusterfs
-
-Remove bash-specific syntax from mount.glusterfs
-
-This is a backport of Iec3a52686f7cee1825ac5a06c11fb8ac4d3e5d65
-
-BUG: 1138897
-Change-Id: I3149cd4d94c862a3857709c00cf0ed0377976f40
-Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
----
- xlators/mount/fuse/utils/mount_glusterfs.in | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git xlators/mount/fuse/utils/mount_glusterfs.in xlators/mount/fuse/utils/mount_glusterfs.in
-index e0a06ea..dc326b4 100755
---- xlators/mount/fuse/utils/mount_glusterfs.in
-+++ xlators/mount/fuse/utils/mount_glusterfs.in
-@@ -449,7 +449,7 @@ without_options()
- parse_options()
- {
- local optarg=${1}
-- for pair in $(echo ${optarg//,/ }); do
-+ for pair in $(echo $optarg | sed 's/,/ /g'); do
- key=$(echo "$pair" | cut -f1 -d'=');
- value=$(echo "$pair" | cut -f2- -d'=');
- if [ "$key" = "$value" ]; then
-@@ -463,7 +463,8 @@ parse_options()
- main ()
- {
- ## `mount` on OSX specifies options as first argument
-- if [[ $1 =~ "-o" ]]; then
-+ echo $1|grep -q -- "-o"
-+ if [ $? -eq 0 ]; then
- volfile_loc=$3
- mount_point=$4
- else
---
-1.8.2.3
-
diff --git a/filesystems/glusterfs/patches/patch-9080 b/filesystems/glusterfs/patches/patch-9080
deleted file mode 100644
index 55d7999b631..00000000000
--- a/filesystems/glusterfs/patches/patch-9080
+++ /dev/null
@@ -1,264 +0,0 @@
-$NetBSD: patch-9080,v 1.1 2014/11/18 14:38:15 manu Exp $
-From db7e7d493f763e0128c879280c9cec01bdea4260 Mon Sep 17 00:00:00 2001
-From: Emmanuel Dreyfus <manu@netbsd.org>
-Date: Thu, 30 Oct 2014 01:43:32 +0100
-Subject: [PATCH] glupy: portability fixes
-
-Fixes portability problems so that NetBSD passes tests/features/glupy.t
-
-- Use python-config to detect python build environment on all systems,
- not just Linux and Darwin.
-- Get the site-package directory from python and make sure we install
- glupy.py there, Previously we installed within glusterfs prefix,
- which caused a problem if it was different that python's prefix.
-- Set PYTHONPATH for tests so that the detected site-packages is used
- in python's search path. This should be useless, but let us have it
- just in case.
-- Pass glupy.so path from glusterfsd to glupy.py through an
- environment variable and use it in CDLL instead of "", as the
- later seems not portable (at least it fails on NetBSD).
-- Use gil_init_key pthread_getspecific to avoid deadlocks (that
- code was #ifdef out, perhaps because it was not needed on Linux,
- but it seems to be required for NetBSD.
-- Recover the error message from Python and send it to the logs
- to help debugging problems.
-
-Backport of: http://review.gluster.org/8978
-
-BUG: 1138897
-Change-Id: I1e23ba5cc18f129ee1032f905cb053953b683a81
-Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
----
- configure.ac | 18 +++++----------
- tests/env.rc.in | 5 ++++-
- tests/features/glupy.t | 1 +
- xlators/features/glupy/src/Makefile.am | 4 ++--
- xlators/features/glupy/src/glupy.c | 40 +++++++++++++++++++++++++---------
- xlators/features/glupy/src/glupy.py | 3 ++-
- 6 files changed, 45 insertions(+), 26 deletions(-)
-
-diff --git configure.ac configure.ac
-index ddc2cc5..dfcd976 100644
---- configure.ac
-+++ configure.ac
-@@ -217,6 +217,7 @@ AC_CANONICAL_HOST
- AC_PROG_CC
- AC_DISABLE_STATIC
- AC_PROG_LIBTOOL
-+AC_SUBST([shrext_cmds])
-
- AC_CHECK_PROG([RPCGEN], [rpcgen], [yes], [no])
-
-@@ -967,18 +968,9 @@ saved_CFLAGS=$CFLAGS
- saved_CPPFLAGS=$CPPFLAGS
- saved_LDFLAGS=$LDFLAGS
-
--case $host_os in
-- linux*)
-- CFLAGS="`${PYTHON}-config --cflags`"
-- CPPFLAGS=$CFLAGS
-- LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-- ;;
-- darwin*)
-- CFLAGS="`${PYTHON}-config --cflags`"
-- CPPFLAGS=$CFLAGS
-- LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-- ;;
--esac
-+CFLAGS="`${PYTHON}-config --cflags`"
-+CPPFLAGS=$CFLAGS
-+LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-
- AC_CHECK_HEADERS([python$PYTHON_VERSION/Python.h],[have_Python_h=yes],[])
- AC_ARG_ENABLE([glupy],
-@@ -1029,12 +1021,14 @@ case $host_os in
- esac
-
- if test "x$BUILD_GLUPY" = "xyes"; then
-+ BUILD_PYTHON_SITE_PACKAGES=`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
- BUILD_PYTHON_INC=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"`
- BUILD_PYTHON_LIB=python$PYTHON_VERSION
- GLUPY_SUBDIR=glupy
- GLUPY_SUBDIR_MAKEFILE=xlators/features/glupy/Makefile
- GLUPY_SUBDIR_SRC_MAKEFILE=xlators/features/glupy/src/Makefile
- echo "building glupy with -isystem $BUILD_PYTHON_INC -l $BUILD_PYTHON_LIB"
-+ AC_SUBST(BUILD_PYTHON_SITE_PACKAGES)
- AC_SUBST(BUILD_PYTHON_INC)
- AC_SUBST(BUILD_PYTHON_LIB)
- AC_SUBST(GLUPY_SUBDIR)
-diff --git tests/env.rc.in tests/env.rc.in
-index 000a80f..1850b7a 100644
---- tests/env.rc.in
-+++ tests/env.rc.in
-@@ -8,4 +8,7 @@ LD_LIBRARY_PATH=@libdir@:$LD_LIBRARY_PATH
- export LD_LIBRARY_PATH
-
- GLUSTERD_WORKDIR=@GLUSTERD_WORKDIR@
--export GLUSTERD_WORKDIR
-\ No newline at end of file
-+export GLUSTERD_WORKDIR
-+
-+PYTHONPATH=@BUILD_PYTHON_SITE_PACKAGES@:$PYTHON_PATH
-+export PYTHONPATH
-diff --git tests/features/glupy.t tests/features/glupy.t
-index a34e48f..8b79a14 100755
---- tests/features/glupy.t
-+++ tests/features/glupy.t
-@@ -3,6 +3,7 @@
- . $(dirname $0)/../include.rc
- . $(dirname $0)/../volume.rc
-
-+echo $PYTHON_PATH >&2
- cleanup;
-
- TEST mkdir -p $B0/glupytest
-diff --git xlators/features/glupy/src/Makefile.am xlators/features/glupy/src/Makefile.am
-index d9361a5..de8b0de 100644
---- xlators/features/glupy/src/Makefile.am
-+++ xlators/features/glupy/src/Makefile.am
-@@ -4,7 +4,7 @@ xlator_LTLIBRARIES = glupy.la
- xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
- glupydir = $(xlatordir)/glupy
- AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -isystem $(BUILD_PYTHON_INC)
--AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" $(GF_CFLAGS)
-+AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" -DPATH_GLUSTERFS_GLUPY_MODULE=\"${xlatordir}/glupy${shrext_cmds}\" $(GF_CFLAGS)
-
- # Flags to build glupy.so with
- glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -shared -nostartfiles
-@@ -15,7 +15,7 @@ glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- noinst_HEADERS = glupy.h
-
- # Install glupy.py into the Python site-packages area
--pyglupydir = $(pythondir)/gluster
-+pyglupydir = @BUILD_PYTHON_SITE_PACKAGES@/gluster
- pyglupy_PYTHON = glupy.py __init__.py
-
- CLEANFILES =
-diff --git xlators/features/glupy/src/glupy.c xlators/features/glupy/src/glupy.c
-index 292f5b7..7bb88c0 100644
---- xlators/features/glupy/src/glupy.c
-+++ xlators/features/glupy/src/glupy.c
-@@ -31,12 +31,10 @@ pthread_key_t gil_init_key;
- PyGILState_STATE
- glupy_enter (void)
- {
--#if 0
- if (!pthread_getspecific(gil_init_key)) {
- PyEval_ReleaseLock();
- (void)pthread_setspecific(gil_init_key,(void *)1);
- }
--#endif
-
- return PyGILState_Ensure();
- }
-@@ -2333,6 +2331,9 @@ init (xlator_t *this)
- PyObject *py_args = NULL;
- PyObject *syspath = NULL;
- PyObject *path = NULL;
-+ PyObject *error_type = NULL;
-+ PyObject *error_msg = NULL;
-+ PyObject *error_bt = NULL;
- static gf_boolean_t py_inited = _gf_false;
- void * err_cleanup = &&err_return;
-
-@@ -2349,12 +2350,20 @@ init (xlator_t *this)
- err_cleanup = &&err_free_priv;
-
- if (!py_inited) {
-+ /*
-+ * This must be done before Py_Initialize(),
-+ * because it will duplicate the environment,
-+ * and fail to see later environment updates.
-+ */
-+ setenv("PATH_GLUSTERFS_GLUPY_MODULE",
-+ PATH_GLUSTERFS_GLUPY_MODULE, 1);
-+
- Py_Initialize();
- PyEval_InitThreads();
--#if 0
-+
- (void)pthread_key_create(&gil_init_key,NULL);
- (void)pthread_setspecific(gil_init_key,(void *)1);
--#endif
-+
- /* PyEval_InitThreads takes this "for" us. No thanks. */
- PyEval_ReleaseLock();
- py_inited = _gf_true;
-@@ -2370,7 +2379,9 @@ init (xlator_t *this)
- if (!py_mod_name) {
- gf_log (this->name, GF_LOG_ERROR, "could not create name");
- if (PyErr_Occurred()) {
-- PyErr_Print();
-+ PyErr_Fetch (&error_type, &error_msg, &error_bt);
-+ gf_log (this->name, GF_LOG_ERROR, "Python error: %s",
-+ PyString_AsString(error_msg));
- }
- goto *err_cleanup;
- }
-@@ -2379,9 +2390,12 @@ init (xlator_t *this)
- priv->py_module = PyImport_Import(py_mod_name);
- Py_DECREF(py_mod_name);
- if (!priv->py_module) {
-- gf_log (this->name, GF_LOG_ERROR, "Python import failed");
-+ gf_log (this->name, GF_LOG_ERROR, "Python import of %s failed",
-+ module_name);
- if (PyErr_Occurred()) {
-- PyErr_Print();
-+ PyErr_Fetch (&error_type, &error_msg, &error_bt);
-+ gf_log (this->name, GF_LOG_ERROR, "Python error: %s",
-+ PyString_AsString(error_msg));
- }
- goto *err_cleanup;
- }
-@@ -2392,7 +2406,9 @@ init (xlator_t *this)
- if (!py_init_func || !PyCallable_Check(py_init_func)) {
- gf_log (this->name, GF_LOG_ERROR, "missing init func");
- if (PyErr_Occurred()) {
-- PyErr_Print();
-+ PyErr_Fetch (&error_type, &error_msg, &error_bt);
-+ gf_log (this->name, GF_LOG_ERROR, "Python error: %s",
-+ PyString_AsString(error_msg));
- }
- goto *err_cleanup;
- }
-@@ -2402,7 +2418,9 @@ init (xlator_t *this)
- if (!py_args) {
- gf_log (this->name, GF_LOG_ERROR, "could not create args");
- if (PyErr_Occurred()) {
-- PyErr_Print();
-+ PyErr_Fetch (&error_type, &error_msg, &error_bt);
-+ gf_log (this->name, GF_LOG_ERROR, "Python error: %s",
-+ PyString_AsString(error_msg));
- }
- goto *err_cleanup;
- }
-@@ -2414,7 +2432,9 @@ init (xlator_t *this)
- if (!priv->py_xlator) {
- gf_log (this->name, GF_LOG_ERROR, "Python init failed");
- if (PyErr_Occurred()) {
-- PyErr_Print();
-+ PyErr_Fetch (&error_type, &error_msg, &error_bt);
-+ gf_log (this->name, GF_LOG_ERROR, "Python error: %s",
-+ PyString_AsString(error_msg));
- }
- goto *err_cleanup;
- }
-diff --git xlators/features/glupy/src/glupy.py xlators/features/glupy/src/glupy.py
-index eda8aeb..b9fc370 100644
---- xlators/features/glupy/src/glupy.py
-+++ xlators/features/glupy/src/glupy.py
-@@ -9,9 +9,10 @@
- ##
-
- import sys
-+import os
- from ctypes import *
-
--dl = CDLL("",RTLD_GLOBAL)
-+dl = CDLL(os.getenv("PATH_GLUSTERFS_GLUPY_MODULE", ""),RTLD_GLOBAL)
-
-
- class call_frame_t (Structure):
---
-1.8.2.3
-
diff --git a/filesystems/glusterfs/patches/patch-9084 b/filesystems/glusterfs/patches/patch-9084
deleted file mode 100644
index d179a946495..00000000000
--- a/filesystems/glusterfs/patches/patch-9084
+++ /dev/null
@@ -1,350 +0,0 @@
-$NetBSD: patch-9084,v 1.1 2014/11/18 14:38:15 manu Exp $
-From 23b7ead5de0f21abdcf5440a4a43dcf3a42c3822 Mon Sep 17 00:00:00 2001
-From: Emmanuel Dreyfus <manu@netbsd.org>
-Date: Mon, 10 Nov 2014 10:01:00 +0100
-Subject: [PATCH] telldir()/seekdir() portability fixes
-
-POSIX says that an offset obtained from telldir() can only be used
-on the same DIR *. Linux is abls to reuse the offset accross
-closedir()/opendir() for a given directory, but this is not portable
-and such a behavior should be fixed.
-
-An incomplete fix for the posix xlator was merged in
-http://review.gluster.org/8933
-This change set completes it.
-
-- Perform the same fix index xlator.
-- Use appropriate casts and variable types so that 32 bit signed
- offsets obtained by telldir() do not get clobbered when copied into
- 64 bit signed types.
-- modify afr-self-heald.c so that it does not use anonymous fd,
- since this will cause closedir()/opendir() between each
- syncop_readdir(). On failure we fallback to anonymous fs
- only for Linux so that we can cope with updated client vs not
- updated brick.
-- Avoid sending an EINVAL when the client request for the EOF offset.
- Here we fix an error in previous fix for posix xlator: since we
- fill each directory entry with the offset of the next entry, we
- must consider as EOF the offset of the last entry, and not the
- value of telldir() after we read it.
-
-This is a backport of I59fb7f06a872c4f98987105792d648141c258c6a
-
-BUG: 1138897
-Change-Id: I1e9f3e4a7d780b98adf6d9f197ee2198d43ef94d
-Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
----
- xlators/cluster/afr/src/afr-self-heald.c | 46 +++++++++++++++++++++++++++-----
- xlators/features/index/src/index.c | 42 ++++++++++++++++++++---------
- xlators/features/index/src/index.h | 1 +
- xlators/storage/posix/src/posix.c | 26 +++++++++++-------
- 4 files changed, 87 insertions(+), 28 deletions(-)
-
-diff --git xlators/cluster/afr/src/afr-self-heald.c xlators/cluster/afr/src/afr-self-heald.c
-index 10e1996..6ce52aa 100644
---- xlators/cluster/afr/src/afr-self-heald.c
-+++ xlators/cluster/afr/src/afr-self-heald.c
-@@ -276,6 +276,8 @@ afr_shd_index_opendir (xlator_t *this, int child)
- #ifdef GF_LINUX_HOST_OS
- fd_unref (fd);
- fd = fd_anonymous (inode);
-+ if (!fd)
-+ goto out;
- #else /* GF_LINUX_HOST_OS */
- gf_log(this->name, GF_LOG_ERROR,
- "opendir of %s for %s failed: %s",
-@@ -429,7 +431,7 @@ afr_shd_index_sweep (struct subvol_healer *healer)
- fd_t *fd = NULL;
- xlator_t *subvol = NULL;
- afr_private_t *priv = NULL;
-- off_t offset = 0;
-+ uint64_t offset = 0;
- gf_dirent_t entries;
- gf_dirent_t *entry = NULL;
- uuid_t gfid;
-@@ -503,11 +505,12 @@ afr_shd_index_sweep (struct subvol_healer *healer)
- int
- afr_shd_full_sweep (struct subvol_healer *healer, inode_t *inode)
- {
-+ loc_t loc = {0, };
- fd_t *fd = NULL;
- xlator_t *this = NULL;
- xlator_t *subvol = NULL;
- afr_private_t *priv = NULL;
-- off_t offset = 0;
-+ uint64_t offset = 0;
- gf_dirent_t entries;
- gf_dirent_t *entry = NULL;
- int ret = 0;
-@@ -516,9 +519,38 @@ afr_shd_full_sweep (struct subvol_healer *healer, inode_t *inode)
- priv = this->private;
- subvol = priv->children[healer->subvol];
-
-- fd = fd_anonymous (inode);
-- if (!fd)
-- return -errno;
-+ uuid_copy (loc.gfid, inode->gfid);
-+ loc.inode = inode_ref(inode);
-+
-+ fd = fd_create (inode, GF_CLIENT_PID_AFR_SELF_HEALD);
-+ if (!fd) {
-+ gf_log(this->name, GF_LOG_ERROR,
-+ "fd_create of %s failed: %s",
-+ uuid_utoa (loc.gfid), strerror(errno));
-+ ret = -errno;
-+ goto out;
-+ }
-+
-+ ret = syncop_opendir (subvol, &loc, fd);
-+ if (ret) {
-+#ifdef GF_LINUX_HOST_OS /* See comment in afr_shd_index_opendir() */
-+ fd_unref(fd);
-+ fd = fd_anonymous (inode);
-+ if (!fd) {
-+ gf_log(this->name, GF_LOG_ERROR,
-+ "fd_anonymous of %s failed: %s",
-+ uuid_utoa (loc.gfid), strerror(errno));
-+ ret = -errno;
-+ goto out;
-+ }
-+#else /* GF_LINUX_HOST_OS */
-+ gf_log(this->name, GF_LOG_ERROR,
-+ "opendir of %s failed: %s",
-+ uuid_utoa (loc.gfid), strerror(errno));
-+ ret = -errno;
-+ goto out;
-+#endif /* GF_LINUX_HOST_OS */
-+ }
-
- INIT_LIST_HEAD (&entries.list);
-
-@@ -560,6 +592,8 @@ afr_shd_full_sweep (struct subvol_healer *healer, inode_t *inode)
- break;
- }
-
-+out:
-+ loc_wipe (&loc);
- if (fd)
- fd_unref (fd);
- return ret;
-@@ -949,7 +983,7 @@ afr_shd_gather_index_entries (xlator_t *this, int child, dict_t *output)
- fd_t *fd = NULL;
- xlator_t *subvol = NULL;
- afr_private_t *priv = NULL;
-- off_t offset = 0;
-+ uint64_t offset = 0;
- gf_dirent_t entries;
- gf_dirent_t *entry = NULL;
- uuid_t gfid;
-diff --git xlators/features/index/src/index.c xlators/features/index/src/index.c
-index c342da8..50e2e0a 100644
---- xlators/features/index/src/index.c
-+++ xlators/features/index/src/index.c
-@@ -268,10 +268,11 @@ check_delete_stale_index_file (xlator_t *this, char *filename)
- }
-
- static int
--index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
-+index_fill_readdir (fd_t *fd, index_fd_ctx_t *fctx, DIR *dir, off_t off,
- size_t size, gf_dirent_t *entries)
- {
- off_t in_case = -1;
-+ off_t last_off = 0;
- size_t filled = 0;
- int count = 0;
- char entrybuf[sizeof(struct dirent) + 256 + 8];
-@@ -286,11 +287,11 @@ index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
- } else {
- seekdir (dir, off);
- #ifndef GF_LINUX_HOST_OS
-- if (telldir(dir) != off) {
-+ if ((u_long)telldir(dir) != off && off != fctx->dir_eof) {
- gf_log (THIS->name, GF_LOG_ERROR,
-- "seekdir(%ld) failed on dir=%p: "
-+ "seekdir(0x%llx) failed on dir=%p: "
- "Invalid argument (offset reused from "
-- "another DIR * structure?)", (long)off, dir);
-+ "another DIR * structure?)", off, dir);
- errno = EINVAL;
- count = -1;
- goto out;
-@@ -299,7 +300,7 @@ index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
- }
-
- while (filled <= size) {
-- in_case = telldir (dir);
-+ in_case = (u_long)telldir (dir);
-
- if (in_case == -1) {
- gf_log (THIS->name, GF_LOG_ERROR,
-@@ -335,12 +336,13 @@ index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
- if (this_size + filled > size) {
- seekdir (dir, in_case);
- #ifndef GF_LINUX_HOST_OS
-- if (telldir(dir) != in_case) {
-+ if ((u_long)telldir(dir) != in_case &&
-+ in_case != fctx->dir_eof) {
- gf_log (THIS->name, GF_LOG_ERROR,
-- "seekdir(%ld) failed on dir=%p: "
-+ "seekdir(0x%llx) failed on dir=%p: "
- "Invalid argument (offset reused from "
- "another DIR * structure?)",
-- (long)in_case, dir);
-+ in_case, dir);
- errno = EINVAL;
- count = -1;
- goto out;
-@@ -357,7 +359,14 @@ index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
- entry->d_name, strerror (errno));
- goto out;
- }
-- this_entry->d_off = telldir (dir);
-+ /*
-+ * we store the offset of next entry here, which is
-+ * probably not intended, but code using syncop_readdir()
-+ * (glfs-heal.c, afr-self-heald.c, pump.c) rely on it
-+ * for directory read resumption.
-+ */
-+ last_off = (u_long)telldir(dir);
-+ this_entry->d_off = last_off;
- this_entry->d_ino = entry->d_ino;
-
- list_add_tail (&this_entry->list, &entries->list);
-@@ -366,9 +375,12 @@ index_fill_readdir (fd_t *fd, DIR *dir, off_t off,
- count ++;
- }
-
-- if ((!readdir (dir) && (errno == 0)))
-+ if ((!readdir (dir) && (errno == 0))) {
- /* Indicate EOF */
- errno = ENOENT;
-+ /* Remember EOF offset for later detection */
-+ fctx->dir_eof = last_off;
-+ }
- out:
- return count;
- }
-@@ -581,6 +593,7 @@ __index_fd_ctx_get (fd_t *fd, xlator_t *this, index_fd_ctx_t **ctx)
- fctx = NULL;
- goto out;
- }
-+ fctx->dir_eof = -1;
-
- ret = __fd_ctx_set (fd, this, (uint64_t)(long)fctx);
- if (ret) {
-@@ -949,7 +962,7 @@ index_readdir_wrapper (call_frame_t *frame, xlator_t *this,
- goto done;
- }
-
-- count = index_fill_readdir (fd, dir, off, size, &entries);
-+ count = index_fill_readdir (fd, fctx, dir, off, size, &entries);
-
- /* pick ENOENT to indicate EOF */
- op_errno = errno;
-@@ -1270,8 +1283,11 @@ index_releasedir (xlator_t *this, fd_t *fd)
- goto out;
-
- fctx = (index_fd_ctx_t*) (long) ctx;
-- if (fctx->dir)
-- closedir (fctx->dir);
-+ if (fctx->dir) {
-+ ret = closedir (fctx->dir);
-+ if (ret)
-+ gf_log (this->name, GF_LOG_ERROR, "closedir error: %s", strerror (errno));
-+ }
-
- GF_FREE (fctx);
- out:
-diff --git xlators/features/index/src/index.h xlators/features/index/src/index.h
-index 661dcdb..206d280 100644
---- xlators/features/index/src/index.h
-+++ xlators/features/index/src/index.h
-@@ -34,6 +34,7 @@ typedef struct index_inode_ctx {
-
- typedef struct index_fd_ctx {
- DIR *dir;
-+ off_t dir_eof;
- } index_fd_ctx_t;
-
- typedef struct index_priv {
-diff --git xlators/storage/posix/src/posix.c xlators/storage/posix/src/posix.c
-index 3e3d14f..5d37c9f 100644
---- xlators/storage/posix/src/posix.c
-+++ xlators/storage/posix/src/posix.c
-@@ -4839,6 +4839,7 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- gf_dirent_t *entries, xlator_t *this, int32_t skip_dirs)
- {
- off_t in_case = -1;
-+ off_t last_off = 0;
- size_t filled = 0;
- int count = 0;
- char entrybuf[sizeof(struct dirent) + 256 + 8];
-@@ -4874,11 +4875,11 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- } else {
- seekdir (dir, off);
- #ifndef GF_LINUX_HOST_OS
-- if (telldir(dir) != (long)off && off != pfd->dir_eof) {
-+ if ((u_long)telldir(dir) != off && off != pfd->dir_eof) {
- gf_log (THIS->name, GF_LOG_ERROR,
-- "seekdir(%ld) failed on dir=%p: "
-+ "seekdir(0x%llx) failed on dir=%p: "
- "Invalid argument (offset reused from "
-- "another DIR * structure?)", (long)off, dir);
-+ "another DIR * structure?)", off, dir);
- errno = EINVAL;
- count = -1;
- goto out;
-@@ -4887,7 +4888,7 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- }
-
- while (filled <= size) {
-- in_case = telldir (dir);
-+ in_case = (u_long)telldir (dir);
-
- if (in_case == -1) {
- gf_log (THIS->name, GF_LOG_ERROR,
-@@ -4947,13 +4948,13 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- if (this_size + filled > size) {
- seekdir (dir, in_case);
- #ifndef GF_LINUX_HOST_OS
-- if (telldir(dir) != (long)in_case &&
-+ if ((u_long)telldir(dir) != in_case &&
- in_case != pfd->dir_eof) {
- gf_log (THIS->name, GF_LOG_ERROR,
-- "seekdir(%ld) failed on dir=%p: "
-+ "seekdir(0x%llx) failed on dir=%p: "
- "Invalid argument (offset reused from "
- "another DIR * structure?)",
-- (long)in_case, dir);
-+ in_case, dir);
- errno = EINVAL;
- count = -1;
- goto out;
-@@ -4970,7 +4971,14 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- entry->d_name, strerror (errno));
- goto out;
- }
-- this_entry->d_off = telldir (dir);
-+ /*
-+ * we store the offset of next entry here, which is
-+ * probably not intended, but code using syncop_readdir()
-+ * (glfs-heal.c, afr-self-heald.c, pump.c) rely on it
-+ * for directory read resumption.
-+ */
-+ last_off = (u_long)telldir(dir);
-+ this_entry->d_off = last_off;
- this_entry->d_ino = entry->d_ino;
- this_entry->d_type = entry->d_type;
-
-@@ -4984,7 +4992,7 @@ posix_fill_readdir (fd_t *fd, DIR *dir, off_t off, size_t size,
- /* Indicate EOF */
- errno = ENOENT;
- /* Remember EOF offset for later detection */
-- pfd->dir_eof = telldir (dir);
-+ pfd->dir_eof = (u_long)last_off;
- }
- out:
- return count;
---
-1.8.2.3
-
diff --git a/filesystems/glusterfs/patches/patch-configure b/filesystems/glusterfs/patches/patch-configure
deleted file mode 100644
index ed56a7a6694..00000000000
--- a/filesystems/glusterfs/patches/patch-configure
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-configure,v 1.1 2014/11/18 14:38:15 manu Exp $
-
-autoconf output after patch-9080
-
---- configure.orig 2014-11-04 17:06:43.000000000 +0100
-+++ configure 2014-11-04 17:09:32.000000000 +0100
-@@ -822,8 +822,9 @@
- GLUPY_SUBDIR_MAKEFILE
- GLUPY_SUBDIR
- BUILD_PYTHON_LIB
- BUILD_PYTHON_INC
-+BUILD_PYTHON_SITE_PACKAGES
- PYTHONDEV_LDFLAGS
- PYTHONDEV_CPPFLAGS
- PYTHONDEV_CFLAGS
- ENABLE_SYSLOG_FALSE
-@@ -889,8 +890,9 @@
- systemddir
- mountutildir
- pkgconfigdir
- RPCGEN
-+shrext_cmds
- CPP
- OTOOL64
- OTOOL
- LIPO
-@@ -19501,21 +19503,11 @@
- saved_CFLAGS=$CFLAGS
- saved_CPPFLAGS=$CPPFLAGS
- saved_LDFLAGS=$LDFLAGS
-
--case $host_os in
-- linux*)
-- CFLAGS="`${PYTHON}-config --cflags`"
-- CPPFLAGS=$CFLAGS
-- LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-- ;;
-- darwin*)
-- CFLAGS="`${PYTHON}-config --cflags`"
-- CPPFLAGS=$CFLAGS
-- LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-- ;;
--esac
--
-+CFLAGS="`${PYTHON}-config --cflags`"
-+CPPFLAGS=$CFLAGS
-+LDFLAGS="-L`${PYTHON}-config --prefix`/lib `${PYTHON}-config --ldflags`"
-
- for ac_header in python$PYTHON_VERSION/Python.h
- do
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-@@ -19721,8 +19713,9 @@
- ;;
- esac
-
- if test "x$BUILD_GLUPY" = "xyes"; then
-+ BUILD_PYTHON_SITE_PACKAGES=`$PYTHON -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
- BUILD_PYTHON_INC=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_inc()"`
- BUILD_PYTHON_LIB=python$PYTHON_VERSION
- GLUPY_SUBDIR=glupy
- GLUPY_SUBDIR_MAKEFILE=xlators/features/glupy/Makefile
diff --git a/filesystems/glusterfs/patches/patch-xlator_cluster_dht_src_dht-common.c b/filesystems/glusterfs/patches/patch-xlator_cluster_dht_src_dht-common.c
deleted file mode 100644
index 1e365b37b4d..00000000000
--- a/filesystems/glusterfs/patches/patch-xlator_cluster_dht_src_dht-common.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-xlator_cluster_dht_src_dht-common.c,v 1.1 2014/11/18 14:38:15 manu Exp $
-
-Shut up log-filling message
-
---- xlators/cluster/dht/src/dht-common.c.orig 2014-11-07 16:45:47.000000000 +0100
-+++ xlators/cluster/dht/src/dht-common.c 2014-11-07 16:46:09.000000000 +0100
-@@ -1817,9 +1817,9 @@
- "fresh_lookup returned for %s with op_ret %d and "
- "op_errno %d", loc->path, op_ret, op_errno);
-
- if (ENTRY_MISSING (op_ret, op_errno)) {
-- gf_log (this->name, GF_LOG_INFO, "Entry %s missing on subvol"
-+ gf_log (this->name, GF_LOG_DEBUG, "Entry %s missing on subvol"
- " %s", loc->path, prev->this->name);
- if (conf->search_unhashed == GF_DHT_LOOKUP_UNHASHED_ON) {
- local->op_errno = ENOENT;
- dht_lookup_everywhere (frame, this, loc);
diff --git a/filesystems/glusterfs/patches/patch-xlator_features_glupy_src_Makefile.in b/filesystems/glusterfs/patches/patch-xlator_features_glupy_src_Makefile.in
deleted file mode 100644
index b684b64f943..00000000000
--- a/filesystems/glusterfs/patches/patch-xlator_features_glupy_src_Makefile.in
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-xlator_features_glupy_src_Makefile.in,v 1.1 2014/11/18 14:38:15 manu Exp $
-
-automake output after patch-9006
-
---- xlators/features/glupy/src/Makefile.in.orig 2014-11-04 16:37:44.000000000 +0100
-+++ xlators/features/glupy/src/Makefile.in 2014-11-04 16:44:25.000000000 +0100
-@@ -314,9 +314,9 @@
- # Ensure GLUSTER_PYTHON_PATH is passed to glupy.so
- xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
- glupydir = $(xlatordir)/glupy
- AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -isystem $(BUILD_PYTHON_INC)
--AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" $(GF_CFLAGS)
-+AM_CFLAGS = $(PYTHONDEV_CFLAGS) -Wall -fno-strict-aliasing -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" -DPATH_GLUSTERFS_GLUPY_MODULE=\"${xlatordir}/glupy${shrext_cmds}\" $(GF_CFLAGS)
-
- # Flags to build glupy.so with
- glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -shared -nostartfiles
- glupy_la_SOURCES = glupy.c
-@@ -325,9 +325,9 @@
-
- noinst_HEADERS = glupy.h
-
- # Install glupy.py into the Python site-packages area
--pyglupydir = $(pythondir)/gluster
-+pyglupydir = @BUILD_PYTHON_SITE_PACKAGES@/gluster
- pyglupy_PYTHON = glupy.py __init__.py
- CLEANFILES =
- all: all-am
-
diff --git a/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_Makefile.in b/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_Makefile.in
index d5f4796ab76..1f6a30fe65c 100644
--- a/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_Makefile.in
+++ b/filesystems/glusterfs/patches/patch-xlators_mgmt_glusterd_src_Makefile.in
@@ -1,8 +1,9 @@
-$NetBSD: patch-xlators_mgmt_glusterd_src_Makefile.in,v 1.1 2014/12/11 22:08:22 joerg Exp $
+$NetBSD: patch-xlators_mgmt_glusterd_src_Makefile.in,v 1.2 2015/04/09 15:20:48 manu Exp $
---- xlators/mgmt/glusterd/src/Makefile.in.orig 2014-12-10 15:18:18.000000000 +0000
-+++ xlators/mgmt/glusterd/src/Makefile.in
-@@ -356,7 +356,7 @@ noinst_HEADERS = glusterd.h glusterd-uti
+--- xlators/mgmt/glusterd/src/Makefile.in.orig 2015-01-21 13:11:01.000000000 +0100
++++ xlators/mgmt/glusterd/src/Makefile.in 2015-04-09 15:58:41.000000000 +0200
+@@ -358,9 +358,9 @@
+ glusterd-syncop.h glusterd-hooks.h glusterd-locks.h \
glusterd-mgmt.h glusterd-messages.h glusterd-peer-utils.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
@@ -11,3 +12,4 @@ $NetBSD: patch-xlators_mgmt_glusterd_src_Makefile.in,v 1.1 2014/12/11 22:08:22 j
-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
-I$(CONTRIBDIR)/uuid -I$(CONTRIBDIR)/mount \
-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
+ -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\