sys-fs/zfs and friends: bump to 0.6.5
authorRichard Yao <ryao@gentoo.org>
Fri, 11 Sep 2015 21:21:49 +0000 (17:21 -0400)
committerRichard Yao <ryao@gentoo.org>
Fri, 11 Sep 2015 21:24:59 +0000 (17:24 -0400)
Upstream release notes:

https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.6.5

Package-Manager: portage-2.2.20.1
Signed-off-by: Richard Yao <ryao@gentoo.org>
sys-fs/zfs-kmod/Manifest
sys-fs/zfs-kmod/zfs-kmod-0.6.5.ebuild [new file with mode: 0644]
sys-fs/zfs/Manifest
sys-fs/zfs/zfs-0.6.5.ebuild [new file with mode: 0644]
sys-kernel/spl/Manifest
sys-kernel/spl/spl-0.6.5.ebuild [new file with mode: 0644]

index 6698c0d00a298f283ffe1c4934cece8faf9edc6e..6112879d8828dcc9c0c2c879fce5eea48ac7ed79 100644 (file)
@@ -6,6 +6,7 @@ DIST zfs-0.6.3-patches-r1.tar.xz 87852 SHA256 71b5286f77cb6a6c2b97cee406dfd4788f
 DIST zfs-0.6.3.tar.gz 1665270 SHA256 00caeae63cc724d3dd741aeb36fd2dc03d2158794bd6a5e925cdc8d7e5d3da8c SHA512 8c7741f5f227eb031d79fe87bf7d60e790a098fa6caede462d556c97d798832f97f5a377cbb74fc99b8d198e5f3cc1a3491f69fcdaa0408933dbadd132013416 WHIRLPOOL db9791da12c441c89667b194154b209f5aa69ea46d5327cfcde0b3a910cf1f0e5ca448909824e45b31252a1907280b711fb6ba04eb313d09de0ffbf5e6e304fe
 DIST zfs-0.6.4.2.tar.gz 1738601 SHA256 26af2924cbb891b79203a31827cba4cdc310162d5f7b9e2d643eb6576aa19015 SHA512 87a28997b8f9d36e189410171db583402418a55782b7b7f333993e98c5e17ccc4b6cd5825f38b904294c87e3dfdfb7748bd71cc371589c1358f16c942e0c18db WHIRLPOOL 1700de7da56311a7b608c99a821e2fa97a6145ccc88f3d8eff12f778421ba7b7b9cc5f5fbe5f1acd2ea2fd1db778c200a2ea961e3859a8fc89d80474894293f1
 DIST zfs-0.6.4.tar.gz 1735736 SHA256 7f37aaaa1fc15201dde58bb84e0f191ccac462f19ffec0c889b6f6ed3f73a804 SHA512 cf47cbf5fa8dff75f5e9d81b323f5745d7b210266ba9e6ccab16bbf0e2b055aa1168bad94a77a4bc56c6fbe0391593f210bd4c74f7a8d0d99385ac4dd61e5622 WHIRLPOOL 1b0cc8a9727b57f2e63bd106cd94780002a068b31668b9dc103dbc0b48858a380d7c228f39f0526fc84b9d10aca1bd376ace0346a2ef4306a9d164c2d56606f1
+DIST zfs-0.6.5.tar.gz 1816180 SHA256 542121940122c922c9d21a2bb39bca4e4a9db2f6bbfd2e576630840e256d4c82 SHA512 58480ee9b0780f1f21d12504abc226be3e6df1939214f6a8f245315d1fa0b9da56b3a744df26426ee78f13684a4ca288df6dddc50f8f91d9d0b4c542980a9c53 WHIRLPOOL fdb5580ec8d4abe57069ce453c1d91225019758ecf5d31856a7897ac7e4b51c6a8ae3258e822f684fbd70a0a7d7410c65c37a569f37d132767522118c587cc24
 DIST zfs-kmod-0.6.2-p2.tar.xz 28636 SHA256 12882463a38a5a57cf2bb3c14c5783f9511f6dc7b163a47575f2f3dcc24f26f6 SHA512 5792660ae8f5013d12e70d608e9cffa92a8c4089a88a5e78728ee88204b3f970d452d5b0b3874e02be49ebbc139e07139be7b5a86ca40bc8b23cb11a7198a9a8 WHIRLPOOL 0e4c57b363cdd3d736efbd1355567b18e22439bd3b20ef40b27f6b97ad4570c7cc99a11b196ac25359d1966c1a70e178f4fd1687b60450f148ccda47b07282a9
 DIST zfs-kmod-0.6.2-p3.tar.xz 45988 SHA256 4af06d1472f5d24e01d147b6fec5c78fbbd9739d1259bd3fbf57af66c99b9bcb SHA512 eddf67c0aa49d42f663f98dc721bac75e8d0521df5ae174cd6aeee0a935a71b49e06961404eb6c71a09cd239358868a2fe49de4f1d26776948f8fe7fc943165c WHIRLPOOL 5634a92f6f322f67edef95ad121b0b1699e520ca8beb05b3385dc7e20198dd45d337731bf7df69d1b1c552ed0b78d54b15bc9c9e76b694ae4c8d360892b9d764
 DIST zfs-kmod-0.6.2-p4.tar.xz 63984 SHA256 9167edc4be86e3fcda6b3c198e51f92ab0c95ac5baca11666c28029a628cdac9 SHA512 13e4ec415c35d2f268d89565745f5898c0943423577a2ba6714b3a069c5a80f244cd06dff91464f38dd4ed60673d1145ead080bb03a56d4be33e328f948ffa64 WHIRLPOOL 8c399ec67119ed4fbebb5599d00f888918678bc4e4ea369b4bdc5c75bfc90fc76396087624c8011de370a54ff103bccaa8922d05ac7ccebb2b3481bbbcf44b19
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.5.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.5.ebuild
new file mode 100644 (file)
index 0000000..dd565a4
--- /dev/null
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+       inherit git-2
+       EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
+else
+       inherit eutils versionator
+       SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz"
+       S="${WORKDIR}/zfs-zfs-${PV}"
+       KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
+fi
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug +rootfs"
+RESTRICT="debug? ( strip ) test"
+
+DEPEND="
+       =sys-kernel/spl-${PV}*
+       dev-lang/perl
+       virtual/awk
+"
+
+RDEPEND="${DEPEND}
+       !sys-fs/zfs-fuse
+"
+
+pkg_setup() {
+       linux-info_pkg_setup
+       CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+               BLK_DEV_LOOP
+               EFI_PARTITION
+               IOSCHED_NOOP
+               MODULES
+               !PAX_KERNEXEC_PLUGIN_METHOD_OR
+               !PAX_USERCOPY_SLABS
+               ZLIB_DEFLATE
+               ZLIB_INFLATE
+       "
+
+       use debug && CONFIG_CHECK="${CONFIG_CHECK}
+               FRAME_POINTER
+               DEBUG_INFO
+               !DEBUG_INFO_REDUCED
+       "
+
+       use rootfs && \
+               CONFIG_CHECK="${CONFIG_CHECK}
+                       BLK_DEV_INITRD
+                       DEVTMPFS
+       "
+
+       kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
+
+       [ ${PV} != "9999" ] && \
+               { kernel_is le 4 2 || die "Linux 4.2 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 "${S}/module/Makefile.in"
+
+       # Set module revision number
+       [ ${PV} != "9999" ] && \
+               { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
+
+       autotools-utils_src_prepare
+}
+
+src_configure() {
+       local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
+       use custom-cflags || strip-flags
+       filter-ldflags -Wl,*
+
+       set_arch_to_kernel
+       local myeconfargs=(${myeconfargs}
+               --bindir="${EPREFIX}/bin"
+               --sbindir="${EPREFIX}/sbin"
+               --with-config=kernel
+               --with-linux="${KV_DIR}"
+               --with-linux-obj="${KV_OUT_DIR}"
+               --with-spl="${EROOT}usr/src/${SPL_PATH}"
+               --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
+               $(use_enable debug)
+       )
+
+       autotools-utils_src_configure
+}
+
+src_install() {
+       autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
+       dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+
+       # Remove old modules
+       if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
+       then
+               ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
+               ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
+               ewarn "Automatically removing old modules to avoid problems."
+               rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
+               rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
+       fi
+
+       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 new feature flags"
+       ewarn "that are incompatible with previous versions. GRUB2 support for"
+       ewarn "/boot with the new feature flags is not yet available."
+       ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+       ewarn "Any new pools will be created with the new feature flags by default"
+       ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
+       ewarn "create a newpool that is backward compatible wih GRUB2, use "
+       ewarn
+       ewarn "zpool create -d -o feature@async_destroy=enabled "
+       ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
+       ewarn " -o feature@spacemap_histogram=enabled"
+       ewarn " -o feature@enabled_txg=enabled "
+       ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
+       ewarn " ..."
+       ewarn
+       ewarn "GRUB2 support will be updated as soon as either the GRUB2"
+       ewarn "developers do a tag or the Gentoo developers find time to backport"
+       ewarn "support from GRUB2 HEAD."
+}
index 415ec6f0f4ad1c0872c17e490c71abf773b0e885..fbe195ec7a519c9a04ae784dc568fa74719d224e 100644 (file)
@@ -6,6 +6,7 @@ DIST zfs-0.6.3-patches-r1.tar.xz 87852 SHA256 71b5286f77cb6a6c2b97cee406dfd4788f
 DIST zfs-0.6.3.tar.gz 1665270 SHA256 00caeae63cc724d3dd741aeb36fd2dc03d2158794bd6a5e925cdc8d7e5d3da8c SHA512 8c7741f5f227eb031d79fe87bf7d60e790a098fa6caede462d556c97d798832f97f5a377cbb74fc99b8d198e5f3cc1a3491f69fcdaa0408933dbadd132013416 WHIRLPOOL db9791da12c441c89667b194154b209f5aa69ea46d5327cfcde0b3a910cf1f0e5ca448909824e45b31252a1907280b711fb6ba04eb313d09de0ffbf5e6e304fe
 DIST zfs-0.6.4.2.tar.gz 1738601 SHA256 26af2924cbb891b79203a31827cba4cdc310162d5f7b9e2d643eb6576aa19015 SHA512 87a28997b8f9d36e189410171db583402418a55782b7b7f333993e98c5e17ccc4b6cd5825f38b904294c87e3dfdfb7748bd71cc371589c1358f16c942e0c18db WHIRLPOOL 1700de7da56311a7b608c99a821e2fa97a6145ccc88f3d8eff12f778421ba7b7b9cc5f5fbe5f1acd2ea2fd1db778c200a2ea961e3859a8fc89d80474894293f1
 DIST zfs-0.6.4.tar.gz 1735736 SHA256 7f37aaaa1fc15201dde58bb84e0f191ccac462f19ffec0c889b6f6ed3f73a804 SHA512 cf47cbf5fa8dff75f5e9d81b323f5745d7b210266ba9e6ccab16bbf0e2b055aa1168bad94a77a4bc56c6fbe0391593f210bd4c74f7a8d0d99385ac4dd61e5622 WHIRLPOOL 1b0cc8a9727b57f2e63bd106cd94780002a068b31668b9dc103dbc0b48858a380d7c228f39f0526fc84b9d10aca1bd376ace0346a2ef4306a9d164c2d56606f1
+DIST zfs-0.6.5.tar.gz 1816180 SHA256 542121940122c922c9d21a2bb39bca4e4a9db2f6bbfd2e576630840e256d4c82 SHA512 58480ee9b0780f1f21d12504abc226be3e6df1939214f6a8f245315d1fa0b9da56b3a744df26426ee78f13684a4ca288df6dddc50f8f91d9d0b4c542980a9c53 WHIRLPOOL fdb5580ec8d4abe57069ce453c1d91225019758ecf5d31856a7897ac7e4b51c6a8ae3258e822f684fbd70a0a7d7410c65c37a569f37d132767522118c587cc24
 DIST zfs-kmod-0.6.2-p0.tar.xz 8244 SHA256 84456e1d52c6d44cc377d131ee34c042c289d00f74e7a9b521d8ef82bdfcf369 SHA512 ff29830e44aeb537d82d2c34070a245271b51013131f9191d03ab35eff2b86559c4bdadd3cf21f7aa7bec07c3556ef712db9cca2beedd1288036c29d750567e2 WHIRLPOOL 62b9a920a832f5715a24c2a0cdc914a5e77700b0e8723df868b1bf8b8a7ecec6f7df14cb294dfb4f4f219cc8253615c594b609a117b57b576e1796b8042bfdc5
 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
diff --git a/sys-fs/zfs/zfs-0.6.5.ebuild b/sys-fs/zfs/zfs-0.6.5.ebuild
new file mode 100644 (file)
index 0000000..7695557
--- /dev/null
@@ -0,0 +1,171 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit python-r1
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+if [ ${PV} == "9999" ] ; then
+       inherit git-2 linux-mod
+       EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
+else
+       inherit eutils versionator
+       SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
+       S="${WORKDIR}/${PN}-${P}"
+       KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
+fi
+
+inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils udev systemd
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="BSD-2 CDDL bash-completion? ( MIT )"
+SLOT="0"
+IUSE="bash-completion custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
+RESTRICT="test"
+
+COMMON_DEPEND="
+       sys-apps/util-linux[static-libs?]
+       sys-libs/zlib[static-libs(+)?]
+       virtual/awk
+"
+DEPEND="${COMMON_DEPEND}
+       virtual/pkgconfig
+"
+
+RDEPEND="${COMMON_DEPEND}
+       !=sys-apps/grep-2.13*
+       !kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
+       !sys-fs/zfs-fuse
+       !prefix? ( virtual/udev )
+       test-suite? (
+               sys-apps/util-linux
+               sys-devel/bc
+               sys-block/parted
+               sys-fs/lsscsi
+               sys-fs/mdadm
+               sys-process/procps
+               virtual/modutils
+               )
+       rootfs? (
+               app-arch/cpio
+               app-misc/pax-utils
+               !<sys-boot/grub-2.00-r2:2
+               )
+       !>sys-fs/udev-init-scripts-27
+"
+
+pkg_setup() {
+       :
+}
+
+src_prepare() {
+       # Update paths
+       sed -e "s|/sbin/lsmod|/bin/lsmod|" \
+               -e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
+               -e "s|/sbin/parted|/usr/sbin/parted|" \
+               -i scripts/common.sh.in
+
+       autotools-utils_src_prepare
+}
+
+src_configure() {
+       use custom-cflags || strip-flags
+       local myeconfargs=(
+               --bindir="${EPREFIX}/bin"
+               --sbindir="${EPREFIX}/sbin"
+               --with-config=user
+               --with-linux="${KV_DIR}"
+               --with-linux-obj="${KV_OUT_DIR}"
+               --with-udevdir="$(get_udevdir)"
+               --with-blkid
+               $(use_enable debug)
+       )
+       autotools-utils_src_configure
+
+       # prepare systemd unit and helper script
+       cat "${FILESDIR}/zfs.service.in" | \
+               sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
+                       -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
+               > "${T}/zfs.service" || die
+       cat "${FILESDIR}/zfs-init.sh.in" | \
+               sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
+                       -e "s:@sysconfdir@:${EPREFIX}/etc:g" \
+               > "${T}/zfs-init.sh" || die
+}
+
+src_install() {
+       autotools-utils_src_install
+       gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
+       rm -rf "${ED}usr/lib/dracut"
+       use test-suite || rm -rf "${ED}usr/share/zfs"
+
+       use bash-completion && newbashcomp "${FILESDIR}/bash-completion-r1" zfs
+
+       exeinto /usr/libexec
+       doexe "${T}/zfs-init.sh"
+       systemd_dounit "${T}/zfs.service"
+       doinitd "${FILESDIR}/zed"
+}
+
+pkg_postinst() {
+
+       if ! use kernel-builtin && [ ${PV} = "9999" ]
+       then
+               einfo "Adding ${P} to the module database to ensure that the"
+               einfo "kernel modules and userland utilities stay in sync."
+               update_moduledb
+       fi
+
+       if [ -e "${EROOT}/etc/runlevels/boot/zfs" ]
+       then
+               einfo 'The zfs boot script has been split into the zfs-import,'
+               einfo 'zfs-mount and zfs-share scripts, with zed being added in the'
+               einfo 'form of a fourth script.'
+               einfo
+               einfo 'You had the zfs script in your boot runlevel. For your'
+               einfo 'convenience, it has been automatically removed and the three'
+               einfo 'scripts that replace it have been configured to start.'
+               einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
+               einfo 'runlevel while the zfs-share script is in the default runlevel.'
+
+               rm "${EROOT}/etc/runlevels/boot/zfs"
+               ln -snf "${EROOT}/etc/init.d/zfs-import" \
+                       "${EROOT}/etc/runlevels/boot/zfs-import"
+               ln -snf "${EROOT}/etc/init.d/zfs-mount" \
+                       "${EROOT}/etc/runlevels/boot/zfs-mount"
+               ln -snf "${EROOT}/etc/init.d/zfs-share" \
+                       "${EROOT}/etc/runlevels/default/zfs-share"
+       else
+               [ -e "${EROOT}/etc/runlevels/boot/zfs-import" ] || \
+                       einfo "You should add zfs-import to the boot runlevel."
+               [ -e "${EROOT}/etc/runlevels/boot/zfs-mount" ] || \
+                       einfo "You should add zfs-mount to the boot runlevel."
+               [ -e "${EROOT}/etc/runlevels/default/zfs-share" ] || \
+                       einfo "You should add zfs-share to the default runlevel."
+       fi
+
+       [ -e "${EROOT}/etc/runlevels/default/zfs-zed" ] || \
+               einfo "You should add zfs-zed to the default runlevel."
+
+       if [ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ]
+       then
+               einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
+               rm "${EROOT}/etc/runlevels/shutdown/zfs-shutdown"
+       fi
+
+}
+
+pkg_postrm() {
+       if ! use kernel-builtin && [ ${PV} = "9999" ]
+       then
+               remove_moduledb
+       fi
+}
index 88e4f755f8b17c20d5d91fec7e3800c14ab1b4eb..5c2d17c02b1dafd2e10e7a0b581e390d2e71cd51 100644 (file)
@@ -11,3 +11,4 @@ DIST spl-0.6.3-patches-r1.tar.xz 15996 SHA256 7f1cf74c9be5c14eeff529ce0a45d7dcca
 DIST spl-0.6.3.tar.gz 221430 SHA256 5d60dfbe86a50e65dbce17f538d8d0874a0cc293374f59eed46cd2dd1809a944 SHA512 c4b82f1e279c7581d0082c044157e8a933edf53233c8c7c8202117454cfda0473ab85fbb56ac0b6da09a4d6798e33020a9c55bf23e25d630efa3265545c3defc WHIRLPOOL eaf001a96a80264e16ce416da38b988eabbfd2fce17690151a496a3141c32e92e5d00791e2d9c009ae0cf6910f80434c10f02a700752fc664f6bf6723bb03dba
 DIST spl-0.6.4.2.tar.gz 190421 SHA256 05c428f48acc55287c0662a90cfc087985b8ef3694dc057cfb16e1fa2ebbda43 SHA512 6a295651622dd1819bc9ef8f693c6a3cf73dbb084a4789ad508dda644bfcaa1984c5487ea0e16c8d6d468da59a3fae2e9309b2b13cd869a4af4ea675c394bbe3 WHIRLPOOL e270b66ac9e22c806876e727ef040c3cfb2c304889de982f1c54a1625f7bf0214d3b6f8baac42cb3710aa23897f1b1bc67ef633fe35cb1b2c4b57196390a0fad
 DIST spl-0.6.4.tar.gz 190348 SHA256 290c20cec89161a0e3e3a885494dfb7b0b7defbe38006cb2ecfdf2b241136415 SHA512 4dda082170884811a2667ecdc130e9e3743bf362109bebb53bd69a18115b8e2b41305d212a03f4233258f866fe7c56ed4a3f08fc1814fa1f8e947b5305a056ab WHIRLPOOL 475593c4b0f75fb30c963196bf6e45219b4a57bd8c9d4350f02ff358c97a69f066b5d4ce8cb346b67d773d7ff985e1812925a5490b8911b9cd657e654772bb9f
+DIST spl-0.6.5.tar.gz 193043 SHA256 5e687254eca8f35fb52a387ea685c7bb0b1c17c29caff3a710761ba418011e3b SHA512 3d7362a4867a85b72dd93b9cb08fccf6fefed3322ace6090e7ab3ae847053b0e7da4f73a6634cde727638c6d945726306b2f4a964da3b1980ba34bdef531541a WHIRLPOOL 0deb87d6ba22532513a87a8f8aab78d4c61985ec028e251e003d56a270dc8cb6a0a96a278afe95368a27fb815474225285b90b5cdad1b1743390a8980b4ac373
diff --git a/sys-kernel/spl/spl-0.6.5.ebuild b/sys-kernel/spl/spl-0.6.5.ebuild
new file mode 100644 (file)
index 0000000..3555908
--- /dev/null
@@ -0,0 +1,114 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+AUTOTOOLS_AUTORECONF="1"
+
+inherit flag-o-matic linux-info linux-mod autotools-utils
+
+if [[ ${PV} == "9999" ]] ; then
+       inherit git-2
+       EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
+else
+       inherit eutils versionator
+       SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${P}.tar.gz"
+       S="${WORKDIR}/${PN}-${P}"
+       KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
+fi
+
+DESCRIPTION="The Solaris Porting Layer is a Linux kernel module which provides many of the Solaris kernel APIs"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="custom-cflags debug debug-log"
+RESTRICT="debug? ( strip ) test"
+
+COMMON_DEPEND="dev-lang/perl
+       virtual/awk"
+
+DEPEND="${COMMON_DEPEND}"
+
+RDEPEND="${COMMON_DEPEND}
+       !sys-devel/spl"
+
+AT_M4DIR="config"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+pkg_setup() {
+       linux-info_pkg_setup
+       CONFIG_CHECK="
+               !DEBUG_LOCK_ALLOC
+               !GRKERNSEC_HIDESYM
+               MODULES
+               KALLSYMS
+               !PAX_KERNEXEC_PLUGIN_METHOD_OR
+               !PAX_SIZE_OVERFLOW
+               ZLIB_DEFLATE
+               ZLIB_INFLATE
+       "
+
+       use debug && CONFIG_CHECK="${CONFIG_CHECK}
+               FRAME_POINTER
+               DEBUG_INFO
+               !DEBUG_INFO_REDUCED
+       "
+
+       kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
+
+       [ ${PV} != "9999" ] && \
+               { kernel_is le 4 2 || die "Linux 4.2 is the latest supported version."; }
+
+       check_extra_config
+}
+
+src_prepare() {
+       # Workaround for hard coded path
+       sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
+               die "Cannot patch check.sh"
+
+       # splat is unnecessary unless we are debugging
+       use debug || sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in"
+
+       # Set module revision number
+       [ ${PV} != "9999" ] && \
+               { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
+
+       autotools-utils_src_prepare
+}
+
+src_configure() {
+       use custom-cflags || strip-flags
+       filter-ldflags -Wl,*
+
+       set_arch_to_kernel
+       local myeconfargs=(
+               --bindir="${EPREFIX}/bin"
+               --sbindir="${EPREFIX}/sbin"
+               --with-config=all
+               --with-linux="${KV_DIR}"
+               --with-linux-obj="${KV_OUT_DIR}"
+               $(use_enable debug)
+       )
+       autotools-utils_src_configure
+}
+
+src_install() {
+       autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
+       dodoc AUTHORS DISCLAIMER README.markdown
+}
+
+pkg_postinst() {
+       linux-mod_pkg_postinst
+
+       # Remove old modules
+       if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
+       then
+               ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
+               ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
+               ewarn "Automatically removing old modules to avoid problems."
+               rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
+               rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
+       fi
+}