From patchwork Wed Jul 31 03:54:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 66567 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 C3D7027BBEA; Wed, 31 Jul 2024 04:56:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2BF0A27BBE2 for ; Wed, 31 Jul 2024 04:56:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZ0RK-0005dP-5b; Tue, 30 Jul 2024 23:55:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZ0RH-0005cg-FP for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:47 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZ0RH-0004u6-66 for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=1rhjv2L81+g8qZi64AubNkHzZl2s4wtlCwF6ZAxRUI0=; b=APe3yY1NrxJqeeXh5Q3pUik8/WyI37mJelP6asUKArw12J2Em02cbsZfBC0KlYFE0FkpkHUq3ZaD0qV9NLuetaxvJ0LrVAd4z9VGQUBuwZkrY6udfs3tbhQHytqU7T4NrbrLHgG91sD0lW1SX89MQcgY/EEMFHMt8kxbtf1KKHIIr8v9j2PpJoCMLxi91mqLADay7B9+1gApfrlr0mVaGHtepJt99KagzkEyI1wV9opx4u8obHj8FVznThsrQLFi8Z8yf4aXoAQ5xOY4ltUeDettZpHDf0hkEdb8qo8mB5MIXDLrIF/DpLYHmWpYgcIaYLCrl2rn3Txz2Xhxm5bL8g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZ0RV-0001zG-Nw for guix-patches@gnu.org; Tue, 30 Jul 2024 23:56:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71832] [PATCH v5 1/3] gnu: Add nss-rapid. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Jul 2024 03:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71832 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71832@debbugs.gnu.org Cc: Ian Eure Received: via spool by 71832-submit@debbugs.gnu.org id=B71832.17223981317569 (code B ref 71832); Wed, 31 Jul 2024 03:56:01 +0000 Received: (at 71832) by debbugs.gnu.org; 31 Jul 2024 03:55:31 +0000 Received: from localhost ([127.0.0.1]:48821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0R1-0001y0-6f for submit@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:31 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:51533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0Qx-0001xS-Hb for 71832@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:29 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 2FB6D1382188; Tue, 30 Jul 2024 23:55:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 30 Jul 2024 23:55:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1722398107; x= 1722484507; bh=1rhjv2L81+g8qZi64AubNkHzZl2s4wtlCwF6ZAxRUI0=; b=G /THzIkxG9isWVy7ADG3YMjbSOc2Xls83K63rzZNXmXQqtDmhZar0dHnu1qUQzGdq BV6ym117KOWzUJjvj8UOna+TNjeAJx0reLBcLdBgFuFAxgfNM19UP+jIqsOSKAjS 0wJqa/2MKK/bBhV4HSeTuYGJ/0MEbXrSSHQcGS8Ku00Shwoh4fBXg5ucczH+47Cn b3/QYZTyHtPZEQf7hTJZHZ+rfSBK/SBWyX7lBjtveYXEnrBcs673YJd97oGO/aaE DyxxhRkkGFKK+a8tYD/jmiQW+36mWUIL/1rN2E9O1+YIu3N7gicurvkclH5z4wP/ kzgN3gMBTCQez4BJNneUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722398107; x= 1722484507; bh=1rhjv2L81+g8qZi64AubNkHzZl2s4wtlCwF6ZAxRUI0=; b=I MV0gVUtrtKvc8/uqymVRIliBHmzK3bBw4UjTYlUUPhLtR22YlN8YsYlhQKz5HoYn mHcGZOYYHTVdDfe+OITlNCjTY6FA63pfrGBGm4cLZ3hX9UMdc0FmukyuyFEg20lW U2MfoN4WBRUOEUkzMHGorMrXL1np5o9ueJ01fy0cEFakuMj73yn0paeIdXm4BoRs Cq8PYDv4CpGn1LB+S7ptXmngz3BaD2jl04Tk9SQreVNk84fMKAnm88xBnQ6vki8x xReiZXPaOeUfsaA5ilQx46x8OgmtuTPQxmT+cVyXAW76GhMxLKynr3mLAyXOSVyl du7ALHEz7x5CZYpgK4QkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeehgdejkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgvtgdr thhvqeenucggtffrrghtthgvrhhnpefgteeiffdvleejleeiieevgeegleegieevjeekfe evledugfehteetgfeuffevhfenucffohhmrghinhepmhhoiihilhhlrgdrohhrghenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvg htrhhoshhpvggtrdhtvhdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jul 2024 23:55:06 -0400 (EDT) From: Ian Eure Date: Tue, 30 Jul 2024 20:54:59 -0700 Message-ID: <20240731035501.27512-2-ian@retrospec.tv> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731035501.27512-1-ian@retrospec.tv> References: <20240731035501.27512-1-ian@retrospec.tv> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/nss.scm (nss-rapid): New variable. Change-Id: I2bdd2119fb0c857feae9eb2e47a28909b8228cd7 --- gnu/packages/nss.scm | 80 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 6 deletions(-) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 9224a8ed5a..17f05a65b0 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -106,6 +106,9 @@ (define-public nspr-4.32 (base32 "0v3zds1id71j5a5si42a658fjz8nv2f6zp6w4gqrqmdr6ksz8sxv")))))) +;; nss should track ESRs, but currently doesn't. When the next ESR it out, it +;; should get updated. + (define-public nss (package (name "nss") @@ -153,13 +156,13 @@ (define-public nss ;; Ensure we are building for the (%current-target-system). #$@(if (%current-target-system) #~((string-append - "OS_TEST=" - (string-take #$(%current-target-system) - (string-index #$(%current-target-system) #\-))) + "OS_TEST=" + (string-take #$(%current-target-system) + (string-index #$(%current-target-system) #\-))) (string-append - "KERNEL=" (cond (#$(target-hurd?) "gnu") - (#$(target-linux?) "linux") - (else "")))) + "KERNEL=" (cond (#$(target-hurd?) "gnu") + (#$(target-linux?) "linux") + (else "")))) #~()) #$@(if (%current-target-system) #~("CROSS_COMPILE=1") @@ -303,6 +306,71 @@ (define-public nss/fixed (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) (format #t "test suite not run~%")))))))))))) +;; nss-rapid tracks the rapid release channel. Unless your package requires a +;; newer version, you should prefer the `nss' package, which tracks the ESR +;; channel. +;; +;; See https://wiki.mozilla.org/NSS:Release_Versions +;; and https://wiki.mozilla.org/Rapid_Release_Model + +(define-public nss-rapid + (package + (inherit nss) + (name "nss-rapid") + (version "3.102.1") + (source (origin + (inherit (package-source nss)) + (uri (let ((version-with-underscores + (string-join (string-split version #\.) "_"))) + (string-append + "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" + "releases/NSS_" version-with-underscores "_RTM/src/" + "nss-" version ".tar.gz"))) + (sha256 + (base32 + "1k1pjxz0ab4lg8xqggbb8pw77c1q8h4bldi09z4pj5g4hwsjv62l")))) + (arguments + (substitute-keyword-arguments (package-arguments nss) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for + ;; testing. The latter requires a working DNS or /etc/hosts. + (setenv "DOMSUF" "localdomain") + (setenv "USE_IP" "TRUE") + (setenv "IP_ADDRESS" "127.0.0.1") + + ;; This specific test is looking at performance "now + ;; verify that we can quickly dump a database", and + ;; we're not testing performance here (especially + ;; since we're using faketime), so raise the + ;; threshold + (substitute* "nss/tests/dbtests/dbtests.sh" + ((" -lt 5") " -lt 50")) + + ;; Since the test suite is very lengthy, run the test + ;; suite once, not thrice as done by default, by + ;; selecting only the 'standard' cycle. + (setenv "NSS_CYCLES" "standard") + + ;; The "PayPalEE.cert" certificate expires every six months, + ;; leading to test failures: + ;; . To + ;; work around that, set the time to roughly the release date. + (invoke "faketime" "2024-01-23" "./nss/tests/all.sh")) + (format #t "test suite not run~%")))))))) + (synopsis "Network Security Services (Rapid Release)") + (description + "Network Security Services (@dfn{NSS}) is a set of libraries designed to +support cross-platform development of security-enabled client and server +applications. Applications built with NSS can support SSL v2 and v3, TLS, +PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other +security standards. + +This package tracks the Rapid Release channel, which updates frequently."))) (define-public nsncd (package (name "nsncd") From patchwork Wed Jul 31 03:55:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 66565 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 AA87B27BBE9; Wed, 31 Jul 2024 04:56:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8131327BBE2 for ; Wed, 31 Jul 2024 04:56:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZ0RO-0005eg-JM; Tue, 30 Jul 2024 23:55:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZ0RI-0005cw-44 for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:48 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZ0RH-0004uL-RU for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=3tkduaXMWRdzQeeeeXA7Wtyw1cnF40lifR2tCrRdizE=; b=RuAzmkHu2Hh0eVw1l020e8v2NQmHkRnOfug+GUH+SqVBu2P/kiQOJHyxZreavdKXRVx2MNHWgEZHcybtuxwnL3jhgkrXM3B+Hc8LZoU7hJfupI+VXMrg0uPCTuFbm16goPTimeOwOCqj1N0IG0SkqfmboRMoLtB99HnVChS63f6LWWhUA2By0q1mHoBZ14qImY+Jn/ybCpEk2DCiBFi775nQUERzXzmVR9KfefQKfem0V95KY9/d+b52IatVwke/luMh4dLOzb8pupEIVyKWQFX6pQMlq/LRIm+ThMTNBzw6UM4+zilMnUAMEExTuU3OTqOjv7T7eEgQeAxL/ExHpg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZ0RW-0001zV-P7 for guix-patches@gnu.org; Tue, 30 Jul 2024 23:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71832] [PATCH v5 2/3] gnu: gnuzilla: Add skr to all-mozilla-locales. Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Jul 2024 03:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71832 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71832@debbugs.gnu.org Cc: Ian Eure Received: via spool by 71832-submit@debbugs.gnu.org id=B71832.17223981337596 (code B ref 71832); Wed, 31 Jul 2024 03:56:02 +0000 Received: (at 71832) by debbugs.gnu.org; 31 Jul 2024 03:55:33 +0000 Received: from localhost ([127.0.0.1]:48827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0R2-0001yM-Sz for submit@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:33 -0400 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:58513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0Qy-0001xU-JQ for 71832@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:30 -0400 Received: from compute8.internal (compute8.nyi.internal [10.202.2.227]) by mailfout.nyi.internal (Postfix) with ESMTP id 2FC421382192; Tue, 30 Jul 2024 23:55:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute8.internal (MEProxy); Tue, 30 Jul 2024 23:55:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1722398108; x= 1722484508; bh=3tkduaXMWRdzQeeeeXA7Wtyw1cnF40lifR2tCrRdizE=; b=Y JNBktTE/TWJ0abOxQM7UBm6i0dpUt5u+LBJ2f3Lu4ss/X3vAUXoY+GXqYghU2q4X 1IXDOG5r0WBvtaMD9WqyzxWtEAAs1LfH2EsL78DTthHWCL3m7V8IsiMOsIaIJrIl 4PLhBfvVJmjei3FkydFBlU/fTAt+DwBnNJFG6v4M+PmMh7TcBAApWH2u4V+8QgC5 /0N4pYlvp2ZRO4sEX6LNSmcm6RzwnAI87xfh1RlzUHBavuyjcwwCrONWY3xl/GdW kcFdd9inUwSA+eLzepvTCfS/J2yZOZYEjymBYZQR4IBnNVQf6L79MDy0O+3H4z35 HsG9pi8GDmS0WFnY/NOkw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722398108; x= 1722484508; bh=3tkduaXMWRdzQeeeeXA7Wtyw1cnF40lifR2tCrRdizE=; b=I Zvy+ZxNiTrG4pd8XBCdHwtZMTx5ANBdGLFTap9+s1RP2eo9eyrG4v+lxZacYMXrx hvOOQeLVKpDXGs/bXCkX2opw1og76QG2qUncoPKhYL3cIyumW8b6jiLvZLkZgbHb Jh3+YFNgeQL3F+Kx3NULID5PeYwEGmLNqTyGpQZzrgX1FQHY4gz36BoSi9CVnVy/ gZl+q5EtgfU4alFE10WeD4B+LIjVCsWWqENjHXxhlmEti4P05d+++SYKWjtwpCR/ iuRdINVBra75B9lrxKC3FlUj85I0lTGusAAhsZto8jZei/yr0sSyBmjV3IkF/1Pu f4SEoAPMh9Czr5nIC64cA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeehgdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgvtgdr thhvqeenucggtffrrghtthgvrhhnpeevveejffduvdetieeutefgueekvdefieeuvdevle efgefhudelfeetvdfgfeegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrdhtvhdpnhgspghrtghpthhtoh eptd X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jul 2024 23:55:07 -0400 (EDT) From: Ian Eure Date: Tue, 30 Jul 2024 20:55:00 -0700 Message-ID: <20240731035501.27512-3-ian@retrospec.tv> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731035501.27512-1-ian@retrospec.tv> References: <20240731035501.27512-1-ian@retrospec.tv> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * (gnuzilla): Add skr to all-mozilla-locales. Change-Id: If996048792a53dffb55b7e16e69370dd72fc78e3 --- gnu/packages/gnuzilla.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 3e7818ba43..98dd67a5dd 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -508,6 +508,7 @@ (define-public all-mozilla-locales ("0xndsph4v725q3xcpmxxjb9vxv19sssqnng82m9215cdsv9klgpb" "bf5f6e362f6f" "sco") ("0l70n8817mbmbc09fsnn2aqjj9k9dhad2gmzgphmiilf9mqm2dpf" "1f705c926a99" "si") ("19bqjazazww08chd1qc08dsnr2521088jq5jd4j3185yb1ypm3nr" "c1bd10d70325" "sk") + ("12q1nv6z4bk8yaw3vhl9xs41i7kpx1415mwg635v76fx8h94ycl3" "00eaf8d9e83b" "skr") ("11nmjmy2j249588ahg4mh9lxdqr476jbh28a07qxxibfa76j9vk3" "44be3cbf69b6" "sl") ("1ww35141nixg2s03kfmmq9fk6m3qiz2vg7p5a85shjp7i89pyj1d" "800576ff8ef9" "son") ("1q7nfybwc8mxdwi9fpvfhayq18mykzygkpakr5ngfz2316k8lf5r" "4de8638ac27f" "sq") From patchwork Wed Jul 31 03:55:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ian Eure X-Patchwork-Id: 66566 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 454D727BBEA; Wed, 31 Jul 2024 04:56:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9011827BBE9 for ; Wed, 31 Jul 2024 04:56:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZ0RN-0005eO-9x; Tue, 30 Jul 2024 23:55:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sZ0RI-0005cx-J3 for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:48 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZ0RI-0004uW-Ad for guix-patches@gnu.org; Tue, 30 Jul 2024 23:55:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=UF5SSmzEy4fSRNIGVDOvP9Bpz8xDaiFpCgIfJ6LELsI=; b=i6YBn7F7/Yhui5TDD5SGKRxVA92MhZ0k3rwWdvXj9kAsL/+ftGxS+p4JXUq0D4OMvaG6D2EthZbc5VjLNc6qg87goIwttxhudz1S9YmYwPNPmRMWFlvVZdvVNUSqpZfMz9eYujQkAJyywakzEsWP2AmaofkZM0x5ThTdVsSkPnSBr4MGm5czUDHAdU8PnV6hl9SEf+5Gk1x64ODs72ccQgjAC1te4g7Nx7OE3LNEihtAmW3k0enSygdcewQN9DxxWRfuVkGPdquWLPek+jPP/T3ArlJ4/vGNQ6jR9gFmCJaXB3joIU5glBeeKFyJ24/ZdLDo2f+JmE2gF/KBAwYtfw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZ0RX-0001ze-8h for guix-patches@gnu.org; Tue, 30 Jul 2024 23:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71832] [PATCH v5 3/3] gnu: librewolf: Update to 128.0.3-1 Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 31 Jul 2024 03:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71832 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71832@debbugs.gnu.org Cc: Ian Eure Received: via spool by 71832-submit@debbugs.gnu.org id=B71832.17223981377606 (code B ref 71832); Wed, 31 Jul 2024 03:56:03 +0000 Received: (at 71832) by debbugs.gnu.org; 31 Jul 2024 03:55:37 +0000 Received: from localhost ([127.0.0.1]:48829 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0R5-0001ya-8W for submit@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:37 -0400 Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]:36291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ0Qz-0001xW-9k for 71832@debbugs.gnu.org; Tue, 30 Jul 2024 23:55:32 -0400 Received: from compute8.internal (compute8.nyi.internal [10.202.2.227]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 25BEA1146E65; Tue, 30 Jul 2024 23:55:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute8.internal (MEProxy); Tue, 30 Jul 2024 23:55:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1722398109; x=1722484509; bh=UF5SSmzEy4fSRNIGVDOvP9Bpz8xDaiFpCgIfJ6LELsI=; b= kJJz67DLy/WUVwmmYvj+Xa2tjgKE7O6YFZgiMLvplC2LnA3Fcj127J00yWJGf6cr EUr9fSLoyNyrRUab4PTI6UyTnbONGW9e+meM6TQgWg1FavvQvdbqJi4bjBnZY3RK UKU0Pjal4hTpr37U/7lIAoYfD34BhFBC2MN87+6vzq1/4cCD8mbC0kq+7Wd3BLlW HrjFcvKceOfpRk+Oae9bN6+H3VKyne3HyxskF/Ss43b/lXQ2fWycYQKZXeNadBDK RqGowjWYIpzWRsJyKu8TGXYYq/nqs71YoQsqDBVgwv3wYASZq/BHsknxFP9x1nl9 59TSPboQQ+BJFOIbMvXa7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722398109; x= 1722484509; bh=UF5SSmzEy4fSRNIGVDOvP9Bpz8xDaiFpCgIfJ6LELsI=; b=C Ze87KdLVxrg0LgUMs5CJNYKVJZJB/zHxKRNrWEadY5nLoxyiLWehA+SszOQn9olZ zlN65Ap2XOiXx/GEAKYOvtVZAlZuX44IziHUItI9QyT5Tmy9iFTtN/Idb0sIrPUP el44OrFdPiQjlX6zNz1cMRin7aduuL9e30ACNPz5lsi2q8RlJ5Odf4ywR5KU8mHj DELMp+YOlg9x7SfbONwI2H+v4aHq8xwh0PEWdC3t+GURSW5p44yCYmFWkeZMz1Y0 J2DF9VlRv0hi7qbaQnDwLM+1hGeN8kF9kfhPSYHYvF6wTst2O9ufiRpQQ5U+v6dK SZ9p6uXBB/HaEcD7v5JQA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeehgdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhggtgfgsehtke ertdertdejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggt rdhtvheqnecuggftrfgrthhtvghrnhepudffhfeiteejkeehlefgueejffeiveefueekke elhfeltdejteeiieekjeejudelnecuffhomhgrihhnpehsvggrrhgthhhfohigrdhorhhg pdhmohiiihhllhgrrdhorhhgpdhgnhhurdhorhhgpdgtohhnthgvnhhtrdhrvggrugdpgh gvthgrugguohhnshdrshgvrghrtghhpdhgvghtrgguughonhhsrdhlihhnkhdpghhithhh uhgsrdgtohhmpdhlihgsrhgvfiholhhfrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhn sggprhgtphhtthhopedt X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Jul 2024 23:55:08 -0400 (EDT) From: Ian Eure Date: Tue, 30 Jul 2024 20:55:01 -0700 Message-ID: <20240731035501.27512-4-ian@retrospec.tv> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731035501.27512-1-ian@retrospec.tv> References: <20240731035501.27512-1-ian@retrospec.tv> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/librewolf.scm (librewolf): Update to 128.0.3-1. Reorganize module to improve usability and reduce duplication. The Rust package and build ID are now at the top of the file. The librewolf-source variable has been replaced with the make-librewolf-source procedure, centralizing versions & hashes in the librewolf package definition. Dedent some of the package’s arguments to improve readability. Change-Id: I15f8a2aa1fae07e0497ab5511d10af0c1f70cc2e --- gnu/packages/librewolf.scm | 1054 ++++++++++++++++++------------------ 1 file changed, 531 insertions(+), 523 deletions(-) diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm index 3e46477724..def21997fc 100644 --- a/gnu/packages/librewolf.scm +++ b/gnu/packages/librewolf.scm @@ -94,12 +94,24 @@ (define-module (gnu packages librewolf) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) +;; Define the versions of rust needed to build librewolf, trying to match +;; upstream. See the file taskcluster/kinds/toolchain/rust.yml at +;; https://searchfox.org under the particular firefox release, like +;; mozilla-esr102. +;; 1.75 is the default in Guix, 1.77 is the minimum for Librewolf. +(define rust-librewolf rust-1.77) + +;; Update this id with every update to its release date. +;; It's used for cache validation and therefore can lead to strange bugs. +;; ex: date '+%Y%m%d%H%M%S' +(define %librewolf-build-id "20240730155826") + (define (firefox-source-origin version hash) (origin (method url-fetch) (uri (string-append "https://ftp.mozilla.org/pub/firefox/releases/" - version "/source/" "firefox-" version + version "/source/firefox-" version ".source.tar.xz")) (sha256 (base32 hash)))) @@ -115,11 +127,14 @@ (define (librewolf-source-origin version hash) (define computed-origin-method (@@ (guix packages) computed-origin-method)) -(define librewolf-source - (let* ((ff-src (firefox-source-origin "126.0.1" "0fr679rcwshwpfxidc55b2xsn4pmrr7p9ix4rr2mv2k7kwsjcc7n")) - (version "126.0.1-1") - (lw-src (librewolf-source-origin version "0cac80073vkzd85ai9rbnwixs1h9bpy4dj2ri6jxdlqsy5d663km"))) - +(define* (make-librewolf-source version #:key firefox-hash librewolf-hash) + (let* ((ff-src (firefox-source-origin + (car (string-split version #\-)) + firefox-hash)) + (version version) + (lw-src (librewolf-source-origin + version + librewolf-hash))) (origin (method computed-origin-method) (file-name (string-append "librewolf-" version ".source.tar.gz")) @@ -163,11 +178,6 @@ (define librewolf-source (("^ff_source_tarball:=.*") (string-append "ff_source_tarball:=" #+ff-src))) - ;; Remove encoding_rs patch, it doesn't build with Rust 1.75. - (substitute* '("assets/patches.txt") - (("patches/encoding_rs.patch\\\n$") - "")) - ;; Stage locales. (begin (format #t "Staging locales...~%") @@ -205,526 +215,524 @@ (define librewolf-source ".source.tar.gz") #$output)))))))) -;; Define the versions of rust needed to build librewolf, trying to match -;; upstream. See the file taskcluster/ci/toolchain/rust.yml at -;; https://searchfox.org under the particular firefox release, like -;; mozilla-esr102. -(define rust-librewolf rust) ; 1.75 is the default in Guix, 1.65 is the minimum. - -;; Update this id with every update to its release date. -;; It's used for cache validation and therefore can lead to strange bugs. -;; ex: date '+%Y%m%d%H%M%S' -(define %librewolf-build-id "20240607212143") - (define-public librewolf - (package - (name "librewolf") - (version "126.0.1-1") - (source librewolf-source) - (build-system gnu-build-system) - (arguments - (list - #:configure-flags #~(let ((clang #$(this-package-native-input "clang"))) - `("--enable-application=browser" - - ;; Configuration - "--without-wasm-sandboxed-libraries" - "--with-system-jpeg" - "--with-system-zlib" - "--with-system-png" - "--with-system-webp" - "--with-system-icu" - "--with-system-libvpx" - "--with-system-libevent" - "--with-system-ffi" - "--enable-system-pixman" - "--enable-jemalloc" - - ;; see https://bugs.gnu.org/32833 - "--with-system-nspr" - "--with-system-nss" - - ,(string-append "--with-clang-path=" clang - "/bin/clang") - ,(string-append "--with-libclang-path=" clang - "/lib") - - ;; Distribution - "--with-distribution-id=org.guix" - "--with-app-name=librewolf" - "--with-app-basename=LibreWolf" - "--with-branding=browser/branding/librewolf" - - ;; Features - "--disable-tests" - "--disable-updater" - "--enable-pulseaudio" - "--disable-crashreporter" - "--allow-addon-sideload" - "--with-unsigned-addon-scopes=app,system" - - ;; switch only available on x86, whereas EME - ;; is not supported on other targets - ,@(if #$(target-x86?) '("--disable-eme") '()) - - ;; Build details - "--disable-debug" - "--enable-rust-simd" - "--enable-release" - "--enable-optimize" - "--enable-strip" - "--enable-hardening" - "--disable-elf-hack")) - #:imported-modules %cargo-utils-modules - #:modules `((ice-9 regex) - (ice-9 string-fun) - (ice-9 ftw) - (srfi srfi-1) - (srfi srfi-26) - (rnrs bytevectors) - (rnrs io ports) - (guix elf) - (guix build gremlin) - ,@%gnu-build-system-modules) - #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'fix-preferences - (lambda* (#:key inputs #:allow-other-keys) - (let ((port (open-file "browser/app/profile/firefox.js" - "a"))) - (define (write-setting key value) - (format port "~%pref(\"~a\", ~a);~%" key value) - (format #t + (let ((version "128.0.3-1")) + (package + (name "librewolf") + (version version) + (source (make-librewolf-source + version + #:firefox-hash + "1p6ymqzp23xfd4h3lc6aihjbq1ljspli9m17bm6rgklkbk6m8r1j" + #:librewolf-hash + "0pp36q4rcsiyv9b09jfgfrl1k3vqp5bh08c9iq0r2v8is5rbcdz5")) + + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(let ((clang #$(this-package-native-input "clang"))) + `("--enable-application=browser" + + ;; Configuration + "--without-wasm-sandboxed-libraries" + "--with-system-jpeg" + "--with-system-zlib" + "--with-system-png" + "--with-system-webp" + "--with-system-icu" + "--with-system-libvpx" + "--with-system-libevent" + "--with-system-ffi" + "--enable-system-pixman" + "--enable-jemalloc" + + ;; see https://bugs.gnu.org/32833 + "--with-system-nspr" + "--with-system-nss" + + ,(string-append "--with-clang-path=" clang + "/bin/clang") + ,(string-append "--with-libclang-path=" clang + "/lib") + + ;; Distribution + "--with-distribution-id=org.guix" + "--with-app-name=librewolf" + "--with-app-basename=LibreWolf" + "--with-branding=browser/branding/librewolf" + + ;; Features + "--disable-tests" + "--disable-updater" + "--enable-pulseaudio" + "--disable-crashreporter" + "--allow-addon-sideload" + "--with-unsigned-addon-scopes=app,system" + ;; switch only available on x86, whereas EME + ;; is not supported on other targets + ,@(if #$(target-x86?) '("--disable-eme") '()) + + ;; Build details + "--disable-debug" + "--enable-rust-simd" + "--enable-release" + "--enable-optimize" + "--enable-strip" + "--enable-hardening" + "--disable-elf-hack")) + #:imported-modules %cargo-utils-modules + #:modules `((ice-9 regex) + (ice-9 string-fun) + (ice-9 ftw) + (srfi srfi-1) + (srfi srfi-26) + (rnrs bytevectors) + (rnrs io ports) + (guix elf) + (guix build gremlin) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-preferences + (lambda* (#:key inputs #:allow-other-keys) + (let ((port (open-file "browser/app/profile/firefox.js" + "a"))) + (define (write-setting key value) + (format port "~%pref(\"~a\", ~a);~%" key value) + (format #t "fix-preferences: setting value of ~a to ~a~%" key value)) - ;; We should allow the sandbox to read the store directory, - ;; because the sandbox has access to /usr on FHS distros. - (write-setting - "security.sandbox.content.read_path_whitelist" - (string-append "\"" - (%store-directory) "/\"")) - - ;; XDG settings should be managed by Guix. - (write-setting "browser.shell.checkDefaultBrowser" - "false") - (close-port port)))) - (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker - (lambda* (#:key inputs #:allow-other-keys) - (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) - (libavcodec (string-append ffmpeg - "/lib/libavcodec.so"))) - ;; Arrange to load libavcodec.so by its absolute file name. - (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp" - (("libavcodec\\.so") - libavcodec))))) - (add-after 'patch-source-shebangs 'patch-cargo-checksums - (lambda _ - (use-modules (guix build cargo-utils)) - (let ((null-hash - ;; This is the SHA256 output of an empty string. - (string-append - "e3b0c44298fc1c149afbf4c8996fb924" - "27ae41e4649b934ca495991b7852b855"))) - (for-each (lambda (file) - (format #t + ;; We should allow the sandbox to read the store directory, + ;; because the sandbox has access to /usr on FHS distros. + (write-setting + "security.sandbox.content.read_path_whitelist" + (string-append "\"" + (%store-directory) "/\"")) + + ;; XDG settings should be managed by Guix. + (write-setting "browser.shell.checkDefaultBrowser" + "false") + (close-port port)))) + (add-after 'fix-preferences 'fix-ffmpeg-runtime-linker + (lambda* (#:key inputs #:allow-other-keys) + (let* ((ffmpeg (assoc-ref inputs "ffmpeg")) + (libavcodec (string-append ffmpeg + "/lib/libavcodec.so"))) + ;; Arrange to load libavcodec.so by its absolute file name. + (substitute* "dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp" + (("libavcodec\\.so") + libavcodec))))) + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (use-modules (guix build cargo-utils)) + (let ((null-hash + ;; This is the SHA256 output of an empty string. + (string-append + "e3b0c44298fc1c149afbf4c8996fb924" + "27ae41e4649b934ca495991b7852b855"))) + (for-each (lambda (file) + (format #t "patch-cargo-checksums: patching checksums in ~a~%" file) - (substitute* file - (("(checksum = )\".*\"" all name) - (string-append name "\"" null-hash - "\"")))) - (find-files "." "Cargo\\.lock$")) - (for-each generate-all-checksums - '("build" - "dom/media" - "dom/webauthn" - "gfx" - "intl" - "js" - "media" - "modules" - "mozglue/static/rust" - "netwerk" - "remote" - "security/manager/ssl" - "servo" - "storage" - "third_party/rust" - "toolkit" - "xpcom/rust" - "services"))))) - (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag - (lambda _ - ;; Remove --frozen flag from cargo invokation, otherwise it'll - ;; complain that it's not able to change Cargo.lock. - ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373 - (substitute* "build/RunCbindgen.py" - (("args.append\\(\"--frozen\"\\)") "pass")))) - (delete 'bootstrap) - (add-before 'configure 'patch-SpeechDispatcherService.cpp - (lambda _ - (let* ((lib "libspeechd.so.2") - (file (string-append - "dom/media/webspeech/synth/" - "speechd/SpeechDispatcherService.cpp")) - (old-content (call-with-input-file file - get-string-all))) - (substitute - file - `((,(format #f "~s" lib) unquote - (lambda (line _) - (string-replace-substring - line lib - (string-append #$speech-dispatcher - "/lib/" lib)))))) - (if (string=? old-content - (call-with-input-file file - get-string-all)) - (error - "substitute did nothing, phase requires an update"))))) - (add-before 'configure 'set-build-id - ;; Build will write the timestamp to output, which is harmful - ;; for reproducibility, so change it to a fixed date. Use a - ;; separate phase for easier modification with inherit. - (lambda _ - (setenv "MOZ_BUILD_DATE" - #$%librewolf-build-id))) - (replace 'configure - (lambda* (#:key inputs outputs configure-flags - #:allow-other-keys) - (setenv "AUTOCONF" - (string-append (assoc-ref inputs "autoconf") - "/bin/autoconf")) - (setenv "SHELL" - (which "bash")) - (setenv "CONFIG_SHELL" - (which "bash")) - (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" - "system") - ;; This should use the host info probably (does it - ;; build on non-x86_64 though?) - (setenv "GUIX_PYTHONPATH" - (string-append (getcwd) - "/obj-x86_64-pc-linux-gnu/_virtualenvs/build")) - - ;; Use Clang, Clang is 2x faster than GCC - (setenv "AR" "llvm-ar") - (setenv "NM" "llvm-nm") - (setenv "CC" "clang") - (setenv "CXX" "clang++") - (setenv "MOZ_NOSPAM" "1") - (setenv "MOZ_APP_NAME" "librewolf") - - (setenv "MOZBUILD_STATE_PATH" - (getcwd)) - - (let* ((mozconfig (string-append (getcwd) "/mozconfig")) - (out (assoc-ref outputs "out")) - (flags (cons (string-append "--prefix=" out) - configure-flags))) - (format #t "build directory: ~s~%" - (getcwd)) - (format #t "configure flags: ~s~%" flags) - - (define write-flags - (lambda flags - (display (string-join (map (cut string-append - "ac_add_options " <>) - flags) "\n")) - (display "\n"))) - (with-output-to-file mozconfig - (lambda () - (apply write-flags flags) - ;; The following option unsets Telemetry - ;; Reporting. With the Addons Fiasco, - ;; Mozilla was found to be collecting - ;; user's data, including saved passwords - ;; and web form data, without users - ;; consent. Mozilla was also found - ;; shipping updates to systems without - ;; the user's knowledge or permission. - ;; As a result of this, use the following - ;; command to permanently disable - ;; telemetry reporting. - (display "unset MOZ_TELEMETRY_REPORTING\n") - (display "mk_add_options MOZ_CRASHREPORTER=0\n") - (display "mk_add_options MOZ_DATA_REPORTING=0\n") - (display - "mk_add_options MOZ_SERVICES_HEALTHREPORT=0") - (display - "mk_add_options MOZ_TELEMETRY_REPORTING=0"))) - (setenv "MOZCONFIG" mozconfig)) - (invoke "./mach" "configure"))) - (add-before 'build 'fix-addons-placeholder - (lambda _ - (substitute* "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl" - (("addons.mozilla.org") - "gnuzilla.gnu.org")))) - (replace 'build - (lambda* (#:key (make-flags '()) - (parallel-build? #t) #:allow-other-keys) - (apply invoke "./mach" "build" - ;; mach will use parallel build if possible by default - `(,@(if parallel-build? - '() - '("-j1")) ,@make-flags)))) - (add-after 'build 'neutralise-store-references - (lambda _ - ;; Mangle the store references to compilers & - ;; other build tools in about:buildconfig, - ;; reducing the package's closure by 1 GiB on - ;; x86-64. - (let* ((build-dir (car (scandir "." - (cut string-prefix? - "obj-" <>)))) - (file (string-append build-dir - "/dist/bin/chrome/toolkit/" - "content/global/buildconfig.html"))) - (substitute* file - (((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))))))) - (replace 'install - (lambda _ - (invoke "./mach" "install"))) - (add-after 'install 'remove-duplicate-bin - (lambda* (#:key outputs #:allow-other-keys) - (delete-file (string-append #$output - "/lib/librewolf/librewolf-bin")))) - (add-after 'install 'wrap-glxtest - ;; glxtest uses dlopen() to load mesa and pci - ;; libs, wrap it to set LD_LIBRARY_PATH. - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (libs (map - (lambda (lib-name) - (string-append (assoc-ref inputs - lib-name) - "/lib")) - '("mesa" "pciutils")))) - (wrap-program (car (find-files lib "^glxtest$")) - `("LD_LIBRARY_PATH" prefix ,libs))))) - (add-after 'install 'patch-config - (lambda* (#:key inputs #:allow-other-keys) - (let ((lib (string-append #$output "/lib/librewolf")) - (config-file "librewolf.cfg")) - - ;; Required for Guix packaged extensions - ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8 - ;; Default is 5. - (substitute* (in-vicinity lib config-file) - (("defaultPref\\(\"extensions.enabledScopes\", 5\\)") - "defaultPref(\"extensions.enabledScopes\", 13)")) - ;; Use Mozzarella addons repo. - (call-with-port - (open-file - (in-vicinity lib config-file) - "a") - (lambda (port) - ;; Add-ons panel (see settings.js in Icecat source). - (for-each - (lambda (pref) - (format port - "defaultPref(~s, ~s);~%" - (car pref) - (cdr pref))) - `(("extensions.getAddons.search.browseURL" - ,(string-append - "https://gnuzilla.gnu.org/mozzarella/" - "search.php?q=%TERMS%")) - ("extensions.getAddons.get.url" . - "https://gnuzilla.gnu.org/mozzarella") - ("extensions.getAddons.link.url" . - "https://gnuzilla.gnu.org/mozzarella") - ("extensions.getAddons.discovery.api_url" . - "https://gnuzilla.gnu.org/mozzarella") - ("extensions.getAddons.langpacks.url" . - "https://gnuzilla.gnu.org/mozzarella") - ("lightweightThemes.getMoreURL" . - "https://gnuzilla.gnu.org/mozzarella")))))))) - (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; The following two functions are from Guix's icecat package in - ;; (gnu packages gnuzilla). See commit - ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b. - (define (runpath-of lib) - (call-with-input-file lib - (compose elf-dynamic-info-runpath elf-dynamic-info - parse-elf get-bytevector-all))) - (define (runpaths-of-input label) - (let* ((dir (string-append (assoc-ref inputs label) - "/lib")) - (libs (find-files dir "\\.so$"))) - (append-map runpath-of libs))) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (libs (map - (lambda (lib-name) - (string-append (assoc-ref inputs - lib-name) - "/lib")) - '("mesa" "libpng-apng" "libnotify" "libva" - "pulseaudio" "gtk+" "pipewire" - ;; For U2F and WebAuthn - "eudev"))) - - ;; VA-API is run in the RDD (Remote Data Decoder) sandbox - ;; and must be explicitly given access to files it needs. - ;; Rather than adding the whole store (as Nix had - ;; upstream do, see - ;; and - ;; linked upstream patches), we can just follow the - ;; runpaths of the needed libraries to add everything to - ;; LD_LIBRARY_PATH. These will then be accessible in the - ;; RDD sandbox. - (rdd-whitelist (map (cut string-append <> "/") - (delete-duplicates (append-map - runpaths-of-input - '("mesa" - "ffmpeg"))))) - (gtk-share (string-append (assoc-ref inputs - "gtk+") - "/share"))) - (wrap-program (car (find-files lib "^librewolf$")) - `("LD_LIBRARY_PATH" prefix - (,@libs ,@rdd-whitelist)) - `("XDG_DATA_DIRS" prefix - (,gtk-share)) - `("MOZ_LEGACY_PROFILES" = - ("1")) - `("MOZ_ALLOW_DOWNGRADE" = - ("1")))))) - (add-after 'wrap-program 'install-desktop-entry - (lambda* (#:key outputs #:allow-other-keys) - (let* ((desktop-file - "taskcluster/docker/firefox-snap/firefox.desktop") - (applications (string-append #$output - "/share/applications"))) - (substitute* desktop-file - (("^Exec=firefox") - (string-append "Exec=" - #$output "/bin/librewolf")) - ;; "Firefox" -> "LibreWolf" everywhere - (("Firefox") - "LibreWolf") - ;; Remove non-Latin translations. - (("^Name\\[(ar|bn)\\].*$") - "") - (("^Icon=.*") - (string-append "Icon=" - #$output - "/share/icons/hicolor/128x128/apps/librewolf.png + (substitute* file + (("(checksum = )\".*\"" all name) + (string-append name "\"" null-hash + "\"")))) + (find-files "." "Cargo\\.lock$")) + (for-each generate-all-checksums + '("build" + "dom/media" + "dom/webauthn" + "gfx" + "intl" + "js" + "media" + "modules" + "mozglue/static/rust" + "netwerk" + "remote" + "security/manager/ssl" + "servo" + "storage" + "third_party/rust" + "toolkit" + "xpcom/rust" + "services"))))) + (add-after 'patch-cargo-checksums 'remove-cargo-frozen-flag + (lambda _ + ;; Remove --frozen flag from cargo invokation, otherwise it'll + ;; complain that it's not able to change Cargo.lock. + ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1726373 + (substitute* "build/RunCbindgen.py" + (("args.append\\(\"--frozen\"\\)") "pass")))) + (delete 'bootstrap) + (add-before 'configure 'patch-SpeechDispatcherService.cpp + (lambda _ + (let* ((lib "libspeechd.so.2") + (file (string-append + "dom/media/webspeech/synth/" + "speechd/SpeechDispatcherService.cpp")) + (old-content (call-with-input-file file + get-string-all))) + (substitute + file + `((,(format #f "~s" lib) unquote + (lambda (line _) + (string-replace-substring + line lib + (string-append #$speech-dispatcher + "/lib/" lib)))))) + (if (string=? old-content + (call-with-input-file file + get-string-all)) + (error + "substitute did nothing, phase requires an update"))))) + (add-before 'configure 'set-build-id + ;; Build will write the timestamp to output, which is harmful + ;; for reproducibility, so change it to a fixed date. Use a + ;; separate phase for easier modification with inherit. + (lambda _ + (setenv "MOZ_BUILD_DATE" + #$%librewolf-build-id))) + (replace 'configure + (lambda* (#:key inputs outputs configure-flags + #:allow-other-keys) + (setenv "AUTOCONF" + (string-append (assoc-ref inputs "autoconf") + "/bin/autoconf")) + (setenv "SHELL" + (which "bash")) + (setenv "CONFIG_SHELL" + (which "bash")) + (setenv "MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE" + "system") + ;; This should use the host info probably (does it + ;; build on non-x86_64 though?) + (setenv "GUIX_PYTHONPATH" + (string-append (getcwd) + "/obj-x86_64-pc-linux-gnu/_virtualenvs/build")) + + ;; Use Clang, Clang is 2x faster than GCC + (setenv "AR" "llvm-ar") + (setenv "NM" "llvm-nm") + (setenv "CC" "clang") + (setenv "CXX" "clang++") + (setenv "MOZ_NOSPAM" "1") + (setenv "MOZ_APP_NAME" "librewolf") + (setenv "MOZ_APP_REMOTINGNAME" "LibreWolf") + + (setenv "MOZBUILD_STATE_PATH" + (getcwd)) + + (let* ((mozconfig (string-append (getcwd) "/mozconfig")) + (out (assoc-ref outputs "out")) + (flags (cons (string-append "--prefix=" out) + configure-flags))) + (format #t "build directory: ~s~%" + (getcwd)) + (format #t "configure flags: ~s~%" flags) + + (define write-flags + (lambda flags + (display (string-join (map (cut string-append + "ac_add_options " <>) + flags) "\n")) + (display "\n"))) + (with-output-to-file mozconfig + (lambda () + (apply write-flags flags) + ;; The following option unsets Telemetry + ;; Reporting. With the Addons Fiasco, + ;; Mozilla was found to be collecting + ;; user's data, including saved passwords + ;; and web form data, without users + ;; consent. Mozilla was also found + ;; shipping updates to systems without + ;; the user's knowledge or permission. + ;; As a result of this, use the following + ;; command to permanently disable + ;; telemetry reporting. + (display "unset MOZ_TELEMETRY_REPORTING\n") + (display "mk_add_options MOZ_CRASHREPORTER=0\n") + (display "mk_add_options MOZ_DATA_REPORTING=0\n") + (display + "mk_add_options MOZ_SERVICES_HEALTHREPORT=0") + (display + "mk_add_options MOZ_TELEMETRY_REPORTING=0"))) + (setenv "MOZCONFIG" mozconfig)) + (invoke "./mach" "configure"))) + (add-before 'build 'fix-addons-placeholder + (lambda _ + (substitute* "toolkit/locales/en-US/toolkit/about/aboutAddons.ftl" + (("addons.mozilla.org") + "gnuzilla.gnu.org")))) + (replace 'build + (lambda* (#:key (make-flags '()) + (parallel-build? #t) #:allow-other-keys) + (apply invoke "./mach" "build" + ;; mach will use parallel build if possible by default + `(,@(if parallel-build? + '() + '("-j1")) ,@make-flags)))) + (add-after 'build 'neutralise-store-references + (lambda _ + ;; Mangle the store references to compilers & + ;; other build tools in about:buildconfig, + ;; reducing the package's closure by 1 GiB on + ;; x86-64. + (let* ((build-dir (car (scandir "." + (cut string-prefix? + "obj-" <>)))) + (file (string-append build-dir + "/dist/bin/chrome/toolkit/" + "content/global/buildconfig.html"))) + (substitute* file + (((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))))))) + (replace 'install + (lambda _ + (invoke "./mach" "install"))) + (add-after 'install 'remove-duplicate-bin + (lambda* (#:key outputs #:allow-other-keys) + (delete-file (string-append #$output + "/lib/librewolf/librewolf-bin")))) + (add-after 'install 'wrap-glxtest + ;; glxtest uses dlopen() to load mesa and pci + ;; libs, wrap it to set LD_LIBRARY_PATH. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (libs (map + (lambda (lib-name) + (string-append (assoc-ref inputs + lib-name) + "/lib")) + '("mesa" "pciutils")))) + (wrap-program (car (find-files lib "^glxtest$")) + `("LD_LIBRARY_PATH" prefix ,libs))))) + (add-after 'install 'patch-config + (lambda* (#:key inputs #:allow-other-keys) + (let ((lib (string-append #$output "/lib/librewolf")) + (config-file "librewolf.cfg")) + + ;; Required for Guix packaged extensions + ;; SCOPE_PROFILE=1, SCOPE_APPLICATION=4, SCOPE_SYSTEM=8 + ;; Default is 5. + (substitute* (in-vicinity lib config-file) + (("defaultPref\\(\"extensions.enabledScopes\", 5\\)") + "defaultPref(\"extensions.enabledScopes\", 13)")) + ;; Use Mozzarella addons repo. + (call-with-port + (open-file + (in-vicinity lib config-file) + "a") + (lambda (port) + ;; Add-ons panel (see settings.js in Icecat source). + (for-each + (lambda (pref) + (format port + "defaultPref(~s, ~s);~%" + (car pref) + (cdr pref))) + `(("extensions.getAddons.search.browseURL" + ,(string-append + "https://gnuzilla.gnu.org/mozzarella/" + "search.php?q=%TERMS%")) + ("extensions.getAddons.get.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.link.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.discovery.api_url" . + "https://gnuzilla.gnu.org/mozzarella") + ("extensions.getAddons.langpacks.url" . + "https://gnuzilla.gnu.org/mozzarella") + ("lightweightThemes.getMoreURL" . + "https://gnuzilla.gnu.org/mozzarella")))))))) + (add-after 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; The following two functions are from Guix's icecat package in + ;; (gnu packages gnuzilla). See commit + ;; b7a0935420ee630a29b7e5ac73a32ba1eb24f00b. + (define (runpath-of lib) + (call-with-input-file lib + (compose elf-dynamic-info-runpath elf-dynamic-info + parse-elf get-bytevector-all))) + (define (runpaths-of-input label) + (let* ((dir (string-append (assoc-ref inputs label) + "/lib")) + (libs (find-files dir "\\.so$"))) + (append-map runpath-of libs))) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (libs (map + (lambda (lib-name) + (string-append (assoc-ref inputs + lib-name) + "/lib")) + '("mesa" "libpng-apng" "libnotify" "libva" + "pulseaudio" "gtk+" "pipewire" + ;; For U2F and WebAuthn + "eudev"))) + + ;; VA-API is run in the RDD (Remote Data Decoder) sandbox + ;; and must be explicitly given access to files it needs. + ;; Rather than adding the whole store (as Nix had + ;; upstream do, see + ;; and + ;; linked upstream patches), we can just follow the + ;; runpaths of the needed libraries to add everything to + ;; LD_LIBRARY_PATH. These will then be accessible in the + ;; RDD sandbox. + (rdd-whitelist (map (cut string-append <> "/") + (delete-duplicates (append-map + runpaths-of-input + '("mesa" + "ffmpeg"))))) + (gtk-share (string-append (assoc-ref inputs + "gtk+") + "/share"))) + (wrap-program (car (find-files lib "^librewolf$")) + `("LD_LIBRARY_PATH" prefix + (,@libs ,@rdd-whitelist)) + `("XDG_DATA_DIRS" prefix + (,gtk-share)) + `("MOZ_LEGACY_PROFILES" = + ("1")) + `("MOZ_ALLOW_DOWNGRADE" = + ("1")))))) + (add-after 'wrap-program 'install-desktop-entry + (lambda* (#:key outputs #:allow-other-keys) + (let* ((desktop-file + "taskcluster/docker/firefox-snap/firefox.desktop") + (applications (string-append #$output + "/share/applications"))) + (substitute* desktop-file + (("^Exec=firefox") + (string-append "Exec=" + #$output "/bin/librewolf")) + ;; "Firefox" -> "LibreWolf" everywhere + (("Firefox") + "LibreWolf") + ;; Remove non-Latin translations. + (("^Name\\[(ar|bn)\\].*$") + "") + (("^Icon=.*") + (string-append "Icon=" + #$output + "/share/icons/hicolor/128x128/apps/librewolf.png ")) - ;; These commands were changed. - (("-NewWindow") - "-new-window") - (("-NewPrivateWindow") - "-new-private-window") - (("StartupNotify=true") - "StartupNotify=true -StartupWMClass=Navigator")) - (copy-file desktop-file "librewolf.desktop") - (install-file "librewolf.desktop" applications)))) - (add-after 'install-desktop-entry 'install-icons - (lambda* (#:key outputs #:allow-other-keys) - (let ((icon-source-dir (string-append #$output - "/lib/librewolf/browser/" - "chrome/icons/default"))) - (for-each (lambda (size) - (let ((dest (string-append #$output - "/share/icons/hicolor/" - size - "x" - size - "/apps"))) - (mkdir-p dest) - (symlink (string-append icon-source-dir - "/default" size ".png") - (string-append dest - "/librewolf.png")))) - '("16" "32" "48" "64" "128")))))) - - ;; Test will significantly increase build time but with little rewards. - #:tests? #f - - ;; WARNING: Parallel build will consume lots of memory! - ;; If you have encountered OOM issue in build phase, try disable it. - #:parallel-build? #t - - ;; Some dynamic lib was determined at runtime, so rpath check may fail. - #:validate-runpath? #f)) - (inputs (list bash-minimal - bzip2 - cairo - cups - dbus-glib - freetype - ffmpeg - gdk-pixbuf - glib - gtk+ - gtk+-2 - hunspell - icu4c-73 - jemalloc - libcanberra - libevent - libffi - libgnome - libjpeg-turbo - libnotify - libpng-apng - libva - libvpx - libwebp - libxcomposite - libxft - libxinerama - libxscrnsaver - libxt - mesa - mit-krb5 - nspr - nss/fixed - pango - pciutils - pipewire - pixman - pulseaudio - speech-dispatcher - sqlite - startup-notification - eudev - unzip - zip - zlib)) - (native-inputs (list alsa-lib - autoconf-2.13 - `(,rust-librewolf "cargo") - clang-18 - llvm-18 - m4 - nasm - node-lts - perl - pkg-config - python - rust-librewolf - rust-cbindgen-0.26 - which - yasm)) - (home-page "https://librewolf.net/") - (synopsis - "Custom version of Firefox, focused on privacy, security and freedom") - (description - "LibreWolf is designed to increase protection against tracking and + ;; These commands were changed. + (("-NewWindow") + "-new-window") + (("-NewPrivateWindow") + "-new-private-window") + (("StartupNotify=true") + "StartupNotify=true +StartupWMClass=LibreWolf")) + (copy-file desktop-file "librewolf.desktop") + (install-file "librewolf.desktop" applications)))) + (add-after 'install-desktop-entry 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let ((icon-source-dir (string-append #$output + "/lib/librewolf/browser/" + "chrome/icons/default"))) + (for-each (lambda (size) + (let ((dest (string-append #$output + "/share/icons/hicolor/" + size + "x" + size + "/apps"))) + (mkdir-p dest) + (symlink (string-append icon-source-dir + "/default" size ".png") + (string-append dest + "/librewolf.png")))) + '("16" "32" "48" "64" "128")))))) + + ;; Test will significantly increase build time but with little rewards. + #:tests? #f + + ;; WARNING: Parallel build will consume lots of memory! + ;; If you have encountered OOM issue in build phase, try disable it. + #:parallel-build? #t + + ;; Some dynamic lib was determined at runtime, so rpath check may fail. + #:validate-runpath? #f)) + (inputs (list bash-minimal + bzip2 + cairo + cups + dbus-glib + freetype + ffmpeg + gdk-pixbuf + glib + gtk+ + gtk+-2 + hunspell + icu4c-73 + jemalloc + libcanberra + libevent + libffi + libgnome + libjpeg-turbo + libnotify + libpng-apng + libva + libvpx + libwebp + libxcomposite + libxft + libxinerama + libxscrnsaver + libxt + mesa + mit-krb5 + nspr + nss-rapid + pango + pciutils + pipewire + pixman + pulseaudio + speech-dispatcher + sqlite + startup-notification + eudev + unzip + zip + zlib)) + (native-inputs (list alsa-lib + autoconf-2.13 + `(,rust-librewolf "cargo") + clang-18 + llvm-18 + m4 + nasm + node-lts + perl + pkg-config + python + rust-librewolf + rust-cbindgen-0.26 + which + yasm)) + (home-page "https://librewolf.net/") + (synopsis + "Custom version of Firefox, focused on privacy, security and freedom") + (description + "LibreWolf is designed to increase protection against tracking and fingerprinting techniques, while also including a few security improvements. This is achieved through our privacy and security oriented settings and patches. LibreWolf also aims to remove all the telemetry, data collection and annoyances, as well as disabling anti-freedom features like DRM.") - (license license:mpl2.0))) + (license license:mpl2.0))))