summaryrefslogtreecommitdiff
path: root/dev-libs/elfutils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-29 03:04:53 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-10-29 03:04:53 +0000
commitbd35a61d88b111f25f4b10126e0d4755545fc7a5 (patch)
tree656ac661ed7b28ad66ba778b74bc5fe4e2b86b10 /dev-libs/elfutils
parent5d4291ee2ba8b85e8515b5f47b814a5c872eed04 (diff)
gentoo auto-resync : 29:10:2024 - 03:04:53
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/Manifest14
-rw-r--r--dev-libs/elfutils/elfutils-0.191-r1.ebuild2
-rw-r--r--dev-libs/elfutils/elfutils-0.191-r2.ebuild2
-rw-r--r--dev-libs/elfutils/elfutils-0.192.ebuild145
-rw-r--r--dev-libs/elfutils/elfutils-9999.ebuild4
-rw-r--r--dev-libs/elfutils/files/elfutils-0.192-configure-better-error-message.patch96
-rw-r--r--dev-libs/elfutils/files/elfutils-0.192-libelf-static-link-libeu.patch31
-rw-r--r--dev-libs/elfutils/files/elfutils-0.192-stacktrace-maybe-uninit.patch38
-rw-r--r--dev-libs/elfutils/metadata.xml5
9 files changed, 330 insertions, 7 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index 6cb4a2e98755..ca688a6e44a3 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -2,13 +2,19 @@ AUX elfutils-0.189-musl-aarch64-regs.patch 1865 BLAKE2B c177254f31b214d39dc18a95
AUX elfutils-0.189-musl-macros.patch 2421 BLAKE2B 23c214481ee441b4f3b66bb5cfd8a5321328136e743ad6b48533b2943d6cc896726d49d0b7493b5b57f0dbdec5bda9dcacf8fef485b0fb58bc24f732920a6e4e SHA512 86b249a14ed5a352acb16115559163d0f762ff718a23ff2989974e28f16f64c7554f3dcf5f6d5557bce524c3142e0e61ba315f1c20ec4106074b4d5901379fb6
AUX elfutils-0.191-avoid-overriding-libcxx-system-header.patch 977 BLAKE2B 04fd3ed75f6e5ff684acf504cbab0e9bc7ed8d3a3e769db8acde3cfcb9bc8181dc03e73059c394cd52df4dd9eeb1f2fddbdb2564ac67036a23806f7fe5267ca5 SHA512 fa94d67553f643cad2f99339cd2ea5df1276f381723dc02664de337b3a971c94227ba157381af253291dac18db5534ea5dad9a4d6d3b97c34db297c28b5af021
AUX elfutils-0.191-musl-macros.patch 530 BLAKE2B d403d8e5d92b1bcef960a410cd27e3d72a807ff2041683ee4420e392d6add88b0584a18b0a3612a98ddccae6494dcf7e0764362feeeea19b8f1af17df93c24d2 SHA512 af7e924da81e26df7febc6b149d515d2a6da4b96bbfef878d42b3291dca1eafbf5ab145bc2f033dfd33f1213009844fcc74b410987c09b926f60113e35a49882
+AUX elfutils-0.192-configure-better-error-message.patch 5115 BLAKE2B 5b46b608008f0a32da4dbbc90eacc6e1ab4bac7fd9adb831d77b50aa47fa3e665bb610e7e35ec9e2ef191ab150040c0487e882693fd8bce0e4fd6fa2eda0f63f SHA512 5951d4740758e724493597c938178e339012ed3c42e841ce4db28ec04d4b435c4ce3ffe6fef7232380c025d6efee2564a43a94df9b55793730fd4811e5afcf0a
+AUX elfutils-0.192-libelf-static-link-libeu.patch 1157 BLAKE2B c60def4f80f3486ad43643d1caf5063f6e3fb6343aa4ba8ae26071a8b66c9a7e4d1c4235ff67368fe18de052e2edb6979cdca2ac3fb04385f83ef76f6d991c8f SHA512 9dd6ed318f07c0303a7a9f117568753054b7d676d3c171c713c3c8be6dec684b850603692a7c20205c867973689758e31380c570f6442d02413ca4f109d669ea
+AUX elfutils-0.192-stacktrace-maybe-uninit.patch 1264 BLAKE2B 14de60367e45d5cdf6311b41209dd3eacf1a887ccd5a8a03dae5c2df095f611d765dba2abab38bf86cfe76837ca6ee3f9dbd379d5a63bf864b3091847481110b SHA512 221ee907a70cfec48650f915d0dec1907dcbbffea92c79439a5040b93f255e9f34b16c07aeb87e9e569941f7ee0840f9011e96f6ced43c16e6e627c2cf151eea
DIST elfutils-0.190.tar.bz2 9162766 BLAKE2B 9934aff08f1898377708b28595fb52130ef9f80408132ac7d306845b10672ba45cf1ac69783da07b3eea9fd647741d44da45b8b2626c45a768cb2844c6186513 SHA512 9c4f5328097e028286c42f29e39dc3d80914b656cdfbbe05b639e91bc787ae8ae64dd4d69a6e317ce30c01648ded10281b86a51e718295f4c589df1225a48102
DIST elfutils-0.190.tar.bz2.sig 310 BLAKE2B d6a2d490aa6815ed9a7c3624050716ebf7c50465af9907d471d47aa3b57590faf9b9ee03de127c6b3bdffa6948414aab6aa8c784ce29570f76bb03ee2021c062 SHA512 7cd88c19402a959679204a5b01ddd48720e224b84268d0d7452f0f1433150b97dd02288fac204fbd5e2fd6f227473bfe62205b350d5fe2e17addf45fb452eed6
DIST elfutils-0.191.tar.bz2 9310088 BLAKE2B 2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92a5555d7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04
DIST elfutils-0.191.tar.bz2.sig 310 BLAKE2B 5afee19515a115d4ca6d1e0c4a49eca84bb4b911687492934e939a80ac75b7fcea9b6bf5fc0f2248a4c64ef09bd5af9dfc60c72410cba33b78444c38443ad279 SHA512 ab030739d95d13abb84cf4dc6c5407e51d0bd0bca108e27654a1830371694181a1b6f115fdbb4ae0772390f54f1c4811e5ae26b38fdcfd3275177a3716adfd22
+DIST elfutils-0.192.tar.bz2 11913897 BLAKE2B cf9036a1fca416e0d47c76471093609230545aee63e31e30991dc3c88417d7c621c930bb74809374da3bf142501cee91a2b861a5a89efcb5e1ac184df5defce1 SHA512 543188f5f2cfe5bc7955a878416c5f252edff9926754e5de0c6c57b132f21d9285c9b29e41281e93baad11d4ae7efbbf93580c114579c182103565fe99bd3909
+DIST elfutils-0.192.tar.bz2.sig 310 BLAKE2B b34bd17e161c827ce502338388f0f7604fca8478e8e2f05f1ad744b5288f7767466d005d7591ad74098eda53aa3bcde8a3b485983447a434e2cb2e5e64c38063 SHA512 9de0731dd3986a3dde03cfacdc3daa668f0e2cc482adfc31ab97320f85f7d13d3f056154aa16299db3f09e1c89020635012ffdd0e4cb68c1391b0e218721fb22
EBUILD elfutils-0.190.ebuild 3189 BLAKE2B e69c096e08fd48d1d2f5615256069552f0db0f4f12c77989639a400cd19e50d0285185f049b8b2846107dfa0b06f3573ad17bb5c5e98313cf5215d5e4319439e SHA512 59dbfef36e4cb7fe15ba00ee29a9f8af561d6aad76ec2c76df8663f17534ca4ab6edfa126383eab197aaa0de2e46d5d8cb84faf986b69c71aa7920d805005510
-EBUILD elfutils-0.191-r1.ebuild 3431 BLAKE2B 94dfc2095bdd99d57538b8b507e0c85820c6e1f50f4c8fdd8f998f6bb66ac1bc3b481f212b4c52d10a6ea2f2ef47e4fb77839efcb37d33e76cba69c8d6265180 SHA512 78354c4098295746a595c842994207d8c5f07f1e1a0d70aa0f13959fa646b6c54cca00980365151071c7df98957a07c6f521fbe706d644c51e4ace72d4954ce7
-EBUILD elfutils-0.191-r2.ebuild 3642 BLAKE2B 6b397b42a4b3b666b9dffd82c80e6830f0979c3c057b787352ab9ee383a4d1680ff48aface2aec23b464f585bc40d2dcc0358ff08b3abfe29d5a3ddbab56585b SHA512 cb7b36c4f37e9a01e1f5eccd37c9971f47402275c718e1a7d5d1af7b6a79abfe38b34027f3eebb1067fa4feda54a67acc889ac2319240170d4e6c4d3efcc933e
+EBUILD elfutils-0.191-r1.ebuild 3429 BLAKE2B 249899fa53cfc8752adf5791bfc89724f1fc90becf333d14bd489f1405606a07a49746543ecbce174f4a7d3dd7a81fde4ef5ce5b83140399387edeac3a367597 SHA512 528b428645573c65b80a46c7cc55cc2bcf6815210fb7e6c850e3518993161d72f464fc64ffc8d89da1b238c34ba3f26f66c5ccececcc306f075e8c13148577cc
+EBUILD elfutils-0.191-r2.ebuild 3634 BLAKE2B 4e0acc299f1442d43ab8a3ba919798eb0590b89e491e5b5acd786f15f8a4e647b02442f1f9955203f64cebea8ce6482abc5ae980f57686d15bcbd186e0173f36 SHA512 842b9a3a128e6bee44844296bd2f130bad907fe5cc722acf0b9d7c8902711735ff03e97c3ddd8fca3cde8f134dfbc8e818faad9a39e4204e1acb3ec29c679aa0
EBUILD elfutils-0.191.ebuild 3208 BLAKE2B eff31de9c66132e8aa1d2209fd5703c53de51acf04bf05c17748c9fa99e86f016e21b777c6b60798f8a5905d903ba6180d5718bb4b964c812f38e69fc678c359 SHA512 e8ed0f3739b19b2450d66963949702f94c106179c49b8e2cb12c0cd746211a4fc8ed3bbfaea8a06e1693e1dbc1976640091b925debdbaafada00098103efa7cb
-EBUILD elfutils-9999.ebuild 3571 BLAKE2B 4bd319c61bbc27b663d333a77f434be1515d8b0dee77721123af1ee82e49fdc3450281d0f1003c455a757bda743a0af12991a146dd9e7d86c8fb2709806faf14 SHA512 69e05af6205a299295bf8d64629ce8d422d16eced959ffd1c1ac67df6329bbfae36e6c75a82d02b884c2cefb11267cb2602309bd0c4c87b8efcb1aef5d6098e8
-MISC metadata.xml 680 BLAKE2B f5f2ad88e2f5f7823ea466403cb44888cea12ded4c1364e4c941be9f0e620ff9214973459bd4f70c43540e8f2a5d915c7d6e65ff3b2758c6660af928deb648b3 SHA512 403b91d41f6ff564c66445492c45d41ed4513709e557ac68d447e583b6bc4e22ccafe67f8e998660dfe47e75120c902107fccba90db06d99bd4c72f024bd881c
+EBUILD elfutils-0.192.ebuild 3817 BLAKE2B f6b1743b83b914f2f7fc335f9e359a424b1d09b340ddced7586bda290ee2d0cb8effdf2122fb4097687354ece8078769998520b23b54b68c2834dffb808c4f22 SHA512 e774cd881c949bab78727d39742d45bc8515ce97d68270a74d24d13fb6471a35c8a6e994332543be62b9f86107853786a5fe05bd3dd73d9a3beab9a261187029
+EBUILD elfutils-9999.ebuild 3659 BLAKE2B 06641076219af9f625bb93f31755d65e2c1894e463c588698ca00c37305f96d104bc38055d90792a11f52ca07707b0bd1760655cccac4a0d9de2aa0b8d10b77c SHA512 54a966a14d5700d18b71ef6f5272c75f89aeaf6a2da2b68a0c9ca2af77914f50620325f67aa9aea30a9f1da93bba08f577e897a502acdc1d3811b3da63965efb
+MISC metadata.xml 920 BLAKE2B 64bce99992961669c535e0232a5c1a9241316e13737fd6cc2e50314e400e0562cc2b692cbe590836e13aced55ff90c4833862e6da39f3c57afc56f6826d4c9f2 SHA512 db7f9105ca6bf72b084cddb0ddba9d02879a88b023d71aa7126c5678b4263475c936e3fecde214bffb543452c94c8a58b7a17c793926952bb1f9956ed549f151
diff --git a/dev-libs/elfutils/elfutils-0.191-r1.ebuild b/dev-libs/elfutils/elfutils-0.191-r1.ebuild
index 21547c7f0ac1..bcfa4c11cfc6 100644
--- a/dev-libs/elfutils/elfutils-0.191-r1.ebuild
+++ b/dev-libs/elfutils/elfutils-0.191-r1.ebuild
@@ -21,7 +21,7 @@ else
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
fi
diff --git a/dev-libs/elfutils/elfutils-0.191-r2.ebuild b/dev-libs/elfutils/elfutils-0.191-r2.ebuild
index 7ff2aa7e5011..ea40e46c2a43 100644
--- a/dev-libs/elfutils/elfutils-0.191-r2.ebuild
+++ b/dev-libs/elfutils/elfutils-0.191-r2.ebuild
@@ -21,7 +21,7 @@ else
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
fi
diff --git a/dev-libs/elfutils/elfutils-0.192.ebuild b/dev-libs/elfutils/elfutils-0.192.ebuild
new file mode 100644
index 000000000000..36c17b46d209
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.192.ebuild
@@ -0,0 +1,145 @@
+# Copyright 2003-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/elfutils.gpg
+inherit autotools flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://sourceware.org/elfutils/"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://sourceware.org/git/elfutils.git"
+ inherit git-r3
+
+ BDEPEND="
+ sys-devel/bison
+ sys-devel/flex
+ "
+else
+ inherit verify-sig
+ SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
+ SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+ BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
+fi
+
+LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
+SLOT="0"
+IUSE="bzip2 debuginfod lzma nls static-libs stacktrace test +utils valgrind zstd"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !dev-libs/libelf
+ >=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
+ debuginfod? (
+ app-arch/libarchive:=
+ dev-db/sqlite:3=
+ net-libs/libmicrohttpd:=
+
+ net-misc/curl[static-libs?,${MULTILIB_USEDEP}]
+ )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
+ stacktrace? ( dev-util/sysprof )
+ zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
+ elibc_musl? (
+ dev-libs/libbsd
+ sys-libs/argp-standalone
+ sys-libs/fts-standalone
+ sys-libs/obstack-standalone
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ valgrind? ( dev-debug/valgrind )
+"
+BDEPEND+="
+ sys-devel/m4
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
+ "${FILESDIR}"/${PN}-0.191-musl-macros.patch
+ "${FILESDIR}"/${P}-libelf-static-link-libeu.patch
+ "${FILESDIR}"/${P}-configure-better-error-message.patch
+ "${FILESDIR}"/${P}-stacktrace-maybe-uninit.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ if ! use static-libs; then
+ sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
+ fi
+
+ # https://sourceware.org/PR23914
+ sed -i 's:-Werror::' */Makefile.in || die
+}
+
+src_configure() {
+ # bug #407135
+ use test && append-flags -g
+
+ # bug 660738
+ filter-flags -fno-asynchronous-unwind-tables
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ unset LEX YACC
+
+ local myeconfargs=(
+ $(use_enable nls)
+ $(multilib_native_use_enable debuginfod)
+ $(use_enable debuginfod libdebuginfod)
+ $(multilib_native_use_enable stacktrace)
+ $(use_enable valgrind valgrind-annotations)
+
+ # explicitly disable thread safety, it's not recommended by upstream
+ # doesn't build either on musl.
+ --disable-thread-safety
+
+ # Valgrind option is just for running tests under it; dodgy under sandbox
+ # and indeed even w/ glibc with newer instructions.
+ --disable-valgrind
+ --program-prefix="eu-"
+ --with-zlib
+ $(use_with bzip2 bzlib)
+ $(use_with lzma)
+ $(use_with zstd)
+ )
+
+ [[ ${PV} == 9999 ]] && myeconfargs+=( --enable-maintainer-mode )
+
+ # Needed because sets alignment macro
+ is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
+ is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check VERBOSE=1
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ dodoc NOTES
+
+ # These build quick, and are needed for most tests, so we don't
+ # disable building them when the USE flag is disabled.
+ if ! use utils; then
+ rm -rf "${ED}"/usr/bin || die
+ fi
+}
diff --git a/dev-libs/elfutils/elfutils-9999.ebuild b/dev-libs/elfutils/elfutils-9999.ebuild
index ca29f7aa5643..84b6120da8b2 100644
--- a/dev-libs/elfutils/elfutils-9999.ebuild
+++ b/dev-libs/elfutils/elfutils-9999.ebuild
@@ -28,7 +28,7 @@ fi
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
-IUSE="bzip2 debuginfod lzma nls static-libs test +utils valgrind zstd"
+IUSE="bzip2 debuginfod lzma nls static-libs stacktrace test +utils valgrind zstd"
RESTRICT="!test? ( test )"
RDEPEND="
@@ -43,6 +43,7 @@ RDEPEND="
net-misc/curl[static-libs?,${MULTILIB_USEDEP}]
)
lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
+ stacktrace? ( dev-util/sysprof )
zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
elibc_musl? (
dev-libs/libbsd
@@ -96,6 +97,7 @@ multilib_src_configure() {
$(use_enable nls)
$(multilib_native_use_enable debuginfod)
$(use_enable debuginfod libdebuginfod)
+ $(multilib_native_use_enable stacktrace)
$(use_enable valgrind valgrind-annotations)
# explicitly disable thread safety, it's not recommended by upstream
diff --git a/dev-libs/elfutils/files/elfutils-0.192-configure-better-error-message.patch b/dev-libs/elfutils/files/elfutils-0.192-configure-better-error-message.patch
new file mode 100644
index 000000000000..fc6867ea782d
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.192-configure-better-error-message.patch
@@ -0,0 +1,96 @@
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=42b19e54393f031e6355cf0658e9518571e85ed3
+
+From 42b19e54393f031e6355cf0658e9518571e85ed3 Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Tue, 22 Oct 2024 18:19:09 +0200
+Subject: [PATCH] configure: better error message for [lib]debuginfod missing
+ dependencies
+
+When dependencies for libdebuginfod, debuginfod or ima verification are
+missing and these features are explicitly enabled the user might not
+immediately know which of the dependicies are missing. Move the checks
+around a little so checks for dependencies are done immediately before
+the enable error message. And add the possible reason to the error to
+make things more clear.
+
+ * configure.ac: Move libcurl and json-c tests before libdebuginfod
+ check, move libmicrohttpd, sqlite3 and libarchive tests before
+ debuginfod check and move librpm, libcrypto and imaevm.h tests
+ before ima verification check.
+
+https://sourceware.org/PR32294
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -837,16 +837,7 @@ AC_ARG_ENABLE([debuginfod-ima-verification],[AS_HELP_STRING([--enable-debuginfod
+ # Look for various packages, minimum versions as per rhel7.
+ PKG_PROG_PKG_CONFIG
+ PKG_CHECK_MODULES([libcurl],[libcurl >= 7.29.0],[have_libcurl=yes],[have_libcurl=no])
+-AC_CHECK_LIB(pthread, pthread_setname_np, [AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],[Enable pthread_setname_np])])
+ PKG_CHECK_MODULES([jsonc],[json-c >= 0.11],[have_jsonc=yes],[have_jsonc=no])
+-PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.33],[],[enable_debuginfod=no])
+-PKG_CHECK_MODULES([oldlibmicrohttpd],[libmicrohttpd < 0.9.51],[old_libmicrohttpd=yes],[old_libmicrohttpd=no])
+-PKG_CHECK_MODULES([sqlite3],[sqlite3 >= 3.7.17],[have_sqlite3=yes],[have_sqlite3=no])
+-PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[have_libarchive=yes],[have_libarchive=no])
+-AC_CHECK_LIB(rpm, headerGet, [AC_CHECK_DECL(RPMSIGTAG_FILESIGNATURES,
+- [AC_SUBST(rpm_LIBS, '-lrpm -lrpmio')],[], [#include <rpm/rpmlib.h>])])
+-AC_CHECK_LIB(crypto, EVP_MD_CTX_new, [AC_SUBST(crypto_LIBS, '-lcrypto')])
+-AC_CHECK_HEADER(imaevm.h)
+ #
+ # pronounce judgement on ability to build client, overridden by =yes/=no
+ if test "x$enable_libdebuginfod" = "xno"; then
+@@ -855,11 +846,15 @@ elif test "x$enable_libdebuginfod" = "xdummy"; then
+ true
+ elif test "x$have_jsonc$have_libcurl" = "xyesyes"; then
+ enable_libdebuginfod=yes
+-elif test "x$enable_libdebuginfod" = "xyes" -o "x$enable_libdebuginfod" = "xdummy"; then
+- AC_MSG_ERROR([unable to build libdebuginfod])
++elif test "x$enable_libdebuginfod" = "xyes"; then
++ AC_MSG_ERROR([unable to build libdebuginfod, missing libjson-c or libcurl])
+ else
+ enable_libdebuginfod=no
+ fi
++PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd >= 0.9.33],[],[enable_debuginfod=no])
++PKG_CHECK_MODULES([oldlibmicrohttpd],[libmicrohttpd < 0.9.51],[old_libmicrohttpd=yes],[old_libmicrohttpd=no])
++PKG_CHECK_MODULES([sqlite3],[sqlite3 >= 3.7.17],[have_sqlite3=yes],[have_sqlite3=no])
++PKG_CHECK_MODULES([libarchive],[libarchive >= 3.1.2],[have_libarchive=yes],[have_libarchive=no])
+ #
+ # pronounce judgement on ability to build server, overridden by =yes/=no
+ if test "x$enable_debuginfod" = "xno"; then
+@@ -867,18 +862,22 @@ if test "x$enable_debuginfod" = "xno"; then
+ elif test "x$have_jsonc$HAVE_CXX11$have_libarchive$have_sqlite3" = "xyesyesyesyes"; then
+ enable_debuginfod=yes
+ elif test "x$enable_debuginfod" = "xyes"; then
+- AC_MSG_ERROR([unable to build debuginfod])
++ AC_MSG_ERROR([unable to build debuginfod, missing libmicrohttpd, sqlite3 or libarchive])
+ else
+ enable_debuginfod=no
+ fi
+ #
++AC_CHECK_LIB(rpm, headerGet, [AC_CHECK_DECL(RPMSIGTAG_FILESIGNATURES,
++ [AC_SUBST(rpm_LIBS, '-lrpm -lrpmio')],[], [#include <rpm/rpmlib.h>])])
++AC_CHECK_LIB(crypto, EVP_MD_CTX_new, [AC_SUBST(crypto_LIBS, '-lcrypto')])
++AC_CHECK_HEADER(imaevm.h)
+ # pronounce judgment on ima signature support
+ if test "x$enable_debuginfod_ima_verification" = "xno"; then
+ true
+ elif test "x$ac_cv_lib_rpm_headerGet$ac_cv_have_decl_RPMSIGTAG_FILESIGNATURES$ac_cv_lib_crypto_EVP_MD_CTX_new$ac_cv_header_imaevm_h" = "xyesyesyesyes"; then
+ enable_debuginfod_ima_verification=yes
+ elif test "x$enable_debuginfod_ima_verification" = "xyes"; then
+- AC_MSG_ERROR([unable to enable debuginfod ima verification])
++ AC_MSG_ERROR([unable to enable ima verification, missing librpm, libcrypto or imaevm.h])
+ else
+ enable_debuginfod_ima_verification=no
+ fi
+@@ -895,6 +894,8 @@ AS_IF([test "x$have_libarchive" = "xyes"],AC_DEFINE([HAVE_LIBARCHIVE],[1],[Defin
+ AM_CONDITIONAL([ENABLE_IMA_VERIFICATION],[test "$enable_debuginfod_ima_verification" = "xyes"])
+ AM_CONDITIONAL([OLD_LIBMICROHTTPD],[test "x$old_libmicrohttpd" = "xyes"])
+
++AC_CHECK_LIB(pthread, pthread_setname_np, [AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],[Enable pthread_setname_np])])
++
+ dnl for /etc/profile.d/elfutils.{csh,sh}
+ default_debuginfod_urls=""
+ AC_ARG_ENABLE(debuginfod-urls,
+--
+2.43.5
diff --git a/dev-libs/elfutils/files/elfutils-0.192-libelf-static-link-libeu.patch b/dev-libs/elfutils/files/elfutils-0.192-libelf-static-link-libeu.patch
new file mode 100644
index 000000000000..0986ce6b3262
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.192-libelf-static-link-libeu.patch
@@ -0,0 +1,31 @@
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=f5d6e088f84dd05278c4698a21cbf1ff4569978d
+
+From f5d6e088f84dd05278c4698a21cbf1ff4569978d Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Tue, 22 Oct 2024 15:03:42 +0200
+Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive
+
+libelf might use some symbols from libeu.a, specifically the eu-search
+wrappers. But we don't ship libeu.a separately. So include the libeu
+objects in the libelf.a archive to facilitate static linking.
+
+ * libelf/Makefile.am (libeu_objects): New variable.
+ (libelf_a_LIBADD): New, add libeu_objects.
+
+https://sourceware.org/PR32293
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+--- a/libelf/Makefile.am
++++ b/libelf/Makefile.am
+@@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
+ @$(textrel_check)
+ $(AM_V_at)ln -fs $@ $@.$(VERSION)
+
++libeu_objects = $(shell $(AR) t ../lib/libeu.a)
++libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
++
+ install: install-am libelf.so
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
+ $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
+--
+2.43.5
diff --git a/dev-libs/elfutils/files/elfutils-0.192-stacktrace-maybe-uninit.patch b/dev-libs/elfutils/files/elfutils-0.192-stacktrace-maybe-uninit.patch
new file mode 100644
index 000000000000..f572bf854678
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.192-stacktrace-maybe-uninit.patch
@@ -0,0 +1,38 @@
+https://sourceware.org/git/?p=elfutils.git;a=commit;h=dce324303198545e1c5484d912e5f259b1d4953d
+
+From dce324303198545e1c5484d912e5f259b1d4953d Mon Sep 17 00:00:00 2001
+From: Mark Wielaard <mark@klomp.org>
+Date: Thu, 24 Oct 2024 11:06:08 +0200
+Subject: [PATCH] stacktrace: Init elf_fd in sysprof_init_dwfl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+When building with LTO gcc believes elf_fd can be used uninitialized:
+
+In function ‘sysprof_init_dwfl’,
+ inlined from ‘sysprof_unwind_cb’ at stacktrace.c:1235:16:
+stacktrace.c:1087:7: error: ‘elf_fd’ may be used uninitialized [-Werror=maybe-uninitialized]
+ 1087 | close (elf_fd);
+ | ^
+
+This code won't be reached because if find_procfile doesn't initialize
+elf_fd, it will return an error. But help the compiler by initializing
+elf_fd to -1.
+
+ * src/stacktrace.c (sysprof_init_dwfl): Init elf_fd to -1.
+
+Signed-off-by: Mark Wielaard <mark@klomp.org>
+--- a/src/stacktrace.c
++++ b/src/stacktrace.c
+@@ -1033,7 +1033,7 @@ sysprof_init_dwfl (struct sysprof_unwind_info *sui,
+ }
+
+ Elf *elf = NULL;
+- int elf_fd;
++ int elf_fd = -1;
+ err = find_procfile (dwfl, &pid, &elf, &elf_fd);
+ if (err < 0)
+ {
+--
+2.43.5
diff --git a/dev-libs/elfutils/metadata.xml b/dev-libs/elfutils/metadata.xml
index 05def2bfd0b3..a28aa11dc005 100644
--- a/dev-libs/elfutils/metadata.xml
+++ b/dev-libs/elfutils/metadata.xml
@@ -7,6 +7,11 @@
</maintainer>
<use>
<flag name="lzma">Support automatic decompression of LZMA-compressed files and kernel images</flag>
+ <flag name="stacktrace">
+ Build experimental eu-stacktrace tool. Relies on integration with dev-util/sysprof.
+
+ See https://developers.redhat.com/articles/2024/06/11/get-system-wide-profiles-binaries-without-frame-pointers.
+ </flag>
<flag name="utils">Install command-line utilities (all the eu-* programs)</flag>
<flag name="debuginfod">Enable debuginfod support, both the debuginfod server and the libdebuginfod client library</flag>
</use>