summaryrefslogtreecommitdiff
path: root/dev-libs
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libdwarf/Manifest2
-rw-r--r--dev-libs/libdwarf/libdwarf-0.9.0.ebuild (renamed from dev-libs/libdwarf/libdwarf-0.4.1.ebuild)2
-rw-r--r--dev-libs/libdwarf/metadata.xml3
-rw-r--r--dev-libs/openssl/Manifest4
-rw-r--r--dev-libs/openssl/files/gentoo.config-1.0.4 (renamed from dev-libs/openssl/files/gentoo.config-1.0.2)19
-rw-r--r--dev-libs/openssl/openssl-3.1.1.ebuild (renamed from dev-libs/openssl/openssl-3.0.3-r1.ebuild)185
6 files changed, 86 insertions, 129 deletions
diff --git a/dev-libs/libdwarf/Manifest b/dev-libs/libdwarf/Manifest
index dcc5163..53fb6a2 100644
--- a/dev-libs/libdwarf/Manifest
+++ b/dev-libs/libdwarf/Manifest
@@ -1 +1 @@
-DIST libdwarf-0.4.1.tar.xz 2410800 BLAKE2B 88753ebc2606fbcc7a41ea3db8f5bc1b41357705f7b4e21acb49c13d96f3741a7305b764ab973bc9ac0c6c4246b668f82d93886451d9963f4237a9ff47694429 SHA512 793fe487de80fe6878f022b90f49ec334a0d7db071ff22a11902db5e3457cc7f3f853945a9ac74de2c40f7f388277f21c5b2e62745bca92d2bb55c51e9577693
+DIST libdwarf-0.9.0.tar.xz 2718492 BLAKE2B fd3d2d94532a009dfceb46869481507bf92d8ad7236bc2240049272f5e9f102d1a53bcc57df83fcdfc0ab37fbdab6e3926312d3619d8b0e669198b47bba1b950 SHA512 282d90dfc9da704eb64a4ba1141f2ae660feeb14bbf1a72377386698e3124928b44a6914d8e88e6141ab08835ce723ad090a853ad57dbcb439dbba57255fb589
diff --git a/dev-libs/libdwarf/libdwarf-0.4.1.ebuild b/dev-libs/libdwarf/libdwarf-0.9.0.ebuild
index ee99812..475c379 100644
--- a/dev-libs/libdwarf/libdwarf-0.4.1.ebuild
+++ b/dev-libs/libdwarf/libdwarf-0.9.0.ebuild
@@ -14,7 +14,6 @@ IUSE="dwarfexample dwarfgen static-libs"
DEPEND="
sys-libs/zlib
- dwarfgen? ( virtual/libelf )
"
RDEPEND="${DEPEND}"
@@ -24,7 +23,6 @@ src_configure() {
--enable-shared
$(use_enable dwarfexample)
$(use_enable dwarfgen)
- $(use_enable dwarfgen libelf)
$(use_enable static-libs static)
)
econf "${myeconfargs[@]}"
diff --git a/dev-libs/libdwarf/metadata.xml b/dev-libs/libdwarf/metadata.xml
index c4a208f..32edad3 100644
--- a/dev-libs/libdwarf/metadata.xml
+++ b/dev-libs/libdwarf/metadata.xml
@@ -9,4 +9,7 @@
<flag name="dwarfexample">dwarfexample</flag>
<flag name="dwarfgen">dwarfgen</flag>
</use>
+ <upstream>
+ <remote-id type="github">davea42/libdwarf-code</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest
index 0f681d0..a86d270 100644
--- a/dev-libs/openssl/Manifest
+++ b/dev-libs/openssl/Manifest
@@ -1,2 +1,2 @@
-DIST openssl-3.0.3.tar.gz 15058905 BLAKE2B 8141d13dbea2f1febdd4e46aa404e9f3bac51e1fdc0c9b0df8bf3bf6852e18b09201a2a8cbee99f72e8d6de660834093449b7a14a3fbdda8511286ca3b6743e7 SHA512 949472025211fabdaf2564122f0a9a3baef0facb6373e90cf6c4485164a50898050b179722d0b358c4d8cf1787384ea30d5fd03b98757634631d3e8978509b1a
-DIST openssl-3.0.3.tar.gz.asc 488 BLAKE2B 3f31e3a73706b69683220e05b1b4ddc75dc3e7e12652dca711e4aa0eb3c023ef736aee9ade15172d7f28e1e1af03e86d4854ec6c3d167cad42882f483c5e56d4 SHA512 04afe65c6af1ae43a9967462383a6a4f567f5acff19ec1952cd6fce2dc3c3d4dfb3cb54126562724c148f40dcb66668abf727282d35730bbf36f82b5c6bacace
+DIST openssl-3.1.1.tar.gz 15544757 BLAKE2B 094f7e28f16de6528016fcd21df1d7382b0dbdcd80ec469d37add9c37f638c059dda3ffb4415eba890a33d146ddc9016bcc7192df101c73be5e70faf6e3b1097 SHA512 8ba9dd6ab87451e126c19cc106ccd1643ca48667d6c37504d0ab98205fbccf855fd0db54474b4113c4c3a15215a4ef77a039fb897a69f71bcab2054b2effd1d9
+DIST openssl-3.1.1.tar.gz.asc 833 BLAKE2B 5a2a9aeb475b843862e133d53bc5bb3c8e12e8e03b1e2da41d0eaa0eade1ae03c4318ad1f5c490c5e1ed7e6ac6275a6d7c881d99993911722b043b15d1622b25 SHA512 83349020c67e5b956f3ef37604a03a1970ea393f862691f5fd5d85930c01e559e25db17d397d8fd230c3862a8b2fba2d5c7df883d56d7472f4c01dab3a661cb2
diff --git a/dev-libs/openssl/files/gentoo.config-1.0.2 b/dev-libs/openssl/files/gentoo.config-1.0.4
index 68d7d0a..79f6331 100644
--- a/dev-libs/openssl/files/gentoo.config-1.0.2
+++ b/dev-libs/openssl/files/gentoo.config-1.0.4
@@ -77,7 +77,9 @@ fi
# Detect target arch
machine=""
+submachine=""
chost_machine=${CHOST%%-*}
+[[ ${CC} == *clang* ]] && submachine="-clang"
case ${system} in
linux)
case ${chost_machine}:${ABI} in
@@ -95,17 +97,22 @@ linux)
# hppa64*) machine=parisc64;;
hppa*) machine="generic32 -DB_ENDIAN";;
i[0-9]86*|\
- x86_64*:x86) machine=elf;;
+ x86_64*:x86) machine=x86${submachine};;
ia64*) machine=ia64;;
- m68*) machine="generic32 -DB_ENDIAN";;
- mips*el*) machine="generic32 -DL_ENDIAN";;
- mips*) machine="generic32 -DB_ENDIAN";;
+ loongarch64*) machine="loongarch64 -DL_ENDIAN" system=linux64;;
+ m68*) machine="latomic -DB_ENDIAN";;
+ mips*el*:o32) machine="mips32 -DL_ENDIAN";;
+ mips*:o32) machine="mips32 -DB_ENDIAN";;
+ mips*el*:n32) machine="mips64 -DL_ENDIAN";;
+ mips*:n32) machine="mips64 -DB_ENDIAN";;
+ mips*el*:n64) machine="mips64 -DL_ENDIAN" system=linux64;;
+ mips*:n64) machine="mips64 -DB_ENDIAN" system=linux64;;
powerpc64*le*)machine=ppc64le;;
powerpc64*) machine=ppc64;;
powerpc*le*) machine="generic32 -DL_ENDIAN";;
powerpc*) machine=ppc;;
riscv32*) machine="generic32 -DL_ENDIAN";;
- riscv64*) machine="generic64 -DL_ENDIAN";;
+ riscv64*) machine="riscv64 -DL_ENDIAN" system=linux64;;
# sh64*) machine=elf;;
sh*b*) machine="generic32 -DB_ENDIAN";;
sh*) machine="generic32 -DL_ENDIAN";;
@@ -120,7 +127,7 @@ linux)
s390x*) machine=s390x system=linux64;;
s390*) machine="generic32 -DB_ENDIAN";;
x86_64*:x32) machine=x32;;
- x86_64*) machine=x86_64;;
+ x86_64*) machine=x86_64${submachine};;
esac
;;
BSD)
diff --git a/dev-libs/openssl/openssl-3.0.3-r1.ebuild b/dev-libs/openssl/openssl-3.1.1.ebuild
index 86e51bf..d391173 100644
--- a/dev-libs/openssl/openssl-3.0.3-r1.ebuild
+++ b/dev-libs/openssl/openssl-3.1.1.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/openssl.org.asc
inherit edo flag-o-matic linux-info toolchain-funcs multilib-minimal multiprocessing verify-sig
DESCRIPTION="Robust, full-featured Open Source Toolkit for the Transport Layer Security (TLS)"
@@ -15,21 +16,22 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
- SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
- verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )"
- VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/openssl.org.asc
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+ SRC_URI="
+ mirror://openssl/source/${MY_P}.tar.gz
+ verify-sig? ( mirror://openssl/source/${MY_P}.tar.gz.asc )
+ "
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
fi
S="${WORKDIR}"/${MY_P}
LICENSE="Apache-2.0"
-SLOT="0/3" # .so version of libssl/libcrypto
+SLOT="0/$(ver_cut 1)" # .so version of libssl/libcrypto
IUSE="+asm cpu_flags_x86_sse2 fips ktls rfc3779 sctp static-libs test tls-compression vanilla verify-sig weak-ssl-ciphers"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
- >=app-misc/c_rehash-1.7-r1
+ !<net-misc/openssh-9.2_p1-r3
tls-compression? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
"
BDEPEND="
@@ -40,7 +42,7 @@ BDEPEND="
sys-devel/bc
sys-process/procps
)
- verify-sig? ( sec-keys/openpgp-keys-openssl )"
+ verify-sig? ( >=sec-keys/openpgp-keys-openssl-20230207 )"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}"
@@ -50,11 +52,6 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/openssl/configuration.h
)
-PATCHES=(
- # General patches which are suitable to always apply
- # If they're Gentoo specific, add to USE=-vanilla logic in src_prepare!
-)
-
pkg_setup() {
if use ktls ; then
if kernel_is -lt 4 18 ; then
@@ -63,6 +60,7 @@ pkg_setup() {
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!"
+ use test && CONFIG_CHECK+=" ~CRYPTO_USER_API_SKCIPHER"
linux-info_pkg_setup
fi
@@ -81,14 +79,17 @@ pkg_setup() {
fi
}
-src_prepare() {
- # Allow openssl to be cross-compiled
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
- chmod a+rx gentoo.config || die
+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}"/${P}.tar.gz{,.asc}
+ fi
- # Keep this in sync with app-misc/c_rehash
- SSL_CNF_DIR="/etc/ssl"
+ 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
@@ -106,18 +107,13 @@ src_prepare() {
rm test/recipes/80-test_ssl_new.t || die
fi
- # - Make sure the man pages are suffixed (bug #302165)
- # - Don't bother building man pages if they're disabled
- # - Make DOCDIR Gentoo compliant
- sed -i \
- -e '/^MANSUFFIX/s:=.*:=ssl:' \
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
- -e $(has noman FEATURES \
- && echo '/^install:/s:install_docs::' \
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \
- Configurations/unix-Makefile.tmpl \
- || die
+ # Test fails depending on kernel configuration, bug #699134
+ rm test/recipes/30-test_afalg.t || 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
@@ -130,32 +126,17 @@ src_prepare() {
# 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
+ # 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-flags $(test-flags-CC -Wa,--noexecstack)
- # Prefixify Configure shebang (bug #141906)
- sed \
- -e "1s,/usr/bin/env,${BROOT}&," \
- -i Configure || die
-
- # Remove test target when FEATURES=test isn't set
- if ! use test ; then
- sed \
- -e '/^$config{dirs}/s@ "test",@@' \
- -i Configure || 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
- ./config --test-sanity || die "I AM NOT SANE"
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
# bug #197996
unset APPS
# bug #312551
@@ -165,14 +146,16 @@ 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")
- local sslout=$(./gentoo.config)
+ local sslout=$(bash "${FILESDIR}/gentoo.config-1.0.4")
einfo "Using configuration: ${sslout:-(openssl knows best)}"
- local config="Configure"
- [[ -z ${sslout} ]] && config="config"
# https://github.com/openssl/openssl/blob/master/INSTALL.md#enable-and-disable-features
local myeconfargs=(
@@ -185,7 +168,7 @@ multilib_src_configure() {
enable-sm2
enable-srp
$(use elibc_musl && echo "no-async")
- $(use amd64 && echo "enable-ec_nistp_64_gcc_128")
+ enable-ec_nistp_64_gcc_128
enable-idea
enable-mdc2
$(use fips && echo "enable-fips")
@@ -205,38 +188,15 @@ multilib_src_configure() {
threads
)
- CFLAGS= LDFLAGS= edo \
- ./${config} \
- "${myeconfargs[@]}"
-
- # Clean out hardcoded flags that openssl uses
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
- -e 's:^CFLAGS=::' \
- -e 's:\(^\| \)-fomit-frame-pointer::g' \
- -e 's:\(^\| \)-O[^ ]*::g' \
- -e 's:\(^\| \)-march=[^ ]*::g' \
- -e 's:\(^\| \)-mcpu=[^ ]*::g' \
- -e 's:\(^\| \)-m[^ ]*::g' \
- -e 's:^ *::' \
- -e 's: *$::' \
- -e 's: \+: :g' \
- -e 's:\\:\\\\:g'
- )
-
- # Now insert clean default flags with user flags
- sed -i \
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
- Makefile \
- || die
+ edo perl "${S}/Configure" "${myeconfargs[@]}"
}
multilib_src_compile() {
- # depend is needed to use $confopts; it also doesn't matter
- # that it's -j1 as the code itself serializes subdirs
- emake -j1 depend
+ emake build_sw
- emake all
+ if multilib_is_native_abi; then
+ emake build_docs
+ fi
}
multilib_src_test() {
@@ -246,10 +206,17 @@ multilib_src_test() {
}
multilib_src_install() {
- # We need to create ${ED}/usr on our own to avoid a race condition (bug #665130)
- dodir /usr
+ emake DESTDIR="${D}" install_sw
+ if use fips; then
+ emake DESTDIR="${D}" install_fips
+ # Regen this in pkg_preinst, bug 900625
+ rm "${ED}${SSL_CNF_DIR}"/fipsmodule.cnf || die
+ fi
- emake DESTDIR="${D}" install
+ if multilib_is_native_abi; then
+ emake DESTDIR="${D}" install_ssldirs
+ emake DESTDIR="${D}" DOCDIR='$(INSTALLTOP)'/share/doc/${PF} 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
@@ -271,35 +238,6 @@ multilib_src_install_all() {
# Create the certs directory
keepdir ${SSL_CNF_DIR}/certs
- # Namespace openssl programs to prevent conflicts with other man pages
- cd "${ED}"/usr/share/man || die
- local m d s
- for m in $(find . -type f | xargs grep -L '#include') ; do
- d=${m%/*} ; d=${d#./} ; m=${m##*/}
-
- [[ ${m} == openssl.1* ]] && continue
-
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
-
- mv ${d}/{,ssl-}${m} || die
-
- # Fix up references to renamed man pages
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} || die
- ln -s ssl-${m} ${d}/openssl-${m} || die
-
- # Locate any symlinks that point to this man page
- # We assume that any broken links are due to the above renaming
- for s in $(find -L ${d} -type l) ; do
- s=${s##*/}
- rm -f ${d}/${s}
-
- # We don't want to "|| die" here
- ln -s ssl-${m} ${d}/ssl-${s}
- ln -s ssl-${s} ${d}/openssl-${s}
- done
- done
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
-
# bug #254521
dodir /etc/sandbox.d
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
@@ -308,8 +246,19 @@ multilib_src_install_all() {
keepdir ${SSL_CNF_DIR}/private
}
+pkg_preinst() {
+ if use fips; then
+ # Regen fipsmodule.cnf, bug 900625
+ ebegin "Running openssl fipsinstall"
+ "${ED}/usr/bin/openssl" fipsinstall -quiet \
+ -out "${ED}${SSL_CNF_DIR}/fipsmodule.cnf" \
+ -module "${ED}/usr/$(get_libdir)/ossl-modules/fips.so"
+ eend $?
+ fi
+}
+
pkg_postinst() {
- ebegin "Running 'c_rehash ${EROOT}${SSL_CNF_DIR}/certs/' to rebuild hashes (bug #333069)"
- c_rehash "${EROOT}${SSL_CNF_DIR}/certs" >/dev/null
+ ebegin "Running 'openssl rehash ${EROOT}${SSL_CNF_DIR}/certs' to rebuild hashes (bug #333069)"
+ openssl rehash "${EROOT}${SSL_CNF_DIR}/certs"
eend $?
}