diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2017-07-26 08:42:09 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-07-26 10:07:52 -0400 |
commit | 5bda0e0c27cef4b2bf73a6be8771778ddeece215 (patch) | |
tree | c094588f7508db9324ea3e11c6dc8965762eebed /recipes-extended/glusterfs/glusterfs.inc | |
parent | 4e05423f1542403651fe3e4623693aac857642bb (diff) | |
download | meta-cloud-services-5bda0e0c27cef4b2bf73a6be8771778ddeece215.tar.gz |
glusterfs: uprev to 3.11.1
* Add systemd support
* Drop the following patch which already fixed in upstream:
0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/glusterfs/glusterfs.inc')
-rw-r--r-- | recipes-extended/glusterfs/glusterfs.inc | 142 |
1 files changed, 107 insertions, 35 deletions
diff --git a/recipes-extended/glusterfs/glusterfs.inc b/recipes-extended/glusterfs/glusterfs.inc index 7a3f71a..e45dc9e 100644 --- a/recipes-extended/glusterfs/glusterfs.inc +++ b/recipes-extended/glusterfs/glusterfs.inc | |||
@@ -1,21 +1,25 @@ | |||
1 | # | ||
2 | # Copyright (C) 2013 Wind River Systems, Inc. | ||
3 | # | ||
4 | |||
5 | SUMMARY = "Glusterfs distributed filesystem" | 1 | SUMMARY = "Glusterfs distributed filesystem" |
6 | DESCRIPTION = "\ | 2 | DESCRIPTION = "\ |
7 | GlusterFS is an open source, distributed file system capable of scaling \ | 3 | GlusterFS is an open source, distributed file system capable of scaling \ |
8 | to several petabytes (actually, 72 brontobytes!) and handling thousands \ | 4 | to several petabytes (actually, 72 brontobytes!) and handling thousands \ |
9 | of clients. GlusterFS clusters together storage building blocks over \ | 5 | of clients. GlusterFS clusters together storage building blocks over \ |
10 | Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory \ | 6 | Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory \ |
11 | resources and managing data in a single global namespace." | 7 | resources and managing data in a single global namespace." |
12 | HOMEPAGE = "http://www.gluster.org/" | 8 | HOMEPAGE = "http://www.gluster.org/" |
13 | SECTION = "console/network" | 9 | SECTION = "console/network" |
14 | 10 | ||
15 | SRC_URI += "file://glusterd-ovp \ | 11 | SRC_URI += "file://glusterd.init \ |
12 | file://glusterd.service \ | ||
13 | file://glusterfs-configure-automake-with-subdir-objects-for.patch \ | ||
16 | file://xlator-host-contamination-3.4.patch \ | 14 | file://xlator-host-contamination-3.4.patch \ |
17 | file://glusterfs-disable-default-startup-scripts.patch \ | 15 | file://glusterfs-disable-default-startup-scripts.patch \ |
18 | file://0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch \ | 16 | file://glusterfs-api-remove-unnecessary-library-options.patch \ |
17 | file://python-work-around-host-and-target-python.patch \ | ||
18 | file://glusterfs-change-default-nfs-port-number.patch \ | ||
19 | file://dependence-on-correct-header-file-path.patch \ | ||
20 | file://libglusterfs-Don-t-link-against-libfl.patch \ | ||
21 | file://glusterd-change-port-range.patch \ | ||
22 | file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ | ||
19 | " | 23 | " |
20 | 24 | ||
21 | LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" | 25 | LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" |
@@ -23,51 +27,79 @@ LIC_FILES_CHKSUM = "file://COPYING-GPLV2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | |||
23 | file://COPYING-LGPLV3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ | 27 | file://COPYING-LGPLV3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ |
24 | file://contrib/fuse-util/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 28 | file://contrib/fuse-util/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
25 | 29 | ||
26 | inherit autotools update-rc.d pkgconfig | 30 | inherit autotools pkgconfig distutils-base update-rc.d systemd |
27 | 31 | ||
28 | DEPENDS += "bison-native flex-native fuse libaio libxml2 ncurses \ | 32 | DEPENDS += "bison-native flex-native python-native fuse libaio libxml2 ncurses \ |
29 | openssl python readline zlib" | 33 | openssl python readline zlib liburcu util-linux glib-2.0 acl" |
30 | 34 | ||
31 | EXTRA_OECONF = "ac_cv_file__etc_debian_version=no \ | 35 | EXTRA_OECONF = "ac_cv_file__etc_debian_version=no \ |
32 | ac_cv_file__etc_SuSE_release=no \ | 36 | ac_cv_file__etc_SuSE_release=no \ |
33 | ac_cv_file__etc_redhat_release=no \ | 37 | ac_cv_file__etc_redhat_release=no \ |
34 | --with-mountutildir=${sbindir} \ | 38 | --with-mountutildir=${sbindir} \ |
35 | --disable-fusermount \ | 39 | --disable-fusermount \ |
36 | PYTHON=${bindir}/python" | 40 | TARGET_PYTHON=${bindir}/python \ |
37 | 41 | PYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ | |
38 | PACKAGECONFIG ??= "georeplication" | 42 | BUILD_PYTHON_INC=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ |
43 | BUILD_PYTHON_LIB=python${PYTHON_BASEVERSION} \ | ||
44 | BUILD_PYTHON_SITE_PACKAGES=${PYTHON_SITEPACKAGES_DIR} \ | ||
45 | " | ||
46 | |||
47 | PACKAGECONFIG ??= "georeplication libibverbs" | ||
39 | PACKAGECONFIG[bd-xlator] = "--enable-bd-xlator,--disable-bd-xlator,lvm2," | 48 | PACKAGECONFIG[bd-xlator] = "--enable-bd-xlator,--disable-bd-xlator,lvm2," |
40 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | 49 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," |
41 | PACKAGECONFIG[georeplication] = "--enable-georeplication,--disable-georeplication,,rsync" | 50 | PACKAGECONFIG[georeplication] = "--enable-georeplication,--disable-georeplication,,rsync" |
42 | PACKAGECONFIG[libibverbs] = "--enable-ibverbs,--disable-ibverbs,libibverbs librdmacm," | 51 | PACKAGECONFIG[libibverbs] = "--enable-ibverbs,--disable-ibverbs,libibverbs librdmacm," |
43 | PACKAGECONFIG[ocf] = "--with-ocf,--without-ocf,," | 52 | PACKAGECONFIG[ocf] = "--with-ocf,--without-ocf,," |
44 | PACKAGECONFIG[systemtap] = "--enable-systemtap,--disable-systemtap,systemtap," | ||
45 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind," | 53 | PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind," |
46 | 54 | ||
47 | do_install_append() { | 55 | do_install_append() { |
48 | install -d ${D}${sysconfdir}/init.d | 56 | install -d ${D}${sysconfdir}/init.d |
49 | install -m 0755 ${WORKDIR}/glusterd-ovp \ | 57 | install -m 0755 ${WORKDIR}/glusterd.init \ |
50 | ${D}${sysconfdir}/init.d/glusterd | 58 | ${D}${sysconfdir}/init.d/glusterd |
51 | 59 | ||
52 | # Mount looks for mount.* plug-ins in /sbin; fix it with a symlink. | 60 | # Mount looks for mount.* plug-ins in /sbin; fix it with a symlink. |
53 | mkdir -p ${D}${base_sbindir} | 61 | mkdir -p ${D}${base_sbindir} |
54 | (cd ${D}${base_sbindir}; ln -s ..${sbindir}/mount.glusterfs .) | 62 | (cd ${D}${base_sbindir}; ln -s ..${sbindir}/mount.glusterfs .) |
55 | 63 | ||
56 | # These are plug-ins, so they don't need libtool configs. | 64 | # These are plug-ins, so they don't need libtool configs. |
57 | find ${D}${libdir}/glusterfs/${PV} -name '*.la' -exec rm -f '{}' ';' | 65 | find ${D}${libdir}/glusterfs/${PV} -name '*.la' -exec rm -f '{}' ';' |
58 | 66 | ||
59 | # The RPM spec file creates these directories. | 67 | # The RPM spec file creates these directories. |
60 | install -d ${D}${sysconfdir}/default/volatiles | 68 | install -d ${D}${sysconfdir}/default/volatiles |
61 | cat > ${D}${sysconfdir}/default/volatiles/99_glusterfs << EOF | 69 | cat > ${D}${sysconfdir}/default/volatiles/99_glusterfs << EOF |
62 | d root root 0755 ${localstatedir}/log/glusterfs none | 70 | d root root 0755 ${localstatedir}/log/glusterfs none |
63 | d root root 0755 ${localstatedir}/run/gluster none | 71 | d root root 0755 ${localstatedir}/run/gluster none |
64 | EOF | 72 | EOF |
73 | |||
74 | # Install systemd service files | ||
75 | install -d ${D}${systemd_system_unitdir} | ||
76 | install -m 0644 ${WORKDIR}/glusterd.service ${D}${systemd_system_unitdir} | ||
77 | sed -i -e 's#@SBINDIR@#${sbindir}#g' \ | ||
78 | -e 's#@base_bindir@#${base_bindir}#g' \ | ||
79 | -e 's#@localstatedir@#${localstatedir}#g' \ | ||
80 | ${D}${systemd_system_unitdir}/glusterd.service | ||
81 | |||
82 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
83 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
84 | cat > ${D}${sysconfdir}/tmpfiles.d/glusterfs.conf << EOF | ||
85 | d ${localstatedir}/log/glusterfs 0755 root root - | ||
86 | d ${localstatedir}/run/gluster 0755 root root - | ||
87 | EOF | ||
88 | fi | ||
89 | |||
90 | # Remove /var/run and /var/log as they are created on startup | ||
91 | rm -rf ${D}${localstatedir}/run | ||
92 | rm -rf ${D}${localstatedir}/log | ||
65 | } | 93 | } |
66 | 94 | ||
67 | INITSCRIPT_PACKAGES = "glusterfs-server" | 95 | INITSCRIPT_PACKAGES = "glusterfs-server" |
68 | INITSCRIPT_NAME = "glusterd" | 96 | INITSCRIPT_NAME = "glusterd" |
69 | INITSCRIPT_PARAMS = "start 20 5 3 2 . stop 80 0 1 6 ." | 97 | INITSCRIPT_PARAMS = "start 20 5 3 2 . stop 80 0 1 6 ." |
70 | 98 | ||
99 | SYSTEMD_PACKAGES = "glusterfs-server" | ||
100 | SYSTEMD_SERVICE_${PN} = "glusterd.service" | ||
101 | SYSTEMD_AUTO_ENABLE = "disable" | ||
102 | |||
71 | # Allow plug-in symlinks. | 103 | # Allow plug-in symlinks. |
72 | INSANE_SKIP_${PN} += "dev-so" | 104 | INSANE_SKIP_${PN} += "dev-so" |
73 | INSANE_SKIP_${PN}-rdma += "dev-so" | 105 | INSANE_SKIP_${PN}-rdma += "dev-so" |
@@ -77,6 +109,10 @@ INSANE_SKIP_${PN}-server += "dev-so" | |||
77 | PACKAGES += "${PN}-rdma ${PN}-geo-replication ${PN}-fuse ${PN}-server \ | 109 | PACKAGES += "${PN}-rdma ${PN}-geo-replication ${PN}-fuse ${PN}-server \ |
78 | ${PN}-api ${PN}-ocf" | 110 | ${PN}-api ${PN}-ocf" |
79 | 111 | ||
112 | RDEPENDS_${PN} += "python python-json python-ctypes bash" | ||
113 | RDEPENDS_${PN}-ocf += "bash" | ||
114 | RDEPENDS_${PN}-server += "bash" | ||
115 | |||
80 | FILES_${PN}-dbg += "${libdir}/glusterfs/${PV}/*/.debug \ | 116 | FILES_${PN}-dbg += "${libdir}/glusterfs/${PV}/*/.debug \ |
81 | ${libdir}/glusterfs/${PV}/*/*/.debug \ | 117 | ${libdir}/glusterfs/${PV}/*/*/.debug \ |
82 | ${libdir}/glusterfs/${PV}/*/*/*/.debug \ | 118 | ${libdir}/glusterfs/${PV}/*/*/*/.debug \ |
@@ -92,18 +128,51 @@ FILES_${PN} = "${libdir}/glusterfs/${PV}/auth \ | |||
92 | ${libdir}/glusterfs/${PV}/xlator/protocol/client* \ | 128 | ${libdir}/glusterfs/${PV}/xlator/protocol/client* \ |
93 | ${libdir}/glusterfs/${PV}/xlator/system \ | 129 | ${libdir}/glusterfs/${PV}/xlator/system \ |
94 | ${libdir}/glusterfs/${PV}/xlator/testing \ | 130 | ${libdir}/glusterfs/${PV}/xlator/testing \ |
131 | ${libdir}/glusterfs/${PV}/xlator/meta.so \ | ||
132 | ${libdir}/glusterfs/ganesha \ | ||
133 | ${libdir}/glusterfs/glusterfs/glusterfind \ | ||
134 | ${libdir}/glusterfs/glusterfs/gfind_missing_files \ | ||
135 | ${libdir}/glusterfs/glusterfs/peer* \ | ||
136 | ${libdir}/glusterfs/glusterfs/*.sh \ | ||
95 | ${libdir}/libglusterfs.so.* \ | 137 | ${libdir}/libglusterfs.so.* \ |
96 | ${libdir}/libgfrpc.so.* \ | 138 | ${libdir}/libgfrpc.so.* \ |
139 | ${libdir}/libgfchangelog.so.* \ | ||
140 | ${libdir}/libgfdb.so.* \ | ||
97 | ${libdir}/libgfxdr.so.* \ | 141 | ${libdir}/libgfxdr.so.* \ |
142 | ${libdir}/python*/site-packages \ | ||
143 | ${libexecdir}/glusterfs/events \ | ||
144 | ${libexecdir}/glusterfs/glusterfind \ | ||
145 | ${libexecdir}/glusterfs/gfind_missing_files \ | ||
146 | ${libexecdir}/glusterfs/peer_mountbroker.py \ | ||
147 | ${libexecdir}/glusterfs/peer_eventsapi.py \ | ||
148 | ${libexecdir}/glusterfs/peer_mountbroker \ | ||
149 | ${libexecdir}/glusterfs/peer_gsec_create \ | ||
150 | ${libexecdir}/glusterfs/gverify.sh \ | ||
151 | ${libexecdir}/glusterfs/peer_add_secret_pub \ | ||
98 | ${localstatedir} \ | 152 | ${localstatedir} \ |
99 | ${sysconfdir}/default/volatiles \ | 153 | ${sysconfdir}/default/volatiles \ |
100 | ${sbindir}/glusterfs \ | 154 | ${sbindir}/glusterfs \ |
101 | ${sbindir}/glusterfsd" | 155 | ${sbindir}/glusterfsd \ |
156 | ${sbindir}/gfind_missing_files \ | ||
157 | ${sbindir}/glfsheal \ | ||
158 | ${sbindir}/gluster-eventsapi \ | ||
159 | ${sbindir}/gluster-mountbroker \ | ||
160 | ${sbindir}/glustereventsd \ | ||
161 | ${sbindir}/gf_attach \ | ||
162 | ${sbindir}/*.py \ | ||
163 | ${bindir}/ \ | ||
164 | ${sysconfdir}/glusterfs \ | ||
165 | ${sysconfdir}/ganesha \ | ||
166 | ${datadir}/glusterfs/* \ | ||
167 | " | ||
102 | 168 | ||
103 | FILES_${PN}-rdma = "${libdir}/glusterfs/${PV}/rpc-transport/rdma*" | 169 | FILES_${PN}-rdma = "${libdir}/glusterfs/${PV}/rpc-transport/rdma*" |
104 | 170 | ||
105 | FILES_${PN}-geo-replication = "${libexecdir}/glusterfs/gsyncd \ | 171 | FILES_${PN}-geo-replication = "${libexecdir}/glusterfs/gsyncd \ |
106 | ${libexecdir}/glusterfs/python/syncdaemon" | 172 | ${libexecdir}/glusterfs/python/syncdaemon \ |
173 | ${libexecdir}/glusterfs/peer_georep-sshkey.py \ | ||
174 | ${libexecdir}/glusterfs/set_geo_rep_pem_keys.sh \ | ||
175 | ${sbindir}/gluster-georep-sshkey" | ||
107 | 176 | ||
108 | FILES_${PN}-fuse = "${bindir}/fusermount-glusterfs \ | 177 | FILES_${PN}-fuse = "${bindir}/fusermount-glusterfs \ |
109 | ${libdir}/glusterfs/${PV}/xlator/mount \ | 178 | ${libdir}/glusterfs/${PV}/xlator/mount \ |
@@ -118,7 +187,9 @@ FILES_${PN}-server = "${libdir}/glusterfs/${PV}/xlator/mgmt \ | |||
118 | ${sbindir}/glusterd \ | 187 | ${sbindir}/glusterd \ |
119 | ${sysconfdir}/glusterfs/glusterd.vol \ | 188 | ${sysconfdir}/glusterfs/glusterd.vol \ |
120 | ${sysconfdir}/glusterfs/glusterfs-logrotate \ | 189 | ${sysconfdir}/glusterfs/glusterfs-logrotate \ |
121 | ${sysconfdir}/init.d/glusterd" | 190 | ${sysconfdir}/init.d/glusterd \ |
191 | ${sysconfdir}/tmpfiles.d \ | ||
192 | ${systemd_system_unitdir}" | ||
122 | 193 | ||
123 | # Note: Debian package renaming produces libgfapi[0-9]+-*.*.rpm. | 194 | # Note: Debian package renaming produces libgfapi[0-9]+-*.*.rpm. |
124 | FILES_${PN}-api = "${libdir}/libgfapi.so.*" | 195 | FILES_${PN}-api = "${libdir}/libgfapi.so.*" |
@@ -126,7 +197,8 @@ FILES_${PN}-api = "${libdir}/libgfapi.so.*" | |||
126 | FILES_${PN}-ocf = "${prefix}/lib/ocf" | 197 | FILES_${PN}-ocf = "${prefix}/lib/ocf" |
127 | 198 | ||
128 | pkg_postinst_${PN}() { | 199 | pkg_postinst_${PN}() { |
129 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ]; then | 200 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ]; then |
130 | /etc/init.d/populate-volatile.sh update | 201 | /etc/init.d/populate-volatile.sh update |
131 | fi | 202 | fi |
132 | } | 203 | } |
204 | |||