diff options
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 7a3f71a4..e45dc9ed 100644 --- a/recipes-extended/glusterfs/glusterfs.inc +++ b/recipes-extended/glusterfs/glusterfs.inc @@ -1,21 +1,25 @@ -# -# Copyright (C) 2013 Wind River Systems, Inc. -# - SUMMARY = "Glusterfs distributed filesystem" DESCRIPTION = "\ - GlusterFS is an open source, distributed file system capable of scaling \ - to several petabytes (actually, 72 brontobytes!) and handling thousands \ - of clients. GlusterFS clusters together storage building blocks over \ - Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory \ - resources and managing data in a single global namespace." +GlusterFS is an open source, distributed file system capable of scaling \ +to several petabytes (actually, 72 brontobytes!) and handling thousands \ +of clients. GlusterFS clusters together storage building blocks over \ +Infiniband RDMA or TCP/IP interconnect, aggregating disk and memory \ +resources and managing data in a single global namespace." HOMEPAGE = "http://www.gluster.org/" SECTION = "console/network" -SRC_URI += "file://glusterd-ovp \ +SRC_URI += "file://glusterd.init \ + file://glusterd.service \ + file://glusterfs-configure-automake-with-subdir-objects-for.patch \ file://xlator-host-contamination-3.4.patch \ file://glusterfs-disable-default-startup-scripts.patch \ - file://0001-Fix-for-mount.glusterfs-not-accepting-version-argume.patch \ + file://glusterfs-api-remove-unnecessary-library-options.patch \ + file://python-work-around-host-and-target-python.patch \ + file://glusterfs-change-default-nfs-port-number.patch \ + file://dependence-on-correct-header-file-path.patch \ + file://libglusterfs-Don-t-link-against-libfl.patch \ + file://glusterd-change-port-range.patch \ + file://configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch \ " LICENSE = "(LGPLv3+ | GPLv2) & GPLv3+ & LGPLv3+ & GPLv2+ & LGPLv2+ & LGPLv2.1+ & Apache-2.0" @@ -23,51 +27,79 @@ LIC_FILES_CHKSUM = "file://COPYING-GPLV2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING-LGPLV3;md5=e6a600fd5e1d9cbde2d983680233ad02 \ file://contrib/fuse-util/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -inherit autotools update-rc.d pkgconfig +inherit autotools pkgconfig distutils-base update-rc.d systemd -DEPENDS += "bison-native flex-native fuse libaio libxml2 ncurses \ - openssl python readline zlib" +DEPENDS += "bison-native flex-native python-native fuse libaio libxml2 ncurses \ + openssl python readline zlib liburcu util-linux glib-2.0 acl" EXTRA_OECONF = "ac_cv_file__etc_debian_version=no \ ac_cv_file__etc_SuSE_release=no \ ac_cv_file__etc_redhat_release=no \ --with-mountutildir=${sbindir} \ --disable-fusermount \ - PYTHON=${bindir}/python" - -PACKAGECONFIG ??= "georeplication" + TARGET_PYTHON=${bindir}/python \ + PYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \ + BUILD_PYTHON_INC=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \ + BUILD_PYTHON_LIB=python${PYTHON_BASEVERSION} \ + BUILD_PYTHON_SITE_PACKAGES=${PYTHON_SITEPACKAGES_DIR} \ + " + +PACKAGECONFIG ??= "georeplication libibverbs" PACKAGECONFIG[bd-xlator] = "--enable-bd-xlator,--disable-bd-xlator,lvm2," PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," PACKAGECONFIG[georeplication] = "--enable-georeplication,--disable-georeplication,,rsync" PACKAGECONFIG[libibverbs] = "--enable-ibverbs,--disable-ibverbs,libibverbs librdmacm," PACKAGECONFIG[ocf] = "--with-ocf,--without-ocf,," -PACKAGECONFIG[systemtap] = "--enable-systemtap,--disable-systemtap,systemtap," PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind," do_install_append() { - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/glusterd-ovp \ - ${D}${sysconfdir}/init.d/glusterd + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/glusterd.init \ + ${D}${sysconfdir}/init.d/glusterd - # Mount looks for mount.* plug-ins in /sbin; fix it with a symlink. - mkdir -p ${D}${base_sbindir} - (cd ${D}${base_sbindir}; ln -s ..${sbindir}/mount.glusterfs .) + # Mount looks for mount.* plug-ins in /sbin; fix it with a symlink. + mkdir -p ${D}${base_sbindir} + (cd ${D}${base_sbindir}; ln -s ..${sbindir}/mount.glusterfs .) - # These are plug-ins, so they don't need libtool configs. - find ${D}${libdir}/glusterfs/${PV} -name '*.la' -exec rm -f '{}' ';' + # These are plug-ins, so they don't need libtool configs. + find ${D}${libdir}/glusterfs/${PV} -name '*.la' -exec rm -f '{}' ';' - # The RPM spec file creates these directories. - install -d ${D}${sysconfdir}/default/volatiles - cat > ${D}${sysconfdir}/default/volatiles/99_glusterfs << EOF + # The RPM spec file creates these directories. + install -d ${D}${sysconfdir}/default/volatiles + cat > ${D}${sysconfdir}/default/volatiles/99_glusterfs << EOF d root root 0755 ${localstatedir}/log/glusterfs none d root root 0755 ${localstatedir}/run/gluster none EOF + + # Install systemd service files + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/glusterd.service ${D}${systemd_system_unitdir} + sed -i -e 's#@SBINDIR@#${sbindir}#g' \ + -e 's#@base_bindir@#${base_bindir}#g' \ + -e 's#@localstatedir@#${localstatedir}#g' \ + ${D}${systemd_system_unitdir}/glusterd.service + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + cat > ${D}${sysconfdir}/tmpfiles.d/glusterfs.conf << EOF +d ${localstatedir}/log/glusterfs 0755 root root - +d ${localstatedir}/run/gluster 0755 root root - +EOF + fi + + # Remove /var/run and /var/log as they are created on startup + rm -rf ${D}${localstatedir}/run + rm -rf ${D}${localstatedir}/log } INITSCRIPT_PACKAGES = "glusterfs-server" INITSCRIPT_NAME = "glusterd" INITSCRIPT_PARAMS = "start 20 5 3 2 . stop 80 0 1 6 ." +SYSTEMD_PACKAGES = "glusterfs-server" +SYSTEMD_SERVICE_${PN} = "glusterd.service" +SYSTEMD_AUTO_ENABLE = "disable" + # Allow plug-in symlinks. INSANE_SKIP_${PN} += "dev-so" INSANE_SKIP_${PN}-rdma += "dev-so" @@ -77,6 +109,10 @@ INSANE_SKIP_${PN}-server += "dev-so" PACKAGES += "${PN}-rdma ${PN}-geo-replication ${PN}-fuse ${PN}-server \ ${PN}-api ${PN}-ocf" +RDEPENDS_${PN} += "python python-json python-ctypes bash" +RDEPENDS_${PN}-ocf += "bash" +RDEPENDS_${PN}-server += "bash" + FILES_${PN}-dbg += "${libdir}/glusterfs/${PV}/*/.debug \ ${libdir}/glusterfs/${PV}/*/*/.debug \ ${libdir}/glusterfs/${PV}/*/*/*/.debug \ @@ -92,18 +128,51 @@ FILES_${PN} = "${libdir}/glusterfs/${PV}/auth \ ${libdir}/glusterfs/${PV}/xlator/protocol/client* \ ${libdir}/glusterfs/${PV}/xlator/system \ ${libdir}/glusterfs/${PV}/xlator/testing \ + ${libdir}/glusterfs/${PV}/xlator/meta.so \ + ${libdir}/glusterfs/ganesha \ + ${libdir}/glusterfs/glusterfs/glusterfind \ + ${libdir}/glusterfs/glusterfs/gfind_missing_files \ + ${libdir}/glusterfs/glusterfs/peer* \ + ${libdir}/glusterfs/glusterfs/*.sh \ ${libdir}/libglusterfs.so.* \ ${libdir}/libgfrpc.so.* \ + ${libdir}/libgfchangelog.so.* \ + ${libdir}/libgfdb.so.* \ ${libdir}/libgfxdr.so.* \ + ${libdir}/python*/site-packages \ + ${libexecdir}/glusterfs/events \ + ${libexecdir}/glusterfs/glusterfind \ + ${libexecdir}/glusterfs/gfind_missing_files \ + ${libexecdir}/glusterfs/peer_mountbroker.py \ + ${libexecdir}/glusterfs/peer_eventsapi.py \ + ${libexecdir}/glusterfs/peer_mountbroker \ + ${libexecdir}/glusterfs/peer_gsec_create \ + ${libexecdir}/glusterfs/gverify.sh \ + ${libexecdir}/glusterfs/peer_add_secret_pub \ ${localstatedir} \ ${sysconfdir}/default/volatiles \ ${sbindir}/glusterfs \ - ${sbindir}/glusterfsd" + ${sbindir}/glusterfsd \ + ${sbindir}/gfind_missing_files \ + ${sbindir}/glfsheal \ + ${sbindir}/gluster-eventsapi \ + ${sbindir}/gluster-mountbroker \ + ${sbindir}/glustereventsd \ + ${sbindir}/gf_attach \ + ${sbindir}/*.py \ + ${bindir}/ \ + ${sysconfdir}/glusterfs \ + ${sysconfdir}/ganesha \ + ${datadir}/glusterfs/* \ + " FILES_${PN}-rdma = "${libdir}/glusterfs/${PV}/rpc-transport/rdma*" FILES_${PN}-geo-replication = "${libexecdir}/glusterfs/gsyncd \ - ${libexecdir}/glusterfs/python/syncdaemon" + ${libexecdir}/glusterfs/python/syncdaemon \ + ${libexecdir}/glusterfs/peer_georep-sshkey.py \ + ${libexecdir}/glusterfs/set_geo_rep_pem_keys.sh \ + ${sbindir}/gluster-georep-sshkey" FILES_${PN}-fuse = "${bindir}/fusermount-glusterfs \ ${libdir}/glusterfs/${PV}/xlator/mount \ @@ -118,7 +187,9 @@ FILES_${PN}-server = "${libdir}/glusterfs/${PV}/xlator/mgmt \ ${sbindir}/glusterd \ ${sysconfdir}/glusterfs/glusterd.vol \ ${sysconfdir}/glusterfs/glusterfs-logrotate \ - ${sysconfdir}/init.d/glusterd" + ${sysconfdir}/init.d/glusterd \ + ${sysconfdir}/tmpfiles.d \ + ${systemd_system_unitdir}" # Note: Debian package renaming produces libgfapi[0-9]+-*.*.rpm. FILES_${PN}-api = "${libdir}/libgfapi.so.*" @@ -126,7 +197,8 @@ FILES_${PN}-api = "${libdir}/libgfapi.so.*" FILES_${PN}-ocf = "${prefix}/lib/ocf" pkg_postinst_${PN}() { - if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ]; then - /etc/init.d/populate-volatile.sh update - fi + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ]; then + /etc/init.d/populate-volatile.sh update + fi } + |