summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/Manifest.gzbin21911 -> 21911 bytes
-rw-r--r--sys-fs/zfs-kmod/Manifest4
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.8.3.ebuild171
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild9
-rw-r--r--sys-fs/zfs/Manifest6
-rw-r--r--sys-fs/zfs/zfs-0.8.2-r2.ebuild3
-rw-r--r--sys-fs/zfs/zfs-0.8.3.ebuild219
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild3
8 files changed, 403 insertions, 12 deletions
diff --git a/sys-fs/Manifest.gz b/sys-fs/Manifest.gz
index b96ee0d211e5..7c7704a22324 100644
--- a/sys-fs/Manifest.gz
+++ b/sys-fs/Manifest.gz
Binary files differ
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 3f2315c84dda..9c635c1c8555 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,7 +1,9 @@
AUX 0.8.2-umask_O_TMPFILE.patch 1188 BLAKE2B 19cb2b42e5ca7e0f29ecb9b0f725375ce60c510961d4744b34e93c7fb323ceb3b5ede85c9bbab4d3b894b111f9ab16d1648677adf73691062c8c552b72e6ca46 SHA512 7290597e0c74c54db09c4c97800bf5fa8744bb4686de65c71ef52e77d6832b245650d580a12c60c5dd04ace5063c156379462f2f6be53976ba0a271c46548dfa
DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
DIST zfs-0.8.2.tar.gz 8738111 BLAKE2B 5c15f6664ca70f0deeb5b9e32f2bcff68f9821529e5203ff18612ce88473fee9af369354c442f3db7882d301cf17c805c9635b05bfd3460833ed8e5ff8004dd0 SHA512 1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496
+DIST zfs-0.8.3.tar.gz 8779385 BLAKE2B 8b51b9d5b61543566bc7839d8452fdf9358442155e95f93a011531338824bbd4fc8879500e276b02d5d49d504a046728ecc0c6154f69eb7b47180b9bb0e46958 SHA512 aded632e6b04180560d4f2ff283260016e883dadae4e7fda9070b7113dee948099cb7a7b183f1c8139654389a2610fb9cc6f997acdc846040e605125cf016010
EBUILD zfs-kmod-0.7.13.ebuild 4119 BLAKE2B f8d921251bc94644a7331762054935518bb9fb68425b404572876466bff118b9ae20cf297f34d9267c933d7ea28840c84fe8e4a867e9a9f191b627f29207798b SHA512 8e4eb43e5b4edd7dcb8b0ecb13a809340ee20247017e7cb141b8489dc4c9988b84b40e866028e8d3b73aea69981a923e4fc4b237389115fb8e72d8b6ed450340
EBUILD zfs-kmod-0.8.2-r2.ebuild 4483 BLAKE2B 6fed0585a7ef9c6d22b0787e7da013cba40c7121ab79eca2ac85b56005bfd34d80d1f635d4c052c7e4f63e19c247ed6d81b77a83bef7ecf5f2bb943c1b431fbe SHA512 946f096ea68965171b55806c1274dfa3935de4850966a8b6a5acd6ea385ca442daab89623697c7a687e41f8a7716622f0c3b234f93921dd7b25cbea22cc6f7d0
-EBUILD zfs-kmod-9999.ebuild 4406 BLAKE2B 95bfd099332c55d3b2da8a3c5f5a0e5f88ad9ca7e09472001421f1eb6c13a5ff812e1b4167e9b74c2ca2900d3442d0e31aaf3ec0afd81bb258cd48ed6b0af616 SHA512 c21d08e82751bc83a2c0662aa6caf23621775fbb10539e9fe31fd794279248ad5e2888b67c247efbd0bb453a14ca9bf1085e2896efe0b1af7ae98491f10ce5d8
+EBUILD zfs-kmod-0.8.3.ebuild 4248 BLAKE2B 9e4dd5fa97530b8c0b2b760526491e006f49213a11264a2cb88a4ee282668cbcec3bbfca070b19a8e5f23f2e94fe0f6e25db81a5774ae8ad4b93f074d5859407 SHA512 75bf45975857a0841c857461948a4243b2aaf491bd8e49b5b0a278a0dd2f795ffbcf2224a5c2f0aadb478b8b7548c11c381b66388f927582355feb18862ea647
+EBUILD zfs-kmod-9999.ebuild 4248 BLAKE2B 9e4dd5fa97530b8c0b2b760526491e006f49213a11264a2cb88a4ee282668cbcec3bbfca070b19a8e5f23f2e94fe0f6e25db81a5774ae8ad4b93f074d5859407 SHA512 75bf45975857a0841c857461948a4243b2aaf491bd8e49b5b0a278a0dd2f795ffbcf2224a5c2f0aadb478b8b7548c11c381b66388f927582355feb18862ea647
MISC metadata.xml 551 BLAKE2B c8dc35c8f884d3f5d8720ad838c34ae5be7dc3b3cc63ab7713330a5611bca2829942eeb640b7e00ef285af9b52dd2d134cd793a20baeecff2af56f6b60116e21 SHA512 1cfd4a6a6ec4a120c8e02d3dde831b1f73294a06b798388ff8d4e761ef986e625a56fa980f8d412fab082630f58932116cf795bc5e5728c6485dd9ad54e22a7a
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.3.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.3.ebuild
new file mode 100644
index 000000000000..87090d4d5e0f
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.3.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic linux-mod toolchain-funcs
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://zfsonlinux.org/"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
+else
+ SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64"
+ S="${WORKDIR}/zfs-${PV}"
+ ZFS_KERNEL_COMPAT="5.4"
+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"
+
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
+
+ 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"
+ 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
+}
+
+src_configure() {
+ set_arch_to_kernel
+
+ use custom-cflags || strip-flags
+
+ filter-ldflags -Wl,*
+
+ local myconf=(
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ myemakeargs=( 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 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."
+}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index e8dbe7749786..87090d4d5e0f 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit flag-o-matic linux-info linux-mod toolchain-funcs
+inherit flag-o-matic linux-mod toolchain-funcs
DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
HOMEPAGE="https://zfsonlinux.org/"
@@ -38,8 +38,6 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
pkg_setup() {
- linux-info_pkg_setup
-
CONFIG_CHECK="
!DEBUG_LOCK_ALLOC
EFI_PARTITION
@@ -80,7 +78,7 @@ pkg_setup() {
"Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
fi
- check_extra_config
+ linux-mod_pkg_setup
}
src_prepare() {
@@ -92,9 +90,6 @@ src_prepare() {
# Set module revision number
sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i module/Makefile.in
}
src_configure() {
diff --git a/sys-fs/zfs/Manifest b/sys-fs/zfs/Manifest
index 5b552e3f245c..9170d048f8ad 100644
--- a/sys-fs/zfs/Manifest
+++ b/sys-fs/zfs/Manifest
@@ -6,8 +6,10 @@ AUX zfs-init.sh.in 582 BLAKE2B 27e5c1aff398c42178b3d7c005e91a1f8f3afa303a22e49c9
AUX zfs.service.in 335 BLAKE2B a18ad1d70975df98cfb7b5196ad17b7197d5eb59cac2ccb3b9243f111c6c882c3480eb6396e347eac91670e3a67d7f122953d6fa82ec61a6467163b788b31858 SHA512 7a167b389723e5f55fea6956e5546e46c89ebf3e2d1c25f6b56c357e6d3ffc765226549d78cdeb79b4dc90c798ec6326a13996215b40eb49179376e32c3c3287
DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
DIST zfs-0.8.2.tar.gz 8738111 BLAKE2B 5c15f6664ca70f0deeb5b9e32f2bcff68f9821529e5203ff18612ce88473fee9af369354c442f3db7882d301cf17c805c9635b05bfd3460833ed8e5ff8004dd0 SHA512 1424b1a030b814f812b5da422100669db5b8c3ccae14c2fdd62a5e0df28e7255247fe5ca99c95a14f08c92cc1574c22dd132093e4a1dd81e38c95b10cc5e2496
+DIST zfs-0.8.3.tar.gz 8779385 BLAKE2B 8b51b9d5b61543566bc7839d8452fdf9358442155e95f93a011531338824bbd4fc8879500e276b02d5d49d504a046728ecc0c6154f69eb7b47180b9bb0e46958 SHA512 aded632e6b04180560d4f2ff283260016e883dadae4e7fda9070b7113dee948099cb7a7b183f1c8139654389a2610fb9cc6f997acdc846040e605125cf016010
EBUILD zfs-0.7.13-r1.ebuild 6282 BLAKE2B 9fae8590e1d6f723bea164f90b6b8a5ce1a96d8dc2d10b514f0d50a2c24c70ede7fd3dc1888efc4c3746e72d4970d5c2ed501072a21f08a46a188cd288a9743b SHA512 b50d3835a65153143ea4b9236e8084a495565397d570b64f4b622e4b501432a55b8b604dc7f276502e97e0b500302b74ae53fc8ba12c087f9e43ba84a4891ceb
EBUILD zfs-0.7.13-r2.ebuild 6346 BLAKE2B f317a17063a320a92c13b1546507dc37b75c48ae5c19871d8ed0113590dd84687bd5b331f168a5d68e8d0aef0c135519e5abd9a8c91c858ab6bae53c5236496b SHA512 4c24e183caf67d52b14047add79947d0331eb1590a0754486ca5a03c2ab9f7cade308973164924855e8293d7c0d905bae1d4295f7cb5efbafe9dea8a4d1b9125
-EBUILD zfs-0.8.2-r2.ebuild 5672 BLAKE2B 02538fc52c722905316084dc355fc2360abd784818e9ddb07a068567af038aa374004c83b95d4bea01ee75023469f24a87f1afffd0c21894c5c4234979e1ff37 SHA512 9fd338a8d9704ab43623b867a1a269cb2bcd2a54d651f8533d4d7fd6755013adc041f75b830ad147d48038eb0d594aad426b9e1ac65ff6f7376ad0582cff669d
-EBUILD zfs-9999.ebuild 5401 BLAKE2B 1036d675756e7f3a9f372823b57578ef8996d994ca23a9e7a50b101321320edfd4df7b1d30182fce755d02945d6c46c79a54a1eef0fe2f74fc6e60b3f8f3c43d SHA512 6e92a22c166ce4bf1a4f5e14f03aeb540bd201f526b8c59d9a5ae57a69a507f40e0727fea787887f147572db0b99295cc955e8a5275866353366cddbccddb9f8
+EBUILD zfs-0.8.2-r2.ebuild 5701 BLAKE2B b7c845e5342023bbdc210f306c64f6cef3383bfe6c9f445a77f05a2117dfe22e6a792d2d55b61108638926225791bc6c45335410d65adf67e00cc7b6faea430e SHA512 f5e09062ed0496bf51257f1b89f7e21e0f727d222a25ef22745727d6d7ca56d136222fd149cf8f6a6a8d87054427d30aaa451b7ae0360b29b99da095bb1e8135
+EBUILD zfs-0.8.3.ebuild 5567 BLAKE2B 8b0768a1d6a36f16598aee0039417e08818dfd115f93682c9e255ba3d49c5dd5fe93e54c953bf9978594c69b1b817c8739647a708e90073885accdc29458f97d SHA512 16ecd59b2911eb8dde31032e950c150c68bc9c3a904daa8be32fb594e85185e858790c71b3589fdaf5cc8cc801e10bbfe5b6192a3a99f848277086367717c734
+EBUILD zfs-9999.ebuild 5430 BLAKE2B 681134f5d63ec4b0d88a2029ef600d2ed76fa843924db5abf949a7ee33d75711564988d4559badbb367023b112f9d2495cb943662b770a3ca6996ed01b0a9ace SHA512 a55a3d4cae07ec07d4f4a5b196c06653bc774389c3e772b8a262528237081bf38eb624c0c3d7080d8f3bb9b42dcc0c80e3b351af1ed967c94ef294407ab35105
MISC metadata.xml 751 BLAKE2B 84331bb699e48773412c2b3a26786e746428a111b64d1a309d0acd6f2454220e917a6650b2a35e88269f77c725f848493f46516adf72a0deb149dbb1e0275bf3 SHA512 a16f2fff439157fa1910926bd5b90ccfc3cab262fe7b41e5565b645f29774b14f1d9ac11aceaee57b8685ec1c782d826e08715559fb0b2e06031a165ca5f6295
diff --git a/sys-fs/zfs/zfs-0.8.2-r2.ebuild b/sys-fs/zfs/zfs-0.8.2-r2.ebuild
index fea065189c3f..341a978b2793 100644
--- a/sys-fs/zfs/zfs-0.8.2-r2.ebuild
+++ b/sys-fs/zfs/zfs-0.8.2-r2.ebuild
@@ -124,6 +124,7 @@ src_prepare() {
src_configure() {
use custom-cflags || strip-flags
+ python_setup
local myconf=(
--bindir="${EPREFIX}/bin"
@@ -137,6 +138,7 @@ src_configure() {
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$(get_udevdir)"
+ --with-python="${EPYTHON}"
--with-systemdunitdir="$(systemd_get_systemunitdir)"
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
$(use_enable debug)
@@ -180,7 +182,6 @@ src_install() {
fi
# enforce best available python implementation
- python_setup
python_fix_shebang "${ED}/bin"
}
diff --git a/sys-fs/zfs/zfs-0.8.3.ebuild b/sys-fs/zfs/zfs-0.8.3.ebuild
new file mode 100644
index 000000000000..9ac492e30ce3
--- /dev/null
+++ b/sys-fs/zfs/zfs-0.8.3.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python{2_7,3_{6,7}} )
+
+inherit bash-completion-r1 flag-o-matic linux-info linux-mod distutils-r1 systemd toolchain-funcs udev usr-ldscript
+
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
+HOMEPAGE="https://zfsonlinux.org/"
+
+if [[ ${PV} == "9999" ]] ; then
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
+else
+ SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~ppc64"
+fi
+
+LICENSE="BSD-2 CDDL MIT"
+SLOT="0"
+IUSE="custom-cflags debug kernel-builtin libressl python +rootfs test-suite static-libs"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ net-libs/libtirpc[static-libs?]
+ sys-apps/util-linux[static-libs?]
+ sys-libs/zlib[static-libs(+)?]
+ virtual/awk
+ virtual/libudev[static-libs(-)?]
+ libressl? ( dev-libs/libressl:0=[static-libs?] )
+ !libressl? ( dev-libs/openssl:0=[static-libs?] )
+ python? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ )
+"
+
+BDEPEND="virtual/awk
+ virtual/pkgconfig
+ python? (
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+"
+
+RDEPEND="${DEPEND}
+ !kernel-builtin? ( ~sys-fs/zfs-kmod-${PV} )
+ !prefix? ( virtual/udev )
+ sys-fs/udev-init-scripts
+ rootfs? (
+ app-arch/cpio
+ app-misc/pax-utils
+ !<sys-kernel/genkernel-3.5.1.1
+ )
+ test-suite? (
+ sys-apps/util-linux
+ sys-devel/bc
+ sys-block/parted
+ sys-fs/lsscsi
+ sys-fs/mdadm
+ sys-process/procps
+ virtual/modutils
+ )
+"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/bash-completion-sudo.patch" )
+
+pkg_setup() {
+ if use kernel_linux && use test-suite; then
+ linux-info_pkg_setup
+
+ if ! linux_config_exists; then
+ ewarn "Cannot check the linux kernel configuration."
+ else
+ if use test-suite; then
+ if linux_chkconfig_present BLK_DEV_LOOP; then
+ eerror "The ZFS test suite requires loop device support enabled."
+ eerror "Please enable it:"
+ eerror " CONFIG_BLK_DEV_LOOP=y"
+ eerror "in /usr/src/linux/.config or"
+ eerror " Device Drivers --->"
+ eerror " Block devices --->"
+ eerror " [X] Loopback device support"
+ fi
+ fi
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == "9999" ]]; then
+ eautoreconf
+ else
+ # Set revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_prepare
+ popd >/dev/null || die
+ fi
+
+ # prevent errors showing up on zfs-mount stop, #647688
+ # openrc will unmount all filesystems anyway.
+ sed -i "/^ZFS_UNMOUNT=/ s/yes/no/" etc/init.d/zfs.in || die
+}
+
+src_configure() {
+ use custom-cflags || strip-flags
+ python_setup
+
+ local myconf=(
+ --bindir="${EPREFIX}/bin"
+ --enable-shared
+ --enable-systemd
+ --enable-sysvinit
+ --localstatedir="${EPREFIX}/var"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=user
+ --with-dracutdir="${EPREFIX}/usr/lib/dracut"
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-udevdir="$(get_udevdir)"
+ --with-python="${EPYTHON}"
+ --with-systemdunitdir="$(systemd_get_systemunitdir)"
+ --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
+ $(use_enable debug)
+ $(use_enable python pyzfs)
+ $(use_enable static-libs static)
+ )
+
+ econf "${myconf[@]}"
+
+ # temp hack for https://github.com/zfsonlinux/zfs/issues/9443
+ sed -i "s@/usr/local/@"${EPREFIX}/"@g" etc/init.d/zfs-functions || die
+}
+
+src_compile() {
+ default
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_compile
+ popd >/dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
+
+ use test-suite || rm -rf "${ED}/usr/share/zfs"
+
+ if ! use static-libs; then
+ find "${ED}/" -name '*.la' -delete || die
+ fi
+
+ dobashcomp contrib/bash_completion.d/zfs
+ bashcomp_alias zfs zpool
+
+ # strip executable bit from conf.d file
+ fperms 0644 /etc/conf.d/zfs
+
+ if use python; then
+ pushd contrib/pyzfs >/dev/null || die
+ distutils-r1_src_install
+ popd >/dev/null || die
+ fi
+
+ # enforce best available python implementation
+ python_fix_shebang "${ED}/bin"
+
+}
+
+pkg_postinst() {
+ if use rootfs; then
+ if ! has_version sys-kernel/genkernel && ! has_version sys-kernel/dracut; then
+ elog "root on zfs requires initramfs to boot"
+ elog "the following packages known to provide one and tested on regular basis:"
+ elog " sys-kernel/dracut"
+ elog " sys-kernel/genkernel"
+ fi
+
+ if has_version "<=sys-kernel/genkernel-3.5.3.3"; then
+ einfo "genkernel version 3.5.3.3 and earlier does NOT support"
+ einfo " unlocking pools with native zfs encryption enabled at boot"
+ einfo " use dracut or >=genkernel-4 if you requre this functionality"
+ fi
+ fi
+
+ 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
+
+ [[ -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."
+ [[ -e "${EROOT}/etc/runlevels/default/zfs-zed" ]] || \
+ einfo "You should add zfs-zed to the default runlevel."
+}
+
+pkg_postrm() {
+ if ! use kernel-builtin && [[ ${PV} == "9999" ]]; then
+ remove_moduledb
+ fi
+}
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index ccf810c825f2..1c02c0298585 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -115,6 +115,7 @@ src_prepare() {
src_configure() {
use custom-cflags || strip-flags
+ python_setup
local myconf=(
--bindir="${EPREFIX}/bin"
@@ -128,6 +129,7 @@ src_configure() {
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$(get_udevdir)"
+ --with-python="${EPYTHON}"
--with-systemdunitdir="$(systemd_get_systemunitdir)"
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
$(use_enable debug)
@@ -171,7 +173,6 @@ src_install() {
fi
# enforce best available python implementation
- python_setup
python_fix_shebang "${ED}/bin"
}