public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/keyutils/
Date: Sat,  1 Sep 2018 01:32:18 +0000 (UTC)	[thread overview]
Message-ID: <1535765526.3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.whissi@gentoo> (raw)

commit:     3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  1 01:20:01 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Sep  1 01:32:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c3ef606

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

 sys-apps/keyutils/keyutils-1.5.10-r1.ebuild | 30 ++++++++++++++++++++++++-----
 sys-apps/keyutils/keyutils-1.5.11-r1.ebuild | 30 ++++++++++++++++++++++++-----
 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 5a4a876d41c..e76b88beb5d 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 b47e4ff1d2d..23be07210ba 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
 }
 


             reply	other threads:[~2018-09-01  1:32 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  1:32 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-15  0:12 [gentoo-commits] repo/gentoo:master commit in: sys-apps/keyutils/ Mike Gilbert
2024-03-03  4:00 Sam James
2024-03-02 12:12 Arthur Zamarin
2024-03-02 12:12 Arthur Zamarin
2024-03-02 12:12 Arthur Zamarin
2024-03-02 12:12 Arthur Zamarin
2024-03-02 12:12 Arthur Zamarin
2024-03-02 12:12 Arthur Zamarin
2024-02-07 19:20 Sam James
2024-01-05 14:02 Sam James
2024-01-05 14:02 Sam James
2023-10-10  4:34 Sam James
2023-04-06  5:18 Sam James
2023-04-06  4:50 Sam James
2022-12-26  8:35 Sam James
2022-11-22  8:04 Arthur Zamarin
2022-10-29 14:45 Sam James
2022-05-11  0:49 Sam James
2022-05-11  0:49 Sam James
2022-05-10 14:34 Agostino Sarubbo
2022-05-10 13:47 Agostino Sarubbo
2022-05-10 13:47 Agostino Sarubbo
2022-04-27 18:06 Arthur Zamarin
2022-01-14 14:42 Arthur Zamarin
2022-01-13  2:56 Georgy Yakovlev
2021-05-13 16:15 Sam James
2021-05-13 13:55 David Seifert
2020-07-08 11:34 Thomas Deutschmann
2020-07-07 17:08 Thomas Deutschmann
2020-01-06 11:52 Mike Frysinger
2019-11-02  0:23 Sergei Trofimovich
2019-09-22  9:32 Agostino Sarubbo
2019-09-21  5:20 Matt Turner
2019-09-16  7:55 Agostino Sarubbo
2019-09-13 18:01 Mikle Kolyada
2019-09-11  8:43 Agostino Sarubbo
2019-09-11  8:41 Agostino Sarubbo
2019-09-11  8:28 Agostino Sarubbo
2019-09-11  8:20 Agostino Sarubbo
2019-09-09 17:20 Aaron Bauman
2019-05-05 12:06 Mikle Kolyada
2018-11-16 12:53 Lars Wendler
2018-08-31 14:55 Thomas Deutschmann
2018-08-31 14:55 Thomas Deutschmann
2018-08-31 14:55 Thomas Deutschmann
2018-08-31 14:55 Thomas Deutschmann
2018-08-31  2:54 Thomas Deutschmann
2018-08-02 15:50 Lars Wendler
2018-03-11  6:24 Matt Turner
2018-03-11  1:12 Matt Turner
2018-02-18 12:28 Tobias Klausmann
2018-01-24 21:25 Sergei Trofimovich
2018-01-12  4:10 Mike Frysinger
2018-01-09  8:09 Sergei Trofimovich
2018-01-04 15:42 Lars Wendler
2018-01-04 15:25 Lars Wendler
2017-05-24 16:30 Lars Wendler
2017-03-14 21:03 Mike Frysinger
2016-04-18 19:10 Mike Frysinger
2016-03-30 23:48 Mike Frysinger
2016-03-30 23:48 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535765526.3c3ef606b855d35fb0e0fc9dcc0c005b28f5e6d3.whissi@gentoo \
    --to=whissi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox