bumped ZFS 0.7.9 to allow 4.17 kernels as 4.16 is EOL'd

This commit is contained in:
layman 2018-07-21 15:16:27 +02:00
parent 3dddce24fd
commit 5bcee36b16
4 changed files with 260 additions and 0 deletions

2
sys-fs/zfs-kmod/Manifest Normal file
View File

@ -0,0 +1,2 @@
DIST zfs-0.7.9.tar.gz 6548649 BLAKE2B aa2f1b9d0ba0eda1af7d420c43d65d5d4183169cfe97c693356e1e0b15967ea512c25454f2d77285600f2209d778e4299f420754932e403a390b87b4f488dc94 SHA512 af5d9c320885ee84019fb04250c4b12c7ac3bb3d1037b1961ec4584701a737558374dc22521743e197356efb1d1f0ced9beff675ae9cfcccf3cd8407467f18fa
EBUILD zfs-kmod-0.7.9.ebuild 4053 BLAKE2B 3fd50c6fd61ea5074d30dc614d96e3536842b1d91e3d9857482e0f4e0c5e38d4b838c04008a8b2f160c2e89c8ea8938e02bb6fc8f8f67c1e98a89d19085eec89 SHA512 a8384a821aee26b7daae6548bfd60d64ce5d7bff00a963818c35cfefbf3215c559de402e6892964486252453f9cb60ace6131e798c556288b8c476b1f5808841

View File

@ -0,0 +1,145 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
if [ ${PV} == "9999" ]; then
AUTOTOOLS_AUTORECONF="1"
EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
inherit git-r3
else
SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
S="${WORKDIR}/zfs-${PV}"
KEYWORDS="amd64"
fi
inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
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
"
AT_M4DIR="config"
AUTOTOOLS_IN_SOURCE_BUILD="1"
DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
pkg_setup() {
linux-info_pkg_setup
CONFIG_CHECK="
!DEBUG_LOCK_ALLOC
EFI_PARTITION
IOSCHED_NOOP
MODULES
!PAX_KERNEXEC_PLUGIN_METHOD_OR
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 17 || die "Linux 4.17 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}"
}
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."
}

2
sys-kernel/spl/Manifest Normal file
View File

@ -0,0 +1,2 @@
DIST spl-0.7.9.tar.gz 551115 BLAKE2B 0ebb801ff60e5f8691c0b3386b5b1c326ea9d40decc20fb455ddb103d108923f28cd870e1c1dc465af5e24e8627973f2b60e7b9b88b3fdbd3ac45f3bd167def2 SHA512 89a42a65b3c09a654ffc3bcef84a0735eefe080c2d790400a3691cccf01e9f0a95cd40a4eed37542cfa7f4a94f20e06aae44886325473713407833d247751ec3
EBUILD spl-0.7.9.ebuild 2686 BLAKE2B 4a8f48a1c0c6527cfb3ff726c71449401ea105802729ad81d0912e57f0563b76d0690c5975b496c239eb0584f20ed845c6b33d39879d73a5e52ba85601f33720 SHA512 e2763f99ac5f51895c9032a8c0ff7a441c9922ff5a3cc6971acb3399017cff5b04a6d1541fbf5251df514cee9502dac6d228d7e169e2d2f6e7f0ab66c6b2b8c1

View File

@ -0,0 +1,111 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
if [[ ${PV} == "9999" ]] ; then
AUTOTOOLS_AUTORECONF="1"
EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
inherit git-r3
else
SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
KEYWORDS="amd64"
fi
inherit flag-o-matic linux-info linux-mod autotools-utils
DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags debug"
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"
DOCS=( AUTHORS DISCLAIMER )
pkg_setup() {
linux-info_pkg_setup
CONFIG_CHECK="
!DEBUG_LOCK_ALLOC
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 17 || die "Linux 4.17 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" || die ; }
# 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}"
}
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
}