diff options
Diffstat (limited to 'recipes-extended/glusterfs/files')
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 0000000..d89fde9 --- /dev/null +++ b/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 960a101ab795fed1b7505ed9db61769cbdb9450e Mon Sep 17 00:00:00 2001 | ||
2 | From: Sebastian Lenartowicz <Sebastian.Lenartowicz@windriver.com> | ||
3 | Date: Wed, 4 Dec 2013 15:16:02 -0500 | ||
4 | Subject: [PATCH 1/1] Fix for mount.glusterfs not accepting --version argument | ||
5 | |||
6 | The mount.glusterfs shell script serves as a convenient "gatekeeper" | ||
7 | for the glusterfs program itself, and performs a few setup tasks, | ||
8 | depending on the options it's given. However, an overzealous check | ||
9 | for the number of arguments (any number of arguments less than 2) | ||
10 | was preventing the --version and --help arguments from being usable | ||
11 | on their own. This patch solves that by dropping the check (the | ||
12 | glusterfs software itself can throw out commands with too few | ||
13 | arguments, which makes the check redundant in any event). | ||
14 | --- | ||
15 | xlators/mount/fuse/utils/mount.glusterfs.in | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in | ||
19 | index 2a8183c..ea18efb 100755 | ||
20 | --- a/xlators/mount/fuse/utils/mount.glusterfs.in | ||
21 | +++ b/xlators/mount/fuse/utils/mount.glusterfs.in | ||
22 | @@ -395,7 +395,7 @@ main () | ||
23 | pos_args=$((pos_args+1)) | ||
24 | fi | ||
25 | done | ||
26 | - if [ $in_opt = "yes" -o $pos_args -lt 2 ]; then | ||
27 | + if [ $in_opt = "yes" ]; then | ||
28 | usage | ||
29 | exit 1 | ||
30 | fi | ||
31 | -- | ||
32 | 1.7.9.7 | ||
33 | |||
diff --git a/recipes-extended/glusterfs/files/glusterd-ovp b/recipes-extended/glusterfs/files/glusterd-ovp new file mode 100644 index 0000000..c020928 --- /dev/null +++ b/recipes-extended/glusterfs/files/glusterd-ovp | |||
@@ -0,0 +1,93 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # chkconfig: 35 20 80 | ||
4 | # description: Gluster File System service for volume management | ||
5 | # | ||
6 | |||
7 | # Get function from functions library | ||
8 | . /etc/init.d/functions | ||
9 | |||
10 | BASE=glusterd | ||
11 | PIDFILE=/var/run/$BASE.pid | ||
12 | PID=`test -f $PIDFILE && cat $PIDFILE` | ||
13 | GLUSTERFSD=glusterfsd | ||
14 | GLUSTERFS=glusterfs | ||
15 | GLUSTERD_BIN=/usr/sbin/$BASE | ||
16 | GLUSTERD_OPTS="--pid-file=$PIDFILE" | ||
17 | GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS" | ||
18 | RETVAL=0 | ||
19 | |||
20 | # Start the service $BASE | ||
21 | start() | ||
22 | { | ||
23 | # Force creation of the log directory even on a tmpfs /var/log. | ||
24 | mkdir -p /var/log/glusterfs | ||
25 | |||
26 | start-stop-daemon --stop --test --quiet --pidfile $PIDFILE | ||
27 | status=$? | ||
28 | if [ $status -eq 0 ]; then | ||
29 | echo "glusterd service is already running with pid $PID" | ||
30 | exit 1 | ||
31 | else | ||
32 | echo -n $"Starting $BASE:" | ||
33 | start-stop-daemon --start --pidfile $PIDFILE \ | ||
34 | --exec $GLUSTERD_BIN -- "$GLUSTERD_OPTS" | ||
35 | RETVAL=$? | ||
36 | echo | ||
37 | [ $RETVAL -ne 0 ] && exit $RETVAL | ||
38 | fi | ||
39 | } | ||
40 | |||
41 | # Stop the service $BASE | ||
42 | stop() | ||
43 | { | ||
44 | echo -n $"Stopping $BASE:" | ||
45 | start-stop-daemon --stop --test --quiet --pidfile $PIDFILE | ||
46 | status=$? | ||
47 | if [ $status -eq 0 ]; then | ||
48 | start-stop-daemon --stop --quiet --pidfile $PIDFILE | ||
49 | [ -w $PIDFILE ] && rm -f $PIDFILE | ||
50 | else | ||
51 | start-stop-daemon --stop --quiet --name $BASE | ||
52 | fi | ||
53 | |||
54 | echo | ||
55 | pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null | ||
56 | [ $? -eq 0 ] && start-stop-daemon --stop --quiet --name $GLUSTERFSD | ||
57 | |||
58 | #pidof -c -o %PPID -x $GLUSTERFS &> /dev/null | ||
59 | #[ $? -eq 0 ] && start-stop-daemon --stop --quiet --name $GLUSTERFS | ||
60 | |||
61 | if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then | ||
62 | pid=`cat /etc/glusterd/nfs/run/nfs.pid`; | ||
63 | cmd=`ps -p $pid -o comm=` | ||
64 | |||
65 | if [ $cmd == "glusterfs" ]; then | ||
66 | start-stop-daemon --stop --quiet \ | ||
67 | --pidfile /etc/glusterd/nfs/run/nfs.pid | ||
68 | fi | ||
69 | fi | ||
70 | } | ||
71 | |||
72 | |||
73 | ### service arguments ### | ||
74 | case $1 in | ||
75 | start) | ||
76 | start | ||
77 | ;; | ||
78 | stop) | ||
79 | stop | ||
80 | ;; | ||
81 | status) | ||
82 | status $BASE | ||
83 | ;; | ||
84 | restart | force-reload) | ||
85 | $0 stop | ||
86 | $0 start | ||
87 | ;; | ||
88 | *) | ||
89 | echo $"Usage: $0 {start|stop|status|restart}." | ||
90 | exit 1 | ||
91 | esac | ||
92 | |||
93 | 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 0000000..4e0379b --- /dev/null +++ b/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | The glusterfs code for installing start-up scripts checks for systemd | ||
2 | directories on the build host, and if it finds them, it chooses systemd | ||
3 | style scripts, otherwise init.d style scripts. This behavior might | ||
4 | conceivably be suitable for self-hosted builds, but it's grossly broken | ||
5 | for cross-build environments. Since we want to install custom WR scripts | ||
6 | regardless of which script style we support, we patch glusterfs so that | ||
7 | it doesn't install any of its default start-up scripts. | ||
8 | |||
9 | Upstream-Status: Inappropriate [WR-specific change] | ||
10 | Signed-off-by: Donn Seeley <donn.seeley@windriver.com> | ||
11 | --- | ||
12 | extras/Makefile.am | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | --- a/extras/Makefile.am | ||
16 | +++ b/extras/Makefile.am | ||
17 | @@ -2,7 +2,7 @@ | ||
18 | EditorModedir = $(docdir) | ||
19 | EditorMode_DATA = glusterfs-mode.el glusterfs.vim | ||
20 | |||
21 | -SUBDIRS = init.d systemd benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM | ||
22 | +SUBDIRS = benchmarking hook-scripts $(OCF_SUBDIR) LinuxRPM | ||
23 | |||
24 | confdir = $(sysconfdir)/glusterfs | ||
25 | 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 0000000..16cc47e --- /dev/null +++ b/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | Three of the translator makefiles in glusterfs add unnecessary | ||
2 | -L$(xlatordir) link options. This option causes the linker to check | ||
3 | the host's $(xlatordir) directory, resulting in contamination that gets | ||
4 | flagged by Yocto's QA rules. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Donn Seeley <donn.seeley@windriver.com> | ||
8 | --- | ||
9 | xlators/mgmt/glusterd/src/Makefile.am | 2 -- | ||
10 | xlators/nfs/server/src/Makefile.am | 2 -- | ||
11 | xlators/system/posix-acl/src/Makefile.am | 2 -- | ||
12 | 3 files changed, 6 deletions(-) | ||
13 | |||
14 | --- a/xlators/mgmt/glusterd/src/Makefile.am | ||
15 | +++ b/xlators/mgmt/glusterd/src/Makefile.am | ||
16 | @@ -33,8 +33,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_src | ||
17 | |||
18 | AM_CFLAGS = -Wall $(GF_CFLAGS) | ||
19 | |||
20 | -AM_LDFLAGS = -L$(xlatordir) | ||
21 | - | ||
22 | CLEANFILES = | ||
23 | |||
24 | install-data-hook: | ||
25 | --- a/xlators/nfs/server/src/Makefile.am | ||
26 | +++ b/xlators/nfs/server/src/Makefile.am | ||
27 | @@ -19,6 +19,4 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \ | ||
28 | |||
29 | AM_CFLAGS = -Wall $(GF_CFLAGS) | ||
30 | |||
31 | -AM_LDFLAGS = -L$(xlatordir) | ||
32 | - | ||
33 | CLEANFILES = | ||
34 | --- a/xlators/system/posix-acl/src/Makefile.am | ||
35 | +++ b/xlators/system/posix-acl/src/Makefile.am | ||
36 | @@ -10,8 +10,6 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_src | ||
37 | |||
38 | AM_CFLAGS = -Wall $(GF_CFLAGS) | ||
39 | |||
40 | -AM_LDFLAGS = -L$(xlatordir) | ||
41 | - | ||
42 | CLEANFILES = | ||
43 | |||
44 | access-control-compat: | ||