GNU bug report logs - #39146
[PATCH] gnu: icecat: Remove compiler paths from about:buildconfig

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Wed, 15 Jan 2020 22:22:01 UTC

Severity: normal

Tags: patch

Done: Jakub Kądziołka <kuba <at> kadziolka.net>

Bug is archived. No further changes may be made.

Full log


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

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39146 <at> debbugs.gnu.org
Cc: Mark H Weaver <mhw <at> netris.org>, Marius Bakke <mbakke <at> fastmail.com>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH v3] gnu: icecat: Remove about:buildconfig store references.
Date: Wed, 12 Feb 2020 20:45:25 +0100
[Message part 1 (text/plain, inline)]
* gnu/packages/gnuzilla.scm (icecat)[arguments]:
  New ‘neutralise-store-references’ phase.

Co-authored-by: Tobias Geerinckx-Rice <me <at> tobias.gr>
---

On Mon, Feb 10, 2020 at 10:49:31PM +0100, Tobias Geerinckx-Rice wrote:
> The truncation of these very long paths was fully intended as a feature, but
> if people do think they're actually useful I think this is a clever hack
> worthy of Guix :-)
> 
> Have you tested whether copying & pasting still works fine with this?
At the time it was just a rough idea, but here's a patch. After waiting
a while for IceCat to compile, I tested this and it's working
flawlessly. Selection and copy-paste are unhindered.

In the end, I decided to use a comment instead of an empty span, since
it'll be less mysterious should someone stumble upon it. It's also more
greppable.

(to be clear, I only tested the comment version, so perhaps the <span>
one wouldn't have even worked. Not that it matters...)

BTW, do you happen to know a good way to send a patch as a reply? I
ended up using `neomutt -H' and then specifying all the CC's manually...

 gnu/packages/gnuzilla.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index ae0c58eedb..114e5e636c 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -7,10 +7,11 @@
 ;;; Copyright © 2016 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2017 Clément Lassieur <clement <at> lassieur.org>
 ;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2019 Ivan Petkov <ivanppetkov <at> gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1067,6 +1068,17 @@ from forcing GEXP-PROMISE."
                                 (force-output)
                                 (retry (- remaining-attempts 1))))
                        (apply build args)))))))
+         (add-after 'build 'neutralise-store-references
+           (lambda _
+             ;; Mangle the store references to compilers & other build tools in
+             ;; about:buildconfig, reducing IceCat's closure by 1 GiB on x86-64.
+             (substitute*
+                 "dist/bin/chrome/toolkit/content/global/buildconfig.html"
+               (((format #f "(~a/)([0-9a-z]{32})" (%store-directory)) _ store hash)
+                (string-append store (string-take hash 8)
+                               "<!-- Guix: not a runtime dependency -->"
+                               (string-drop hash 8))))
+             #t))
          (add-before 'configure 'install-desktop-entry
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Install the '.desktop' file.
-- 
2.25.0

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

This bug report was last modified 5 years and 81 days ago.

Previous Next


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