teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame 0002-Disable-debuginfod-server-lookups-in-build-and-depen.patch

Panu Matilainen 1cb2ce
From 31356bf81c247871d6e4461565f4b33c1e6a145a Mon Sep 17 00:00:00 2001
Panu Matilainen 1cb2ce
Message-Id: <31356bf81c247871d6e4461565f4b33c1e6a145a.1676544357.git.pmatilai@redhat.com>
Panu Matilainen 1cb2ce
In-Reply-To: <3103d307063c71ff7791c2a59aacd41cfa05285c.1676544357.git.pmatilai@redhat.com>
Panu Matilainen 1cb2ce
References: <3103d307063c71ff7791c2a59aacd41cfa05285c.1676544357.git.pmatilai@redhat.com>
Panu Matilainen 1cb2ce
From: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen 1cb2ce
Date: Thu, 16 Feb 2023 12:25:24 +0200
Panu Matilainen 1cb2ce
Subject: [PATCH 2/2] Disable debuginfod server lookups in build and dependency
Panu Matilainen 1cb2ce
 generator scripts
Panu Matilainen 1cb2ce
Panu Matilainen 1cb2ce
With recent elfutils (0.182 or so) various seemingly innocuous tools
Panu Matilainen 1cb2ce
such as `readelf` like to do network lookups for ELF symbol information.
Panu Matilainen 1cb2ce
There's no circumstance where we'd want that to happen during rpmbuild,
Panu Matilainen 1cb2ce
so disable these lookups during all spec build scriptlets and also
Panu Matilainen 1cb2ce
dependency generator children.
Panu Matilainen 1cb2ce
---
Panu Matilainen 1cb2ce
 build/rpmfc.c | 1 +
Panu Matilainen 1cb2ce
 macros.in     | 1 +
Panu Matilainen 1cb2ce
 2 files changed, 2 insertions(+)
Panu Matilainen 1cb2ce
Panu Matilainen 1cb2ce
diff --git a/build/rpmfc.c b/build/rpmfc.c
Panu Matilainen 1cb2ce
index 06205469c..a69e81f44 100644
Panu Matilainen 1cb2ce
--- a/build/rpmfc.c
Panu Matilainen 1cb2ce
+++ b/build/rpmfc.c
Panu Matilainen 1cb2ce
@@ -316,6 +316,7 @@ static int getOutputFrom(ARGV_t argv,
Panu Matilainen 1cb2ce
 	rpmlog(RPMLOG_DEBUG, "\texecv(%s) pid %d\n",
Panu Matilainen 1cb2ce
                         argv[0], (unsigned)getpid());
Panu Matilainen 1cb2ce
 
Panu Matilainen 1cb2ce
+	unsetenv("DEBUGINFOD_URLS");
Panu Matilainen 1cb2ce
 	if (buildRoot)
Panu Matilainen 1cb2ce
 	    setenv("RPM_BUILD_ROOT", buildRoot, 1);
Panu Matilainen 1cb2ce
 
Panu Matilainen 1cb2ce
diff --git a/macros.in b/macros.in
Panu Matilainen 1cb2ce
index 7398a0496..307086a2b 100644
Panu Matilainen 1cb2ce
--- a/macros.in
Panu Matilainen 1cb2ce
@@ -724,6 +724,7 @@ package or when debugging this package.\
Panu Matilainen 1cb2ce
   LANG=C\
Panu Matilainen 1cb2ce
   export LANG\
Panu Matilainen 1cb2ce
   unset CDPATH DISPLAY ||:\
Panu Matilainen 1cb2ce
+  unset DEBUGINFOD_URLS ||:\
Panu Matilainen 1cb2ce
   %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
Panu Matilainen 1cb2ce
   export RPM_BUILD_ROOT}\
Panu Matilainen 1cb2ce
   %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
Panu Matilainen 1cb2ce
+++ b/macros.in
Panu Matilainen 1cb2ce
--