From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE5AA15802F for ; Sat, 11 Mar 2023 18:02:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25176E07D0; Sat, 11 Mar 2023 18:02:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EC464E07D0 for ; Sat, 11 Mar 2023 18:02:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CDA0D335C39 for ; Sat, 11 Mar 2023 18:02:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 214148D4 for ; Sat, 11 Mar 2023 18:02:03 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1678557697.16ddb7d5254ba3dc499c0698235dca32d2a6e014.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/openssl/openssl-1.1.1t-r1.ebuild X-VCS-Directories: dev-libs/openssl/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 16ddb7d5254ba3dc499c0698235dca32d2a6e014 X-VCS-Branch: master Date: Sat, 11 Mar 2023 18:02:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 37200d2a-b3cc-4383-ac47-ca6808420cba X-Archives-Hash: 56ebb9379bd99a49eedc2c9776b7ac4f commit: 16ddb7d5254ba3dc499c0698235dca32d2a6e014 Author: Mike Gilbert gentoo org> AuthorDate: Sat Mar 11 18:00:23 2023 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Mar 11 18:01:37 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16ddb7d5 dev-libs/openssl: backport ebuild changes from 3.x Signed-off-by: Mike Gilbert gentoo.org> dev-libs/openssl/openssl-1.1.1t-r1.ebuild | 71 ++++++++++++++----------------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/dev-libs/openssl/openssl-1.1.1t-r1.ebuild b/dev-libs/openssl/openssl-1.1.1t-r1.ebuild index a724839c80c5..e7fb7976c194 100644 --- a/dev-libs/openssl/openssl-1.1.1t-r1.ebuild +++ b/dev-libs/openssl/openssl-1.1.1t-r1.ebuild @@ -75,13 +75,6 @@ src_unpack() { } src_prepare() { - # Allow openssl to be cross-compiled - cp "${FILESDIR}"/gentoo.config-1.0.4 gentoo.config || die - chmod a+rx gentoo.config || die - - # Keep this in sync with app-misc/c_rehash - SSL_CNF_DIR="/etc/ssl" - # Make sure we only ever touch Makefile.org and avoid patching a file # that gets blown away anyways by the Configure script in src_configure rm -f Makefile @@ -99,25 +92,6 @@ src_prepare() { rm test/recipes/80-test_ssl_new.t || die fi - # Quiet out unknown driver argument warnings since openssl - # doesn't have well-split CFLAGS and we're making it even worse - # and 'make depend' uses -Werror for added fun (bug #417795 again) - tc-is-clang && append-flags -Qunused-arguments - - # We really, really need to build OpenSSL w/ strict aliasing disabled. - # It's filled with violations and it *will* result in miscompiled - # code. This has been in the ebuild for > 10 years but even in 2022, - # it's still relevant: - # - https://github.com/llvm/llvm-project/issues/55255 - # - https://github.com/openssl/openssl/issues/18225 - # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 - # Don't remove the no strict aliasing bits below! - filter-flags -fstrict-aliasing - append-flags -fno-strict-aliasing - - append-cppflags -DOPENSSL_NO_BUF_FREELISTS - - append-flags $(test-flags-CC -Wa,--noexecstack) # Remove test target when FEATURES=test isn't set if ! use test ; then @@ -140,19 +114,34 @@ src_prepare() { Configurations/10-main.conf || die fi - local sslout=$(./gentoo.config) - einfo "Using configuration: ${sslout:-(openssl knows best)}" - local config="perl Configure" - [[ -z ${sslout} ]] && config="sh config -v" - # The config script does stupid stuff to prompt the user. Kill it. sed -i '/stty -icanon min 0 time 50; read waste/d' config || die - edo ${config} ${sslout} --test-sanity - - multilib_copy_sources } -multilib_src_configure() { +src_configure() { + # Keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (bug #417795 again) + tc-is-clang && append-flags -Qunused-arguments + + # We really, really need to build OpenSSL w/ strict aliasing disabled. + # It's filled with violations and it *will* result in miscompiled + # code. This has been in the ebuild for > 10 years but even in 2022, + # it's still relevant: + # - https://github.com/llvm/llvm-project/issues/55255 + # - https://github.com/openssl/openssl/issues/18225 + # - https://github.com/openssl/openssl/issues/18663#issuecomment-1181478057 + # Don't remove the no strict aliasing bits below! + filter-flags -fstrict-aliasing + append-flags -fno-strict-aliasing + + append-cppflags -DOPENSSL_NO_BUF_FREELISTS + + append-flags $(test-flags-CC -Wa,--noexecstack) + # bug #197996 unset APPS # bug #312551 @@ -162,6 +151,10 @@ multilib_src_configure() { tc-export AR CC CXX RANLIB RC + multilib-minimal_src_configure +} + +multilib_src_configure() { use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") @@ -178,10 +171,10 @@ multilib_src_configure() { # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" #fi - local sslout=$(./gentoo.config) + local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4") einfo "Use configuration ${sslout:-(openssl knows best)}" - local config="perl Configure" - [[ -z ${sslout} ]] && config="sh config -v" + local config=( perl "${S}/Configure" ) + [[ -z ${sslout} ]] && config=( sh "${S}/config" -v ) # "disable-deprecated" option breaks too many consumers. # Don't set it without thorough revdeps testing. @@ -219,7 +212,7 @@ multilib_src_configure() { threads ) - edo ${config} "${myeconfargs[@]}" + edo "${config[@]}" "${myeconfargs[@]}" } multilib_src_compile() {