summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
commitab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch)
treee8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /sys-fs/zfs-kmod
parent6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff)
gentoo resync : 18.12.2020
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r--sys-fs/zfs-kmod/Manifest2
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild185
2 files changed, 187 insertions, 0 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 0c6dbab0dc96..46f5a1ac2c8c 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,6 +1,8 @@
DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab SHA512 3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773
+DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
DIST zfs-2.0.0.tar.gz 12989903 BLAKE2B 2961b97aa6736af9b4a2bc968d1488f49ec0c0fd7bb22b6bc015047239279efd2d48f8d7c593f9b467ac9d40f99d67363ab551bdfaf1dd71335c37c48c759875 SHA512 2706ae1aa54b882b272502e7a46e57ff41f9db9b123e8cd5dafbdd7f61975d05538167016f943804145d22aa018a1f11c884f692dc3992b28c24eac08112650f
EBUILD zfs-kmod-0.8.5.ebuild 4537 BLAKE2B 4cc63f9a5645b5ea988f9a4ccc3aacb1d0e0091047192210a39273ba35cbf7bdde85c495194e9777c84478de2041ed4b44692bacfc82830c6105264d07c8076a SHA512 9bf1464089fa6b0b1dadf4799174ad87331c9f322b59dd234a01542714eabec8fefdc677cbfe7a7f14af0c0067e58599c7342ef0cfea1517aa913781cb62a322
+EBUILD zfs-kmod-0.8.6.ebuild 4761 BLAKE2B 7eb6f17543425e7216461bb5813a0933bb672dd5479af661cca233968e8543aa72c5b80c8282e3c0a53374abe1900b5f5530e94823cf6fb8a70c4d91bfc863e8 SHA512 4c591a4b524f140a15eddfb75371dfb03040e1d95c4c25f1d1e6f48115b605ea153348252d2a10849f2c4372c694a6c1252f624e5ab8d8346ecc529f482c2bcb
EBUILD zfs-kmod-2.0.0.ebuild 4316 BLAKE2B 1e999fd68487f8fb2f4fa66210a530820858e89984985d069d9b4ec0668fc7d385a316ce724334d92893c30cf115a6c91c674f8f0ea06f4b1b10bb285afaf859 SHA512 18bb55ac74eb466d04832fcfab34b2f7e4d118d341314474f7d25b3fba6769161732d3bb50ac91845c8f6d71350ddf023911ddad2470c5331e1e7c04ef0a6c89
EBUILD zfs-kmod-9999.ebuild 4317 BLAKE2B f805e2c20a65d928b89496aaff71f548c49594b5f4d7decf776339a173b16f39ea5a7e0bfca78f5b1fc01c08ea3a06fa11317458dc2cc4022bdf459d273d68ed SHA512 4ce6398c6ec3cb2015751b0deb6e8694afa22a6b19b0ca83661eed0e195f7ac06f5fb73eaa52a4d86ad2c039dd300de4d49c8901a51e1d80dd37b3e1b0185319
MISC metadata.xml 551 BLAKE2B c8dc35c8f884d3f5d8720ad838c34ae5be7dc3b3cc63ab7713330a5611bca2829942eeb640b7e00ef285af9b52dd2d134cd793a20baeecff2af56f6b60116e21 SHA512 1cfd4a6a6ec4a120c8e02d3dde831b1f73294a06b798388ff8d4e761ef986e625a56fa980f8d412fab082630f58932116cf795bc5e5728c6485dd9ad54e22a7a
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild
new file mode 100644
index 000000000000..cc5f18c90673
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild
@@ -0,0 +1,185 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic linux-mod toolchain-funcs
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+else
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64"
+ S="${WORKDIR}/zfs-${PV}"
+ ZFS_KERNEL_COMPAT="5.9"
+fi
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug +rootfs"
+
+DEPEND=""
+
+RDEPEND="${DEPEND}
+ !sys-kernel/spl
+"
+
+BDEPEND="
+ dev-lang/perl
+ virtual/awk
+"
+
+RESTRICT="debug? ( strip ) test"
+
+DOCS=( AUTHORS COPYRIGHT META README.md )
+
+pkg_setup() {
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ EFI_PARTITION
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !TRIM_UNUSED_KSYMS
+ 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
+ "
+
+ if use arm64; then
+ kernel_is -ge 5 && CONFIG_CHECK="${CONFIG_CHECK} !PREEMPT"
+ fi
+
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
+
+ if [[ ${PV} != "9999" ]]; then
+ local kv_major_max kv_minor_max zcompat
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ kv_major_max="${zcompat%%.*}"
+ zcompat="${zcompat#*.}"
+ kv_minor_max="${zcompat%%.*}"
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
+
+ # 0.8.x requires at least 2.6.32
+ kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
+ else
+ # git master requires at least 3.10
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
+ fi
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == "9999" ]]; then
+ eautoreconf
+ else
+ # Set module revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+
+ # undo https://github.com/openzfs/zfs/commit/acfc4944d0d6db114db9f2bb5401251c5bd767b6
+ # we use release tarballs with no gitignore files already
+ sed -i 's:rm "$KERNEL_DIR/include/zfs/.gitignore"::' copy-builtin || die
+}
+
+src_configure() {
+ set_arch_to_kernel
+
+ use custom-cflags || strip-flags
+
+ filter-ldflags -Wl,*
+
+ local myconf=(
+ CROSS_COMPILE="${CHOST}-"
+ HOSTCC="$(tc-getBUILD_CC)"
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+
+ CONFIG_SHELL="${EPREFIX}/bin/bash" econf "${myconf[@]}"
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ myemakeargs=(
+ CROSS_COMPILE="${CHOST}-"
+ HOSTCC="$(tc-getBUILD_CC)"
+ V=1
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ set_arch_to_kernel
+
+ myemakeargs+=(
+ DEPMOD="/bin/true"
+ DESTDIR="${D}"
+ INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ einstalldocs
+}
+
+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 OpenZFS 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."
+}