GNU bug report logs - #74413
[PATCH] Allow to store and read repository information of VCS builds

Previous Next

Package: emacs;

Reported by: Björn Bidar <bjorn.bidar <at> thaodan.de>

Date: Mon, 18 Nov 2024 08:19:02 UTC

Severity: wishlist

Tags: patch, wontfix

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Björn Bidar <bjorn.bidar <at> thaodan.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 74413 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: bug#74413: [PATCH] Allow to store and read repository information of VCS builds
Date: Tue, 19 Nov 2024 18:13:14 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: stefankangas <at> gmail.com,  luangruo <at> yahoo.com,  74413 <at> debbugs.gnu.org
>> Date: Mon, 18 Nov 2024 23:48:38 +0200
>> 
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>> 
>> > I still don't think I understand, sorry.  Do you mean the file is
>> > generated from a Git repository, but then Emacs is somehow built from
>> > a directory that is not under Git?
>> 
>> The file can be generated from the git repository outside of the Emacs
>> builder.
>
> So you mean someone will chdir to the Git repository, say
>
>   $ make etc-emacsver
>
> Then take the produced file and manually install it when Emacs is
> built (in another directory) and installed, is that right?

I extract the file from the obs service and generate file from the
services metadata. The make target is there to create the file if Emacs
is built with git installed or if the target is used in the way you
mentioned above. 

In both cases the emacs VCS functions will still work after the built
without the sources or git installed, in the case of the former
as long as in the packager has provided the metadata themselves. 

>> > But if this is the scenario, how can you be sure the produced Emacs binary was made from that revision
>> > on that branch?  This is only guaranteed if you actually build from
>> > Git when you record this information.
>> >
>> > What am I missing?
>> 
>> 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.




This bug report was last modified 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.