unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility
@ 2019-04-30 21:28 wednesday
  2019-04-30 21:30 ` [bug#35511] [PATCH 1/1] gnu: emacs: Make build more reproducible wednesday
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: wednesday @ 2019-04-30 21:28 UTC (permalink / raw)
  To: 35511; +Cc: wednesday

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#35511] [PATCH 1/1] gnu: emacs: Make build more reproducible
  2019-04-30 21:28 [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility wednesday
@ 2019-04-30 21:30 ` wednesday
  2019-05-04 16:53 ` [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility ng0
  2019-05-21 20:50 ` bug#35511: " Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: wednesday @ 2019-04-30 21:30 UTC (permalink / raw)
  To: 35511; +Cc: wednesday

* 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility
  2019-04-30 21:28 [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility wednesday
  2019-04-30 21:30 ` [bug#35511] [PATCH 1/1] gnu: emacs: Make build more reproducible wednesday
@ 2019-05-04 16:53 ` ng0
  2019-05-04 23:51   ` Tobias Geerinckx-Rice
  2019-05-21 20:50 ` bug#35511: " Ludovic Courtès
  2 siblings, 1 reply; 5+ messages in thread
From: ng0 @ 2019-05-04 16:53 UTC (permalink / raw)
  To: wednesday; +Cc: 35511

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
> 
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility
  2019-05-04 16:53 ` [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility ng0
@ 2019-05-04 23:51   ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 5+ messages in thread
From: Tobias Geerinckx-Rice @ 2019-05-04 23:51 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: wednesday, 35511

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

ng0@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#35511: [PATCH 0/1] Add configure flag to emacs to improve repoducibility
  2019-04-30 21:28 [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility wednesday
  2019-04-30 21:30 ` [bug#35511] [PATCH 1/1] gnu: emacs: Make build more reproducible wednesday
  2019-05-04 16:53 ` [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility ng0
@ 2019-05-21 20:50 ` Ludovic Courtès
  2 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2019-05-21 20:50 UTC (permalink / raw)
  To: wednesday; +Cc: 35511-done

Hi wednesday,

wednesday <jessejohngildersleve@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’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-05-21 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-30 21:28 [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility wednesday
2019-04-30 21:30 ` [bug#35511] [PATCH 1/1] gnu: emacs: Make build more reproducible wednesday
2019-05-04 16:53 ` [bug#35511] [PATCH 0/1] Add configure flag to emacs to improve repoducibility ng0
2019-05-04 23:51   ` Tobias Geerinckx-Rice
2019-05-21 20:50 ` bug#35511: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).