summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-openstack/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch33
-rw-r--r--meta-openstack/recipes-extended/glusterfs/files/glusterd-ovp93
-rw-r--r--meta-openstack/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch25
-rw-r--r--meta-openstack/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch44
-rw-r--r--meta-openstack/recipes-extended/glusterfs/glusterfs.inc132
-rw-r--r--meta-openstack/recipes-extended/glusterfs/glusterfs_3.4.2.bb12
6 files changed, 339 insertions, 0 deletions
diff --git a/meta-openstack/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch b/meta-openstack/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch
new file mode 100644
index 0000000..d89fde9
--- /dev/null
+++ b/meta-openstack/recipes-extended/glusterfs/files/0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch
@@ -0,0 +1,33 @@
1From 960a101ab795fed1b7505ed9db61769cbdb9450e Mon Sep 17 00:00:00 2001
2From: Sebastian Lenartowicz <Sebastian.Lenartowicz@windriver.com>
3Date: Wed, 4 Dec 2013 15:16:02 -0500
4Subject: [PATCH 1/1] Fix for mount.glusterfs not accepting --version argument
5
6The mount.glusterfs shell script serves as a convenient "gatekeeper"
7for the glusterfs program itself, and performs a few setup tasks,
8depending on the options it's given. However, an overzealous check
9for the number of arguments (any number of arguments less than 2)
10was preventing the --version and --help arguments from being usable
11on their own. This patch solves that by dropping the check (the
12glusterfs software itself can throw out commands with too few
13arguments, 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
18diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
19index 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--
321.7.9.7
33
diff --git a/meta-openstack/recipes-extended/glusterfs/files/glusterd-ovp b/meta-openstack/recipes-extended/glusterfs/files/glusterd-ovp
new file mode 100644
index 0000000..c020928
--- /dev/null
+++ b/meta-openstack/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
10BASE=glusterd
11PIDFILE=/var/run/$BASE.pid
12PID=`test -f $PIDFILE && cat $PIDFILE`
13GLUSTERFSD=glusterfsd
14GLUSTERFS=glusterfs
15GLUSTERD_BIN=/usr/sbin/$BASE
16GLUSTERD_OPTS="--pid-file=$PIDFILE"
17GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS"
18RETVAL=0
19
20# Start the service $BASE
21start()
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
42stop()
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 ###
74case $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
91esac
92
93exit 0
diff --git a/meta-openstack/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch b/meta-openstack/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch
new file mode 100644
index 0000000..4e0379b
--- /dev/null
+++ b/meta-openstack/recipes-extended/glusterfs/files/glusterfs-disable-default-startup-scripts.patch
@@ -0,0 +1,25 @@
1The glusterfs code for installing start-up scripts checks for systemd
2directories on the build host, and if it finds them, it chooses systemd
3style scripts, otherwise init.d style scripts. This behavior might
4conceivably be suitable for self-hosted builds, but it's grossly broken
5for cross-build environments. Since we want to install custom WR scripts
6regardless of which script style we support, we patch glusterfs so that
7it doesn't install any of its default start-up scripts.
8
9Upstream-Status: Inappropriate [WR-specific change]
10Signed-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/meta-openstack/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch b/meta-openstack/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch
new file mode 100644
index 0000000..16cc47e
--- /dev/null
+++ b/meta-openstack/recipes-extended/glusterfs/files/xlator-host-contamination-3.4.patch
@@ -0,0 +1,44 @@
1Three of the translator makefiles in glusterfs add unnecessary
2-L$(xlatordir) link options. This option causes the linker to check
3the host's $(xlatordir) directory, resulting in contamination that gets
4flagged by Yocto's QA rules.
5
6Upstream-Status: Pending
7Signed-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:
diff --git a/meta-openstack/recipes-extended/glusterfs/glusterfs.inc b/meta-openstack/recipes-extended/glusterfs/glusterfs.inc
new file mode 100644
index 0000000..7a3f71a
--- /dev/null
+++ b/meta-openstack/recipes-extended/glusterfs/glusterfs.inc
@@ -0,0 +1,132 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4
5SUMMARY = "Glusterfs distributed filesystem"
6DESCRIPTION = "\
7 GlusterFS is an open source, distributed file system capable of scaling \
8 to several petabytes (actually, 72 brontobytes!) and handling thousands \
9 of clients. GlusterFS clusters together storage building blocks over \
10 Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory \
11 resources and managing data in a single global namespace."
12HOMEPAGE = "http://www.gluster.org/"
13SECTION = "console/network"
14
15SRC_URI += "file://glusterd-ovp \
16 file://xlator-host-contamination-3.4.patch \
17 file://glusterfs-disable-default-startup-scripts.patch \
18 file://0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch \
19 "
20
21LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0"
22LIC_FILES_CHKSUM = "file://COPYING-GPLV2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
23 file://COPYING-LGPLV3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
24 file://contrib/fuse-util/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
25
26inherit autotools update-rc.d pkgconfig
27
28DEPENDS += "bison-native flex-native fuse libaio libxml2 ncurses \
29 openssl python readline zlib"
30
31EXTRA_OECONF = "ac_cv_file__etc_debian_version=no \
32 ac_cv_file__etc_SuSE_release=no \
33 ac_cv_file__etc_redhat_release=no \
34 --with-mountutildir=${sbindir} \
35 --disable-fusermount \
36 PYTHON=${bindir}/python"
37
38PACKAGECONFIG ??= "georeplication"
39PACKAGECONFIG[bd-xlator] = "--enable-bd-xlator,--disable-bd-xlator,lvm2,"
40PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,,"
41PACKAGECONFIG[georeplication] = "--enable-georeplication,--disable-georeplication,,rsync"
42PACKAGECONFIG[libibverbs] = "--enable-ibverbs,--disable-ibverbs,libibverbs librdmacm,"
43PACKAGECONFIG[ocf] = "--with-ocf,--without-ocf,,"
44PACKAGECONFIG[systemtap] = "--enable-systemtap,--disable-systemtap,systemtap,"
45PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind,"
46
47do_install_append() {
48 install -d ${D}${sysconfdir}/init.d
49 install -m 0755 ${WORKDIR}/glusterd-ovp \
50 ${D}${sysconfdir}/init.d/glusterd
51
52 # Mount looks for mount.* plug-ins in /sbin; fix it with a symlink.
53 mkdir -p ${D}${base_sbindir}
54 (cd ${D}${base_sbindir}; ln -s ..${sbindir}/mount.glusterfs .)
55
56 # These are plug-ins, so they don't need libtool configs.
57 find ${D}${libdir}/glusterfs/${PV} -name '*.la' -exec rm -f '{}' ';'
58
59 # The RPM spec file creates these directories.
60 install -d ${D}${sysconfdir}/default/volatiles
61 cat > ${D}${sysconfdir}/default/volatiles/99_glusterfs << EOF
62d root root 0755 ${localstatedir}/log/glusterfs none
63d root root 0755 ${localstatedir}/run/gluster none
64EOF
65}
66
67INITSCRIPT_PACKAGES = "glusterfs-server"
68INITSCRIPT_NAME = "glusterd"
69INITSCRIPT_PARAMS = "start 20 5 3 2 . stop 80 0 1 6 ."
70
71# Allow plug-in symlinks.
72INSANE_SKIP_${PN} += "dev-so"
73INSANE_SKIP_${PN}-rdma += "dev-so"
74INSANE_SKIP_${PN}-fuse += "dev-so"
75INSANE_SKIP_${PN}-server += "dev-so"
76
77PACKAGES += "${PN}-rdma ${PN}-geo-replication ${PN}-fuse ${PN}-server \
78 ${PN}-api ${PN}-ocf"
79
80FILES_${PN}-dbg += "${libdir}/glusterfs/${PV}/*/.debug \
81 ${libdir}/glusterfs/${PV}/*/*/.debug \
82 ${libdir}/glusterfs/${PV}/*/*/*/.debug \
83 ${libexecdir}/glusterfs/.debug"
84
85FILES_${PN} = "${libdir}/glusterfs/${PV}/auth \
86 ${libdir}/glusterfs/${PV}/rpc-transport/socket* \
87 ${libdir}/glusterfs/${PV}/xlator/cluster \
88 ${libdir}/glusterfs/${PV}/xlator/debug \
89 ${libdir}/glusterfs/${PV}/xlator/encryption \
90 ${libdir}/glusterfs/${PV}/xlator/features \
91 ${libdir}/glusterfs/${PV}/xlator/performance \
92 ${libdir}/glusterfs/${PV}/xlator/protocol/client* \
93 ${libdir}/glusterfs/${PV}/xlator/system \
94 ${libdir}/glusterfs/${PV}/xlator/testing \
95 ${libdir}/libglusterfs.so.* \
96 ${libdir}/libgfrpc.so.* \
97 ${libdir}/libgfxdr.so.* \
98 ${localstatedir} \
99 ${sysconfdir}/default/volatiles \
100 ${sbindir}/glusterfs \
101 ${sbindir}/glusterfsd"
102
103FILES_${PN}-rdma = "${libdir}/glusterfs/${PV}/rpc-transport/rdma*"
104
105FILES_${PN}-geo-replication = "${libexecdir}/glusterfs/gsyncd \
106 ${libexecdir}/glusterfs/python/syncdaemon"
107
108FILES_${PN}-fuse = "${bindir}/fusermount-glusterfs \
109 ${libdir}/glusterfs/${PV}/xlator/mount \
110 ${sbindir}/mount.glusterfs \
111 ${base_sbindir}/mount.glusterfs"
112
113FILES_${PN}-server = "${libdir}/glusterfs/${PV}/xlator/mgmt \
114 ${libdir}/glusterfs/${PV}/xlator/nfs \
115 ${libdir}/glusterfs/${PV}/xlator/protocol/server* \
116 ${libdir}/glusterfs/${PV}/xlator/storage \
117 ${sbindir}/gluster \
118 ${sbindir}/glusterd \
119 ${sysconfdir}/glusterfs/glusterd.vol \
120 ${sysconfdir}/glusterfs/glusterfs-logrotate \
121 ${sysconfdir}/init.d/glusterd"
122
123# Note: Debian package renaming produces libgfapi[0-9]+-*.*.rpm.
124FILES_${PN}-api = "${libdir}/libgfapi.so.*"
125
126FILES_${PN}-ocf = "${prefix}/lib/ocf"
127
128pkg_postinst_${PN}() {
129 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ]; then
130 /etc/init.d/populate-volatile.sh update
131 fi
132}
diff --git a/meta-openstack/recipes-extended/glusterfs/glusterfs_3.4.2.bb b/meta-openstack/recipes-extended/glusterfs/glusterfs_3.4.2.bb
new file mode 100644
index 0000000..b6ae856
--- /dev/null
+++ b/meta-openstack/recipes-extended/glusterfs/glusterfs_3.4.2.bb
@@ -0,0 +1,12 @@
1#
2# Copyright (C) 2013 Wind River Systems, Inc.
3#
4
5PR = "r0"
6
7SRC_URI = "http://download.gluster.org/pub/gluster/glusterfs/3.4/${PV}/${BPN}-${PV}.tar.gz"
8
9SRC_URI[md5sum] = "7c05304a9aca3c85ff27458461783623"
10SRC_URI[sha256sum] = "4fcd42b13b60a67587de98e60ff679803433bbb0c11aa2b40c4135e2358cedef"
11
12require glusterfs.inc