[Bug debuginfod/25722] New: debuginfod-find should be able to take an /bin/path in place of buildid
https://sourceware.org/bugzilla/show_bug.cgi?id=25722 Bug ID: 25722 Summary: debuginfod-find should be able to take an /bin/path in place of buildid Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: fche at redhat dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- This way one could run it via % debuginfod-find debuginfo /bin/ls without having to hand-extract the buildid first. -- You are receiving this mail because: You are on the CC list for the bug.
[Bug debuginfod/25583] Use libarchive to extract .deb packages?
https://sourceware.org/bugzilla/show_bug.cgi?id=25583 --- Comment #8 from Frank Ch. Eigler --- https://sourceware.org/pipermail/elfutils-devel/2020q1/002529.html -- You are receiving this mail because: You are on the CC list for the bug.
patch PR25583: debuginfod bsdtar for deb
Hi - Author: Frank Ch. Eigler Date: Wed Mar 25 10:55:53 2020 -0400 PR25583: debuginfod: prefer bsdtar to dpkg for .deb handling It turns out a bsdtar subshell can do the job of dpkg-deb. bsdtar comes from/with libarchive so it should be available everywhere. Signed-off-by: Frank Ch. Eigler diff --git a/config/ChangeLog b/config/ChangeLog index d1050e2c084a..368f959ee0be 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2020-03-25 Frank Ch. Eigler + + * elfutils.spec.in: *Require: bsdtar instead of dpkg. + 2020-03-04 Mark Wielaard * elfutils.spec.in (package debuginfod): Remove Requires: rpm. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index ef7fe31fe1bd..6e2436506b37 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -35,9 +35,7 @@ BuildRequires: pkgconfig(libarchive) >= 3.1.2 BuildRequires: bzip2 # For the run-debuginfod-find.sh test case in %check for /usr/sbin/ss BuildRequires: iproute -%if 0%{?fedora} >= 20 -BuildRequires: dpkg -%endif +BuildRequires: bsdtar BuildRequires: curl %define _gnu %{nil} @@ -157,9 +155,8 @@ Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Requires(pre): shadow-utils -# To extract .deb files with dpkg-deb --fsys-tarfile -# Can be Recommends if rpm supports that -Requires: dpkg +# To extract .deb files with a bsdtar (= libarchive) subshell +Requires: bsdtar %description debuginfod-client The elfutils-debuginfod-client package contains shared libraries diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index b34b4d2938dd..1cf434bf9fbf 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2020-03-25 Frank Ch. Eigler + + * debuginfod.cxx (parse_opt): Associate a bsdtar subshell with + the .deb & .ddeb extensions, instead of dpkg-deb. + 2020-03-24 Frank Ch. Eigler * debuginfod-client.c (debuginfod_query_server): Print the diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 7c7e85eb6d14..e8364d8c5a24 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -429,8 +429,9 @@ parse_opt (int key, char *arg, scan_archives[".rpm"]="cat"; // libarchive groks rpm natively break; case 'U': - scan_archives[".deb"]="dpkg-deb --fsys-tarfile"; - scan_archives[".ddeb"]="dpkg-deb --fsys-tarfile"; + scan_archives[".deb"]="(bsdtar -O -x -f - data.tar.xz)<"; + scan_archives[".ddeb"]="(bsdtar -O -x -f - data.tar.xz)<"; + // .udeb too? break; case 'Z': { diff --git a/tests/ChangeLog b/tests/ChangeLog index d0d32a87315a..400b64f517e4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2020-03-25 Frank Ch. Eigler + + * run-debuginfod-find.sh: Look for bsdtar instead of dpkg. + 2020-03-23 Mark Wielaard * getphdrnum.c: Include config.h. diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh index b64130282d86..7f9e9e7ac745 100755 --- a/tests/run-debuginfod-find.sh +++ b/tests/run-debuginfod-find.sh @@ -349,7 +349,7 @@ wait_ready $PORT2 'thread_busy{role="scan"}' 0 # have clients contact the new server export DEBUGINFOD_URLS=http://127.0.0.1:$PORT2 -if type dpkg-deb 2>/dev/null; then +if type bsdtar 2>/dev/null; then # copy in the deb files cp -rvp ${abs_srcdir}/debuginfod-debs/*deb D kill -USR1 $PID2
[Bug debuginfod/25722] debuginfod-find should be able to take an /bin/path in place of buildid
https://sourceware.org/bugzilla/show_bug.cgi?id=25722 Konrad Kleine changed: What|Removed |Added CC||kkleine at redhat dot com --- Comment #1 from Konrad Kleine --- Yes please, oh yes! -- You are receiving this mail because: You are on the CC list for the bug.
Re: elfutils 0.179 release end of the week?
Hi Michael, On Tue, 2020-03-24 at 12:58 +, Michael 'veremitz' Everitt wrote: > Has there been any movement on PR21002 recently? Last comment is from > 2 years ago (2018-03-11). No, not that I know. The last request was to open bugs for any remaining issues. I don't believe that has been done. So we don't know if there are any issues left. > Gentoo Linux has bugs https://bugs.gentoo.org/602126 and > https://bugs.gentoo.org/701478 , and I don't doubt other distributions that > use musl-libc (eg. Void linux, Alpine, Adelie) will also be patching this > for their use. As far as I know those distributions haven't pushed any patches upstream for this issue. If you could help them post any patches so they can be reviewed that would be appreciated. Note that musl libc doesn't provide various standard GNU glibc functions, so it might not be that simple to get things to compile and run correctly against it. Thanks, Mark
[Committed] Update mailinglist subscription information
Hi, I pushed the following 2 commits to the code and htdocs repositories. sourceware updated the mailinglist software recently. Update our documentation (README and CONTRIBUTING) and the webpages to point to the new subscription form. Cheers, Mark From a344b8ce0bbe4f50fa2ace5fdfdcaccdee81d0e5 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 25 Mar 2020 23:22:55 +0100 Subject: [PATCH] Update mailinglist subscription info. Signed-off-by: Mark Wielaard --- CONTRIBUTING | 2 +- ChangeLog| 5 + README | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index e3d5a0f7..bb48975b 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -8,7 +8,7 @@ elfutils-devel@sourceware.org. https://sourceware.org/ml/elfutils-devel/ To subscribe send an email to elfutils-devel-subscr...@sourceware.org -Or use the form at https://sourceware.org/lists.html#ml-requestor +Or use the form at https://sourceware.org/mailman/listinfo/elfutils-devel Please supply patches using git format-patch or using git send-email. diff --git a/ChangeLog b/ChangeLog index 96d61403..2c3ed13c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2020-03-25 Mark Wielaard + + * README: Update mailinglist subscription info. + * CONTRIBUTING: Likewise. + 2020-02-03 Frank Ch. Eigler * configure.ac: Tolerate CXX= for debuginfod configuration. diff --git a/README b/README index 0e15bae6..06a9fcd0 100644 --- a/README +++ b/README @@ -24,7 +24,7 @@ elfutils-devel@sourceware.org. https://sourceware.org/ml/elfutils-devel/ To subscribe send an email to elfutils-devel-subscr...@sourceware.org -Or use the form at https://sourceware.org/lists.html#ml-requestor +Or use the form at https://sourceware.org/mailman/listinfo/elfutils-devel See the CONTRIBUTING file for how to propose patches to the code. -- 2.18.2 From 671ab9b44e796b485580919f96f759880d110f9b Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 25 Mar 2020 21:34:00 +0100 Subject: [PATCH] Update mailinglist subscription info. --- index.html | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.html b/index.html index 7f0d169..909158b 100644 --- a/index.html +++ b/index.html @@ -42,13 +42,8 @@ To subscribe to the elfutils development list send email to elfutils-devel-subscr...@sourceware.org. - Or enter your e-mail address in the box below and hit the button: + Or use the form at https://sourceware.org/mailman/listinfo/elfutils-devel";>https://sourceware.org/mailman/listinfo/elfutils-devel. -https://sourceware.org/cgi-bin/subscribe-sourceware";> - - - - See the https://sourceware.org/git/?p=elfutils.git;a=blob_plain;f=CONTRIBUTING;hb=HEAD";>CONTRIBUTING file for how to propose patches to the code. -- 2.18.2
Buildbot failure in Wildebeest Builder on whole buildset
The Buildbot has detected a failed build on builder whole buildset while building elfutils. Full details are available at: https://builder.wildebeest.org/buildbot/#builders/2/builds/495 Buildbot URL: https://builder.wildebeest.org/buildbot/ Worker for this Build: debian-amd64 Build Reason: Blamelist: Mark Wielaard BUILD FAILED: failed test (failure) Sincerely, -The Buildbot
[Bug debuginfod/25722] debuginfod-find should be able to take an /bin/path in place of buildid
https://sourceware.org/bugzilla/show_bug.cgi?id=25722 --- Comment #2 from Frank Ch. Eigler --- https://sourceware.org/pipermail/elfutils-devel/2020q1/002535.html -- You are receiving this mail because: You are on the CC list for the bug.
patch PR25722: /path/name based debuginfod-find & API lookups
Hi - commit b27d38f7eed6d99715fd1cc8a70b0a6a2b04f0ce (HEAD -> fche/pr25722) Author: Frank Ch. Eigler Date: Wed Mar 25 21:36:51 2020 -0400 PR25722: debuginfod client api: accept /path/names in place of buildid hex As a convenience, this extends the debuginfod find functions (and thus debuginfod-find) to accept a /path/name to an ELF binary as an alternative to a hexadecimal string for buildid. Doc & testing incl. Signed-off-by: Frank Ch. Eigler diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index b34b4d2938dd..032a670fd2d0 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,12 @@ +2020-03-25 Frank Ch. Eigler + + * debuginfod-client.c (lookup_elf_buildid): Quick dwelf based + filename-to-buildid lookup function. + (debuginfod_query_server): Use it for non-hexstring buildids. + * debuginfod-find.c (main): Call elf_version(). + * Makefile.am: Add elfutils library prereqs for libdebuginfod.so + and debuginfod-find. + 2020-03-24 Frank Ch. Eigler * debuginfod-client.c (debuginfod_query_server): Print the diff --git a/debuginfod/Makefile.am b/debuginfod/Makefile.am index 52ead30aebf8..1a57d287f9a1 100644 --- a/debuginfod/Makefile.am +++ b/debuginfod/Makefile.am @@ -62,7 +62,7 @@ debuginfod_SOURCES = debuginfod.cxx debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(libmicrohttpd_LIBS) $(libcurl_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl debuginfod_find_SOURCES = debuginfod-find.c -debuginfod_find_LDADD = $(libeu) $(libdebuginfod) +debuginfod_find_LDADD = $(libeu) $(libdebuginfod) $(libelf) noinst_LIBRARIES = libdebuginfod.a noinst_LIBRARIES += libdebuginfod_pic.a @@ -74,7 +74,7 @@ am_libdebuginfod_pic_a_OBJECTS = $(libdebuginfod_a_SOURCES:.c=.os) pkginclude_HEADERS = debuginfod.h libdebuginfod_so_LIBS = libdebuginfod_pic.a -libdebuginfod_so_LDLIBS = $(libcurl_LIBS) +libdebuginfod_so_LDLIBS = $(libcurl_LIBS) $(libdw) $(libelf) $(libeu) libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS) $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -Wl,--soname,$@.$(VERSION) \ diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index ea2d16249a31..a0ca95cb1dc8 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -61,6 +61,8 @@ #include #include #include +#include +#include /* If fts.h is included before config.h, its indirect inclusions may not give us the right LFS aliases of these functions, so map them manually. */ @@ -436,6 +438,43 @@ default_progressfn (debuginfod_client *c, long a, long b) } +static int +lookup_elf_buildid(const char* path, + char *build_id_hex, + ssize_t max_build_id_bytes) +{ + int rc = -ENOENT; + int fd = open (path, O_RDONLY); + if (fd < 0) +goto out; + Elf *elf = elf_begin (fd, ELF_C_READ_MMAP_PRIVATE, NULL); + if (elf == NULL) +goto out1; + const unsigned char *build_id; + ssize_t s = dwelf_elf_gnu_build_id(elf, (const void**) &build_id); + if (s < 0 || s > max_build_id_bytes) { +rc = -EINVAL; +goto out2; + } + ssize_t i; + for (i=0; i> 4]; + build_id_hex[2*i+1] = "0123456789abcdef"[(build_id[i]&0x0F) >> 0]; +} + build_id_hex[2*i] = '\0'; + rc = 0; + + out2: + elf_end (elf); + out1: + close (fd); + out: + return rc; +} + + + /* Query each of the server URLs found in $DEBUGINFOD_URLS for the file with the specified build-id, type (debuginfo, executable or source) and filename. filename may be NULL. If found, return a file @@ -474,16 +513,43 @@ debuginfod_query_server (debuginfod_client *c, goto out; } - /* Copy lowercase hex representation of build_id into buf. */ - if ((build_id_len >= MAX_BUILD_ID_BYTES) || - (build_id_len == 0 && - sizeof(build_id_bytes) > MAX_BUILD_ID_BYTES*2 + 1)) -return -EINVAL; - if (build_id_len == 0) /* expect clean hexadecimal */ -strcpy (build_id_bytes, (const char *) build_id); - else -for (int i = 0; i < build_id_len; i++) - sprintf(build_id_bytes + (i * 2), "%02x", build_id[i]); + if (build_id_len > 0) /* raw bytes */ +{ + if (build_id_len > MAX_BUILD_ID_BYTES) /* too man raw bytes */ +return -EINVAL; + int i; + for (i = 0; i < build_id_len; i++) +{ + build_id_bytes[2*i+0] = "0123456789abcdef"[(build_id[i]&0xF0) >> 4]; + build_id_bytes[2*i+1] = "0123456789abcdef"[(build_id[i]&0x0F) >> 0]; +} + build_id_bytes[2*i] = '\0'; +} + else if (build_id_len == 0) /* \0-terminated string */ +{ + int any_non_hex = 0; + for (int i = 0; build_id[i] != '\0'; i++) +if ((build_id[i] >= '0' && build_id[i] <= '9') || +(build_id[i] >= 'a' && build_id[i] <= 'f')) + ; +else + any_non_hex = 1; + + if (any_non_hex) /* a path name --- try to fetc
[Bug debuginfod/25726] New: iya jipaosy
https://sourceware.org/bugzilla/show_bug.cgi?id=25726 Bug ID: 25726 Summary: iya jipaosy Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: critical Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: maufura87 at gmail dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 12405 --> https://sourceware.org/bugzilla/attachment.cgi?id=12405&action=edit mmk245 jwuahehuannsmsnj -- You are receiving this mail because: You are on the CC list for the bug.