Re: [HTCondor-devel] New ld option --build-id stores a hash in the elf header


Date: Wed, 2 Jun 2021 11:16:18 -0500 (CDT)
From: Carl Edquist <edquist@xxxxxxxxxxx>
Subject: Re: [HTCondor-devel] New ld option --build-id stores a hash in the elf header
The rpm has a %git_rev macro that makesrpm.sh populates - i don't know if that path is taken these days for the official builds.

Also a couple of tricky bits that come to mind - what do you do if there are local changes to the git repo; and, the build configure parameters can still vary even given a single commit.

Carl

On Tue, 1 Jun 2021, Tim Theisen via HTCondor-devel wrote:

It doesn't get passed all the way in. However, I think that the git hash
could be included in a file in the official source tarball. That way
even downstream distributions would have the git sha in their builds.

...Tim

On 6/1/21 9:14 AM, Greg Thain via HTCondor-devel wrote:

All:

Spending a relaxing weekend reading through linker documentation, I
see that the gnu ld linker now has an option --build-id, which can
take a hex string which represents a hash, and store it in the
.gnu.notes.property section of the elf header.  Newer versions of the
"file" command display this hash.  I would suggest that all of our
builds try to set this to the git source sha, so we can have better
tracking of our binaries.  The nice thing about this is it isn't in
the binary at all, not even in the text segment, so there are fewer
"accidentally create a dependency that rebuilds the world" issues.

Do we have the git hash handy when we do the rpm builds?

-greg

_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel

--
Tim Theisen
Release Manager
HTCondor & Open Science Grid
Center for High Throughput Computing
Department of Computer Sciences
University of Wisconsin - Madison
4261 Computer Sciences and Statistics
1210 W Dayton St
Madison, WI 53706-1685
+1 608 265 5736

_______________________________________________
HTCondor-devel mailing list
HTCondor-devel@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-devel
[← Prev in Thread] Current Thread [Next in Thread→]