elfutils: 0.194 -> 0.195 (#511320)

This commit is contained in:
Ryan Burns 2026-05-19 20:23:00 +00:00 committed by GitHub
commit 93991aecc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 53 deletions

View file

@ -28,11 +28,11 @@
# TODO: Look at the hardcoded paths to kernel, modules etc.
stdenv.mkDerivation (finalAttrs: {
pname = "elfutils";
version = "0.194";
version = "0.195";
src = fetchurl {
url = "https://sourceware.org/elfutils/ftp/${finalAttrs.version}/elfutils-${finalAttrs.version}.tar.bz2";
hash = "sha256-CeL/Az05uqiziKLX+8U5C/3pmuO3xnx9qvdDP7zw8B4=";
hash = "sha256-N2Kf338fPcKBjhOPyiuAlBd9bC0PcB07tlClYSGNwCY=";
};
patches = [
@ -57,13 +57,6 @@ stdenv.mkDerivation (finalAttrs: {
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
sha256 = "sha256-7daehJj1t0wPtQzTv+/Rpuqqs5Ng/EYnZzrcf2o/Lb0=";
})
(fetchpatch {
name = "fix-aarch64_attributes.patch";
url = "https://sourceware.org/git/?p=elfutils.git;a=patch;h=b27adc5262e807f341ca0a4910ce04294144f79a";
hash = "sha256-hksO5HXL9Jv5E4o2rI4NAgQp+4z+Lg7Wn/AdW7fpr0c=";
})
# https://patchwork.sourceware.org/project/elfutils/patch/20251205145241.1165646-1-arnout@bzzt.net/
./test-run-sysroot-reliability.patch
]
++ lib.optionals stdenv.hostPlatform.isMusl [ ./musl-error_h.patch ];

View file

@ -1,44 +0,0 @@
commit 898804bed022d1ef26e5c0b12550f87fc86f29ed
Author: Arnout Engelen <arnout@bzzt.net>
Date: Thu Dec 4 21:42:40 2025 +0100
tests: improve reliability of run-sysroot.sh
Previously, the 'second' test would test the `RESOLVE_IN_ROOT` feature
when the current libc supports it, even when the currently running
kernel did not yet support it.
Signed-off-by: Arnout Engelen <arnout@bzzt.net>
diff --git a/tests/run-sysroot.sh b/tests/run-sysroot.sh
index fe302446..d2041e8a 100755
--- a/tests/run-sysroot.sh
+++ b/tests/run-sysroot.sh
@@ -46,10 +46,14 @@ TID 431185:
#8 0x0000aaaae56127f0 _start
EOF
-HAVE_OPENAT2=$(grep '^#define HAVE_OPENAT2_RESOLVE_IN_ROOT' \
- ${abs_builddir}/../config.h | awk '{print $3}')
+libc_has_openat2_resolve_in_root() {
+ grep '^#define HAVE_OPENAT2_RESOLVE_IN_ROOT' ${abs_builddir}/../config.h | awk '{print $3}'
+}
+kernel_has_openat2_resolve_in_root() {
+ printf "%s\n%s" "5.6.0" "$(uname -r)" | sort -V -C
+}
-if [[ "$HAVE_OPENAT2" = 1 ]]; then
+if libc_has_openat2_resolve_in_root && kernel_has_openat2_resolve_in_root; then
# Change the layout of files in sysroot to test symlink escape scenario
rm -f "${tmpdir}/sysroot/bin"
mkdir "${tmpdir}/sysroot/bin"
@@ -57,7 +61,8 @@ if [[ "$HAVE_OPENAT2" = 1 ]]; then
ln -s /bin/bash "${tmpdir}/sysroot/usr/bin/bash"
# Check that stack with --sysroot generates correct backtrace even if target
- # binary is actually absolute symlink pointing outside of sysroot directory
+ # binary is actually absolute symlink to be interpreted relative to the sysroot
+ # directory
testrun "${abs_top_builddir}"/src/stack --core "${tmpdir}/core.bash" \
--sysroot "${tmpdir}/sysroot" >"${tmpdir}/stack.out"