From 0af8ec47f4a94bd284424ced957e79308adbdfde Mon Sep 17 00:00:00 2001 From: Weisson Date: Fri, 14 Apr 2023 10:08:08 +0000 Subject: [PATCH] OpenAnolis does not provides debug info server for now. Signed-off-by: Weisson --- ...not-provides-debug-info-server-for-n.patch | 99 +++++++++++++++++++ elfutils.spec | 7 +- 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 0001-OpenAnolis-does-not-provides-debug-info-server-for-n.patch diff --git a/0001-OpenAnolis-does-not-provides-debug-info-server-for-n.patch b/0001-OpenAnolis-does-not-provides-debug-info-server-for-n.patch new file mode 100644 index 0000000..5aae77f --- /dev/null +++ b/0001-OpenAnolis-does-not-provides-debug-info-server-for-n.patch @@ -0,0 +1,99 @@ +From bd598d9e5a23b49da8121e9ebfb3f164b3bef0a3 Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Fri, 14 Apr 2023 10:03:42 +0000 +Subject: [PATCH] OpenAnolis does not provides debug info server for now. + +Signed-off-by: Weisson +--- + debuginfod/debuginfod-client.c | 4 ++++ + debuginfod/debuginfod-find.c | 2 +- + debuginfod/debuginfod.cxx | 3 --- + tests/Makefile.am | 28 +--------------------------- + 4 files changed, 6 insertions(+), 31 deletions(-) + +diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c +index ef4d47e..2392cc7 100644 +--- a/debuginfod/debuginfod-client.c ++++ b/debuginfod/debuginfod-client.c +@@ -860,6 +860,10 @@ debuginfod_query_server (debuginfod_client *c, + + c->progressfn_cancel = false; + ++ /* debug info server of OpenAnolis is on its way for now. */ ++ dprintf (vfd, "[WARINING] debuginfod not find, please install!"); ++ return -EINVAL; ++ + if (strcmp (type, "source") == 0) + filename = type_arg; + else if (strcmp (type, "section") == 0) +diff --git a/debuginfod/debuginfod-find.c b/debuginfod/debuginfod-find.c +index 3073109..a877300 100644 +--- a/debuginfod/debuginfod-find.c ++++ b/debuginfod/debuginfod-find.c +@@ -40,7 +40,7 @@ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; + + /* Short description of program. */ + static const char doc[] = N_("Request debuginfo-related content " +- "from debuginfods listed in $" DEBUGINFOD_URLS_ENV_VAR "."); ++ "from debuginfods."); + + /* Strings for arguments in help texts. */ + static const char args_doc[] = N_("debuginfo BUILDID\n" +diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx +index 99b1f2b..1d1deee 100644 +--- a/debuginfod/debuginfod.cxx ++++ b/debuginfod/debuginfod.cxx +@@ -4385,9 +4385,6 @@ main (int argc, char *argv[]) + o << arch.first << "(" << arch.second << ") "; + o << endl; + } +- const char* du = getenv(DEBUGINFOD_URLS_ENV_VAR); +- if (du && du[0] != '\0') // set to non-empty string? +- obatched(clog) << "upstream debuginfod servers: " << du << endl; + + vector all_threads; + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index fd58bf8..d5e308b 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -238,35 +238,9 @@ check_PROGRAMS += debuginfod_build_id_find + # With the dummy delegation doesn't work + if !DUMMY_LIBDEBUGINFOD + TESTS += run-debuginfod-dlopen.sh \ +- run-debuginfod-artifact-running.sh \ +- run-debuginfod-fd-prefetch-caches.sh \ + run-debuginfod-regex.sh \ +- run-debuginfod-duplicate-urls.sh \ +- run-debuginfod-file.sh \ +- run-debuginfod-sizetime.sh \ +- run-debuginfod-malformed.sh \ +- run-debuginfod-negative-cache.sh \ +- run-debuginfod-tmp-home.sh \ +- run-debuginfod-writable.sh \ + run-debuginfod-no-urls.sh \ +- run-debuginfod-query-retry.sh \ +- run-debuginfod-extraction.sh \ +- run-debuginfod-archive-groom.sh \ +- run-debuginfod-archive-rename.sh \ +- run-debuginfod-archive-test.sh \ +- run-debuginfod-federation-sqlite.sh \ +- run-debuginfod-federation-link.sh \ +- run-debuginfod-percent-escape.sh \ +- run-debuginfod-x-forwarded-for.sh \ +- run-debuginfod-response-headers.sh \ +- run-debuginfod-extraction-passive.sh \ +- run-debuginfod-webapi-concurrency.sh \ +- run-debuginfod-section.sh +-endif +-if !OLD_LIBMICROHTTPD +-# Will crash on too old libmicrohttpd +-# Too many open file descriptors confuses libmicrohttpd < 0.9.51 +-TESTS += run-debuginfod-federation-metrics.sh ++ run-debuginfod-webapi-concurrency.sh + endif + endif + +-- +2.31.1 + diff --git a/elfutils.spec b/elfutils.spec index 1773f02..b0d7002 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %global source_url ftp://sourceware.org/pub/elfutils/%{version}/ %global _gnu %{nil} %define __brp_remove_la_files %{nil} @@ -15,6 +15,8 @@ License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL Source0: https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2 Source1: elfutils-debuginfod.sysusers +Patch0001: 0001-OpenAnolis-does-not-provides-debug-info-server-for-n.patch + Requires: elfutils-libelf = %{version}-%{release} Requires: elfutils-libs = %{version}-%{release} Recommends: elfutils-debuginfod-client = %{version}-%{release} @@ -351,6 +353,9 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Fri Apr 14 2023 Weisson - 0.189-3 +- OpenAnolis does not provides debug info server for now. + * Fri Mar 31 2023 mgb01105731 - 0.189-2 - Del Specific Fields -- Gitee