1 |
commit: 9c711272c89943e3370cfc557f1afc9fc0ebd887 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 17 16:51:14 2021 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 17 16:51:14 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c711272 |
7 |
|
8 |
dev-libs/openssl: add check for kernel TLS options |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
dev-libs/openssl/openssl-3.0.0_beta1.ebuild | 14 +++++++++++++- |
14 |
1 file changed, 13 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-libs/openssl/openssl-3.0.0_beta1.ebuild b/dev-libs/openssl/openssl-3.0.0_beta1.ebuild |
17 |
index 1402778eb03..f5fac82dbec 100644 |
18 |
--- a/dev-libs/openssl/openssl-3.0.0_beta1.ebuild |
19 |
+++ b/dev-libs/openssl/openssl-3.0.0_beta1.ebuild |
20 |
@@ -3,7 +3,7 @@ |
21 |
|
22 |
EAPI="7" |
23 |
|
24 |
-inherit flag-o-matic toolchain-funcs multilib-minimal |
25 |
+inherit flag-o-matic linux-info toolchain-funcs multilib-minimal |
26 |
|
27 |
MY_P=${P/_/-} |
28 |
|
29 |
@@ -53,6 +53,18 @@ MULTILIB_WRAPPED_HEADERS=( |
30 |
) |
31 |
|
32 |
pkg_setup() { |
33 |
+ if use ktls ; then |
34 |
+ if kernel_is -lt 4 18 ; then |
35 |
+ ewarn "Kernel implementation of TLS (USE=ktls) requires kernel >=4.18!" |
36 |
+ else |
37 |
+ CONFIG_CHECK="~TLS ~TLS_DEVICE" |
38 |
+ ERROR_TLS="You will be unable to offload TLS to kernel because CONFIG_TLS is not set!" |
39 |
+ ERROR_TLS_DEVICE="You will be unable to offload TLS to kernel because CONFIG_TLS_DEVICE is not set!" |
40 |
+ |
41 |
+ linux-info_pkg_setup |
42 |
+ fi |
43 |
+ fi |
44 |
+ |
45 |
[[ ${MERGE_TYPE} == binary ]] && return |
46 |
|
47 |
# must check in pkg_setup; sysctl don't work with userpriv! |