Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/
Date: Fri, 04 Oct 2019 15:48:31
Message-Id: 1570204096.472f2458fc5aa5209a454fd91643cb2a7ffdc869.whissi@gentoo
1 commit: 472f2458fc5aa5209a454fd91643cb2a7ffdc869
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 4 14:14:43 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 4 15:48:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=472f2458
7
8 dev-libs/openssl: check pre requirements for USE=sctp
9
10 FEATURES=test and USE=sctp requires net.sctp.auth_enable=1 or
11 test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel".
12
13 Package-Manager: Portage-2.3.76, Repoman-2.3.17
14 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
15
16 dev-libs/openssl/openssl-1.1.1d-r1.ebuild | 16 ++++++++++++++++
17 1 file changed, 16 insertions(+)
18
19 diff --git a/dev-libs/openssl/openssl-1.1.1d-r1.ebuild b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
20 index db1ec434fd7..1ddfa7ff16f 100644
21 --- a/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
22 +++ b/dev-libs/openssl/openssl-1.1.1d-r1.ebuild
23 @@ -55,6 +55,22 @@ MULTILIB_WRAPPED_HEADERS=(
24 usr/include/openssl/opensslconf.h
25 )
26
27 +pkg_setup() {
28 + [[ ${MERGE_TYPE} == binary ]] && return
29 +
30 + # must check in pkg_setup; sysctl don't work with userpriv!
31 + if has test ${FEATURES}; then
32 + if use sctp; then
33 + # test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
34 + # if sctp.auth_enable is not enabled.
35 + local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
36 + if [[ -z "${sctp_auth_status}" || ${sctp_auth_status} != 1 ]]; then
37 + die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
38 + fi
39 + fi
40 + fi
41 +}
42 +
43 src_prepare() {
44 if use bindist; then
45 mv "${WORKDIR}"/bindist-patches/hobble-openssl "${WORKDIR}" || die