From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74413: [PATCH] Allow to store and read repository information of VCS builds Date: Mon, 18 Nov 2024 21:41:44 +0200 Message-ID: <86zflwtjlz.fsf@gnu.org> References: <86frnovhg8.fsf@gnu.org> <867c90vbfk.fsf@gnu.org> <861pz8uzyo.fsf@gnu.org> <874j44wd7k.fsf@> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8550"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 74413@debbugs.gnu.org, stefankangas@gmail.com To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 18 20:42:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tD7de-00024u-BK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Nov 2024 20:42:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tD7dM-0002Oq-Cl; Mon, 18 Nov 2024 14:42:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tD7dL-0002OZ-3v for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 14:42:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tD7dK-0003cd-Rt for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 14:42:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=pBHTa+DDQ0WFiRqJRXfo3KtKa7hhXyMxDOejFXidClU=; b=XEp6d7/K8qWNkUmjhXK6n1BJqCypawJQwx57QG1r6dEGqS4xqR9R5Cud21M0hYe7Sg+6+3vk2fC2kxpFhXGOzQLlDMaXaNAiGQf06adhqcPIdjo04qWoho6dC3y/yRz18lKcEV9oc0Ded4ObxEEdEBzXMRKhrkqSmwfwn8H/qBnFch7YGekGsJuBSEpdxJH4ttA580wFIqO+QPnpPDc0FD7o+TohoSiRUQUMDES+QYXpQIrjcXuVVUJNEuw5EE14ycLAFbtIPGaZEW2cY2PNIL69l6izGxlaQT4PMR71Xiuc7Gb9DLDawDDEQTuHrLFhbNlGrj7xUMoSTtrO+IOPig==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tD7dK-0003I6-Fd for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 14:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Nov 2024 19:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74413 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74413-submit@debbugs.gnu.org id=B74413.173195891812636 (code B ref 74413); Mon, 18 Nov 2024 19:42:02 +0000 Original-Received: (at 74413) by debbugs.gnu.org; 18 Nov 2024 19:41:58 +0000 Original-Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tD7dF-0003Hj-MB for submit@debbugs.gnu.org; Mon, 18 Nov 2024 14:41:58 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tD7dD-0003HW-3h for 74413@debbugs.gnu.org; Mon, 18 Nov 2024 14:41:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tD7d7-0003YK-5j; Mon, 18 Nov 2024 14:41:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=pBHTa+DDQ0WFiRqJRXfo3KtKa7hhXyMxDOejFXidClU=; b=EMVYqNZ+1DYZIdtcN14w RZigi2YqiRJ0PqlPnMtogdFA0x68GS4lNKC6E0x+nxyqz/vj4F44LCU2O6bJb+ZFhqDQF63V3mbJL YSL4Vf5dXFxMvxmUpcbpd6e9hkD6Yza7rVGOiXEUkJAjUSIg+qCntP5iYKx06b71NGESwaPX0eOKA SWYtOAXNRJ35Vg6toZPS/k416+lpoYU/R5npyMZsZXso9yi0DhtPOMXUO7uw5+b0F01dSaNgjpJlq ZGHx5FNgbOkp9zBOxI+RBgO8vFvugu2ZEqErJFu5YfMR7HXhsQl/myPczcB/aptcTSUOyojLAEFFA vJthTj6ieLP5EQ==; In-Reply-To: <874j44wd7k.fsf@> (message from =?UTF-8?Q?Bj=C3=B6rn?= Bidar on Mon, 18 Nov 2024 21:31:43 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295609 Archived-At: > From: Björn Bidar > Cc: stefankangas@gmail.com, luangruo@yahoo.com, 74413@debbugs.gnu.org > Date: Mon, 18 Nov 2024 21:31:43 +0200 > > Eli Zaretskii writes: > > >> From: Björn Bidar > >> Cc: Stefan Kangas , luangruo@yahoo.com, > >> 74413@debbugs.gnu.org > >> Date: Mon, 18 Nov 2024 18:54:26 +0200 > >> > >> Eli Zaretskii writes: > >> > >> > This is already available if Emacs is built in a Git repository, and > >> > the information is stored in the dumped Emacs. So what is gained by > >> > also recording the repository version on a disk file external to > >> > Emacs? > >> > >> The information is only stored if the worker already had git installed > >> and checked out the sources with git inside the worker. > >> Also the function currently fails unless the system the user uses also happens to > >> have git installed and the sources if the are installed also contain the > >> VCS metadata. > >> Storing the VCS metadata in the sources doesn't happen usually as it > >> increases the size of a good chunk. In my case e.g. from 188MB to 788MB. > >> Why not have the same feature for other platforms too? > > > > Sorry, I don't understand this explanation; I'm probably missing > > something. > > > > The feature you propose requires to build Emacs inside a Git > > repository, is that correct? Because otherwise "git rev-parse" will > > not work, right? If that is correct, then building Emacs inside a Git > > repository already calls this Git command and records the result in 2 > > Emacs Lisp variables. > > > > So why do you also want to record the same > > information on a file? What kind of scenario do you have in mind in > > which building Emacs with its current code will not record the branch > > and the revision, but your additions to Makefile will record that? > > 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 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? 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?