summaryrefslogtreecommitdiff
path: root/net-fs/glusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/glusterfs')
-rw-r--r--net-fs/glusterfs/Manifest8
-rw-r--r--net-fs/glusterfs/files/glusterfs-2.0.1-apache2.patch38
-rw-r--r--net-fs/glusterfs/files/glusterfs-2.0.1-apxs.patch13
-rw-r--r--net-fs/glusterfs/files/glusterfs-2.0.1-gentoo.patch22
-rw-r--r--net-fs/glusterfs/files/glusterfs-2.0.1-parallel-make.patch11
-rw-r--r--net-fs/glusterfs/files/glusterfs-2.0.1.initd22
-rw-r--r--net-fs/glusterfs/files/glusterfs.vim8
-rw-r--r--net-fs/glusterfs/glusterfs-2.0.1.ebuild122
8 files changed, 244 insertions, 0 deletions
diff --git a/net-fs/glusterfs/Manifest b/net-fs/glusterfs/Manifest
index f5d3f9d..f83af91 100644
--- a/net-fs/glusterfs/Manifest
+++ b/net-fs/glusterfs/Manifest
@@ -3,7 +3,15 @@ AUX glusterfs-1.3.10.initd 582 RMD160 a131ee39466e9fb44c2a786740255590a504af36 S
AUX glusterfs-2.0.0_rc1.confd 101 RMD160 02d71bc7c20ff30f38ebd4bfd0c7d62a94fc8227 SHA1 931e7757a6acccab7a1346d15fec52db0e9e26b9 SHA256 97e3d0d2a656500737856988b1b83107c34c41876d4f4ee4f5d87a25b0bdf648
AUX glusterfs-2.0.0_rc1.initd 581 RMD160 c0a69bbea6b5d84d8c3838a218a66cbaeaa5c309 SHA1 186f57dafe02546293ed4189bf17796a42617d56 SHA256 186c083a79c3e5473079997750fe7cc3842c990e70999078c0c0acdec4abef16
AUX glusterfs-2.0.0_rc7-docdir.patch 715 RMD160 d68186f6f5e5405224766396824899f5686dfc62 SHA1 4db26b6bdd4a04baf8367576b6ac23f31972cf90 SHA256 087c3bb2bbca86297201cf502c6c68ff773ada7236f763efac984b729882946c
+AUX glusterfs-2.0.1-apache2.patch 1678 RMD160 75caa591d416ae8b5a8c3a1affa43bf7c9c2173c SHA1 4c10d8448a5254b4ca919d9f46493e3917ce8440 SHA256 276ea9b1d85a0061aca8b827aaab401fbc279725ff1a184a88bd38a4b15f2e62
+AUX glusterfs-2.0.1-apxs.patch 1224 RMD160 81c9b74887be4d4356402774a5752e2ccf8ab525 SHA1 8f32b2d20e0a5a060d7d303a1e291bbb2b97d1f6 SHA256 804cf4104e57e477289796d425d3d386bd7014a944e28a3fb39089ade1ed8ae0
+AUX glusterfs-2.0.1-gentoo.patch 966 RMD160 a36adbfdf8fb0661c4e8b1d79a43a87a45488705 SHA1 67957ca86850e02e7132ed620217c8ea755d41e1 SHA256 9bed3cc8db8a7a4a7f27644628a08d1e8ee1ed6a406de106b89527d60a1de7d4
+AUX glusterfs-2.0.1-parallel-make.patch 472 RMD160 62033a196373a90e522d323bea2e1cb0ce27b5c9 SHA1 a18c9cfe9e72438baef0b24faa67f8eb94d9e08d SHA256 761fea76024bdc811c3af08af1cc3d9959e549990662705df0e9cf3588f52d49
+AUX glusterfs-2.0.1.initd 505 RMD160 a9845f272078b58a77484db4a29cb592f014bac2 SHA1 c900387db0cca5bafc53f0b153ca3c50e6eee678 SHA256 0489a9c197f576eb2251fa61bc43be7fd0dce16fed6718a1e3566253937621b9
+AUX glusterfs.vim 139 RMD160 17a4589550934fd8fd3523d0075af7686fc8f905 SHA1 8aa880c49a7bd1a0e185539acede53840b138746 SHA256 f214c1c8a01c9184b535fa7ae307200a8a1dc83fd42e92bdd57a7b1cae1dc099
DIST glusterfs-2.0.0rc1.tar.gz 1396957 RMD160 a4573eb540a8768239190d12b61deac53a8ee1c8 SHA1 6c39b69b73ed6be3ecae38f7a24ff8254fa6761a SHA256 4703bfdc57b004461f65ea74b08ce22d557e033fbaf30909b3730aabbd01cf4c
DIST glusterfs-2.0.0rc7.tar.gz 1442946 RMD160 934bbc490bb1c148330f8e97c630dcd93994ea69 SHA1 5eb25be69cfe7e90ceca489404deeedae311feed SHA256 b67045a861f8fac859f49926f1c17794d16ec8d0fa202c33929127c641366d79
+DIST glusterfs-2.0.1.tar.gz 1494911 RMD160 9939dfe6a045b3263d6073fc3f792f23d3e2b721 SHA1 5d37d59e151a7d90ad29468af874adbbb35d5bb0 SHA256 52b76ca8e736013e5689eb3d7409f20cb66a8effe72577b5a16487b788317c8b
EBUILD glusterfs-2.0.0_rc1.ebuild 2477 RMD160 4bacb3ef1824594b7632a0b129fa8805f80ce423 SHA1 9c1274bc9339ac739de9337e91d801212009a9fb SHA256 52c420ada4853efee53cfc49b56550c03b71858d46a89e9bf487e25bb6bf55eb
EBUILD glusterfs-2.0.0_rc7.ebuild 3522 RMD160 77a3b0de80e8cb46e358a2f24ee5a4b6282a6752 SHA1 dd9b84b1a874fc6086d747f86f8abb0c5431ddea SHA256 09beb4514bb87fe0423f3ab6988cf8fb92275cee4a0214c617c4233a72f93fcc
+EBUILD glusterfs-2.0.1.ebuild 3765 RMD160 c16073df989f06dbcc0d299890a9955b958e4635 SHA1 b0b11579a1b3ad7c39dc802308b27e71ce21ef94 SHA256 c6009b5d89a80c40a0b2a9cf6b43891de3e54d251cdc9d2418118059a7f47310
diff --git a/net-fs/glusterfs/files/glusterfs-2.0.1-apache2.patch b/net-fs/glusterfs/files/glusterfs-2.0.1-apache2.patch
new file mode 100644
index 0000000..52febe9
--- /dev/null
+++ b/net-fs/glusterfs/files/glusterfs-2.0.1-apache2.patch
@@ -0,0 +1,38 @@
+diff --git a/mod_glusterfs/apache/2.2/src/mod_glusterfs.c b/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
+index a89e1c7..ee17ebb 100644
+--- a/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
++++ b/mod_glusterfs/apache/2.2/src/mod_glusterfs.c
+@@ -2785,7 +2785,7 @@ mod_glfs_index_directory (request_rec *r,
+ apr_size_t dirpathlen;
+ glusterfs_dir_config_t *dir_config = NULL;
+ int ret = -1;
+- struct dirent entry = {0, };
++ struct dirent *entry = NULL;
+ struct stat st = {0, };
+
+ name = r->filename;
+@@ -2994,12 +2994,12 @@ mod_glfs_index_directory (request_rec *r,
+ memcpy(fullpath, name, dirpathlen);
+
+ do {
+- ret = glusterfs_readdir (fd, &entry, sizeof (entry));
+- if (ret <= 0) {
++ entry = glusterfs_readdir (fd);
++ if (entry == NULL) {
+ break;
+ }
+
+- fname = apr_pstrcat (r->pool, path, entry.d_name, NULL);
++ fname = apr_pstrcat (r->pool, path, entry->d_name, NULL);
+
+ ret = glusterfs_stat (fname, &st);
+ if (ret != 0) {
+@@ -3007,7 +3007,7 @@ mod_glfs_index_directory (request_rec *r,
+ }
+
+ dirent.fname = fname;
+- dirent.name = apr_pstrdup (r->pool, entry.d_name);
++ dirent.name = apr_pstrdup (r->pool, entry->d_name);
+ fill_out_finfo (&dirent, &st,
+ APR_FINFO_MIN | APR_FINFO_IDENT
+ | APR_FINFO_NLINK | APR_FINFO_OWNER
diff --git a/net-fs/glusterfs/files/glusterfs-2.0.1-apxs.patch b/net-fs/glusterfs/files/glusterfs-2.0.1-apxs.patch
new file mode 100644
index 0000000..ef7b470
--- /dev/null
+++ b/net-fs/glusterfs/files/glusterfs-2.0.1-apxs.patch
@@ -0,0 +1,13 @@
+diff --git a/mod_glusterfs/apache/2.2/src/Makefile.am b/mod_glusterfs/apache/2.2/src/Makefile.am
+index 1e8f3a3..b2b73dd 100644
+--- a/mod_glusterfs/apache/2.2/src/Makefile.am
++++ b/mod_glusterfs/apache/2.2/src/Makefile.am
+@@ -7,7 +7,7 @@ all: mod_glusterfs.so
+
+ mod_glusterfs.so: $(top_srcdir)/mod_glusterfs/apache/2.2/src/mod_glusterfs.c $(top_builddir)/libglusterfsclient/src/libglusterfsclient.la
+ ln -sf $(top_srcdir)/mod_glusterfs/apache/2.2/src/mod_glusterfs.c $(top_builddir)/mod_glusterfs/apache/2.2/src/mod_glusterfs-build.c
+- $(APXS) -c -o mod_glusterfs.la -Wc,-g3 -Wc,-O0 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -I$(top_srcdir)/libglusterfsclient/src -L$(top_builddir)/libglusterfsclient/src/.libs/ -lglusterfsclient mod_glusterfs-build.c
++ $(APXS) -c -o mod_glusterfs.la -Wc,-g3 -Wc,-O0 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -I$(top_srcdir)/libglusterfsclient/src -L$(libdir) -L$(top_builddir)/libglusterfsclient/src/.libs/ -lglusterfsclient mod_glusterfs-build.c
+ -ln -sf .libs/mod_glusterfs.so mod_glusterfs.so
+
+ $(top_builddir)/libglusterfsclient/src/libglusterfsclient.la:
diff --git a/net-fs/glusterfs/files/glusterfs-2.0.1-gentoo.patch b/net-fs/glusterfs/files/glusterfs-2.0.1-gentoo.patch
new file mode 100644
index 0000000..338dd5c
--- /dev/null
+++ b/net-fs/glusterfs/files/glusterfs-2.0.1-gentoo.patch
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+index aee4dd0..cc49f88 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -259,7 +259,7 @@ fi
+
+ if test "x$BUILD_MOD_GLUSTERFS" = "xyes"; then
+ HTTPD_BIN_DIR=`$APXS -q SBINDIR`
+- MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_BIN_DIR/httpd -V | head -1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'`
++ MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_BIN_DIR/apache2 -V | head -n 1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'`
+ fi
+
+ if test "x$with_apxspath" != "x"; then
+@@ -278,7 +278,7 @@ fi
+
+ if test "x$APACHE_MANUAL" = "xyes"; then
+ HTTPD_BIN_DIR=`$APXS_MANUAL -q SBINDIR`
+- MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_MANUAL -V | head -1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'`
++ MOD_GLUSTERFS_HTTPD_VERSION=`$HTTPD_MANUAL -V | head -n 1 | awk "{print $3}" | sed 's/[[^0-9.]]//g' | sed 's/\(.*\..*\)\..*/\1/'`
+ APXS=$APXS_MANUAL
+ fi
+
diff --git a/net-fs/glusterfs/files/glusterfs-2.0.1-parallel-make.patch b/net-fs/glusterfs/files/glusterfs-2.0.1-parallel-make.patch
new file mode 100644
index 0000000..fbe6333
--- /dev/null
+++ b/net-fs/glusterfs/files/glusterfs-2.0.1-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
diff --git a/net-fs/glusterfs/files/glusterfs-2.0.1.initd b/net-fs/glusterfs/files/glusterfs-2.0.1.initd
new file mode 100644
index 0000000..25e0236
--- /dev/null
+++ b/net-fs/glusterfs/files/glusterfs-2.0.1.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net dns
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/glusterfsd -- \
+ --volfile=/etc/glusterfs/${SVCNAME}.vol \
+ --pid-file=/var/run/${SVCNAME}.pid \
+ --log-file=/var/log/glusterfs/${SVCNAME}.log
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
diff --git a/net-fs/glusterfs/files/glusterfs.vim b/net-fs/glusterfs/files/glusterfs.vim
new file mode 100644
index 0000000..bbb9cb1
--- /dev/null
+++ b/net-fs/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
diff --git a/net-fs/glusterfs/glusterfs-2.0.1.ebuild b/net-fs/glusterfs/glusterfs-2.0.1.ebuild
new file mode 100644
index 0000000..a379a6e
--- /dev/null
+++ b/net-fs/glusterfs/glusterfs-2.0.1.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvs/lportage/net-fs/glusterfs/glusterfs-2.0.1.ebuild,v 1.1 2009-06-03 18:55:25 randomdan Exp $
+
+inherit autotools apache-module 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 ~ppc ~ppc64 ~x86"
+IUSE="berkdb doc emacs examples fuse static vim-syntax"
+#IUSE="berkdb doc emacs examples fuse infiniband static vim-syntax"
+
+DEPEND="berkdb? ( >=sys-libs/db-4.6.21 )
+ emacs? ( virtual/emacs )
+ fuse? ( >=sys-fs/fuse-2.7.0 )"
+# infiniband? ( sys-cluster/libibverbs )
+RDEPEND="${RDEPEND}"
+
+SITEFILE="50${PN}-mode-gentoo.el"
+
+APXS2_S="${S}/mod_glusterfs/apache/2.2/src"
+APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${PN}.so"
+APACHE2_MOD_CONF="70_mod_${PN}"
+APACHE2_MOD_DEFINE="GLUSTERFS"
+APACHE2_DOCFILES="README.txt"
+want_apache2_2
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+ epatch "${FILESDIR}/${P}-parallel-make.patch"
+ epatch "${FILESDIR}/${P}-apache2.patch"
+ epatch "${FILESDIR}/${P}-apxs.patch"
+
+ if ! use doc; then
+ sed -i -e '/SUBDIRS =/s/ [a-z]*-guide//g' \
+ doc/Makefile.am \
+ || die "sed remove-guides-from-Makefile.am-patch"
+ fi
+
+ if ! use examples; then
+ sed -i -e '/SUBDIRS =/s/ examples//' \
+ doc/Makefile.am \
+ || die "sed remove-examples-from-Makefile.am-patch"
+ fi
+
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ $(use_enable berkdb bdb) \
+ $(use_enable fuse fuse-client) \
+ $(use_enable apache2 mod_glusterfs) \
+ $(use_enable static) \
+ --localstatedir=/var ||die
+# $(use_enable infiniband ibverbs) \
+ emake || die
+ # use apache2 && apache-module_src_compile
+ if use emacs ; then
+ elisp-compile extras/glusterfs-mode.el || die "elisp-compile failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}/extras" install || die
+
+ if use apache2 ; then
+ apache-module_src_install
+ rm -rf "${D}/usr/$(get_libdir)/glusterfs/${PV}/apache"
+ fi
+
+ 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
+
+ dodoc AUTHORS ChangeLog NEWS README THANKS || die "dodoc failed"
+
+ newinitd "${FILESDIR}/${P}.initd" glusterfsd || die "newinitd 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 apache2 && apache-module_pkg_postinst
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}