summaryrefslogtreecommitdiff
path: root/backport-Prevent-readelf-internet-access-during-rpaths-checki.patch
diff options
context:
space:
mode:
Diffstat (limited to 'backport-Prevent-readelf-internet-access-during-rpaths-checki.patch')
-rw-r--r--backport-Prevent-readelf-internet-access-during-rpaths-checki.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/backport-Prevent-readelf-internet-access-during-rpaths-checki.patch b/backport-Prevent-readelf-internet-access-during-rpaths-checki.patch
new file mode 100644
index 0000000..c472084
--- /dev/null
+++ b/backport-Prevent-readelf-internet-access-during-rpaths-checki.patch
@@ -0,0 +1,32 @@
+From 3cec59812c8126088a51924c6aeea112ce9b545a Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed, 22 Jun 2022 13:22:00 +0300
+Subject: [PATCH] Prevent readelf internet access during rpaths checking
+ (RhBug:2079600)
+
+Recent binutils can do debug section lookups over the internet, but this
+is something we never want during rpmbuild (everything else aside, we're
+just building the thing so there wont be anything on the net anyhow).
+Disable the lookups by setting DEBUGINFOD_URLS to empty rather than
+using the specific option as this is compatible with any old version of
+readelf.
+---
+ scripts/check-rpaths-worker | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/check-rpaths-worker b/scripts/check-rpaths-worker
+index e32e823..26f74f0 100755
+--- a/scripts/check-rpaths-worker
++++ b/scripts/check-rpaths-worker
+@@ -94,7 +94,7 @@ function msg()
+
+ function check_rpath() {
+ pos=0
+- rpath=$(readelf -W -d "$1" 2>/dev/null | LANG=C grep -E "\((RPATH|RUNPATH)\).*:") || return 0
++ rpath=$(DEBUGINFOD_URLS="" readelf -W -d "$1" 2>/dev/null | LANG=C grep -E "\((RPATH|RUNPATH)\).*:") || return 0
+ rpath=$(echo "$rpath" | LANG=C sed -e "s!.*\(RPATH\|RUNPATH\).*: \[\(.*\)\]!\2!p;d")
+
+ tmp=aux:$rpath:/lib/aux || :
+--
+1.8.3.1
+