Re: DTC Version and Reproducible Builds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, Sep 16, 2024 at 07:51:31PM +0000, Anthony Ortega wrote:
> Hi David,
> 
> I had a question behind the intent of the versioning information
> that gets compiled into the DTC programs. Apologies if a thread
> exists on this already, but I had trouble finding one.

I don't believe there's an existing discussion, but there is a mailing
list it would be appropriate for: <devicetree-compiler@xxxxxxxxxxxxxxx>.
I've added it to the CC.

> I am trying to generate reproducible builds for a Linux environment
> using Buildroot. One of the last packages that is giving me trouble
> is the DTC programs.

By "the DTC programs" I'm guessing you mean fdtget, fdtput and
fdtoverlay primarily?  Or do you mean the actual dtc binary itself
too?

> They all seem to intend to encode the git
> version of the package they were pulled from. However, in a build
> system such as Buildroot the DTC source is staged in such a way that
> the git information is stripped away. While that in of itself is not
> a problem, the problem is that it may be getting built in an output
> directory that is within a larger git repository. Therefore, when
> the setlocalversion script runs, it ends up pulling the version of
> this larger git repository.

Huh.

> Is there any way that you recommend being able to override this
> behavior in the DTC project? At the moment it appears to be the only
> project with this unique issue.

Which is a bit weird, since I'm pretty sure we copied that
setlocalversion gunk from somewhere else (thuogh I forget where).

> This is resulting in a different
> binary executable for each commit of the build system. For
> reference, I am referring to the following section of the Makefile:
> 
> https://github.com/dgibson/dtc/blob/main/Makefile#L118-L119

I don't off hand know of a workaround for this.. but let's try a
possible easy approach first.  What happens if you build using meson
instead of make?  They're supposed to give the same results, but don't
always, and I think meson has its own version logic which might be
more sensible.

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux