[Rpm-maint] [rpm-software-management/rpm] Add --zlib-compress-debug-sections to find-debug-info.sh (#795)

Mark Wielaard mark at klomp.org
Fri Aug 23 13:02:05 UTC 2019


Hi,

Sorry for the late reply.

On Thu, 2019-07-18 at 05:40 -0700, Tom de Vries wrote:
> The script find-debuginfo.sh has a --run-dwz switch to compress the debug
> info using dwz.
> 
> Add a similar switch --zlib-compress-debug-sections that compresses the debug
> info using objcopy --compress-debug-sections.

Note that eu-elfcompress does the same. Not that it really should
matter which tool does it. Currently find-debuginfo.sh uses tools from
both binutils and elfutils, it might be nice to only depend on one set
of tools (my preference would obviously be to migrate everything to the
elfutils toolset).

There is also zlib-gnu, the older, pre-standard, compression. Dunno if
we want to support that too.

> The two modes of compression can be used independently, so we can use one, or
> the other, or both.

I do think that this is a nice option to have in theory. But I haven't
tried it myself yet

> https://github.com/rpm-software-management/rpm/pull/795.patch
> https://github.com/rpm-software-management/rpm/pull/795.diff

-      id="`readelf -Wn "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}" \
-	     2>/dev/null | sed -n 's/^    Build ID: \([0-9a-f]\+\)/\1/p'`"

I am slightly surprised we don't seem to use the dwz build-id. Could
you double check we don't actually need that id?

Also, is there really no distro that is contemplating to use this?
If not, then maybe it is better to not add the extra complexity till
someone really wants it.

Cheers,

Mark


More information about the Rpm-maint mailing list