unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Morgan.J.Smith@outlook.com
To: ludo@gnu.org
Cc: Morgan Smith <Morgan.J.Smith@outlook.com>, 48205@debbugs.gnu.org
Subject: [bug#48205] [PATCH v2] gnu: emacs-org: Make build reproducible
Date: Wed,  9 Jun 2021 11:32:02 -0400	[thread overview]
Message-ID: <BYAPR05MB4023DFEC30DC46812C6AE7D1C5369@BYAPR05MB4023.namprd05.prod.outlook.com> (raw)
In-Reply-To: <BYAPR05MB40239B904A0A20F4BFB8B2A6C55B9@BYAPR05MB4023.namprd05.prod.outlook.com>

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/emacs-xyz.scm (emacs-org)[phases]: Remove loaddefs and use
autoloads instead. Copy autoloads into build directory.
---

Thanks for the suggestions! Sorry about the delay. Also sorry about the
comment. It's probably a little too long :/. I need to work on my english and
my ability to be concise.

 gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1d954ec5bd..180b2709fe 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11761,6 +11761,27 @@ (define-public emacs-org
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; Org ships with the file org-loaddefs.el that functions like our
+         ;; autoloads. Something about the interaction between the loaddefs
+         ;; and autoloads makes the build non-deterministic. We should opt for
+         ;; our autoloads system over the loaddefs since the loaddefs are
+         ;; autogenerated for the release tarball. org-loaddefs.el is
+         ;; mentioned by name in the source files so we have to do a blanket
+         ;; regex search and replace.
+         (add-after 'unpack 'use-autoloads
+           (lambda _
+             (delete-file "org-loaddefs.el")
+             (substitute* (find-files "." "\\.el$")
+               (("org-loaddefs.el") "org-autoloads.el"))))
+         ;; We create the autoloads directly in the install folder. During
+         ;; compilation org checks for the autoloads file so we need to copy
+         ;; it to the build directory.
+         (add-after 'make-autoloads 'copy-autoload-to-build-dir
+           (lambda* (#:key outputs #:allow-other-keys)
+             (copy-file (string-append
+                         (elpa-directory (assoc-ref outputs "out"))
+                         "/org-autoloads.el")
+                        "org-autoloads.el")))
          (add-after 'install 'install-documentation
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((share (string-append (assoc-ref outputs "out") "/share"))
-- 
2.32.0





  parent reply	other threads:[~2021-06-09 15:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 20:54 [bug#48205] [PATCH] gnu: emacs-org: Make build reproducible Morgan.J.Smith
2021-05-11 10:28 ` Ludovic Courtès
2021-06-09 15:32 ` Morgan.J.Smith [this message]
2021-06-11 22:54   ` [bug#48205] [PATCH v2] " Ludovic Courtès
2021-11-26  5:12 ` [bug#48205] [PATCH] gnu: emacs-org: Don't use release tar Morgan.J.Smith
2021-11-28 21:01   ` bug#48205: " Nicolas Goaziou
2021-12-02  1:57     ` [bug#48205] " Michael Rohleder
2021-12-02 17:38 ` [bug#48205] [PATCH] gnu: emacs-org: Preserve version information Morgan.J.Smith
2021-12-03 20:15   ` Nicolas Goaziou

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR05MB4023DFEC30DC46812C6AE7D1C5369@BYAPR05MB4023.namprd05.prod.outlook.com \
    --to=morgan.j.smith@outlook.com \
    --cc=48205@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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 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).