Browse files

Add old glusterfs ebuild

git-svn-id: svn+ssh://svn.coming.dk/var/svn/repos/kloppenborg-overlay@16 72fc17d4-3f51-4bdf-aba9-bd2d4fe144fe
  • Loading branch information...
1 parent 0808113 commit 92ef201eb1132ff9add4aae6b6db774e0aeb9ac4 Sune Kloppenborg Jeppesen committed Jun 18, 2010
View
45 sys-cluster/glusterfs/ChangeLog
@@ -0,0 +1,45 @@
+# ChangeLog for sys-cluster/glusterfs
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/ChangeLog,v 1.9 2010/02/22 22:31:39 alexxy Exp $
+
+*glusterfs-3.0.2 (22 Feb 2010)
+
+ 22 Feb 2010; Alexey Shvetsov <alexxy@gentoo.org> -glusterfs-2.0.8.ebuild,
+ -glusterfs-3.0.0.ebuild, +glusterfs-3.0.2.ebuild:
+ Version bump per bug #304261
+
+ 05 Feb 2010; Alexey Shvetsov <alexxy@gentoo.org> glusterfs-3.0.0.ebuild:
+ Fix bug #300122
+
+*glusterfs-3.0.0 (14 Dec 2009)
+
+ 14 Dec 2009; Alexey Shvetsov <alexxy@gentoo.org> +glusterfs-3.0.0.ebuild:
+ Version bump
+
+ 02 Dec 2009; Alexey Shvetsov <alexxy@gentoo.org> files/glusterfs.initd:
+ Update init.d as asked by Elvanor
+
+ 25 Nov 2009; Alexey Shvetsov <alexxy@gentoo.org> glusterfs-2.0.8.ebuild:
+ Update infiniband deps
+
+*glusterfs-2.0.8 (25 Nov 2009)
+
+ 25 Nov 2009; Alexey Shvetsov <alexxy@gentoo.org> +glusterfs-2.0.8.ebuild,
+ metadata.xml:
+ Version bump per bug #290713
+
+ 23 Sep 2009; Alexey Shvetsov <alexxy@gentoo.org> glusterfs-2.0.6.ebuild:
+ Drop berkdb support since its unstable for current glusterfs version
+
+ 22 Sep 2009; Alexey Shvetsov <alexxy@gentoo.org> files/glusterfs.initd:
+ Update init script
+
+*glusterfs-2.0.6 (22 Sep 2009)
+
+ 22 Sep 2009; Alexey Shvetsov <alexxy@gentoo.org>
+ +files/50glusterfs-mode-gentoo.el, +glusterfs-2.0.6.ebuild,
+ +files/glusterfs-2.0.6-docdir.patch,
+ +files/glusterfs-2.0.6-parallel-make.patch, +files/glusterfs.confd,
+ +files/glusterfs.initd, +files/glusterfs.vim, +metadata.xml:
+ Version bump per bug #167955
+
View
11 sys-cluster/glusterfs/Manifest
@@ -0,0 +1,11 @@
+AUX 50glusterfs-mode-gentoo.el 169 RMD160 406c0dd2d79d054f059fcae29961fb6b7950e367 SHA1 5cb956b94b2704d244a4031093305de3243a7a86 SHA256 2467d044665d16dd95f78f7a7a104099ce00849cd0a2a86b110fe4c91b316a9d
+AUX glusterfs-2.0.8-docdir.patch 1644 RMD160 6961d29068c6b556f195615b789188f28e80b181 SHA1 4ff29870fae0039f390945ccaee3bcd25c87ae70 SHA256 d2922af3e15faae8ae06102a757b158b510b27cc11ad9ffe643ca67e2046ba07
+AUX glusterfs-2.0.8-parallel-make.patch 472 RMD160 62033a196373a90e522d323bea2e1cb0ce27b5c9 SHA1 a18c9cfe9e72438baef0b24faa67f8eb94d9e08d SHA256 761fea76024bdc811c3af08af1cc3d9959e549990662705df0e9cf3588f52d49
+AUX glusterfs-3.0.2-devicenumber.patch 2146 RMD160 8714424972d805d241c11b2476f2c3e48cb021c5 SHA1 0e00f7429ffc340476e1b25dae0f5c707a638333 SHA256 f3adf0442e9443d2e85fa5f341a915ed5d24d5b25ead448f6b55ec818ece29ec
+AUX glusterfs.confd 129 RMD160 ba0a6f22452b70cb3a7eb6f3bdd2b06e7c441b04 SHA1 c83f9e5c0becaf798b30b1709ea7086b56dd2992 SHA256 a9023ba1112ceb4597c654228f0beb0053ed695aeb32c65e0749a7157fab563d
+AUX glusterfs.initd 3134 RMD160 6606d3c3ee825e1af9624d66f5a46e30270e73a3 SHA1 68fcfa5b64dc6b133036b645c64ba75a7afbc126 SHA256 ffa622d26add72dafc1b1f8e6de716b14a6d99911888a344dc7d236fb7667d6e
+AUX glusterfs.vim 139 RMD160 17a4589550934fd8fd3523d0075af7686fc8f905 SHA1 8aa880c49a7bd1a0e185539acede53840b138746 SHA256 f214c1c8a01c9184b535fa7ae307200a8a1dc83fd42e92bdd57a7b1cae1dc099
+DIST glusterfs-3.0.2.tar.gz 1673684 RMD160 c76a1c2f02857b1398887144da897095c2bbd429 SHA1 ea833e06b6a6031fd3cb6bae77d922a34fa910d8 SHA256 b9c795df91aa42b899700d5579fd44e60e866dec15299aaf0e87143cce7b6d13
+EBUILD glusterfs-3.0.2-r1.ebuild 3402 RMD160 01789edf8a901a654e5a3a003f768fb0a51fed37 SHA1 5f27ddec1736f9eb7318bb7b12edbd00ee0e13a9 SHA256 cbbce8ad8eda5e47743cbe10d18f1ea4fd3275fbad0c9bc47c6218cd2f8d2cae
+MISC ChangeLog 1585 RMD160 919d84a6994895f67b7f8034a41e9614dc1a9394 SHA1 1b6afeee84f30b5c3892b82a31517300182808bf SHA256 a02991062e4c901e890831314f87dd6f6ce0c29211640d9e98fb569064342885
+MISC metadata.xml 841 RMD160 af0e9efe274b599905c51048f826016e78b2fc62 SHA1 45cc9a8e2a1fdfcf9eadaa79e00792bce0ed7d55 SHA256 e3eb8442866267d664a641b946a9d48b7116ec664af8d3c300d4d34f1b1958ec
View
5 sys-cluster/glusterfs/files/50glusterfs-mode-gentoo.el
@@ -0,0 +1,5 @@
+
+;;; puppet-mode site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'glusterfs-mode "glusterfs-mode" "Major mode for editing glusterfs manifests")
View
51 sys-cluster/glusterfs/files/glusterfs-2.0.8-docdir.patch
@@ -0,0 +1,51 @@
+From 6a17bb8523c4c7810bf7797371df22cfb259f7a7 Mon Sep 17 00:00:00 2001
+From: MATSUU Takuto <matsuu@gentoo.org>
+Date: Sat, 16 May 2009 07:01:53 +0900
+Subject: [PATCH] Use the standard autoconf $docdir variable.
+
+---
+ doc/examples/Makefile.am | 1 -
+ extras/Makefile.am | 3 +--
+ extras/benchmarking/Makefile.am | 4 +---
+ 3 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
+index b4c93f4..5296d83 100644
+--- a/doc/examples/Makefile.am
++++ b/doc/examples/Makefile.am
+@@ -1,7 +1,6 @@
+ EXTRA = README unify.vol replicate.vol stripe.vol protocol-client.vol protocol-server.vol posix-locks.vol trash.vol write-behind.vol io-threads.vol io-cache.vol read-ahead.vol filter.vol trace.vol
+ EXTRA_DIST = $(EXTRA)
+
+-docdir = $(datadir)/doc/$(PACKAGE_NAME)
+ Examplesdir = $(docdir)/examples
+ Examples_DATA = $(EXTRA)
+
+diff --git a/extras/Makefile.am b/extras/Makefile.am
+index 9be3973..ea0b33d 100644
+--- a/extras/Makefile.am
++++ b/extras/Makefile.am
+@@ -1,6 +1,5 @@
+
+-docdir = $(datadir)/doc/glusterfs/
+-EditorModedir = $(docdir)/
++EditorModedir = $(docdir)
+ EditorMode_DATA = glusterfs-mode.el glusterfs.vim
+
+ SUBDIRS = init.d benchmarking
+diff --git a/extras/benchmarking/Makefile.am b/extras/benchmarking/Makefile.am
+index 04cc061..bfcc592 100644
+--- a/extras/benchmarking/Makefile.am
++++ b/extras/benchmarking/Makefile.am
+@@ -1,7 +1,5 @@
+
+-docdir = $(datadir)/doc/$(PACKAGE_NAME)/benchmarking
+-
+-benchmarkingdir = $(docdir)
++benchmarkingdir = $(docdir)/benchmarking
+
+ benchmarking_DATA = rdd.c glfs-bm.c README launch-script.sh local-script.sh
+
+--
+1.6.3
+
View
11 sys-cluster/glusterfs/files/glusterfs-2.0.8-parallel-make.patch
@@ -0,0 +1,11 @@
+diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am
+index 0609179..548ed3a 100644
+--- a/glusterfsd/src/Makefile.am
++++ b/glusterfsd/src/Makefile.am
+@@ -20,5 +20,6 @@ uninstall-local:
+ install-data-local:
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/run
+ $(INSTALL) -d -m 755 $(DESTDIR)$(localstatedir)/log/glusterfs
++ $(INSTALL) -d -m 755 $(DESTDIR)$(sbindir)
+ rm -f $(DESTDIR)$(sbindir)/glusterfs
+ ln -s glusterfsd $(DESTDIR)$(sbindir)/glusterfs
View
55 sys-cluster/glusterfs/files/glusterfs-3.0.2-devicenumber.patch
@@ -0,0 +1,55 @@
+diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
+index 6b8aa5a..058e82f 100644
+--- a/xlators/storage/posix/src/posix.c
++++ b/xlators/storage/posix/src/posix.c
+@@ -199,19 +199,33 @@ posix_scale_st_ino (struct posix_private *priv, struct stat *buf)
+ int i = 0;
+ int ret = -1;
+ ino_t temp_ino = 0;
+-
++ int r;
++ struct stat export_buf;
++
+ for (i = 0; i < priv->num_devices_to_span; i++) {
+- if (buf->st_dev == priv->st_device[i])
++ if (buf->st_dev == priv->st_device[i]) {
+ break;
++ }
+ if (priv->st_device[i] == 0) {
+ priv->st_device[i] = buf->st_dev;
+ break;
+ }
+ }
+
+- if (i == priv->num_devices_to_span)
+- goto out;
+-
++ if (i == priv->num_devices_to_span) {
++ r = lstat (priv->base_path, &export_buf);
++ if ((r != 0) || (buf->st_dev != export_buf.st_dev)) {
++ goto out;
++ }
++
++ gf_log (THIS->name, GF_LOG_WARNING,
++ "device number for exported volume %s has changed "
++ "since init --- assuming done by automount",
++ priv->base_path);
++
++ priv->st_device[0] = export_buf.st_dev;
++ }
++
+ temp_ino = (buf->st_ino * priv->num_devices_to_span) + i;
+
+ buf->st_ino = temp_ino;
+@@ -239,7 +253,10 @@ posix_lstat_with_gen (xlator_t *this, const char *path, struct stat *stbuf_p)
+ return -1;
+
+ ret = posix_scale_st_ino (priv, &stbuf);
+- if (ret == -1) {
++ if ((ret == -1) && !strcmp (path, "..")) {
++ /* stat on ../ might land us outside the export directory,
++ so don't panic */
++
+ gf_log (this->name, GF_LOG_WARNING,
+ "Access to %s (on dev %lld) is crossing device (%lld)",
+ path, (unsigned long long) stbuf.st_dev,
View
6 sys-cluster/glusterfs/files/glusterfs.confd
@@ -0,0 +1,6 @@
+#glusterfsd_mountpoint=""
+#glusterfsd_log=""
+#glusterfsd_vol=""
+#glusterfsd_port=""
+#glusterfsd_transport=""
+#glusterfsd_opts=""
View
120 sys-cluster/glusterfs/files/glusterfs.initd
@@ -0,0 +1,120 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/files/glusterfs.initd,v 1.3 2009/12/02 21:37:33 alexxy Exp $
+
+if [[ "${SVCNAME}" != "glusterfs" ]]
+then
+ GLUSTERFS_NAME="${SVCNAME#glusterfs.}"
+else
+ GLUSTERFS_NAME="glusterfs"
+fi
+
+GLUSTERFS_PIDFILE="/var/run/${SVCNAME}.pid"
+
+eval 'GLUSTERFS_LOGFILE="${'${GLUSTERFS_NAME}'_log:-/var/log/glusterfs/'${GLUSTERFS_NAME}'.log}"'
+eval 'GLUSTERFS_VOLFILE="${'${GLUSTERFS_NAME}'_vol:-/etc/glusterfs/'${GLUSTERFS_NAME}'.vol}"'
+eval 'GLUSTERFS_SERVER="${'${GLUSTERFS_NAME}'_server}"'
+eval 'GLUSTERFS_PORT="${'${GLUSTERFS_NAME}'_port:-6996}"'
+eval 'GLUSTERFS_TRANSPORT="${'${GLUSTERFS_NAME}'_transport:-socket}"'
+eval 'GLUSTERFS_OPTS="${'${GLUSTERFS_NAME}'_opts}"'
+eval 'GLUSTERFS_MOUNTPOINT="${'${GLUSTERFS_NAME}'_mountpoint}"'
+
+depend() {
+ need net
+ [[ -n "${GLUSTERFS_MOUNTPOINT}" ]] && need fuse
+ use dns
+ before netmount
+ after firewall ntp-client ntpd
+}
+
+checkconfig() {
+ if [[ -z "${GLUSTERFS_NAME}" ]]
+ then
+ eerror "The service name is not properly formatted."
+ return 1
+ fi
+
+ if [[ -z "${GLUSTERFS_SERVER}" ]]
+ then
+ if [[ -z "${GLUSTERFS_VOLFILE}" ]]
+ then
+ eerror "No GlusterFS volume file source has been defined. Edit /etc/conf.d/glusterfs"
+ eerror "and configure a volume file source for ${SVCNAME}."
+ return 1
+ else
+ if [[ ! -f "${GLUSTERFS_VOLFILE}" ]]
+ then
+ eerror "Cannot find volume file: ${GLUSTERFS_VOLFILE}"
+ return 1
+ fi
+ fi
+ fi
+
+ if [[ -n "${GLUSTERFS_MOUNTPOINT}" && ! -d "${GLUSTERFS_MOUNTPOINT}" ]]
+ then
+ eerror "The mountpoint ${GLUSTERFS_MOUNTPOINT} does not exist."
+ return 1
+ fi
+}
+
+start() {
+ local status
+
+ checkconfig || return 1
+
+ ebegin "Starting GlusterFS (${SVCNAME})"
+ eindent
+
+ if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]]
+ then
+ einfo "Starting in server mode ..."
+ else
+ einfo "Starting in client mode. Mounting filesystem ..."
+ fi
+
+ if [[ -n "${GLUSTERFS_SERVER}" ]]
+ then
+ einfo "Using server supplied volume file"
+ start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \
+ --exec /usr/sbin/glusterfsd -- \
+ --pid-file=${GLUSTERFS_PIDFILE} \
+ --log-file=${GLUSTERFS_LOGFILE} \
+ --volfile-server=${GLUSTERFS_SERVER} \
+ --volfile-server-port=${GLUSTERFS_PORT} \
+ --volfile-server-transport=${GLUSTERFS_TRANSPORT} \
+ ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT}
+ status="$?"
+ else
+ einfo "Using local volume file"
+ start-stop-daemon --start --pidfile ${GLUSTERFS_PIDFILE} \
+ --exec /usr/sbin/glusterfsd -- \
+ --pid-file=${GLUSTERFS_PIDFILE} \
+ --log-file=${GLUSTERFS_LOGFILE} \
+ --volfile=${GLUSTERFS_VOLFILE} \
+ ${GLUSTERFS_OPTS} ${GLUSTERFS_MOUNTPOINT}
+ status="$?"
+ fi
+
+ eoutdent
+ eend ${status}
+}
+
+stop() {
+ local status
+
+ ebegin "Stopping GlusterFS (${SVCNAME})"
+ eindent
+ if [[ -z "${GLUSTERFS_MOUNTPOINT}" ]]
+ then
+ einfo "Stopping server process ..."
+ start-stop-daemon --stop --pidfile ${GLUSTERFS_PIDFILE}
+ status="$?"
+ else
+ einfo "Unmounting ${GLUSTERFS_MOUNTPOINT} ..."
+ umount "${GLUSTERFS_MOUNTPOINT}"
+ status="$?"
+ fi
+ eoutdent
+ eend ${status}
+}
View
8 sys-cluster/glusterfs/files/glusterfs.vim
@@ -0,0 +1,8 @@
+if &compatible || v:version < 603
+ finish
+endif
+
+
+" GlusterFS Volume files
+au BufNewFile,BufRead *.vol
+ \ set filetype=glusterfs
View
102 sys-cluster/glusterfs/glusterfs-3.0.2-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/glusterfs/glusterfs-3.0.2.ebuild,v 1.1 2010/02/22 22:31:39 alexxy Exp $
+
+EAPI="2"
+
+inherit autotools elisp-common eutils multilib versionator
+
+DESCRIPTION="GlusterFS is a powerful network/cluster filesystem"
+HOMEPAGE="http://www.gluster.org/"
+SRC_URI="http://ftp.gluster.com/pub/gluster/${PN}/$(get_version_component_range '1-2')/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs +fuse infiniband static vim-syntax extras"
+
+DEPEND="emacs? ( virtual/emacs )
+ fuse? ( >=sys-fs/fuse-2.7.0 )
+ infiniband? ( sys-infiniband/libibverbs )"
+RDEPEND="${DEPEND}
+ !net-fs/glusterfs"
+
+SITEFILE="50${PN}-mode-gentoo.el"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.0.8-parallel-make.patch"
+ epatch "${FILESDIR}/${PN}-2.0.8-docdir.patch"
+ epatch "${FILESDIR}/${PN}-3.0.2-devicenumber.patch"
+ eautoreconf || die "eautoreconf failed"
+}
+
+src_configure() {
+ econf \
+ $(use_enable fuse fuse-client) \
+ $(use_enable infiniband ibverbs) \
+ $(use_enable static) \
+ --disable-bdb \
+ --docdir=/usr/share/doc/${PF} \
+ --localstatedir=/var || die
+# $(use_enable berkdb bdb) \
+}
+
+src_compile() {
+ emake || die "Emake failed"
+ if use emacs ; then
+ elisp-compile extras/glusterfs-mode.el || die "elisp-compile failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ if use emacs ; then
+ elisp-install ${PN} extras/glusterfs-mode.el* || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/ftdetect; doins "${FILESDIR}/glusterfs.vim" || die
+ insinto /usr/share/vim/vimfiles/syntax; doins extras/glusterfs.vim || die
+ fi
+
+ if use extras ; then
+ newbin extras/volgen/glusterfs-volgen glusterfs-volgen || die "Failed to install bins"
+ newbin extras/backend-xattr-sanitize.sh glusterfs-backend-xattr-sanitize || die "Failed to install bins"
+ newbin extras/migrate-unify-to-distribute.sh glusterfs-migrate-unify-to-distribute || die "Failed to install bins"
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS || die "dodoc failed"
+
+ newinitd "${FILESDIR}/${PN}.initd" glusterfsd || die "newinitd failed"
+ newconfd "${FILESDIR}/${PN}.confd" glusterfsd || die "newconfd failed"
+
+ keepdir /var/log/${PN} || die "keepdir failed"
+}
+
+pkg_postinst() {
+ elog "The glusterfs startup script can be multiplexed."
+ elog "The default startup script uses /etc/conf.d/glusterfs to configure the"
+ elog "separate service. To create additional instances of the glusterfs service"
+ elog "simply create a symlink to the glusterfs startup script."
+ elog
+ elog "Example:"
+ elog " # ln -s glusterfsd /etc/init.d/glusterfsd2"
+ elog " # ${EDITOR} /etc/glusterfs/glusterfsd2.vol"
+ elog "You can now treat glusterfsd2 like any other service"
+ echo
+ elog "You can mount exported GlusterFS filesystems through /etc/fstab instead of"
+ elog "through a startup script instance. For more information visit:"
+ elog "http://www.gluster.org/docs/index.php/Mounting_a_GlusterFS_Volume"
+ echo
+ ewarn "You need to use a ntp client to keep the clocks synchronized across all"
+ ewarn "of your servers. Setup a NTP synchronizing service before attempting to"
+ ewarn "run GlusterFS."
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
View
18 sys-cluster/glusterfs/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
+ <longdescription lang='en'>
+ GlusterFS is a cluster file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. GlusterFS is based on a stackable user space design without compromising performance.
+ </longdescription>
+ <use>
+ <flag name='fuse'>Add FUSE mount helper</flag>
+ <flag name='extras'>Install extra helper scripts</flag>
+ <flag name='infiniband'>Add support for Infiniband ibverbs transport.
+ Librarys can be found in science overlay</flag>
+ </use>
+</pkgmetadata>

0 comments on commit 92ef201

Please sign in to comment.