GNU bug report logs - #35511
[PATCH 0/1] Add configure flag to emacs to improve repoducibility

Previous Next

Package: guix-patches;

Reported by: wednesday <jessejohngildersleve <at> zohomail.eu>

Date: Tue, 30 Apr 2019 21:29:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35511 in the body.
You can then email your comments to 35511 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35511; Package guix-patches. (Tue, 30 Apr 2019 21:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to wednesday <jessejohngildersleve <at> zohomail.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 30 Apr 2019 21:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: wednesday <jessejohngildersleve <at> zohomail.eu>
To: guix-patches <at> gnu.org
Cc: wednesday <jessejohngildersleve <at> zohomail.eu>
Subject: [PATCH 0/1] Add configure flag to emacs to improve repoducibility
Date: Tue, 30 Apr 2019 22:28:04 +0100
This patch adds the --disable-build-details configure-flag to the emacs package.
By default the emacs binary stores some information about how it was build, as
stated here:
"By default the dumped emacs executable records details such as the build time and host name. Use the --disable-build-details option of configure to suppress these details, so that building and installing Emacs twice from the same sources is more likely to result in identical copies of Emacs."
https://www.gnu.org/software/emacs/manual/html_node/elisp/Building-Emacs.html

There is also this mailing list post about emacs repoducibility:
https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00711.html

wednesday (1):
  gnu: emacs: Make build more reproducible

 gnu/packages/emacs.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.21.0







Information forwarded to guix-patches <at> gnu.org:
bug#35511; Package guix-patches. (Tue, 30 Apr 2019 21:31:02 GMT) Full text and rfc822 format available.

Message #8 received at 35511 <at> debbugs.gnu.org (full text, mbox):

From: wednesday <jessejohngildersleve <at> zohomail.eu>
To: 35511 <at> debbugs.gnu.org
Cc: wednesday <jessejohngildersleve <at> zohomail.eu>
Subject: [PATCH 1/1] gnu: emacs: Make build more reproducible
Date: Tue, 30 Apr 2019 22:30:12 +0100
* gnu/packages/emacs.scm (emacs)[arguments]: Add configure-flag to omit build
  information in binary.
---
 gnu/packages/emacs.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 7c60cc6021..c9eaab781b 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -115,7 +115,8 @@
     (build-system glib-or-gtk-build-system)
     (arguments
      `(#:tests? #f  ; no check target
-       #:configure-flags (list "--with-modules")
+       #:configure-flags (list "--with-modules"
+                               "--disable-build-details")
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'fix-/bin/pwd
-- 
2.21.0







Information forwarded to guix-patches <at> gnu.org:
bug#35511; Package guix-patches. (Sat, 04 May 2019 16:54:02 GMT) Full text and rfc822 format available.

Message #11 received at 35511 <at> debbugs.gnu.org (full text, mbox):

From: ng0 <at> n0.is
To: wednesday <jessejohngildersleve <at> zohomail.eu>
Cc: 35511 <at> debbugs.gnu.org
Subject: Re: [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve
 repoducibility
Date: Sat, 4 May 2019 16:53:37 +0000
wednesday transcribed 853 bytes:
> This patch adds the --disable-build-details configure-flag to the emacs package.
> By default the emacs binary stores some information about how it was build, as
> stated here:
> "By default the dumped emacs executable records details such as the build time and host name. Use the --disable-build-details option of configure to suppress these details, so that building and installing Emacs twice from the same sources is more likely to result in identical copies of Emacs."
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Building-Emacs.html
> 
> There is also this mailing list post about emacs repoducibility:
> https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00711.html

This email states:
# The configuration option --disable-build-details can be used to omit some information, such as build host name, which make the build not reproducible across machines.

There is either a typo (not reproducible -> reproducible?) or this should not be used.

searching in the tip of emacs, because they are really vague about the option
gives away more details:

 /* Set system-name to nil so that the build is deterministic.  */

Then there's some more info in related commits, such as setting build time
to nil.

If we have nil instead of the time of our environment, this won't really add
any value.
When the time is epoch+1 or similar anyway, recording it does no harm.

Furthermore we reset the system name to localhost (at least when guix still
follows nix in that regard), so we end up with "localhost" in the build
recorded somewhere.

This, and some follow-up commits which fixed errors related to this, is everything
I can find on the details.

I'm not even sure if this makes sense in PMs where your environment does not default
to being reset and readjusted in a chroot, as you can still have chrooted automatic
builds for batch building, and then you end up with this mixture (I was about to
apply this for pkgsrc until I went and read into the code).

Imo there's no need for this switch in guix.
 
> wednesday (1):
>   gnu: emacs: Make build more reproducible
> 
>  gnu/packages/emacs.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> -- 
> 2.21.0
> 
> 
> 
> 
> 
> 




Information forwarded to guix-patches <at> gnu.org:
bug#35511; Package guix-patches. (Sat, 04 May 2019 23:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 35511 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Nils Gillmann <ng0 <at> n0.is>
Cc: wednesday <jessejohngildersleve <at> zohomail.eu>, 35511 <at> debbugs.gnu.org
Subject: Re: [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve
 repoducibility
Date: Sun, 05 May 2019 01:51:17 +0200
[Message part 1 (text/plain, inline)]
ng0 <at> n0.is wrote:
> This email states:
> # The configuration option --disable-build-details can be used 
> to omit some information, such as build host name, which make 
> the build not reproducible across machines.
>
> There is either a typo (not reproducible -> reproducible?) or 
> this should not be used.

I think the original e-mail is correct: ‘the information … make[s] 
the build not reproducible’.  The option can't be the subject 
here.

> If we have nil instead of the time of our environment, this 
> won't really add
> any value.
> When the time is epoch+1 or similar anyway, recording it does no 
> harm.

The time in our environment isn't reproducible AFAIK.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 21 May 2019 20:51:02 GMT) Full text and rfc822 format available.

Notification sent to wednesday <jessejohngildersleve <at> zohomail.eu>:
bug acknowledged by developer. (Tue, 21 May 2019 20:51:02 GMT) Full text and rfc822 format available.

Message #19 received at 35511-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: wednesday <jessejohngildersleve <at> zohomail.eu>
Cc: 35511-done <at> debbugs.gnu.org
Subject: Re: [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve
 repoducibility
Date: Tue, 21 May 2019 22:50:20 +0200
Hi wednesday,

wednesday <jessejohngildersleve <at> zohomail.eu> skribis:

> This patch adds the --disable-build-details configure-flag to the emacs package.
> By default the emacs binary stores some information about how it was build, as
> stated here:
> "By default the dumped emacs executable records details such as the build time and host name. Use the --disable-build-details option of configure to suppress these details, so that building and installing Emacs twice from the same sources is more likely to result in identical copies of Emacs."
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Building-Emacs.html
>
> There is also this mailing list post about emacs repoducibility:
> https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00711.html

This is the right thing to do, applied!

I’m committing a followup that does the same for ‘emacs-minimal’ (even
though ‘emacs-minimal’ has 784 dependent packages, I’m committing to
‘master’ because most of these build in a few seconds.)

I’ve run:

  guix challenge emacs \
    --substitute-urls='https://mirror.hydra.gnu.org https://berlin.guix.gnu.org'

on a commit before this patch, and there’s the ‘.emacs-real’ binary
alongside a dozen of .elc files that differ.  So this may not be the end
of the road, but we should keep monitoring with ‘challenge’ and ‘--check’.

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Jun 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 284 days ago.

Previous Next


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