initial commit
This commit is contained in:
5
sys-fs/zfs/Manifest
Normal file
5
sys-fs/zfs/Manifest
Normal file
@ -0,0 +1,5 @@
|
||||
AUX zfs-0.6.0-includedir.patch 586 RMD160 eb4cc6a9d66721e70c932b1dd640abd852d5470d SHA1 c673e057008b4cb7d4c45b936533e9bceff2443c SHA256 047a0cec35bcc5f8050fa80f8203ea020bf148375297c64300a9607f062cec2d
|
||||
AUX zfs.initd 2052 RMD160 3636ead94d4b7200cc221b9e9646b85a5c3acc1a SHA1 d59d5b475c3dc335bf70a24a7af80ef7a38df347 SHA256 ad5e5aa282f2942b23364b5dcb43b4edea5c3923559d18d624ca9bcb51218476
|
||||
DIST zfs-0.6.0-rc5.tar.gz 1910372 RMD160 29661b7399715409bc695a949fb3081d453bf453 SHA1 bed97f65bd9fb8959e2b1e7da2a0304e9cf25b1d SHA256 7a4bfb7a1d6a9f3e276c7ade366309225be09c3141c4109a14bb1588a7114f19
|
||||
EBUILD zfs-0.6.0_rc5.ebuild 1581 RMD160 91fe26950dc63abbc21e264fdebdae0e42c25275 SHA1 89adfc5d3c0056fd6975c4b5ef40469dcdc9696f SHA256 339cea385628c68bdecf1de89052417f68e9fa561cea51b94972f130ddbf0061
|
||||
EBUILD zfs-9999.ebuild 1507 RMD160 348d2ff51ad8a3aed6cdd319784e503d4abc2ebb SHA1 be5a7374fa4b22c8f6a8b137960b2242bda99298 SHA256 c42c5cc57c32e698682eaf5cb9502011d770f34611d2933aab75fc7983da3998
|
13
sys-fs/zfs/files/zfs-0.6.0-includedir.patch
Normal file
13
sys-fs/zfs/files/zfs-0.6.0-includedir.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -urN zfs-0.6.0-rc3.orig/Makefile.am zfs-0.6.0-rc3/Makefile.am
|
||||
--- zfs-0.6.0-rc3.orig/Makefile.am 2011-04-07 22:31:01.000000000 +0400
|
||||
+++ zfs-0.6.0-rc3/Makefile.am 2011-04-12 03:25:36.000000000 +0400
|
||||
@@ -32,8 +32,7 @@
|
||||
|
||||
if CONFIG_KERNEL
|
||||
install-data-local:
|
||||
- destname=zfs-$(ZFS_META_VERSION)/$(LINUX_VERSION); \
|
||||
- instdest=$(DESTDIR)/usr/src/$$destname; \
|
||||
+ instdest=$(DESTDIR)/${includedir}/zfs-linux; \
|
||||
echo "$(ZFS_META_VERSION)" >$$instdest/zfs.release; \
|
||||
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
||||
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
98
sys-fs/zfs/files/zfs.initd
Normal file
98
sys-fs/zfs/files/zfs.initd
Normal file
@ -0,0 +1,98 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/files/zfs,v 0.9 2011/04/30 10:13:43 devsk Exp $
|
||||
|
||||
depend()
|
||||
{
|
||||
before net
|
||||
after udev
|
||||
keyword -lxc -openvz -prefix -vserver
|
||||
}
|
||||
|
||||
CACHEFILE=/etc/zfs/zpool.cache
|
||||
ZPOOL=/usr/sbin/zpool
|
||||
ZFS=/usr/sbin/zfs
|
||||
ZFS_MODULE=zfs
|
||||
|
||||
checksystem() {
|
||||
if [ -c /dev/zfs ]; then
|
||||
einfo "ZFS modules already loaded"
|
||||
return 0
|
||||
else
|
||||
einfo "Checking if ZFS modules present"
|
||||
if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then
|
||||
eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
einfo "Checking if zfs userspace tools present"
|
||||
if [ ! -x $ZPOOL ]; then
|
||||
eerror "$ZPOOL binary not found."
|
||||
return 1
|
||||
fi
|
||||
if [ ! -x $ZFS ]; then
|
||||
eerror "$ZFS binary not found."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ZFS"
|
||||
checksystem || return 1
|
||||
if [ ! -c /dev/zfs ]; then
|
||||
modprobe $ZFS_MODULE
|
||||
rv=$?
|
||||
if [ $rv -ne 0 ]; then
|
||||
eerror "Failed to load the $ZFS_MODULE module, check 'dmesg|tail'."
|
||||
eend $rv
|
||||
return $rv
|
||||
fi
|
||||
fi
|
||||
|
||||
# Import all pools described by the cache file, and then mount
|
||||
# all filesystem based on their properties.
|
||||
if [ -f $CACHEFILE ]; then
|
||||
einfo "Importing ZFS pools"
|
||||
# as per fedora script, import can fail if all pools are already imported
|
||||
# The check for $rv makes no sense...but someday, it will work right.
|
||||
$ZPOOL import -c $CACHEFILE -aN 2>/dev/null || true
|
||||
rv=$?
|
||||
if [ $rv -ne 0 ]; then
|
||||
eerror "Failed to import not-yet imported pools."
|
||||
eend $rv
|
||||
return $rv
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Mounting ZFS filesystems"
|
||||
$ZFS mount -a
|
||||
rv=$?
|
||||
if [ $rv -ne 0 ]; then
|
||||
eerror "Failed to mount ZFS filesystems."
|
||||
eend $rv
|
||||
return $rv
|
||||
fi
|
||||
|
||||
eend 0
|
||||
return 0
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
ebegin "Unmounting ZFS filesystems"
|
||||
$ZFS umount -a
|
||||
rv=$?
|
||||
if [ $rv -ne 0 ]; then
|
||||
eerror "Failed to umount ZFS filesystems."
|
||||
fi
|
||||
|
||||
eend $rv
|
||||
}
|
||||
|
||||
status()
|
||||
{
|
||||
# show pool status and list
|
||||
$ZPOOL status && echo && $ZPOOL list
|
||||
}
|
67
sys-fs/zfs/zfs-0.6.0_rc5.ebuild
Normal file
67
sys-fs/zfs/zfs-0.6.0_rc5.ebuild
Normal file
@ -0,0 +1,67 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
WANT_AUTOMAKE="1.11"
|
||||
AT_M4DIR=./config # for aclocal called by eautoreconf
|
||||
inherit eutils autotools linux-mod
|
||||
|
||||
DESCRIPTION="Native ZFS for Linux"
|
||||
HOMEPAGE="http://zfsonlinux.org"
|
||||
SRC_URI="http://github.com/downloads/zfsonlinux/${PN}/${P/_/-}.tar.gz"
|
||||
|
||||
LICENSE="CDDL GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 -x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
>=sys-devel/spl-${PV}
|
||||
virtual/linux-sources
|
||||
"
|
||||
RDEPEND="
|
||||
!sys-fs/zfs-fuse
|
||||
"
|
||||
|
||||
S="${WORKDIR}/${P/_/-}"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
kernel_is gt 2 6 32 || die "Your kernel is too old. ${CATEGORY}/${PN} need 2.6.32 or newer."
|
||||
linux_config_exists || die "Your kernel sources are unconfigured."
|
||||
if linux_chkconfig_present PREEMPT; then
|
||||
eerror "${CATEGORY}/${PN} doesn't currently work with PREEMPT kernel."
|
||||
eerror "Please look at bug https://github.com/behlendorf/zfs/issues/83"
|
||||
die "PREEMPT kernel"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${PN}-0.6.0-includedir.patch"
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
set_arch_to_kernel
|
||||
econf \
|
||||
--with-config=all \
|
||||
--with-linux="${KERNEL_DIR}" \
|
||||
--with-linux-obj="${KERNEL_DIR}" \
|
||||
--with-spl=/usr/include/spl \
|
||||
--with-spl-obj=/usr/include/spl/module
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
set_arch_to_kernel
|
||||
default # _not_ the one from linux-mod
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die 'emake install failed'
|
||||
newinitd "${FILESDIR}/zfs.initd" zfs
|
||||
keepdir /var/lock/zfs
|
||||
# Drop unwanted files
|
||||
rm -rf "${D}/usr/src" || die "removing unwanted files die"
|
||||
}
|
66
sys-fs/zfs/zfs-9999.ebuild
Normal file
66
sys-fs/zfs/zfs-9999.ebuild
Normal file
@ -0,0 +1,66 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
WANT_AUTOMAKE="1.11"
|
||||
AT_M4DIR=./config # for aclocal called by eautoreconf
|
||||
|
||||
EGIT_REPO_URI="http://github.com/behlendorf/zfs.git"
|
||||
|
||||
inherit autotools eutils git-2 linux-mod
|
||||
|
||||
DESCRIPTION="Native ZFS for Linux"
|
||||
HOMEPAGE="http://wiki.github.com/behlendorf/zfs/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="CDDL GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
IUSE=""
|
||||
|
||||
DEPEND="
|
||||
>=sys-devel/spl-${PV}
|
||||
>=virtual/linux-sources-2.6
|
||||
"
|
||||
RDEPEND="
|
||||
!sys-fs/zfs-fuse
|
||||
"
|
||||
|
||||
pkg_setup() {
|
||||
linux-mod_pkg_setup
|
||||
kernel_is gt 2 6 32 || die "Your kernel is too old. ${CATEGORY}/${PN} need 2.6.32 or newer."
|
||||
linux_config_exists || die "Your kernel sources are unconfigured."
|
||||
if linux_chkconfig_present PREEMPT; then
|
||||
eerror "${CATEGORY}/${PN} doesn't currently work with PREEMPT kernel."
|
||||
eerror "Please look at bug https://github.com/behlendorf/zfs/issues/83"
|
||||
die "PREEMPT kernel"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${PN}-0.6.0-includedir.patch
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
set_arch_to_kernel
|
||||
econf \
|
||||
--with-config=all \
|
||||
--with-linux="${KERNEL_DIR}" \
|
||||
--with-linux-obj="${KERNEL_DIR}" \
|
||||
--with-spl=/usr/include/spl \
|
||||
--with-spl-obj=/usr/include/spl/module
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
set_arch_to_kernel
|
||||
default # _not_ the one from linux-mod
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die 'emake install failed'
|
||||
# Drop unwanted files
|
||||
rm -rf "${D}/usr/src" || die "removing unwanted files die"
|
||||
}
|
Reference in New Issue
Block a user