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