summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-fs/zfs-fuse/Manifest4
-rw-r--r--sys-fs/zfs-fuse/files/zfs-fuse46
-rw-r--r--sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch14
-rw-r--r--sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild66
4 files changed, 130 insertions, 0 deletions
diff --git a/sys-fs/zfs-fuse/Manifest b/sys-fs/zfs-fuse/Manifest
new file mode 100644
index 0000000..27e1ddf
--- /dev/null
+++ b/sys-fs/zfs-fuse/Manifest
@@ -0,0 +1,4 @@
+AUX zfs-fuse 916 RMD160 b4abd49c98d00956914aabffd8d201dc0ed2abf3 SHA1 0a0e59fd15e5c8c71afd29e9e9c770ff2220aed2 SHA256 971df038f1d5812435e808a1c316a9ea1c00d6e9ba58dfcc980b7232e200b6e1
+AUX zfs-fuse-0.7.0-flags.patch 846 RMD160 e6340a925497665175f1de4cf3793da1fcce8745 SHA1 28fda3fba2df07bd7dc3d252345f54986eeb8a7d SHA256 72e5dd96e1b78811728610e649f2a9d74eb44be1883e679527a9074d6c6046a6
+DIST zfs-fuse-0.7.0.tar.bz2 1367275 RMD160 2f4aeb0062bf9f3a63e5f415635ca796dc80faaf SHA1 d91cb088452aedd0232a389e4aa3b694a27343b3 SHA256 15dac289d2144ff24a837f6d0bbb505cd79ddc24b66fabf6050a67a70c57c296
+EBUILD zfs-fuse-0.7.0.ebuild 1426 RMD160 74f34bcdf612ffd9b770e708d620cb3b5f98934b SHA1 46745273cf464c76ba03924f38027daf4c049cfe SHA256 319081488169994acfea5885379c8936576ec9a68f0ef34ca187ce288cd2ec81
diff --git a/sys-fs/zfs-fuse/files/zfs-fuse b/sys-fs/zfs-fuse/files/zfs-fuse
new file mode 100644
index 0000000..720ff91
--- /dev/null
+++ b/sys-fs/zfs-fuse/files/zfs-fuse
@@ -0,0 +1,46 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/files/zfs-fuse,v 1.1 2010/06/22 20:13:43 ssuominen Exp $
+
+depend() {
+ before net
+ need fuse
+}
+
+PIDFILE="/var/run/zfs/zfs-fuse.pid"
+EXEFILE="/usr/sbin/zfs-fuse"
+
+checksystem() {
+ return 0 # TODO
+}
+
+start() {
+ ebegin "Starting ZFS-FUSE"
+ checksystem || return 1
+ start-stop-daemon --start --exec ${EXEFILE} \
+ --user root --group disk -- --pidfile ${PIDFILE}
+ rv=$?
+ eend $rv
+
+ if [[ $rv -eq 0 ]]; then
+ ebegin "Mounting ZFS filesystems"
+ zfs mount -a
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Unmounting ZFS filesystems"
+ sync
+ sleep 1
+ zfs umount -f -a
+ eend $?
+ sync
+
+ ebegin "Stopping ZFS-FUSE"
+ checksystem || return 2
+ start-stop-daemon --stop --pidfile ${PIDFILE} \
+ --exec ${EXEFILE} --retry TERM/1/TERM/2/TERM/4/TERM/8/KILL
+ eend $?
+}
diff --git a/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch b/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch
new file mode 100644
index 0000000..660816d
--- /dev/null
+++ b/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch
@@ -0,0 +1,14 @@
+--- src/SConstruct 2012-01-28 20:33:17.465511337 +0100
++++ src/SConstruct 2012-01-28 20:34:52.736320291 +0100
+@@ -30,9 +30,8 @@
+ f.close()
+
+ env.CacheDir('/tmp/.zfs-fuse.scons')
+-env['CC'] = 'gcc'
+-env['LINKFLAGS'] = Split('-pipe -Wall')
+-env['CCFLAGS'] = Split('-pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" ')
++env['LINKFLAGS'] = Split(os.environ.get('LDFLAGS', ''))
++env['CCFLAGS'] = Split(os.environ.get('CFLAGS', '') + ' -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" ')
+
+ if osname == "Linux":
+ env.Append(CPPFLAGS = " -DLINUX_AIO")
diff --git a/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild b/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild
new file mode 100644
index 0000000..b0e5a7f
--- /dev/null
+++ b/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/zfs-fuse-0.6.9-r1.ebuild,v 1.4 2010/08/10 10:31:00 ssuominen Exp $
+
+EAPI=2
+inherit eutils bash-completion scons-utils
+
+DESCRIPTION="An implementation of the ZFS filesystem for FUSE/Linux"
+HOMEPAGE="http://zfs-fuse.net/"
+SRC_URI="http://zfs-fuse.net/releases/${PV}/${P}.tar.bz2"
+
+LICENSE="CDDL"
+SLOT="0"
+KEYWORDS="" # sys-fs/zfs-fuse-0.6.9-r1 masked for removal in main tree
+IUSE="debug"
+
+RDEPEND="dev-libs/libaio
+ dev-libs/openssl
+ sys-fs/fuse
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ dev-util/scons
+ sys-apps/acl
+ sys-apps/attr"
+
+S=${WORKDIR}/${P}/src
+
+src_prepare() {
+ sed -i \
+ -e '/LINKFLAGS/s:-s::' \
+ -e '/CCFLAGS/s:-s -O2::' \
+ SConstruct || die
+
+ sed -i \
+ -e 's:../zdb/zdb:/usr/sbin/zdb:' \
+ cmd/ztest/ztest.c || die
+
+ epatch "${FILESDIR}"/${P}-flags.patch
+}
+
+src_compile() {
+ local _debug=0
+ use debug && _debug=2
+
+ escons debug=${_debug} || die
+}
+
+src_install() {
+ scons \
+ install_dir="${D}/usr/sbin" \
+ man_dir="${D}/usr/share/man/man8" \
+ cfg_dir="${D}/etc/zfs" \
+ install || die
+
+ insinto /etc/zfs
+ doins ../contrib/zfsrc || die
+
+ keepdir /var/{lock,run}/zfs
+ fowners root.disk /var/{lock,run}/zfs
+
+ doinitd "${FILESDIR}"/${PN}
+
+ dodoc ../{BUGS,CHANGES,HACKING,README*,STATUS,TESTING,TODO}
+
+ dobashcompletion ../contrib/zfs_completion.bash ${PN}
+}