diff options
Diffstat (limited to 'recipes-extended/glusterfs/glusterfs.inc')
-rw-r--r-- | recipes-extended/glusterfs/glusterfs.inc | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/glusterfs.inc b/recipes-extended/glusterfs/glusterfs.inc new file mode 100644 index 0000000..7a3f71a --- /dev/null +++ b/recipes-extended/glusterfs/glusterfs.inc | |||
@@ -0,0 +1,132 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | |||
5 | SUMMARY = "Glusterfs distributed filesystem" | ||
6 | DESCRIPTION = "\ | ||
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." | ||
12 | HOMEPAGE = "http://www.gluster.org/" | ||
13 | SECTION = "console/network" | ||
14 | |||
15 | SRC_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 | |||
21 | LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" | ||
22 | LIC_FILES_CHKSUM = "file://COPYING-GPLV2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
23 | file://COPYING-LGPLV3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ | ||
24 | file://contrib/fuse-util/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
25 | |||
26 | inherit autotools update-rc.d pkgconfig | ||
27 | |||
28 | DEPENDS += "bison-native flex-native fuse libaio libxml2 ncurses \ | ||
29 | openssl python readline zlib" | ||
30 | |||
31 | EXTRA_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 | |||
38 | PACKAGECONFIG ??= "georeplication" | ||
39 | PACKAGECONFIG[bd-xlator] = "--enable-bd-xlator,--disable-bd-xlator,lvm2," | ||
40 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | ||
41 | PACKAGECONFIG[georeplication] = "--enable-georeplication,--disable-georeplication,,rsync" | ||
42 | PACKAGECONFIG[libibverbs] = "--enable-ibverbs,--disable-ibverbs,libibverbs librdmacm," | ||
43 | PACKAGECONFIG[ocf] = "--with-ocf,--without-ocf,," | ||
44 | PACKAGECONFIG[systemtap] = "--enable-systemtap,--disable-systemtap,systemtap," | ||
45 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind," | ||
46 | |||
47 | do_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 | ||
62 | d root root 0755 ${localstatedir}/log/glusterfs none | ||
63 | d root root 0755 ${localstatedir}/run/gluster none | ||
64 | EOF | ||
65 | } | ||
66 | |||
67 | INITSCRIPT_PACKAGES = "glusterfs-server" | ||
68 | INITSCRIPT_NAME = "glusterd" | ||
69 | INITSCRIPT_PARAMS = "start 20 5 3 2 . stop 80 0 1 6 ." | ||
70 | |||
71 | # Allow plug-in symlinks. | ||
72 | INSANE_SKIP_${PN} += "dev-so" | ||
73 | INSANE_SKIP_${PN}-rdma += "dev-so" | ||
74 | INSANE_SKIP_${PN}-fuse += "dev-so" | ||
75 | INSANE_SKIP_${PN}-server += "dev-so" | ||
76 | |||
77 | PACKAGES += "${PN}-rdma ${PN}-geo-replication ${PN}-fuse ${PN}-server \ | ||
78 | ${PN}-api ${PN}-ocf" | ||
79 | |||
80 | FILES_${PN}-dbg += "${libdir}/glusterfs/${PV}/*/.debug \ | ||
81 | ${libdir}/glusterfs/${PV}/*/*/.debug \ | ||
82 | ${libdir}/glusterfs/${PV}/*/*/*/.debug \ | ||
83 | ${libexecdir}/glusterfs/.debug" | ||
84 | |||
85 | FILES_${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 | |||
103 | FILES_${PN}-rdma = "${libdir}/glusterfs/${PV}/rpc-transport/rdma*" | ||
104 | |||
105 | FILES_${PN}-geo-replication = "${libexecdir}/glusterfs/gsyncd \ | ||
106 | ${libexecdir}/glusterfs/python/syncdaemon" | ||
107 | |||
108 | FILES_${PN}-fuse = "${bindir}/fusermount-glusterfs \ | ||
109 | ${libdir}/glusterfs/${PV}/xlator/mount \ | ||
110 | ${sbindir}/mount.glusterfs \ | ||
111 | ${base_sbindir}/mount.glusterfs" | ||
112 | |||
113 | FILES_${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. | ||
124 | FILES_${PN}-api = "${libdir}/libgfapi.so.*" | ||
125 | |||
126 | FILES_${PN}-ocf = "${prefix}/lib/ocf" | ||
127 | |||
128 | pkg_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 | } | ||