This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: rfc/patch: user-agent distro-description for debuginfod http traffic
- From: Mark Wielaard <mark at klomp dot org>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, elfutils-devel at sourceware dot org
- Date: Wed, 08 Jan 2020 15:49:42 +0100
- Subject: Re: rfc/patch: user-agent distro-description for debuginfod http traffic
- References: <20200106095303.GA2161@redhat.com>
Hi Frank,
On Mon, 2020-01-06 at 04:53 -0500, Frank Ch. Eigler wrote:
> +debuginfod-client-useragent.h:
> + if type uname 2>/dev/null; then \
> + echo '#define DEBUGINFOD_CLIENT_USERAGENT_1 "'`uname -sm | sed -e 's, ,/,g'`'"' > $@; \
> + else \
> + echo '#define DEBUGINFOD_CLIENT_USERAGENT_1 ""' > $@; \
> + fi
> + if type lsb_release 2>/dev/null; then \
> + echo '#define DEBUGINFOD_CLIENT_USERAGENT_2 "'`lsb_release -sir | sed -e 's, ,/,g'`'"' >> $@; \
> + else \
> + echo '#define DEBUGINFOD_CLIENT_USERAGENT_2 ""' > $@; \
> + fi
> + echo '#define DEBUGINFOD_CLIENT_USERAGENT DEBUGINFOD_CLIENT_USERAGENT_1 "," DEBUGINFOD_CLIENT_USERAGENT_2' >> $@
Eep. We really should pick up this info during runtime instead of
during build time. We do want a reproducible build. And this will most
likely produce wrong information if the package build server is on a
different OS or release than the OS/release it is producing packages
for. uname -sm might be "stable", but probably not when cross-
compiling. But where does lsb_release come from? I don't have that on
my systems.
Cheers,
Mark
>