summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2015-12-03 11:20:38 -0500
committerRichard Yao <ryao@gentoo.org>2015-12-03 11:28:28 -0500
commit56ff62daca4803ffcfcddcd88b8322462ba3ddf1 (patch)
treef65b79df0a33347514f448de6af4d45516bc7fc3 /sys-kernel
parentnet-libs/rb_libtorrent: Version bump (diff)
downloadgentoo-56ff62daca4803ffcfcddcd88b8322462ba3ddf1.tar.gz
gentoo-56ff62daca4803ffcfcddcd88b8322462ba3ddf1.tar.bz2
gentoo-56ff62daca4803ffcfcddcd88b8322462ba3ddf1.zip
sys-kernel/spl + sys-fs/zfs{,-kmod}: Partial stable /dev/zfs API + backports
This backports various fixes and also implements the partial /dev/zfs stable API that I have developed at ClusterHQ over the past 14 months. Ordinarily, I would not commit something like this until it has gone upstream, but upstream wants review from people in the Illumos project that prefer to see things like this in production before it reaches them and it would have likely been deadlocked until I volunteered Gentoo. I am confident that this is ready for production and I believe Gentoo benefits from it enough to justify being the first production user. Unless the API changes under review, situations where the kernel modules and userland bits fall out of sync will no longer break the boot process (excluding zfs-share and zfs-zed). This was the longstanding blocker to the ebuilds moving from ~arch to arch, so we could finally see that happen around later this month / early next month. Package-Manager: portage-2.2.20.1 Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/spl/Manifest1
-rw-r--r--sys-kernel/spl/spl-0.6.5.3-r1.ebuild120
2 files changed, 121 insertions, 0 deletions
diff --git a/sys-kernel/spl/Manifest b/sys-kernel/spl/Manifest
index 6d31a52b1256..9cf37012a763 100644
--- a/sys-kernel/spl/Manifest
+++ b/sys-kernel/spl/Manifest
@@ -7,4 +7,5 @@ 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.5.2.tar.gz 193153 SHA256 2642b69870b32e0feeaa57fbfcef546a330064bd4e5805c4862a97287a9287ca SHA512 9db23daf6cc1d6aaa926c987e284d7dbbc538876d6a8b9636d3126efc2be9d54b5ae2cb9cb3a89b604b3d4106374d85d9ad2c1acaf940a1299c1620ee1526d3f WHIRLPOOL cc99f131f9dfcc9ef84237f16491c8c5417af70c57dcbc3dba448c83f93636d5161b301f4fefa4fa8c54c56a1864cd9ce5d5fc758697803bac880839ea57e359
+DIST spl-0.6.5.3-patches-p0.tar.xz 4968 SHA256 8e652d41eba421720bcecee99077d3f3c375153809426011f04a2c64aa181ca7 SHA512 cdc053d7ad537cec3b0e7d777d6a341d1b48d6f49613f77db3831b86f54cef098748b944a353c3bf920974a812d650b65116fe26906ff7921ea69cfa5fef9691 WHIRLPOOL ff9e6a193a8585738f57fec59a3513fe69856019569e90c95da306ab853b0c5a8266bb457ef1f4df0c4bcd20dfbde1062c616d3ee55621b288ab796c733d9589
DIST spl-0.6.5.3.tar.gz 556179 SHA256 637c1eccd721f5d3bb1570621d2cd6646ec0488608482c0dbeb2838cf4bb310c SHA512 24a0c97f1a425e44d12f43519c23ba78672c06d65a03833a8d3827e4c762a873283c90ce66f64b9b186ab815f0b005e69da537e120b8b53877d0f13e649bac57 WHIRLPOOL e67f50c8adc4ac2b770dfaeb479fa8a8c87270c8314b5366dd95665a30adb2f1fb29db9719a0431cc18adc6865ea6f222c1b443f2b95b764cede8db50f49333d
diff --git a/sys-kernel/spl/spl-0.6.5.3-r1.ebuild b/sys-kernel/spl/spl-0.6.5.3-r1.ebuild
new file mode 100644
index 000000000000..a705dda5ebaf
--- /dev/null
+++ b/sys-kernel/spl/spl-0.6.5.3-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+ https://dev.gentoo.org/~ryao/dist/${P}-patches-p0.tar.xz"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
+fi
+
+inherit flag-o-matic linux-info linux-mod autotools-utils
+
+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"
+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 4 || die "Linux 4.4 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Apply patch set
+ EPATCH_SUFFIX="patch" \
+ EPATCH_FORCE="yes" \
+ epatch "${WORKDIR}/${P}-patches"
+ fi
+
+ # 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
+}