summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-09-01 03:20:01 +0200
committerThomas Deutschmann <whissi@gentoo.org>2018-09-01 03:32:06 +0200
commit3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3 (patch)
tree8b39aee9ef9062fe9026cd15eb9bcf7cbdc65497
parentmedia-sound/pulseeffects: 4.3.4 bump (diff)
downloadgentoo-3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.tar.gz
gentoo-3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.tar.bz2
gentoo-3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.zip
sys-apps/keyutils: kernel config checks rewritten
- CONFIG_KEY_DH_OPERATIONS is only available in kernel >=4.7 - Package will now fail in setup phase when FEATURES=test is set and not all required kernel options are set to prevent false positive bug reports due to failures of test phase caused by missing options. Closes: https://bugs.gentoo.org/624380 Package-Manager: Portage-2.3.48, Repoman-2.3.10
-rw-r--r--sys-apps/keyutils/keyutils-1.5.10-r1.ebuild30
-rw-r--r--sys-apps/keyutils/keyutils-1.5.11-r1.ebuild30
2 files changed, 50 insertions, 10 deletions
diff --git a/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
index 5a4a876d41cc..e76b88beb5d5 100644
--- a/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
+++ b/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
@@ -26,13 +26,33 @@ PATCHES=(
)
pkg_setup() {
- CONFIG_CHECK="~KEYS"
- ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ # To prevent a failure in test phase and false positive bug reports
+ # we are enforcing the following options because testsuite expects
+ # that these options are available. I.e. testsuite only decides based
+ # on kernel version which tests will be called, no feature checking.
+ if use test ; then
+ CONFIG_CHECK="KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!"
+
+ if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ fi
+
+ if kernel_is -ge 4 7 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS"
+ ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!"
+ fi
+ else
+ CONFIG_CHECK="~KEYS"
+ ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!"
- if use test && kernel_is lt 4 0 0; then
- CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS ~KEY_DH_OPERATIONS"
- ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ if kernel_is -ge 4 7 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS"
+ ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!"
+ fi
fi
+
linux-info_pkg_setup
}
diff --git a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
index b47e4ff1d2d0..23be07210bad 100644
--- a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
+++ b/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
@@ -27,13 +27,33 @@ PATCHES=(
)
pkg_setup() {
- CONFIG_CHECK="~KEYS"
- ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
+ # To prevent a failure in test phase and false positive bug reports
+ # we are enforcing the following options because testsuite expects
+ # that these options are available. I.e. testsuite only decides based
+ # on kernel version which tests will be called, no feature checking.
+ if use test ; then
+ CONFIG_CHECK="KEYS"
+ ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!"
+
+ if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS"
+ ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ fi
+
+ if kernel_is -ge 4 7 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS"
+ ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!"
+ fi
+ else
+ CONFIG_CHECK="~KEYS"
+ ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!"
- if use test && kernel_is lt 4 0 0; then
- CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS ~KEY_DH_OPERATIONS"
- ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
+ if kernel_is -ge 4 7 ; then
+ CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS"
+ ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!"
+ fi
fi
+
linux-info_pkg_setup
}