aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/glusterfs/files
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/glusterfs/files')
-rw-r--r--recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch33
-rw-r--r--recipes-extended/glusterfs/files/glusterd-ovp93
-rw-r--r--recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch25
-rw-r--r--recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch44
4 files changed, 195 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch b/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch
new file mode 100644
index 00000000..d89fde97
--- /dev/null
+++ b/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch
@@ -0,0 +1,33 @@
+From 960a101ab795fed1b7505ed9db61769cbdb9450e Mon Sep 17 00:00:00 2001
+From: Sebastian Lenartowicz <Sebastian.Lenartowicz@windriver.com>
+Date: Wed, 4 Dec 2013 15:16:02 -0500
+Subject: [PATCH 1/1] Fix for mount.glusterfs not accepting --version argument
+
+The mount.glusterfs shell script serves as a convenient "gatekeeper"
+for the glusterfs program itself, and performs a few setup tasks,
+depending on the options it's given. However, an overzealous check
+for the number of arguments (any number of arguments less than 2)
+was preventing the --version and --help arguments from being usable
+on their own. This patch solves that by dropping the check (the
+glusterfs software itself can throw out commands with too few
+arguments, which makes the check redundant in any event).
+---
+ xlators/mount/fuse/utils/mount.glusterfs.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
+index 2a8183c..ea18efb 100755
+--- a/xlators/mount/fuse/utils/mount.glusterfs.in
++++ b/xlators/mount/fuse/utils/mount.glusterfs.in
+@@ -395,7 +395,7 @@ main ()
+ pos_args=$((pos_args+1))
+ fi
+ done
+- if [ $in_opt = "yes" -o $pos_args -lt 2 ]; then
++ if [ $in_opt = "yes" ]; then
+ usage
+ exit 1
+ fi
+--
+1.7.9.7
+
diff --git a/recipes-extended/glusterfs/files/glusterd-ovp b/recipes-extended/glusterfs/files/glusterd-ovp
new file mode 100644
index 00000000..c0209286
--- /dev/null
+++ b/recipes-extended/glusterfs/files/glusterd-ovp
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+# chkconfig: 35 20 80
+# description: Gluster File System service for volume management
+#
+
+# Get function from functions library
+. /etc/init.d/functions
+
+BASE=glusterd
+PIDFILE=/var/run/$BASE.pid
+PID=`test -f $PIDFILE && cat $PIDFILE`
+GLUSTERFSD=glusterfsd
+GLUSTERFS=glusterfs
+GLUSTERD_BIN=/usr/sbin/$BASE
+GLUSTERD_OPTS="--pid-file=$PIDFILE"
+GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS"
+RETVAL=0
+
+# Start the service $BASE
+start()
+{
+ # Force creation of the log directory even on a tmpfs /var/log.
+ mkdir -p /var/log/glusterfs
+
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE
+ status=$?
+ if [ $status -eq 0 ]; then
+ echo "glusterd service is already running with pid $PID"
+ exit 1
+ else
+ echo -n $"Starting $BASE:"
+ start-stop-daemon --start --pidfile $PIDFILE \
+ --exec $GLUSTERD_BIN -- "$GLUSTERD_OPTS"
+ RETVAL=$?
+ echo
+ [ $RETVAL -ne 0 ] && exit $RETVAL
+ fi
+}
+
+# Stop the service $BASE
+stop()
+{
+ echo -n $"Stopping $BASE:"
+ start-stop-daemon --stop --test --quiet --pidfile $PIDFILE
+ status=$?
+ if [ $status -eq 0 ]; then
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ [ -w $PIDFILE ] && rm -f $PIDFILE
+ else
+ start-stop-daemon --stop --quiet --name $BASE
+ fi
+
+ echo
+ pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null
+ [ $? -eq 0 ] && start-stop-daemon --stop --quiet --name $GLUSTERFSD
+
+ #pidof -c -o %PPID -x $GLUSTERFS &> /dev/null
+ #[ $? -eq 0 ] && start-stop-daemon --stop --quiet --name $GLUSTERFS
+
+ if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then
+ pid=`cat /etc/glusterd/nfs/run/nfs.pid`;
+ cmd=`ps -p $pid -o comm=`
+
+ if [ $cmd == "glusterfs" ]; then
+ start-stop-daemon --stop --quiet \
+ --pidfile /etc/glusterd/nfs/run/nfs.pid
+ fi
+ fi
+}
+
+
+### service arguments ###
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $BASE
+ ;;
+ restart | force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart}."
+ exit 1
+esac
+
+exit 0
diff --git a/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch b/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch
new file mode 100644
index 00000000..4e0379ba
--- /dev/null
+++ b/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch
@@ -0,0 +1,25 @@
+The glusterfs code for installing start-up scripts checks for systemd
+directories on the build host, and if it finds them, it chooses systemd
+style scripts, otherwise init.d style scripts. This behavior might
+conceivably be suitable for self-hosted builds, but it's grossly broken
+for cross-build environments. Since we want to install custom WR scripts
+regardless of which script style we support, we patch glusterfs so that
+it doesn't install any of its default start-up scripts.
+
+Upstream-Status: Inappropriate [WR-specific change]
+Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
+---
+ extras/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -2,7 +2,7 @@
+ EditorModedir = $(docdir)
+ EditorMode_DATA = glusterfs-mode.el glusterfs.vim
+
+-SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM
++SUBDIRS = benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM
+
+ confdir = $(sysconfdir)/glusterfs
+ conf_DATA = glusterfs-logrotate
diff --git a/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch b/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch
new file mode 100644
index 00000000..16cc47e0
--- /dev/null
+++ b/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch
@@ -0,0 +1,44 @@
+Three of the translator makefiles in glusterfs add unnecessary
+-L$(xlatordir) link options. This option causes the linker to check
+the host's $(xlatordir) directory, resulting in contamination that gets
+flagged by Yocto's QA rules.
+
+Upstream-Status: Pending
+Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
+---
+ xlators/mgmt/glusterd/src/Makefile.am | 2 --
+ xlators/nfs/server/src/Makefile.am | 2 --
+ xlators/system/posix-acl/src/Makefile.am | 2 --
+ 3 files changed, 6 deletions(-)
+
+--- a/xlators/mgmt/glusterd/src/Makefile.am
++++ b/xlators/mgmt/glusterd/src/Makefile.am
+@@ -33,8 +33,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_src
+
+ AM_CFLAGS = -Wall $(GF_CFLAGS)
+
+-AM_LDFLAGS = -L$(xlatordir)
+-
+ CLEANFILES =
+
+ install-data-hook:
+--- a/xlators/nfs/server/src/Makefile.am
++++ b/xlators/nfs/server/src/Makefile.am
+@@ -19,6 +19,4 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \
+
+ AM_CFLAGS = -Wall $(GF_CFLAGS)
+
+-AM_LDFLAGS = -L$(xlatordir)
+-
+ CLEANFILES =
+--- a/xlators/system/posix-acl/src/Makefile.am
++++ b/xlators/system/posix-acl/src/Makefile.am
+@@ -10,8 +10,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_src
+
+ AM_CFLAGS = -Wall $(GF_CFLAGS)
+
+-AM_LDFLAGS = -L$(xlatordir)
+-
+ CLEANFILES =
+
+ access-control-compat: