From patchwork Thu Feb 13 22:03:07 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: 20242 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 0D4F327BBEA; Thu, 13 Feb 2020 22:03:16 +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 BC23927BBE4 for ; Thu, 13 Feb 2020 22:03:15 +0000 (GMT) Received: from localhost ([::1]:59704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2MZn-0005l0-7Q for patchwork@mira.cbaines.net; Thu, 13 Feb 2020 17:03:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53979) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2MZe-0005i2-0F for guix-patches@gnu.org; Thu, 13 Feb 2020 17:03:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2MZb-0005yz-6Z for guix-patches@gnu.org; Thu, 13 Feb 2020 17:03:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2MZa-0005wx-BU for guix-patches@gnu.org; Thu, 13 Feb 2020 17:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j2MZa-0004kx-2a for guix-patches@gnu.org; Thu, 13 Feb 2020 17:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39146] [PATCH v4] gnu: icecat: Remove about:buildconfig store references. Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Feb 2020 22:03: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.158163136518255 (code B ref 39146); Thu, 13 Feb 2020 22:03:02 +0000 Received: (at 39146) by debbugs.gnu.org; 13 Feb 2020 22:02:45 +0000 Received: from localhost ([127.0.0.1]:60558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2MZD-0004kI-Tv for submit@debbugs.gnu.org; Thu, 13 Feb 2020 17:02:44 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:52530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j2MZA-0004k7-Fs for 39146@debbugs.gnu.org; Thu, 13 Feb 2020 17:02:38 -0500 Received: (qmail 4282 invoked by uid 1009); 13 Feb 2020 23:02:34 +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/25721. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.009023 secs); 13 Feb 2020 22:02:34 -0000 Received: from unknown (HELO localhost.localdomain) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 13 Feb 2020 23:02:34 +0100 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Date: Thu, 13 Feb 2020 23:03:07 +0100 Message-Id: <20200213220307.24701-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200212194525.joyg66cikh5xfnuu@gravity> References: <20200212194525.joyg66cikh5xfnuu@gravity> MIME-Version: 1.0 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 --- Changes from the previous version: - use regexp-quote around %store-directory, since today's IRC discussion has made me aware that this exists as a built-in - reflow some lines gnu/packages/gnuzilla.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index ae0c58eedb..fe6664e909 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. ;;; @@ -882,6 +883,7 @@ from forcing GEXP-PROMISE." #:modules ((ice-9 ftw) (ice-9 rdelim) + (ice-9 regex) (ice-9 match) (srfi srfi-34) (srfi srfi-35) @@ -1067,6 +1069,20 @@ 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-df-np-sv-z]{32})" + (regexp-quote (%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.