From patchwork Wed Feb 12 19:45:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 20232 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 13A6B27BBEA; Wed, 12 Feb 2020 19:45:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 8C13127BBE4 for ; Wed, 12 Feb 2020 19:45:10 +0000 (GMT) Received: from localhost ([::1]:42556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1xwb-0002bO-Vs for patchwork@mira.cbaines.net; Wed, 12 Feb 2020 14:45:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35247) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1xwV-0002bE-FH for guix-patches@gnu.org; Wed, 12 Feb 2020 14:45:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1xwU-0002R3-8t for guix-patches@gnu.org; Wed, 12 Feb 2020 14:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1xwU-0002Qw-4I for guix-patches@gnu.org; Wed, 12 Feb 2020 14:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1xwU-0000wy-3H for guix-patches@gnu.org; Wed, 12 Feb 2020 14:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39146] [PATCH v3] gnu: icecat: Remove about:buildconfig store references. References: <20200115222115.322ymuuqkwlnbl3v@zdrowyportier.kadziolka.net> Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Feb 2020 19:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39146 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39146@debbugs.gnu.org Cc: Mark H Weaver , Marius Bakke , Tobias Geerinckx-Rice , Danny Milosavljevic Received: via spool by 39146-submit@debbugs.gnu.org id=B39146.15815367013628 (code B ref 39146); Wed, 12 Feb 2020 19:45:02 +0000 Received: (at 39146) by debbugs.gnu.org; 12 Feb 2020 19:45:01 +0000 Received: from localhost ([127.0.0.1]:59083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1xwN-0000wN-W5 for submit@debbugs.gnu.org; Wed, 12 Feb 2020 14:45:00 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:34110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j1xwL-0000wE-8x for 39146@debbugs.gnu.org; Wed, 12 Feb 2020 14:44:53 -0500 Received: (qmail 8086 invoked by uid 1009); 12 Feb 2020 20:44:51 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25720. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.026486 secs); 12 Feb 2020 19:44:51 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 12 Feb 2020 20:44:51 +0100 Date: Wed, 12 Feb 2020 20:45:25 +0100 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Message-ID: <20200212194525.joyg66cikh5xfnuu@gravity> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1581371371.3276.1@tobias.gr> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gnuzilla.scm (icecat)[arguments]: New ‘neutralise-store-references’ phase. Co-authored-by: Tobias Geerinckx-Rice --- 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 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 ;;; Copyright © 2017 Clément Lassieur ;;; Copyright © 2017 ng0 -;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2018 Ricardo Wurmus ;;; Copyright © 2019 Ivan Petkov ;;; Copyright © 2020 Oleg Pykhalov +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; 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) + "" + (string-drop hash 8)))) + #t)) (add-before 'configure 'install-desktop-entry (lambda* (#:key outputs #:allow-other-keys) ;; Install the '.desktop' file.