From 7475c99fc8561e533539b7e510293c488c6b2e7c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 2 Jan 2020 10:32:03 +0000 Subject: sys-kernel/zfs-dkms : backport fix for https://github.com/zfsonlinux/zfs/issues/9417 --- .../files/Use_NMH_WAIT_EXEC_with_call.patch | 12 +++++ sys-kernel/zfs-dkms/zfs-dkms-0.8.2-r1.ebuild | 52 +++++++++++++++++++++ sys-kernel/zfs-dkms/zfs-dkms-0.8.2.ebuild | 54 ---------------------- 3 files changed, 64 insertions(+), 54 deletions(-) create mode 100644 sys-kernel/zfs-dkms/files/Use_NMH_WAIT_EXEC_with_call.patch create mode 100644 sys-kernel/zfs-dkms/zfs-dkms-0.8.2-r1.ebuild delete mode 100644 sys-kernel/zfs-dkms/zfs-dkms-0.8.2.ebuild (limited to 'sys-kernel/zfs-dkms') diff --git a/sys-kernel/zfs-dkms/files/Use_NMH_WAIT_EXEC_with_call.patch b/sys-kernel/zfs-dkms/files/Use_NMH_WAIT_EXEC_with_call.patch new file mode 100644 index 00000000..ad612d26 --- /dev/null +++ b/sys-kernel/zfs-dkms/files/Use_NMH_WAIT_EXEC_with_call.patch @@ -0,0 +1,12 @@ +diff -Nur a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c +--- a/module/zfs/vdev_disk.c 2019-09-25 21:44:42.626286618 +0100 ++++ b/module/zfs/vdev_disk.c 2020-01-02 10:29:56.356741395 +0000 +@@ -220,7 +220,7 @@ + char *envp[] = { NULL }; + + argv[2] = kmem_asprintf(SET_SCHEDULER_CMD, device, elevator); +- error = call_usermodehelper(argv[0], argv, envp, UMH_NO_WAIT); ++ error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); + strfree(argv[2]); + #endif /* HAVE_ELEVATOR_CHANGE */ + if (error) { diff --git a/sys-kernel/zfs-dkms/zfs-dkms-0.8.2-r1.ebuild b/sys-kernel/zfs-dkms/zfs-dkms-0.8.2-r1.ebuild new file mode 100644 index 00000000..a4ee98ab --- /dev/null +++ b/sys-kernel/zfs-dkms/zfs-dkms-0.8.2-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=7 + +inherit eutils + +MY_PN="zfs" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="ZFS sources for linux" +HOMEPAGE="http://zfsonlinux.org/" +SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${MY_P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64" +IUSE="" +DEPEND="sys-kernel/dkms" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/Use_NMH_WAIT_EXEC_with_call.patch ) + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + cp "${FILESDIR}/dkms.conf" "${S}" || die + dodir /usr/src/${P} + insinto /usr/src/${P} + doins -r ${S}/* + fperms 0755 /usr/src/${P}/configure + fperms 0755 /usr/src/${P}/scripts/dkms.mkconf + fperms 0755 /usr/src/${P}/scripts/dkms.postbuild + fperms 0755 /usr/src/${P}/scripts/enum-extract.pl +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} diff --git a/sys-kernel/zfs-dkms/zfs-dkms-0.8.2.ebuild b/sys-kernel/zfs-dkms/zfs-dkms-0.8.2.ebuild deleted file mode 100644 index fdfb5728..00000000 --- a/sys-kernel/zfs-dkms/zfs-dkms-0.8.2.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils - -MY_PN="zfs" -MY_P="${MY_PN}-${PV}" - -DESCRIPTION="ZFS sources for linux" -HOMEPAGE="http://zfsonlinux.org/" -SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${MY_P}.tar.gz" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="amd64" -IUSE="" -DEPEND="sys-kernel/dkms" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${MY_P}" - -src_prepare() { - : -} - -src_configure() { - : -} - -src_compile() { - : -} - -src_install() { - cp "${FILESDIR}/dkms.conf" "${S}" || die - dodir /usr/src/${P} - insinto /usr/src/${P} - doins -r ${S}/* - fperms 0755 /usr/src/${P}/configure - fperms 0755 /usr/src/${P}/scripts/dkms.mkconf - fperms 0755 /usr/src/${P}/scripts/dkms.postbuild - fperms 0755 /usr/src/${P}/scripts/enum-extract.pl -} - -pkg_postinst() { - dkms add ${PN}/${PV} -} - -pkg_prerm() { - dkms remove ${PN}/${PV} --all -} -- cgit v1.2.3