From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#74413: [PATCH] Allow to store and read repository information of VCS builds Date: Mon, 18 Nov 2024 18:48:31 -0500 Message-ID: References: <86frnovhg8.fsf@gnu.org> <867c90vbfk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32746"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 74413@debbugs.gnu.org To: Eli Zaretskii , =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 19 00:50:31 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 1tDBVl-0008MJ-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Nov 2024 00:50:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDBVM-0004mr-Me; Mon, 18 Nov 2024 18:50: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 1tDBVL-0004jn-40 for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:50: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 1tDBVK-0001V5-QG for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:50:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=6tbhCzqr7pozjRrhVg4gGl/28BiAOSviB4OjIgSG7gw=; b=eHv/LmfPZgcwuCJvCpX2lRWZr+oN8wzxeZuUlnepueaJ42gj2DsUNWd1TL3Br26kGnUleYjGuRBCszq3WLuu1P9XiV5iOUD5kxOeit9H4TPAMLzi0pqqARCR7G5flgXKrp48H+U4yjlZeLkKUDtBC1jet8ih65PTQ7inyGit6DJ7xDcNvk/eflJP4/UGnfsI+WPAA2amvSBC2X105tCwpfMNbm7JrMITtcJrXMZbO+TA92WQSr6+SViK4UGofXWwOI7chd/7PF8vzIPxOo5wWRlggASXuVCPewZNjf71FyVA6AUnOjspAqBRz3L2DET1tLeq/N/twqGOpe/QceTetQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tDBVK-0001ne-Im for bug-gnu-emacs@gnu.org; Mon, 18 Nov 2024 18:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Nov 2024 23:50: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.17319737756873 (code B ref 74413); Mon, 18 Nov 2024 23:50:02 +0000 Original-Received: (at 74413) by debbugs.gnu.org; 18 Nov 2024 23:49:35 +0000 Original-Received: from localhost ([127.0.0.1]:39735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDBUs-0001mm-Ua for submit@debbugs.gnu.org; Mon, 18 Nov 2024 18:49:35 -0500 Original-Received: from mail-ed1-f43.google.com ([209.85.208.43]:61848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tDBUr-0001md-BT for 74413@debbugs.gnu.org; Mon, 18 Nov 2024 18:49:34 -0500 Original-Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5cfc19065ffso331320a12.3 for <74413@debbugs.gnu.org>; Mon, 18 Nov 2024 15:49:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731973712; x=1732578512; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=6tbhCzqr7pozjRrhVg4gGl/28BiAOSviB4OjIgSG7gw=; b=lekcWbWNXJ9WDZZDVCq7ZDdE1cPX6/MLQlef9Bfb5iuVcxYLGUkrkAhF6lPO74Xsdp YFEgsyhlsPYCJYI2MX6K2YZcE4nd80Uoke90RJxr6KFbfW0277coF4ur3X6yFR887lLF tNRlHnM60KQGUdDAAkeADbZBLOkjvHKr5kZYXhCVB0bdY2l+OkgvJl78APPVFNLDRq5I v6UfoK5B5qQEPvZaYFF/i5YVDjJ3h7E6DnX+eabkzNq+4Z2nXGKKUGBVAPoOKa2jt2SF 8JuG5Es91yKLTL+kEuqjmFwm3RcOwr9zdli6daVXjLR6WQhSbrI9Fly82lfpFkxx0g72 /ndg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731973712; x=1732578512; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=6tbhCzqr7pozjRrhVg4gGl/28BiAOSviB4OjIgSG7gw=; b=OEnp0kri1Ou3clK0hFqGEM1DrzM7OxLGRRi4P6tNwlbyeUwtieX6OOhG4/ai4i6Fy2 G9KShgXmdoxupW1SDv1vAnUzbqK5DfrLogUd2UzxJgbEg9AGagJT2QcHCCtr4BkvnqeR H6nkHtXsDG8PrblTpCMeW72MziYlOa62R7NJ58tac1C4r2BfLeWttm2atwYk880qxtVh elVJ76NqmIXexVE5+pInYZQmwazjPWJKzPgDfgK2fTB3KzcfuRKruTVVzIy5o9qLyBoI KufyTa0Zc1pl2dEcr41+/ZqdNrgcpooCzsLiEyMwEjThsCuVetMCuWynr4SdGq34S+2a 1mEQ== X-Forwarded-Encrypted: i=1; AJvYcCXc+xJGwWEqxW5Xkrt/s7Sp9YHVBiXa46XfpHNpEwHFGgvtupOnzq1/AgWBbsn/n4svMluoeA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyC724Aqja1e+bAkrrQ4x7a+lf5QGlFOhF1n0rs4/KPv9pDwQBh J+pTylsG+K7onZKrsK8TCazmBjpPFGh83VV7Hu5L/hcmriHnSIlSbLPasCk0CqxBiY0PxrW+7ma ttLBOhzqKiI2zg49gw7zjlPR/nas= X-Google-Smtp-Source: AGHT+IFsJ5Z0kEooQ6+pelQjdbRBZKDCOoBqBuNdAzY/bQuF3pAS60WIiv3f2sish1TSExmrpwJywpUDh2NVNla13fM= X-Received: by 2002:a05:6402:2787:b0:5cf:c18b:b0ce with SMTP id 4fb4d7f45d1cf-5cfc18bb15dmr4766986a12.14.1731973712153; Mon, 18 Nov 2024 15:48:32 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 18 Nov 2024 18:48:31 -0500 In-Reply-To: <867c90vbfk.fsf@gnu.org> 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:295618 Archived-At: Eli Zaretskii writes: >> From: Bj=C3=B6rn Bidar >> Cc: Po Lu , 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=C3=B6rn Bidar 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 pd= ump > 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? 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? 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 ? 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? 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?