From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 99B8C384801B; Fri, 30 Apr 2021 17:57:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 99B8C384801B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 28145302BBED; Fri, 30 Apr 2021 19:57:03 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id D329B413CB92; Fri, 30 Apr 2021 19:57:03 +0200 (CEST) Message-ID: Subject: Re: Storing package metadata in ELF objects From: Mark Wielaard To: Zbigniew =?UTF-8?Q?J=C4=99drzejewski-Szmek?= , Luca Boccassi Cc: devel@lists.fedoraproject.org, systemd-devel@lists.freedesktop.org, debhelper@packages.debian.org, binutils@sourceware.org, Lennart Poettering , debian-dpkg@lists.debian.org, "elfutils-devel@sourceware.org" Date: Fri, 30 Apr 2021 19:57:03 +0200 In-Reply-To: <20210410184407.GC1503@in.waw.pl> References: <2b91ec1654b6c07cca2b5c113df772c85c0dd22c.camel@debian.org> <20210410184407.GC1503@in.waw.pl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2021 17:57:08 -0000 Hi, On Sat, 2021-04-10 at 18:44 +0000, Zbigniew J=C4=99drzejewski-Szmek wrote: > [I'm forwarding the mail from Luca who is not subscribed to fedora- > devel] > On Sat, Apr 10, 2021 at 01:38:31PM +0100, Luca Boccassi wrote: > Cross-posting to the mailing lists of a few relevant projects. Note that in this version of the email the [N] references in your email don't seem to point anywhere. I found an older variant of the same email which contained: [0] https://github.com/systemd/systemd/issues/18433 [1] https://systemd.io/COREDUMP_PACKAGE_METADATA/ [2] https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objec= ts [3] https://github.com/systemd/package-notes > After an initial discussion [0], recently we have been working on a new > specification [0] to encode rich package-level metadata inside ELF > objects, so that it can be included automatically in generated coredump > files. The prototype to parse this in systemd-coredump and store the > information in systemd-journal is ready for testing and merged > upstream. We are now seeking further comments/opinions/suggestions, as > we have a few months before the next release and thus there's plenty of > time to make incompatible changes to the format and implementation, if > required. >=20 > A proposal to use this by default for all packages built in Fedora 35 > has been submitted [1]. >=20 > The Fedora Wiki and the systemd.io document have more details, but to > make a long story short, a new .notes.package section with a JSON > payload will be included in ELF objects, encoding various package- > build-time information like distro name&version, package > name&version, > etc. Is there a list of default keys (and their canonical spelling, upper- lower-Camel_Case, etc.)? If there is, could we have a "debuginfod" key with as value an URL pointing to the debuginfod server URL where the embedded build-id executable, debuginfo and sources can be found? https://sourceware.org/elfutils/Debuginfod.html > To summarize from the discussion, the main reasons why we believe this > is useful are as following: >=20 > 1) minimal containers: the rpm database is not installed in the > containers. The information about build-ids needs to be stored > externally, so package name information is not available immediately, > but only after offline processing. The new note doesn't depend on the > rpm db in any way. >=20 > 2) handling of a core from a container, where the container and host > have different distros >=20 > 3) self-built and external packages: unless a lot of care is taken to > keep access to the debuginfo packages, this information may be lost. > The new note is available even if the repository metadata gets lost. > Users can easily provide equivalent information in a format that makes > sense in their own environment. It should work even when rpms and debs > and other formats are mixed, e.g. during container image creation. >=20 > Other than in Fedora, we are already making the required code changes > at Microsoft to use the same format&specification for internally-built > binaries, and for tools that parse core files and logs. >=20 > Tools for RPM and DEB (debhelper) integration are also available [3]. >=20 > > --=20 > > Kind regards, > > Luca Boccassi >=20 >=20