summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2023-02-16 12:25:24 +0200
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commit3113c591f578b8909f3de5ca8db53d8085a3a647 (patch)
tree1465f031f261af984cc9cfb755e04c188f63f6a2
parent4d866dce3454989348fe5527f2051c8323f056ac (diff)
downloadrpm-3113c591f578b8909f3de5ca8db53d8085a3a647.tar.gz
Disable debuginfod server lookups in build and dependency generator scripts
With recent elfutils (0.182 or so) various seemingly innocuous tools such as `readelf` like to do network lookups for ELF symbol information. There's no circumstance where we'd want that to happen during rpmbuild, so disable these lookups during all spec build scriptlets and also dependency generator children. (cherry picked from commit b927c044b8809c4dd892f75737240a20c32c2b90)
-rw-r--r--build/rpmfc.c1
-rw-r--r--macros.in1
2 files changed, 2 insertions, 0 deletions
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 08d517233..26606378f 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -316,6 +316,7 @@ static int getOutputFrom(ARGV_t argv,
rpmlog(RPMLOG_DEBUG, "\texecv(%s) pid %d\n",
argv[0], (unsigned)getpid());
+ unsetenv("DEBUGINFOD_URLS");
if (buildRoot)
setenv("RPM_BUILD_ROOT", buildRoot, 1);
diff --git a/macros.in b/macros.in
index c08452cf9..a2411d784 100644
--- a/macros.in
+++ b/macros.in
@@ -740,6 +740,7 @@ package or when debugging this package.\
LANG=C\
export LANG\
unset CDPATH DISPLAY ||:\
+ unset DEBUGINFOD_URLS ||:\
%{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
export RPM_BUILD_ROOT}\
%{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\