dev-libs/openssl: new legacy 1.1 ebuild compatible with slot 3
This commit is contained in:
parent
90bbb53903
commit
dda4c39eea
2 changed files with 269 additions and 5 deletions
|
@ -2,12 +2,8 @@ AUX gentoo.config-1.0.2 5302 BLAKE2B b699533ed86c48c0d033092b4d901de837a6a495113
|
|||
AUX gentoo.config-1.0.4 6038 BLAKE2B e2fd6b073cc6be3fa312a73cf031140e3f91eafe432212f8b24795297fdd0a4090d605fcfcbc59df6cc9f659a3dcd0e56df8eb734aa117d5e1f4fe78b4063f8c SHA512 df7c9944b993536df7ff8cd5159ba1534b122fb1db946890e7b25b10596c9259e569e0e3a5fe854726ac8302eb9804edb7af344386b146146d862596175d5ca2
|
||||
AUX openssl-1.1.0j-parallel_install_fix.patch 515 BLAKE2B a1bcffce4dc9e0566e21e753cf1a18ee6eac92aca5880c50b33966d8ecb391f7430e1db6ea5a30ee4e3a9d77fb9e5542e864508b01c325011e368165e079a96c SHA512 0badd29ec8cffd95b2b69a4b8f8eecfc9ea0c00a812b298a650ee353e3965147fd2da1f9058d2d51744838f38168257b89aaf317287c55a7b76f16a69c781828
|
||||
AUX openssl-1.1.1i-riscv32.patch 2557 BLAKE2B 97e51303706ee96d3fae46959b91d1021dcbb3efa421866f6e09bbee6287aae95c6f5d9498bd9d8974b0de747ef696242691cfebec90b31dc9e2cc31b41b81ec SHA512 f75ae1034bb9dda7f4959e8a5d6d0dae21200723d82aebfbea58bd1d7775ef4042e49fdf49d5738771d79d764e44a1b6e0da341d210ea51d21516bb3874b626a
|
||||
DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659
|
||||
DIST openssl-1.0.2t-bindist-1.0.tar.xz 13872 BLAKE2B b2aade96a6e0ca6209a39e205b1c838de945903fcf959c62cc29ddcd1a0cb360fc5db234df86860a6a4c096f5ecc237611e4c2946b986a5500c24ba93c208ef4 SHA512 a48a7efb9b973b865bcc5009d450b428ed6b4b95e4cefe70c51056e47392c8a7bec58215168d8b07712419dc74646c2bd2fd23bcfbba2031376e292249a6b1b6
|
||||
DIST openssl-1.0.2u.tar.gz 5355412 BLAKE2B b2ff2a10e5851af5aca4093422a9a072c794e87b997263826c1c35910c040f695fac63decac5856cb49399ed03d410f97701d9fd4e1ebfbcacd8f3a74ce8bf57 SHA512 c455bb309e20e2c2d47fdc5619c734d107d5c8c38c1409903ce979acc120b0d5fa0312917c0aa0d630e402d092a703d4249643f36078e8528a3cafc9dac6ab32
|
||||
DIST openssl-1.1.1w.tar.gz 9893384 BLAKE2B 2fdba6ca0188928ab2f74e606136afca66cfa0467170fa6298ef160b64ac6fdcad1e81e5dd14013ce0e9921d0f7417edec531cd0beaf1196fec704c2c6d48395 SHA512 b4c625fe56a4e690b57b6a011a225ad0cb3af54bd8fb67af77b5eceac55cc7191291d96a660c5b568a08a2fbf62b4612818e7cca1bb95b2b6b4fc649b0552b6d
|
||||
DIST openssl-1.1.1w.tar.gz.asc 833 BLAKE2B d990be69ed913509d52b78e7473668429d4485adb29ef03e4612dd0cadbac4f04c7289d8e5baf6f397bcedeaac9f802f18fc719964d882ae0514ed1ca16ae277 SHA512 0f3d7aa48b1cabf8dd43e8108aeed10a4dffb4f5a244d4da9c86ea358b0c8b90c46da561d21e01c567c2f5035d824ed82ec104aad1776b7f33a1be85990e98ef
|
||||
EBUILD openssl-1.0.2u-r1.ebuild 10129 BLAKE2B fe03657452c1218e9ed6fff4b939ae5a1b648b20495690c8cc5f8668b6985c860176733080b4f0265d4bae6bc060bf432995a404be24733735ede3f5440f793a SHA512 e843699fac5b1bdf348fb13cd7de96af09af709e6b9dd5d0ca20d867a38ad870504ac58e7bf21efc01f8303520938031f36f0f5e5d1e76458c6e954ee464f364
|
||||
EBUILD openssl-1.1.1w-r1.ebuild 8232 BLAKE2B 2ae0e5e9b162fe27e592c2e89e6a965e331d89f0e0dadaf41df53f1d8e61cc851a1a3098b6b48ba1ef9615e0128c4e011c589ea5b7bf563992eb523e9fc72ae1 SHA512 7c43d5ad4dfc8f428c589f4570aedd950e964fde29b8d6313cb8c063070c11d0947f6ce183e360e2cf5ce9ea07f92d26cf001711bc2e1c242a91e80e69fe0ce5
|
||||
EBUILD openssl-1.1.1w.ebuild 8233 BLAKE2B 4657e3e413f25f4503dbc5484e3d06e63c25c64f9132e3ce64629601f729380b6e1918d34f19e9269ac8ed066b2014d2163d54808e67476d033b2af1603cf609 SHA512 122f5d3e3577d9da17d0a49b38925d3fbbaab4117c116f37d0430463d5dcaa3803089cacbc5fddbc5466506eb6a59f1b5fef130dec200c5951f67d9d6c5b160b
|
||||
EBUILD openssl-1.1.1w-r3.ebuild 8260 BLAKE2B 321695ed8fda30cd2af5f14062ea4af7e45f4352ff6bb0eb2c59fe20f8a303dedc86713ab1d1f7df0b13fe68a8d2f20d7f2151486ed73ea05be8b71fdf88ce0d SHA512 41cdcd8d30595fa81b62e25f1cbab219942b1566715e05c8b7a58e618cd7d738db79415558fafa2c4eb52fa932766102e0691222d4a0a8f16add7bd934417327
|
||||
MISC metadata.xml 1566 BLAKE2B ae4515c90356b8a2d3e2df8e0cea43c587f73bd2e08f696c065c2254639009b6806806df8a84c63d00781b0cbf906a0d11e94b715749ab1292e77afa9cd5bcc2 SHA512 4a5e6b894476e74f1f93f00c326139eadf1afd498f4508fb723322539f29e53aec6dd198da878db714d2da61ab266089c2dd2f91b9fc66a34375ceb6f68ca394
|
||||
|
|
268
dev-libs/openssl/openssl-1.1.1w-r3.ebuild
Normal file
268
dev-libs/openssl/openssl-1.1.1w-r3.ebuild
Normal file
|
@ -0,0 +1,268 @@
|
|||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openssl.org.asc
|
||||
inherit edo flag-o-matic toolchain-funcs multilib-minimal verify-sig
|
||||
|
||||
MY_P=${P/_/-}
|
||||
DESCRIPTION="Full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="https://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
||||
verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0/3" # for satisfying with newer compatible wbuilds requiring slot 3
|
||||
if [[ ${PV} != *_pre* ]] ; then
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
IUSE="+asm rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-compression tls-heartbeat vanilla verify-sig weak-ssl-ciphers"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
>=dev-lang/perl-5
|
||||
sctp? ( >=net-misc/lksctp-tools-1.0.12 )
|
||||
test? (
|
||||
sys-apps/diffutils
|
||||
app-alternatives/bc
|
||||
kernel_linux? ( sys-process/procps )
|
||||
)
|
||||
verify-sig? ( =sec-keys/openpgp-keys-openssl-20230801 )"
|
||||
PDEPEND="app-misc/ca-certificates"
|
||||
|
||||
# force upgrade to prevent broken login, bug #696950
|
||||
RDEPEND+=" !<net-misc/openssh-8.0_p1-r3"
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
usr/include/openssl/opensslconf.h
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
# General patches which are suitable to always apply
|
||||
# If they're Gentoo specific, add to USE=-vanilla logic in src_prepare!
|
||||
"${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch # bug #671602
|
||||
"${FILESDIR}"/${PN}-1.1.1i-riscv32.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
# must check in pkg_setup; sysctl doesn't work with userpriv!
|
||||
if use test && use sctp; then
|
||||
# test_ssl_new will fail with "Ensure SCTP AUTH chunks are enabled in kernel"
|
||||
# if sctp.auth_enable is not enabled.
|
||||
local sctp_auth_status=$(sysctl -n net.sctp.auth_enable 2>/dev/null)
|
||||
if [[ -z "${sctp_auth_status}" ]] || [[ ${sctp_auth_status} != 1 ]]; then
|
||||
die "FEATURES=test with USE=sctp requires net.sctp.auth_enable=1!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Can delete this once test fix patch is dropped
|
||||
if use verify-sig ; then
|
||||
# Needed for downloaded patch (which is unsigned, which is fine)
|
||||
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.asc}
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# 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
|
||||
|
||||
if ! use vanilla ; then
|
||||
PATCHES+=(
|
||||
# Add patches which are Gentoo-specific customisations here
|
||||
)
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
if use test && use sctp && has network-sandbox ${FEATURES}; then
|
||||
einfo "Disabling test '80-test_ssl_new.t' which is known to fail with FEATURES=network-sandbox ..."
|
||||
rm test/recipes/80-test_ssl_new.t || die
|
||||
fi
|
||||
|
||||
# Test fails depending on kernel configuration, bug #699134
|
||||
rm test/recipes/30-test_afalg.t || die
|
||||
|
||||
# Remove test target when FEATURES=test isn't set
|
||||
if ! use test ; then
|
||||
sed \
|
||||
-e '/^$config{dirs}/s@ "test",@@' \
|
||||
-i Configure || die
|
||||
fi
|
||||
|
||||
if use prefix && [[ ${CHOST} == *-solaris* ]] ; then
|
||||
# use GNU ld full option, not to confuse it on Solaris
|
||||
sed -i \
|
||||
-e 's/-Wl,-M,/-Wl,--version-script=/' \
|
||||
-e 's/-Wl,-h,/-Wl,--soname=/' \
|
||||
Configurations/10-main.conf || die
|
||||
fi
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
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/12247
|
||||
# - 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
|
||||
# The OpenSSL developers don't test with LTO right now, it leads to various
|
||||
# warnings/errors (which may or may not be false positives), it's considered
|
||||
# unsupported, and it's not tested in CI: https://github.com/openssl/openssl/issues/18663.
|
||||
filter-lto
|
||||
|
||||
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
||||
|
||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||
|
||||
# bug #197996
|
||||
unset APPS
|
||||
# bug #312551
|
||||
unset SCRIPTS
|
||||
# bug #311473
|
||||
unset CROSS_COMPILE
|
||||
|
||||
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")
|
||||
|
||||
# See if our toolchain supports __uint128_t. If so, it's 64bit
|
||||
# friendly and can use the nicely optimized code paths, bug #460790.
|
||||
#local ec_nistp_64_gcc_128
|
||||
#
|
||||
# Disable it for now though (bug #469976)
|
||||
# Do NOT re-enable without substantial discussion first!
|
||||
#
|
||||
#echo "__uint128_t i;" > "${T}"/128.c
|
||||
#if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then
|
||||
# ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
|
||||
#fi
|
||||
|
||||
local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4")
|
||||
einfo "Use configuration ${sslout:-(openssl knows best)}"
|
||||
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.
|
||||
# Make sure user flags don't get added *yet* to avoid duplicated
|
||||
# flags.
|
||||
local myeconfargs=(
|
||||
${sslout}
|
||||
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2")
|
||||
enable-camellia
|
||||
enable-ec
|
||||
enable-ec2m
|
||||
enable-sm2
|
||||
enable-srp
|
||||
$(use elibc_musl && echo "no-async")
|
||||
${ec_nistp_64_gcc_128}
|
||||
enable-idea
|
||||
enable-mdc2
|
||||
enable-rc5
|
||||
$(use_ssl sslv3 ssl3)
|
||||
$(use_ssl sslv3 ssl3-method)
|
||||
$(use_ssl asm)
|
||||
$(use_ssl rfc3779)
|
||||
$(use_ssl sctp)
|
||||
$(use test || echo "no-tests")
|
||||
$(use_ssl tls-compression zlib)
|
||||
$(use_ssl tls-heartbeat heartbeats)
|
||||
$(use_ssl weak-ssl-ciphers)
|
||||
|
||||
--prefix="${EPREFIX}"/usr
|
||||
--openssldir="${EPREFIX}"${SSL_CNF_DIR}
|
||||
--libdir=$(get_libdir)
|
||||
|
||||
shared
|
||||
threads
|
||||
)
|
||||
|
||||
edo "${config[@]}" "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
emake all
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# Only -j1 is supported for the install targets:
|
||||
# https://github.com/openssl/openssl/issues/21999#issuecomment-1771150305
|
||||
emake DESTDIR="${D}" -j1 install_sw
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
emake DESTDIR="${D}" -j1 install_ssldirs
|
||||
emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} MANSUFFIX=ssl -j1 install_docs
|
||||
fi
|
||||
|
||||
# This is crappy in that the static archives are still built even
|
||||
# when USE=static-libs. But this is due to a failing in the openssl
|
||||
# build system: the static archives are built as PIC all the time.
|
||||
# Only way around this would be to manually configure+compile openssl
|
||||
# twice; once with shared lib support enabled and once without.
|
||||
if ! use static-libs; then
|
||||
rm "${ED}"/usr/$(get_libdir)/lib{crypto,ssl}.a || die
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# openssl installs perl version of c_rehash by default, but
|
||||
# we provide a shell version via app-misc/c_rehash
|
||||
rm "${ED}"/usr/bin/c_rehash || die
|
||||
|
||||
dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
|
||||
|
||||
# Create the certs directory
|
||||
keepdir ${SSL_CNF_DIR}/certs
|
||||
|
||||
# bug #254521
|
||||
dodir /etc/sandbox.d
|
||||
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
|
||||
|
||||
diropts -m0700
|
||||
keepdir ${SSL_CNF_DIR}/private
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)"
|
||||
openssl rehash "${EROOT}${SSL_CNF_DIR}/certs"
|
||||
eend $?
|
||||
}
|
Loading…
Reference in a new issue