From 6822c8757ab2152e32caec5ea7d729b9bdc91588 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Wed, 6 Feb 2013 01:45:21 +0000 Subject: Add virtual/awk dependency, fix build failures on x86 (bug \#450646) and fix build failure on PPC64 (thanks RB for testing) (Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit) --- sys-kernel/spl/ChangeLog | 14 ++- .../files/spl-0.6.0_rc14-fix-atomic64-checks.patch | 70 ++++++++++++++ .../spl-0.6.0_rc14-fix-mutex-owner-check.patch | 33 +++++++ sys-kernel/spl/spl-0.6.0_rc10.ebuild | 11 ++- sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild | 9 +- sys-kernel/spl/spl-0.6.0_rc11.ebuild | 11 ++- sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild | 11 ++- sys-kernel/spl/spl-0.6.0_rc12.ebuild | 11 ++- sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild | 9 +- sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild | 9 +- sys-kernel/spl/spl-0.6.0_rc13.ebuild | 11 ++- sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild | 106 +++++++++++++++++++++ sys-kernel/spl/spl-0.6.0_rc14.ebuild | 92 ------------------ sys-kernel/spl/spl-9999.ebuild | 17 ++-- 14 files changed, 294 insertions(+), 120 deletions(-) create mode 100644 sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch create mode 100644 sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch create mode 100644 sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild delete mode 100644 sys-kernel/spl/spl-0.6.0_rc14.ebuild diff --git a/sys-kernel/spl/ChangeLog b/sys-kernel/spl/ChangeLog index 13c6bb454129..6d80bcaf5d97 100644 --- a/sys-kernel/spl/ChangeLog +++ b/sys-kernel/spl/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sys-kernel/spl # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.42 2013/02/02 16:44:19 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/ChangeLog,v 1.43 2013/02/06 01:45:21 ryao Exp $ + +*spl-0.6.0_rc14-r1 (06 Feb 2013) + + 06 Feb 2013; Richard Yao + +files/spl-0.6.0_rc14-fix-atomic64-checks.patch, + +files/spl-0.6.0_rc14-fix-mutex-owner-check.patch, +spl-0.6.0_rc14-r1.ebuild, + -spl-0.6.0_rc14.ebuild, spl-0.6.0_rc10.ebuild, spl-0.6.0_rc11-r2.ebuild, + spl-0.6.0_rc11.ebuild, spl-0.6.0_rc12-r1.ebuild, spl-0.6.0_rc12.ebuild, + spl-0.6.0_rc13-r1.ebuild, spl-0.6.0_rc13-r2.ebuild, spl-0.6.0_rc13.ebuild, + spl-9999.ebuild: + Add virtual/awk dependency, fix build failures on x86 (bug \#450646) and fix + build failure on PPC64 (thanks RB for testing) *spl-0.6.0_rc14 (02 Feb 2013) diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch new file mode 100644 index 000000000000..9ac8a4308dd6 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-atomic64-checks.patch @@ -0,0 +1,70 @@ +From dd3678fc29d75286b57e705454bbd7e60e1b44e0 Mon Sep 17 00:00:00 2001 +From: Brian Behlendorf +Date: Tue, 5 Feb 2013 09:35:43 -0800 +Subject: [PATCH] Fix atomic64_* autoconf checks + +The SPL_AC_ATOMIC_SPINLOCK, SPL_AC_TYPE_ATOMIC64_CMPXCHG, and +SPL_AC_TYPE_ATOMIC64_XCHG were all directly including the +'asm/atomic.h' header. As of Linux 3.4 this header was removed +which results in a build failure. + +The right thing to do is include 'linux/atomic.h' however we +can't safely do this because it doesn't exist in 2.6.26 kernels. +Therefore, we include 'linux/fs.h' which in turn includes the +correct atomic header regardless of the kernel version. + +When these incorrect APIs are used in ZFS the following build +failure results. + + arc.c:791:80: warning: '__ret' may be used uninitialized + in this function [-Wuninitialized] + arc.c:791:1875: error: call to '__cmpxchg_wrong_size' + declared with attribute error: Bad argument size for cmpxchg + +Since this is all Linux 2.6.24 compatibility code there's +an argument to be made that it should be removed because +kernels this old are not supported. However, because we're +so close to a release I'm going to leave it in place for now. + +Signed-off-by: Brian Behlendorf +Closes zfsonlinux/zfs#814 +Closes zfsonlinux/zfs#1254 +--- + config/spl-build.m4 | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/config/spl-build.m4 b/config/spl-build.m4 +index e9695de..8518404 100644 +--- a/config/spl-build.m4 ++++ b/config/spl-build.m4 +@@ -777,7 +777,7 @@ AC_DEFUN([SPL_AC_ATOMIC_SPINLOCK], [ + [enable_atomic_spinlocks=check]) + + SPL_LINUX_TRY_COMPILE([ +- #include ++ #include + ],[ + atomic64_t *ptr __attribute__ ((unused)); + ],[ +@@ -820,8 +820,7 @@ dnl # + AC_DEFUN([SPL_AC_TYPE_ATOMIC64_CMPXCHG], + [AC_MSG_CHECKING([whether kernel defines atomic64_cmpxchg]) + SPL_LINUX_TRY_COMPILE([ +- #include +- #include ++ #include + ],[ + atomic64_cmpxchg((atomic64_t *)NULL, 0, 0); + ],[ +@@ -840,7 +839,7 @@ dnl # + AC_DEFUN([SPL_AC_TYPE_ATOMIC64_XCHG], + [AC_MSG_CHECKING([whether kernel defines atomic64_xchg]) + SPL_LINUX_TRY_COMPILE([ +- #include ++ #include + ],[ + atomic64_xchg((atomic64_t *)NULL, 0); + ],[ +-- +1.7.10 + diff --git a/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch new file mode 100644 index 000000000000..ee7314d3cf32 --- /dev/null +++ b/sys-kernel/spl/files/spl-0.6.0_rc14-fix-mutex-owner-check.patch @@ -0,0 +1,33 @@ +From a0625691b39468d04eb716919e237f96a3987b48 Mon Sep 17 00:00:00 2001 +From: Richard Yao +Date: Tue, 5 Feb 2013 16:42:29 -0500 +Subject: [PATCH] Fix HAVE_MUTEX_OWNER_TASK_STRUCT autotools check on PPC64 + +The HAVE_MUTEX_OWNER_TASK_STRUCT fails on PPC64 with the following +error: + +error: 'current' undeclared (first use in this function) + +We include linux/sched.h to ensure that current is available. + +Signed-off-by: Richard Yao +Signed-off-by: Brian Behlendorf +--- + config/spl-build.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/config/spl-build.m4 b/config/spl-build.m4 +index 8518404..4cb7e1d 100644 +--- a/config/spl-build.m4 ++++ b/config/spl-build.m4 +@@ -1269,6 +1269,7 @@ AC_DEFUN([SPL_AC_MUTEX_OWNER_TASK_STRUCT], [ + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include ++ #include + ],[ + struct mutex mtx __attribute__ ((unused)); + mtx.owner = current; +-- +1.7.10 + diff --git a/sys-kernel/spl/spl-0.6.0_rc10.ebuild b/sys-kernel/spl/spl-0.6.0_rc10.ebuild index acf1d8773a05..af7374fd0c6e 100644 --- a/sys-kernel/spl/spl-0.6.0_rc10.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc10.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc10.ebuild,v 1.6 2012/12/29 17:01:12 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc10.ebuild,v 1.7 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild b/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild index 9d5bfe751060..48b390d678a2 100644 --- a/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild,v 1.5 2013/01/14 21:07:59 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc11-r2.ebuild,v 1.6 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc11.ebuild b/sys-kernel/spl/spl-0.6.0_rc11.ebuild index 1debe2581c31..b0c94a761ee7 100644 --- a/sys-kernel/spl/spl-0.6.0_rc11.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc11.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc11.ebuild,v 1.4 2012/12/29 17:01:12 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc11.ebuild,v 1.5 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild b/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild index ffc5a8791ad9..4e3222b8a5b0 100644 --- a/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild,v 1.3 2012/12/27 11:47:22 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc12-r1.ebuild,v 1.4 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc12.ebuild b/sys-kernel/spl/spl-0.6.0_rc12.ebuild index 65ed31c65201..a89c8124f102 100644 --- a/sys-kernel/spl/spl-0.6.0_rc12.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc12.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc12.ebuild,v 1.4 2012/12/29 17:01:12 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc12.ebuild,v 1.5 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild b/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild index bef98ca40a7d..b176845c609f 100644 --- a/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild,v 1.2 2013/01/14 21:11:56 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13-r1.ebuild,v 1.3 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild b/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild index a7b7e1849223..35fa279d54bd 100644 --- a/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild,v 1.1 2013/01/16 08:57:37 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13-r2.ebuild,v 1.2 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc13.ebuild b/sys-kernel/spl/spl-0.6.0_rc13.ebuild index f28b0bce4a5a..e6f36dc0bb1d 100644 --- a/sys-kernel/spl/spl-0.6.0_rc13.ebuild +++ b/sys-kernel/spl/spl-0.6.0_rc13.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13.ebuild,v 1.2 2012/12/27 11:47:22 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc13.ebuild,v 1.3 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" diff --git a/sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild b/sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild new file mode 100644 index 000000000000..3d577aed0472 --- /dev/null +++ b/sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc14-r1.ebuild,v 1.1 2013/02/06 01:45:21 ryao Exp $ + +EAPI="4" +AUTOTOOLS_AUTORECONF="1" + +inherit flag-o-matic linux-mod autotools-utils + +if [[ ${PV} == "9999" ]] ; then + inherit git-2 + EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git" +else + inherit eutils versionator + MY_PV=$(replace_version_separator 3 '-') + SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz" + S="${WORKDIR}/${PN}-${PN}-${MY_PV}" + KEYWORDS="~amd64" +fi + +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 debug-log" +RESTRICT="test" + +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" + +AT_M4DIR="config" +AUTOTOOLS_IN_SOURCE_BUILD="1" + +pkg_setup() { + CONFIG_CHECK=" + !DEBUG_LOCK_ALLOC + !GRKERNSEC_HIDESYM + MODULES + KALLSYMS + !PAX_KERNEXEC_PLUGIN_METHOD_OR + ZLIB_DEFLATE + ZLIB_INFLATE + " + + kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required" + + [ ${PV} != "9999" ] && \ + { kernel_is le 3 8 || die "Linux 3.8 is the latest supported version."; } + + check_extra_config +} + +src_prepare() { + # Workaround for hard coded path + sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die + + if [ ${PV} != "9999" ] + then + # Fix x86 build failures on Linux 3.4 and later, bug #450646 + epatch "${FILESDIR}/${P}-fix-atomic64-checks.patch" + + # Fix autotools check that fails on ~ppc64 + epatch "${FILESDIR}/${P}-fix-mutex-owner-check.patch" + fi + + 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) + $(use_enable debug-log) + ) + autotools-utils_src_configure +} + +src_test() { + if [[ ! -e /proc/modules ]] + then + die "Missing /proc/modules" + elif [[ $UID -ne 0 ]] + then + ewarn "Cannot run make check tests with FEATURES=userpriv." + ewarn "Skipping make check tests." + elif grep -q '^spl ' /proc/modules + then + ewarn "Cannot run make check tests with module spl loaded." + ewarn "Skipping make check tests." + else + autotools-utils_src_test + fi +} diff --git a/sys-kernel/spl/spl-0.6.0_rc14.ebuild b/sys-kernel/spl/spl-0.6.0_rc14.ebuild deleted file mode 100644 index 21275d398637..000000000000 --- a/sys-kernel/spl/spl-0.6.0_rc14.ebuild +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-0.6.0_rc14.ebuild,v 1.1 2013/02/02 16:44:19 ryao Exp $ - -EAPI="4" -AUTOTOOLS_AUTORECONF="1" - -inherit flag-o-matic linux-mod autotools-utils - -if [[ ${PV} == "9999" ]] ; then - inherit git-2 - EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git" -else - inherit eutils versionator - MY_PV=$(replace_version_separator 3 '-') - SRC_URI="https://github.com/zfsonlinux/${PN}/archive/${PN}-${MY_PV}.tar.gz" - S="${WORKDIR}/${PN}-${PN}-${MY_PV}" - KEYWORDS="~amd64" -fi - -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 debug-log" -RESTRICT="test" - -RDEPEND="!sys-devel/spl" - -AT_M4DIR="config" -AUTOTOOLS_IN_SOURCE_BUILD="1" - -pkg_setup() { - CONFIG_CHECK=" - !DEBUG_LOCK_ALLOC - !GRKERNSEC_HIDESYM - MODULES - KALLSYMS - !PAX_KERNEXEC_PLUGIN_METHOD_OR - ZLIB_DEFLATE - ZLIB_INFLATE - " - - kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required" - - [ ${PV} != "9999" ] && \ - { kernel_is le 3 8 || die "Linux 3.8 is the latest supported version."; } - - check_extra_config -} - -src_prepare() { - # Workaround for hard coded path - sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/check.sh || die - - 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) - $(use_enable debug-log) - ) - autotools-utils_src_configure -} - -src_test() { - if [[ ! -e /proc/modules ]] - then - die "Missing /proc/modules" - elif [[ $UID -ne 0 ]] - then - ewarn "Cannot run make check tests with FEATURES=userpriv." - ewarn "Skipping make check tests." - elif grep -q '^spl ' /proc/modules - then - ewarn "Cannot run make check tests with module spl loaded." - ewarn "Skipping make check tests." - else - autotools-utils_src_test - fi -} diff --git a/sys-kernel/spl/spl-9999.ebuild b/sys-kernel/spl/spl-9999.ebuild index b8b0babe8c4c..accfa2a6d55f 100644 --- a/sys-kernel/spl/spl-9999.ebuild +++ b/sys-kernel/spl/spl-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.27 2013/01/16 09:01:11 ryao Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/spl/spl-9999.ebuild,v 1.28 2013/02/06 01:45:21 ryao Exp $ EAPI="4" AUTOTOOLS_AUTORECONF="1" @@ -26,7 +26,12 @@ SLOT="0" IUSE="custom-cflags debug debug-log" RESTRICT="test" -RDEPEND="!sys-devel/spl" +COMMON_DEPEND="virtual/awk" + +DEPEND="${COMMON_DEPEND}" + +RDEPEND="${COMMON_DEPEND} + !sys-devel/spl" AT_M4DIR="config" AUTOTOOLS_IN_SOURCE_BUILD="1" @@ -56,11 +61,11 @@ src_prepare() { if [ ${PV} != "9999" ] then - # Fix on_each_cpu autotools to work correctly - epatch "${FILESDIR}/${P}-fix-on_each_cpu-autotools-check.patch" + # Fix x86 build failures on Linux 3.4 and later, bug #450646 + epatch "${FILESDIR}/${P}-fix-atomic64-checks.patch" - # Fix soft lockup regression - epatch "${FILESDIR}/${P}-fix-soft-lockup.patch" + # Fix autotools check that fails on ~ppc64 + epatch "${FILESDIR}/${P}-fix-mutex-owner-check.patch" fi autotools-utils_src_prepare -- cgit v1.2.3-65-gdbad