Subject: bug#74413: [PATCH] Allow to store and read repository information of VCS builds

From: Björn Bidar <[email-masked]>
Date: Wed, 20 Nov 2024 09:55:22 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Björn Bidar <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked]
>> Date: Tue, 19 Nov 2024 18:13:14 +0200
>> 
>> >> If the source is generated by the CI it can also store this information
>> >> in the build source which then can be extracted from the ci metadata to
>> >> the Emacs sources on the builder.
>> >> 
>> >> I can be sure that Emacs was built from that revision as much as I can
>> >> trust the CI to use the sources I told it to use. If I can't trust one,
>> >> I can't trust the other.
>> >
>> > But CI builds from Git, doesn't it?  If so, the Emacs it produces
>> > already records the revision and the branch.
>> 
>> The source generator, the source service runs git but the builder
>> doesn't.
>> Because the builder doesn't have to deal with git the rebuild chain is
>> smaller, build dependency changes can trigger rebuilds, and the worker
>> doesn't have to have git installed.
>> 
>> In most cases it's not required or wanted that worker have git as the
>> only allowed purpose would be to get access already existing metadata but
>> not change anything on the sources itself.
>> 
>> Providing the metadata to the VCS emacs-repository-branch and
>> emacs-repository-version with the previously generated metadata that
>> belongs to the package sources removes the need for git in the build worker.
>
> Thanks, but I still don't understand the problem you are trying to
> solve.  I guess I'm missing something very fundamental here.  You are
> talking about "builder", "source generator", "metadata", etc., and I
> don't understand these terms.  The last sentence seems to confirm my
> guess: you tage the Git revision from a repository, and then build
> from another directory, which can easily cause a mismatch.

It could be that I either assume some things or don't explain them well enough.

I generate a tarball from one repository, store the last commit's refernce the
snapshot of that repository which the tarball was generated from.
The configuration of the program that generates the tarball contains the
branch it pulls the sources from. Both of these then are put into the
the same file that is used by the Android builds.

> So this
> feature looks completely redundant to me, based on the little I do
> understand in these matters.  But I will now bow out of this
> discussion; if Stefan (and others) think it's okay, I won't object.

To reduce any possible I could make the make target shared with the
Android builds if that helps.

> Thank you for your patience.