From: "Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: luangruo@yahoo.com, 74413@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#74413: [PATCH] Allow to store and read repository information of VCS builds
Date: Tue, 19 Nov 2024 08:35:48 +0200 [thread overview]
Message-ID: <44439.5463842497$1731998265@news.gmane.org> (raw)
In-Reply-To: <CADwFkmnNqFsQunZ5BcUDT3gPh7A6tQ84X-=MopU-NicTXOvccA@mail.gmail.com> (Stefan Kangas's message of "Mon, 18 Nov 2024 18:48:31 -0500")
Stefan Kangas <stefankangas@gmail.com> writes:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>>> Cc: Po Lu <luangruo@yahoo.com>, 74413@debbugs.gnu.org
>>> Date: Mon, 18 Nov 2024 16:21:28 +0200
>>>
>>> > Doesn't that go against the tendency to have _less_ detailed/private
>>> > information in the build? We've lately removed some relatively useful
>>> > infos from what we report in commands that use the build information.
>>>
>>> The information added is only the branch and the repository similarly as
>>> used by the Android builds. There's no private information there unless
>>> the exact change reference Emacs was built on is private.
>>
>> The branch name could be private.
>>
>> Stefan, WDYT about this feature suggestion?
>
> The privacy risk here is that if a user is building their own private
> branch, announcing the sha or branch name to the world can be used to
> uniquely identify that user. It would be a serious privacy issue if we,
> for example, included that information in User-Agent headers sent by EWW
> or other kinds of network traffic. AFAIK, we don't do that.
>
> IIUC, we use this information only when submitting bug reports. I think
> this is harmless, if we assume privacy threat models where it can also
> be considered safe to report bugs. The few users that have more strict
> privacy requirements, and are eager to report bugs, will just have to
> think about this detail themselves; it's a rather specialized use case.
>
> IOW, I don't think I see a reason to object on these grounds.
>
> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>
>> The additions to the make file are so that if the worker contains git
>> the file can be generated so that the related functions will still work
>> after the built or to generate them prior the built. The latter probably
>> makes less sense except to maybe avoid having autotools in the built
>> dependency chain.
>>
>> If the Make recipe isn't used to generate the version file it can be
>> generated by the CI, e.g. in my case I take the information from the
>> open build source service. For others such as Fedora the sources can be
>> retrieved in a similar manner.
>>
>> The file can be added before the built starts and package so that the pdump
>> will contain the repository information and the VCS function will also
>> work afterwards.
>
> I don't fully understand how you can have a situation where you can get
> this information in the Makefile, but you can't also get it when dumping
> using `emacs-repository-get-version` and `emacs-repository-get-branch`
> (lisp/loadup.el:474). Could you please elaborate on this?
I added the Makefile part so it would work outside of my environment if
one builds Emacs and then distributes/install it without the sources or
without them containing the VCS information while git is also installed
in their build environment.
Since Emacs Makefiles already have that target for the Android build it
could make sense to share this target outside of the Android build.
> Do you mean that you have one containerized process with Git that clones
> emacs.git into a directory, and then an entirely separate containerized
> process, without Git, builds Emacs from that very same directory? Or
> something along those lines?
Yes more or less.
I'm using an obs source service that generates a tarball from VCS's and
then creates a tarball. [1]
> In this very particular scenario, isn't it enough to add this
> additional step to your CI pipeline:
>
> ./src/emacs -Q --batch --eval '(princ (format "%s:%s" \
> emacs-repository-version emacs-repository-branch))' > version.info
The obs source service already contains that information see the
emacs.obsinfo file I mentioned earlier.
> In other words, is it really necessary for us to support this use case
> in our Makefile? Do we expect that building Emacs in such CI pipelines
> using non-released development version of Emacs will be very common?
The Makefile target is there already for the Android builds all I did I
added it to other platforms too. If the target would be shared then the
hole process is reused.
I think it would become more common to build from VCS sources would be
become more common where the information is useful.
To get more users to test earlier development builds to have faster
general feedback and bug reports reports it is very useful to have
non-released development builds. There are other instances outside my
own usecase where this is frequent such as for example the AUR emacs-git, guix
emacs-next or the Android Fdroid builds.
> BTW, what is the name of that CI system that you're using here? For
> what purpose are you building Emacs: to test Elisp packages, to test
> Emacs, or something else? Finally, why are you not using officially
> tagged versions, either from us or from some distro, in this context?
I'm build Emacs on the open build service. I'm building Emacs on the obs
to provide development builds that can be used to test Emacs and submit
bug reports.
The package is build using the official RPM packaging just
with the newer sources from git.
The initial reason reason was that I noticed that even if you build from
git directly without a CI/or something similar to the source service
mentioned earlier that the functions to retrieve the repository
information don't work since the source path either doesn't exist on any
the machine that installs the final package or that it doesn't contain
the VCS information anymore.
The setup is very similar to the Android builds.
---
[1] https://github.com/openSUSE/obs-service-tar_scm
next prev parent reply other threads:[~2024-11-19 6:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87wmh1j6po.fsf@>
2024-11-18 12:45 ` bug#74413: [PATCH] Allow to store and read repository information of VCS builds Eli Zaretskii
2024-11-18 14:21 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <875xoklj13.fsf@>
2024-11-18 14:55 ` Eli Zaretskii
2024-11-18 16:54 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87frnowkhp.fsf@>
2024-11-18 19:03 ` Eli Zaretskii
2024-11-18 19:31 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <874j44wd7k.fsf@>
2024-11-18 19:41 ` Eli Zaretskii
2024-11-18 21:48 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <87y11g5i2x.fsf@>
2024-11-19 15:16 ` Eli Zaretskii
2024-11-19 16:13 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-19 17:08 ` Eli Zaretskii
2024-11-20 7:55 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-18 23:48 ` Stefan Kangas
2024-11-19 6:35 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-11-19 15:19 ` Eli Zaretskii
2024-11-19 16:16 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-19 17:20 ` Eli Zaretskii
[not found] ` <673c31c6.a70a0220.18f62b.10d8SMTPIN_ADDED_BROKEN@mx.google.com>
2024-11-25 23:43 ` Stefan Kangas
2024-11-26 15:35 ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-18 8:18 Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='44439.5463842497$1731998265@news.gmane.org' \
--to=bug-gnu-emacs@gnu.org \
--cc=74413@debbugs.gnu.org \
--cc=bjorn.bidar@thaodan.de \
--cc=eliz@gnu.org \
--cc=luangruo@yahoo.com \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.