summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/zfs-kmod/Manifest10
-rw-r--r--sys-fs/zfs-kmod/metadata.xml12
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r2.ebuild187
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r3.ebuild187
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r5.ebuild187
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.3.ebuild169
6 files changed, 752 insertions, 0 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
new file mode 100644
index 00000000..ab2ea10c
--- /dev/null
+++ b/sys-fs/zfs-kmod/Manifest
@@ -0,0 +1,10 @@
+DIST spl-0.6.2-p0.tar.xz 3740 SHA256 e07570e0141d0563f38c0eb48c2a43432720f03e805ed0bbc16b657826f8f0fb SHA512 512690cbde850e57b25bdff633efb33838d08591c1923cf8e01d15e0b84e7730fc12f7d64dc39c90d1a6d74e8e344065b86465d2d7651ed4974baa5c99aecca8 WHIRLPOOL 10944742881f92d041f7ed3054cf6a22373919a6a469b2ef6c4e83772c8197139339b8994f4bcbd449b4f33e629854a51240f6dad77bc5e690b76b9f7acac0ba
+DIST spl-0.6.2-p1.tar.xz 6552 SHA256 1784bccdd889dc7e2caa0b37a57d98d3db1b451043238b8c3b8af5da4bd84964 SHA512 12ae76e28a8fbf2d7051049be8a9226230a85b7cf8126839b3c285d7af01a7e4a12dbad33c94ed1edd2cbd9fa0392e9df499522f356dc1329579e76debeb7099 WHIRLPOOL 7c04bc7ae60f830b8c44ea2472a006a5cd81c8e0c3cafbf919f5d6e8088498362ea60c44c93b63af32e54c56b958e9edb35e8c37192efb6189d0da9d280f4e1c
+DIST spl-0.6.2-p4.tar.xz 9076 SHA256 8b434bb53da79c5adb5339b36bddf4d19c4e8d5df7a8a5d2a4ca1bcf7336094e SHA512 77ca1ce0235edb85cf36243ad45710ee8759dcc49bacddc661a986d558eb9cd92671ce256c88287e056732882a038b12bb0d9ae131229819702a06de18c50bc1 WHIRLPOOL afc335ba0a7d24a610f272e6a65460326b91ab91652bf66525e14110a811b2490de65847560989f793aab8d473794c56836e438cb7f1e19d4e253373178f0a72
+DIST spl-0.6.2.tar.gz 215032 SHA256 a8147eaba030ca71bf8c47b46a2c7ae92f9b4ef60aa8ccfa7368f395faeb85ac SHA512 ef5b77046259ec754e0a41f90b51c27207bf91e832d54a8502232b19cfaff711de301f24945ca739faeac2544b3ef22a57f58cf6298d756a1ebaff06f765b8a9 WHIRLPOOL ab7229691a6f56ab3f98513fd0e32048c11dd7cf3ea61e438bac2d97ebd8cd92eeeb422ef1c4e639572feb3e8f69c0840b861f654ca31de481601ef54295be37
+DIST spl-0.6.3.tar.gz 221430 SHA256 5d60dfbe86a50e65dbce17f538d8d0874a0cc293374f59eed46cd2dd1809a944 SHA512 c4b82f1e279c7581d0082c044157e8a933edf53233c8c7c8202117454cfda0473ab85fbb56ac0b6da09a4d6798e33020a9c55bf23e25d630efa3265545c3defc WHIRLPOOL eaf001a96a80264e16ce416da38b988eabbfd2fce17690151a496a3141c32e92e5d00791e2d9c009ae0cf6910f80434c10f02a700752fc664f6bf6723bb03dba
+DIST zfs-0.6.2.tar.gz 1558656 SHA256 91b844bf7a42df22d7533e8004289270b7859b8fcbca3bff8087a79b131318b4 SHA512 008f9decdea3e92f6d74f5369ec9df5776b15efbb9f2bc01012999b71e1f2bc5b46b310a329b60545907dcc78773ec79eb6d21aca49d911f33299fd0a36e1a4b WHIRLPOOL 587279866b6ffa2bfebc91f00cb28de85f7f186426a0292f44c6cde7ca3a51c1911fc0ee431c25c3ee0866174522f90ce04b54de4aa3dc0829ba3a719e47af58
+DIST zfs-0.6.3.tar.gz 1665270 SHA256 00caeae63cc724d3dd741aeb36fd2dc03d2158794bd6a5e925cdc8d7e5d3da8c SHA512 8c7741f5f227eb031d79fe87bf7d60e790a098fa6caede462d556c97d798832f97f5a377cbb74fc99b8d198e5f3cc1a3491f69fcdaa0408933dbadd132013416 WHIRLPOOL db9791da12c441c89667b194154b209f5aa69ea46d5327cfcde0b3a910cf1f0e5ca448909824e45b31252a1907280b711fb6ba04eb313d09de0ffbf5e6e304fe
+DIST zfs-kmod-0.6.2-p1.tar.xz 15988 SHA256 0d5ee6d53f6ba694937a9c1f009a0c18519e56cfcd328e5a42a0486f967608e5 SHA512 77b4f167073fa1be2501889f6795972a370c90b58dca121c95c38d98b37fa092ad043e5ab447e677f2207da7119b9fd2c940990bec83118edf18daff2eccaa16 WHIRLPOOL 730347f5d6c7449f309f6b53cdbcbb77b94c35385cebdb5a953f851f01d26c87d615b8ef673a7346f8351e01237833e18ed2fc7cca78bb200e7537222b3e46e2
+DIST zfs-kmod-0.6.2-p2.tar.xz 28636 SHA256 12882463a38a5a57cf2bb3c14c5783f9511f6dc7b163a47575f2f3dcc24f26f6 SHA512 5792660ae8f5013d12e70d608e9cffa92a8c4089a88a5e78728ee88204b3f970d452d5b0b3874e02be49ebbc139e07139be7b5a86ca40bc8b23cb11a7198a9a8 WHIRLPOOL 0e4c57b363cdd3d736efbd1355567b18e22439bd3b20ef40b27f6b97ad4570c7cc99a11b196ac25359d1966c1a70e178f4fd1687b60450f148ccda47b07282a9
+DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19
diff --git a/sys-fs/zfs-kmod/metadata.xml b/sys-fs/zfs-kmod/metadata.xml
new file mode 100644
index 00000000..ea044906
--- /dev/null
+++ b/sys-fs/zfs-kmod/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>ryao@gentoo.org</email>
+ <name>Richard Yao</name>
+ </maintainer>
+ <use>
+ <flag name="rootfs">Install zfs-shutdown script to support exporting a pool containing rootfs</flag>
+ <flag name="debug-log">Enable additional diagnostics</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r2.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r2.ebuild
new file mode 100644
index 00000000..da663f76
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r2.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2
+ MY_PV=9999
+ EGIT_REPO_URI="git://github.com/zfsonlinux/zfs.git git://github.com/zfsonlinux/spl.git"
+else
+ inherit eutils versionator
+ MY_PV=$(replace_version_separator 3 '-')
+ SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/zfs-kmod-${MY_PV}-p1.tar.xz
+ https://github.com/zfsonlinux/spl/archive/spl-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/spl-${MY_PV}-p0.tar.xz"
+ S="${WORKDIR}"
+ ZFS_S="${WORKDIR}/zfs-zfs-${MY_PV}"
+ SPL_S="${WORKDIR}/spl-spl-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Solaris Porting Layer and Linux ZFS kernel modules"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug debug-log +rootfs"
+RESTRICT="test"
+
+DEPEND="dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+ !sys-kernel/spl
+"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+ BLK_DEV_LOOP
+ EFI_PARTITION
+ !GRKERNSEC_HIDESYM
+ IOSCHED_NOOP
+ MODULES
+ KALLSYMS
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
+ DEVTMPFS"
+
+ kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 11 || die "Linux 3.11 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${ZFS_S}/module/Makefile.in"
+
+ # Workaround for hard coded path
+ sed -i "s|/sbin/lsmod|/bin/lsmod|" "${SPL_S}"/scripts/check.sh || die
+
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ pushd "${SPL_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/spl-${MY_PV}-patches"
+ popd
+
+ pushd "${ZFS_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/zfs-kmod-${MY_PV}-patches"
+ popd
+ fi
+
+ # splat is unnecessary unless we are debugging
+ use debug || sed -e 's/^subdir-m += splat$//' -i "${SPL_S}/module/Makefile.in"
+
+ local d
+ for d in "${ZFS_S}" "${SPL_S}"; do
+ pushd "${d}"
+ S="${d}" BUILD_DIR="${d}" autotools-utils_src_prepare
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+ done
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+
+ einfo "Configuring SPL..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=all
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ $(use_enable debug-log)
+ )
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Configuring ZFS..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${SPL_S}"
+ $(use_enable debug)
+ )
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_compile() {
+ einfo "Compiling SPL..."
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Compiling ZFS..."
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_install() {
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ dodoc "${ZFS_S}"/AUTHORS "${ZFS_S}"/COPYRIGHT "${ZFS_S}"/DISCLAIMER "${ZFS_S}"/README.markdown
+ popd
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for features flags."
+ ewarn "If you upgrade your pools to make use of feature flags, you will lose"
+ ewarn "the ability to import them using older versions of ZFSOnLinux."
+ ewarn "Any new pools will be created with feature flag support and will"
+ ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
+ ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r3.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r3.ebuild
new file mode 100644
index 00000000..e61aa72c
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r3.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2
+ MY_PV=9999
+ EGIT_REPO_URI="git://github.com/zfsonlinux/zfs.git git://github.com/zfsonlinux/spl.git"
+else
+ inherit eutils versionator
+ MY_PV=$(replace_version_separator 3 '-')
+ SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/zfs-kmod-${MY_PV}-p2.tar.xz
+ https://github.com/zfsonlinux/spl/archive/spl-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/spl-${MY_PV}-p1.tar.xz"
+ S="${WORKDIR}"
+ ZFS_S="${WORKDIR}/zfs-zfs-${MY_PV}"
+ SPL_S="${WORKDIR}/spl-spl-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Solaris Porting Layer and Linux ZFS kernel modules"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug debug-log +rootfs"
+RESTRICT="test"
+
+DEPEND="dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+ !sys-kernel/spl
+"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+ BLK_DEV_LOOP
+ EFI_PARTITION
+ !GRKERNSEC_HIDESYM
+ IOSCHED_NOOP
+ MODULES
+ KALLSYMS
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
+ DEVTMPFS"
+
+ kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 12 || die "Linux 3.12 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${ZFS_S}/module/Makefile.in"
+
+ # Workaround for hard coded path
+ sed -i "s|/sbin/lsmod|/bin/lsmod|" "${SPL_S}"/scripts/check.sh || die
+
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ pushd "${SPL_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/spl-${MY_PV}-patches"
+ popd
+
+ pushd "${ZFS_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/zfs-kmod-${MY_PV}-patches"
+ popd
+ fi
+
+ # splat is unnecessary unless we are debugging
+ use debug || sed -e 's/^subdir-m += splat$//' -i "${SPL_S}/module/Makefile.in"
+
+ local d
+ for d in "${ZFS_S}" "${SPL_S}"; do
+ pushd "${d}"
+ S="${d}" BUILD_DIR="${d}" autotools-utils_src_prepare
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+ done
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+
+ einfo "Configuring SPL..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=all
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ $(use_enable debug-log)
+ )
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Configuring ZFS..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${SPL_S}"
+ $(use_enable debug)
+ )
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_compile() {
+ einfo "Compiling SPL..."
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Compiling ZFS..."
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_install() {
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ dodoc "${ZFS_S}"/AUTHORS "${ZFS_S}"/COPYRIGHT "${ZFS_S}"/DISCLAIMER "${ZFS_S}"/README.markdown
+ popd
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for features flags."
+ ewarn "If you upgrade your pools to make use of feature flags, you will lose"
+ ewarn "the ability to import them using older versions of ZFSOnLinux."
+ ewarn "Any new pools will be created with feature flag support and will"
+ ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
+ ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r5.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r5.ebuild
new file mode 100644
index 00000000..dac300ae
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.6.2-r5.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2
+ MY_PV=9999
+ EGIT_REPO_URI="git://github.com/zfsonlinux/zfs.git git://github.com/zfsonlinux/spl.git"
+else
+ inherit eutils versionator
+ MY_PV=$(replace_version_separator 3 '-')
+ SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz
+ https://github.com/zfsonlinux/spl/archive/spl-${MY_PV}.tar.gz
+ http://dev.gentoo.org/~ryao/dist/spl-${MY_PV}-p4.tar.xz
+ http://dev.gentoo.org/~ryao/dist/${PN}-${MY_PV}-p4.tar.xz"
+ S="${WORKDIR}"
+ ZFS_S="${WORKDIR}/zfs-zfs-${MY_PV}"
+ SPL_S="${WORKDIR}/spl-spl-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Solaris Porting Layer and Linux ZFS kernel modules"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug debug-log +rootfs"
+RESTRICT="test"
+
+DEPEND="dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+ !sys-kernel/spl
+"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+ !GRKERNSEC_HIDESYM
+ BLK_DEV_LOOP
+ EFI_PARTITION
+ IOSCHED_NOOP
+ KALLSYMS
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
+ DEVTMPFS"
+
+ kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 14 || die "Linux 3.14 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${ZFS_S}/module/Makefile.in"
+
+ # Workaround for hard coded path
+ sed -i "s|/sbin/lsmod|/bin/lsmod|" "${SPL_S}"/scripts/check.sh || die
+
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ pushd "${SPL_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/spl-${MY_PV}-patches"
+ popd
+
+ pushd "${ZFS_S}"
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/zfs-kmod-${MY_PV}-patches"
+ popd
+ fi
+
+ # splat is unnecessary unless we are debugging
+ use debug || sed -e 's/^subdir-m += splat$//' -i "${SPL_S}/module/Makefile.in"
+
+ local d
+ for d in "${ZFS_S}" "${SPL_S}"; do
+ pushd "${d}"
+ S="${d}" BUILD_DIR="${d}" autotools-utils_src_prepare
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+ done
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+
+ einfo "Configuring SPL..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=all
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ $(use_enable debug-log)
+ )
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Configuring ZFS..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${SPL_S}"
+ $(use_enable debug)
+ )
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_compile() {
+ einfo "Compiling SPL..."
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Compiling ZFS..."
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_install() {
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ dodoc "${ZFS_S}"/AUTHORS "${ZFS_S}"/COPYRIGHT "${ZFS_S}"/DISCLAIMER "${ZFS_S}"/README.markdown
+ popd
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for features flags."
+ ewarn "If you upgrade your pools to make use of feature flags, you will lose"
+ ewarn "the ability to import them using older versions of ZFSOnLinux."
+ ewarn "Any new pools will be created with feature flag support and will"
+ ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
+ ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.3.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.3.ebuild
new file mode 100644
index 00000000..01e9abbb
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.6.3.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="5"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2
+ MY_PV=9999
+ EGIT_REPO_URI="git://github.com/zfsonlinux/zfs.git git://github.com/zfsonlinux/spl.git"
+else
+ inherit eutils versionator
+ MY_PV=$(replace_version_separator 3 '-')
+ SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${MY_PV}.tar.gz
+ https://github.com/zfsonlinux/spl/archive/spl-${MY_PV}.tar.gz"
+ S="${WORKDIR}"
+ ZFS_S="${WORKDIR}/zfs-zfs-${MY_PV}"
+ SPL_S="${WORKDIR}/spl-spl-${MY_PV}"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Solaris Porting Layer and Linux ZFS kernel modules"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug debug-log +rootfs"
+RESTRICT="test"
+
+DEPEND="dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+ !sys-kernel/spl
+"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+ !GRKERNSEC_HIDESYM
+ BLK_DEV_LOOP
+ EFI_PARTITION
+ IOSCHED_NOOP
+ KALLSYMS
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
+ DEVTMPFS"
+
+ kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 3 15 || die "Linux 3.15 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${ZFS_S}/module/Makefile.in"
+
+ # Workaround for hard coded path
+ sed -i "s|/sbin/lsmod|/bin/lsmod|" "${SPL_S}"/scripts/check.sh || die
+
+ # splat is unnecessary unless we are debugging
+ use debug || sed -e 's/^subdir-m += splat$//' -i "${SPL_S}/module/Makefile.in"
+
+ local d
+ for d in "${ZFS_S}" "${SPL_S}"; do
+ pushd "${d}"
+ S="${d}" BUILD_DIR="${d}" autotools-utils_src_prepare
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+ done
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+
+ einfo "Configuring SPL..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=all
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ $(use_enable debug-log)
+ )
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Configuring ZFS..."
+ local myeconfargs=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${SPL_S}"
+ $(use_enable debug)
+ )
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_configure
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_compile() {
+ einfo "Compiling SPL..."
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ einfo "Compiling ZFS..."
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_compile
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+}
+
+src_install() {
+ pushd "${SPL_S}"
+ BUILD_DIR="${SPL_S}" ECONF_SOURCE="${SPL_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ popd
+
+ pushd "${ZFS_S}"
+ BUILD_DIR="${ZFS_S}" ECONF_SOURCE="${ZFS_S}" autotools-utils_src_install
+ unset AUTOTOOLS_BUILD_DIR
+ dodoc "${ZFS_S}"/AUTHORS "${ZFS_S}"/COPYRIGHT "${ZFS_S}"/DISCLAIMER "${ZFS_S}"/README.markdown
+ popd
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for features flags."
+ ewarn "If you upgrade your pools to make use of feature flags, you will lose"
+ ewarn "the ability to import them using older versions of ZFSOnLinux."
+ ewarn "Any new pools will be created with feature flag support and will"
+ ewarn "not be compatible with older versions of ZFSOnLinux. To create a new"
+ ewarn "pool that is backward compatible, use zpool create -o version=28 ..."
+}