Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/keyutils/
Date: Sat, 01 Sep 2018 01:32:24
Message-Id: 1535765526.3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.whissi@gentoo
1 commit: 3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 1 01:20:01 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 1 01:32:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c3ef606
7
8 sys-apps/keyutils: kernel config checks rewritten
9
10 - CONFIG_KEY_DH_OPERATIONS is only available in kernel >=4.7
11
12 - Package will now fail in setup phase when FEATURES=test is set
13 and not all required kernel options are set to prevent false
14 positive bug reports due to failures of test phase caused by
15 missing options.
16
17 Closes: https://bugs.gentoo.org/624380
18 Package-Manager: Portage-2.3.48, Repoman-2.3.10
19
20 sys-apps/keyutils/keyutils-1.5.10-r1.ebuild | 30 ++++++++++++++++++++++++-----
21 sys-apps/keyutils/keyutils-1.5.11-r1.ebuild | 30 ++++++++++++++++++++++++-----
22 2 files changed, 50 insertions(+), 10 deletions(-)
23
24 diff --git a/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
25 index 5a4a876d41c..e76b88beb5d 100644
26 --- a/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
27 +++ b/sys-apps/keyutils/keyutils-1.5.10-r1.ebuild
28 @@ -26,13 +26,33 @@ PATCHES=(
29 )
30
31 pkg_setup() {
32 - CONFIG_CHECK="~KEYS"
33 - ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
34 + # To prevent a failure in test phase and false positive bug reports
35 + # we are enforcing the following options because testsuite expects
36 + # that these options are available. I.e. testsuite only decides based
37 + # on kernel version which tests will be called, no feature checking.
38 + if use test ; then
39 + CONFIG_CHECK="KEYS"
40 + ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!"
41 +
42 + if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then
43 + CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS"
44 + ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
45 + fi
46 +
47 + if kernel_is -ge 4 7 ; then
48 + CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS"
49 + ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!"
50 + fi
51 + else
52 + CONFIG_CHECK="~KEYS"
53 + ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!"
54
55 - if use test && kernel_is lt 4 0 0; then
56 - CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS ~KEY_DH_OPERATIONS"
57 - ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
58 + if kernel_is -ge 4 7 ; then
59 + CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS"
60 + ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!"
61 + fi
62 fi
63 +
64 linux-info_pkg_setup
65 }
66
67
68 diff --git a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild b/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
69 index b47e4ff1d2d..23be07210ba 100644
70 --- a/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
71 +++ b/sys-apps/keyutils/keyutils-1.5.11-r1.ebuild
72 @@ -27,13 +27,33 @@ PATCHES=(
73 )
74
75 pkg_setup() {
76 - CONFIG_CHECK="~KEYS"
77 - ERROR_KEYS="You must have CONFIG_KEYS to use this package!"
78 + # To prevent a failure in test phase and false positive bug reports
79 + # we are enforcing the following options because testsuite expects
80 + # that these options are available. I.e. testsuite only decides based
81 + # on kernel version which tests will be called, no feature checking.
82 + if use test ; then
83 + CONFIG_CHECK="KEYS"
84 + ERROR_KEYS="You must have CONFIG_KEYS to run the package testsuite!"
85 +
86 + if kernel_is -ge 2 6 10 && kernel_is -lt 4 0 0 ; then
87 + CONFIG_CHECK="${CONFIG_CHECK} KEYS_DEBUG_PROC_KEYS"
88 + ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
89 + fi
90 +
91 + if kernel_is -ge 4 7 ; then
92 + CONFIG_CHECK="${CONFIG_CHECK} KEY_DH_OPERATIONS"
93 + ERROR_KEY_DH_OPERATIONS="You must have CONFIG_KEY_DH_OPERATIONS to run the package testsuite!"
94 + fi
95 + else
96 + CONFIG_CHECK="~KEYS"
97 + ERROR_KEYS="You will be unable to use this package on this system because CONFIG_KEYS is not set!"
98
99 - if use test && kernel_is lt 4 0 0; then
100 - CONFIG_CHECK="${CONFIG_CHECK} ~KEYS_DEBUG_PROC_KEYS ~KEY_DH_OPERATIONS"
101 - ERROR_KEYS_DEBUG_PROC_KEYS="You must have CONFIG_KEYS_DEBUG_PROC_KEYS to run the package testsuite!"
102 + if kernel_is -ge 4 7 ; then
103 + CONFIG_CHECK="${CONFIG_CHECK} ~KEY_DH_OPERATIONS"
104 + ERROR_KEY_DH_OPERATIONS="You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!"
105 + fi
106 fi
107 +
108 linux-info_pkg_setup
109 }