From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 4NaDJMYITmZrygAAA41jLg (envelope-from ) for ; Wed, 22 May 2024 17:01:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id UD0JHsYITmZpZAEA62LTzQ (envelope-from ) for ; Wed, 22 May 2024 17:01:26 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm3 header.b=PZ+jjR+U; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="p ujFnIS"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716390086; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=PBLgPJ788Wl9N0ql10tN4mlQ/5XQnBCKHLQBtKeHVK0=; b=aD4EriqPDLYc9MiWDLKmlZPVDDda/E//YfyKv8DEKkhM+2E8cBflI0K0uHl9SnfLxo4F8s uF/uDidenVVJNofjkxizjPjuJAuWSweTY9fHCTyivuAhBYa5KJA6PX2rL8CHYuqsa+le/P 9XTks8c9sE+bQ2uSdZHVprYNF7XMdpZ/reuxD15F1zJ+kQ0rgeGrFeNKOnQAqXo4Ys5RXd AUhN9hXYiwlvSseMuEXW/4zs7YJTP445o4abu+2V63F7rjPhDrQwEVTrO3WOWJt0l+oGKh y5mSFPc54QeqSn7CfPCj5aLgHnZY48vEUf3+96M0NIzl46jRQ4BQJ+3vlmu/Pw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716390086; a=rsa-sha256; cv=none; b=Ij+hm3k9ERABM8X49NQrnArE6ln0KIG30cdZR0bgHg/W01tnpaxwn9xEOX8DO0VhwsrY2G uiFDA26xWd9Oow/j0Sak0fiyRxH7sbGNb43S4nhC0Mty7tnPlwhD/zMoR/359vTXcnwnL+ A8aeULC2CalJ3GK/5I8hi7PVfmZGyqzreGR+9unhYiyubpEh2RAicdebEjkIZhvbWHcw/I 9jTmkcTAnDszTxfnLL+Of1kfnCSPJzb/J+xHjvSFOmi7VsXJXqkFETpp6M7KCt5W8lWI+C q+6xuTNgPfNjC/xkfiVZNESt3CKbLtKo8sSPyUuIjkpDydVUvK+buSmURA6/ig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=retrospec.tv header.s=fm3 header.b=PZ+jjR+U; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="p ujFnIS"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3CC207583E for ; Wed, 22 May 2024 17:01:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9nSd-0001Iu-O0; Wed, 22 May 2024 11:00:59 -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 1s9nSc-0001Gp-4W for guix-patches@gnu.org; Wed, 22 May 2024 11:00:58 -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 1s9nSb-0000h5-SE for guix-patches@gnu.org; Wed, 22 May 2024 11:00:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s9nSh-000423-Ld for guix-patches@gnu.org; Wed, 22 May 2024 11:01:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71121] [PATCH 2/3] gnu: librewolf: Rebuild source tarball Resent-From: Ian Eure Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 May 2024 15:01:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71121 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71121@debbugs.gnu.org Cc: Ian Eure Received: via spool by 71121-submit@debbugs.gnu.org id=B71121.171639003315450 (code B ref 71121); Wed, 22 May 2024 15:01:03 +0000 Received: (at 71121) by debbugs.gnu.org; 22 May 2024 15:00:33 +0000 Received: from localhost ([127.0.0.1]:56483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9nSC-000413-52 for submit@debbugs.gnu.org; Wed, 22 May 2024 11:00:32 -0400 Received: from wfhigh7-smtp.messagingengine.com ([64.147.123.158]:45445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9nS1-00040c-PT for 71121@debbugs.gnu.org; Wed, 22 May 2024 11:00:29 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.west.internal (Postfix) with ESMTP id 3FC191800129; Wed, 22 May 2024 11:00:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 22 May 2024 11:00:10 -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=fm3; t=1716390009; x=1716476409; bh=PBLgPJ788Wl9N0ql10tN4mlQ/5XQnBCKHLQBtKeHVK0=; b= PZ+jjR+UKFGixL6Y2HzMFYnAFcdXURJ7VKyUTzReWbheWZDZJ9NoiL0jgMCBOqeq r7c1EU9tZxQfcvA6oQVBVLXhUqsV80/hBIunlZ4EASwrM+zwxs1CD0ydt8xhm1MN 1N+6pFr+fho3/gLxys9fM0Hh7u6P1uHNRo0ZoC4RMNHatcbmtyRnSsDiuk6hIT4p +JL6mRZP3HMPsZmB3fFH1bp0DyXKRS3b9h/R2mRrYv/MYw1ua9XDvsFH0UDTgSJY LB8x+c1OxDjUx+7SZwPeyd+P/hB3MT1Gn/X1qOKgNCWzUjBIR9J+EYzZg8HZpSJv PGDmGmgZAf2tlibmpFXWNA== 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=fm1; t=1716390009; x= 1716476409; bh=PBLgPJ788Wl9N0ql10tN4mlQ/5XQnBCKHLQBtKeHVK0=; b=p ujFnISlDmEWMJu1pxrbzcmleni3YK3r7qDoG5X0NLf++rVxrlBIc5ra1OcIoeaWZ 33GpFBT8UJZ/TMIklvbkW10pMnHWRKJ5vAWi/bw3hFbyFQ/q/i/zUlFv55dPlT7S 82Y4BfKwLNRI3ovF6hb62GdrFKsWOpN/ayMKPiG0cwcPoF1zGJX6B+hMkAeNKWOM AcvMwH9BCnhjS/Zh9GHGSOFVfkhYrqFLj7r3vKtGcqHOj8dl12U+uB0Lup1GiIWd h86UbLVMDn+TYZMRKyAvA9ZUu7WEljOQUTLLB4w3OHMk3W+suE5k4lVHuI0DLTPX 9Pm1WcyEFpRmA0uYM0sfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeigedgvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfgggtgfesth ekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgrnhesrhgvthhrohhsphgv tgdrthhvqeenucggtffrrghtthgvrhhnpedvieetveekkeeliefhtefftedvtefgvdegle efvdeigfettdejtddvffdvgfejudenucffohhmrghinhepmhhoiihilhhlrgdrohhrghdp tghouggvsggvrhhgrdhorhhgpdhsvggrrhgthhhfohigrdhorhhgpdhgihhtlhgrsgdrtg homhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehi rghnsehrvghtrhhoshhpvggtrdhtvh X-ME-Proxy: Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 May 2024 11:00:08 -0400 (EDT) From: Ian Eure Date: Wed, 22 May 2024 07:59:55 -0700 Message-ID: <20240522145956.31218-2-ian@retrospec.tv> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240522145956.31218-1-ian@retrospec.tv> References: <20240522145956.31218-1-ian@retrospec.tv> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.46 X-Spam-Score: -1.46 X-Migadu-Queue-Id: 3CC207583E X-Migadu-Scanner: mx11.migadu.com X-TUID: gWxKDMfMW9OI * gnu/packages/librewolf.scm (librewolf): This patch removes an intermediate step in the build chain. The upstream source tarball is created with an automated build process, where Firefox sources are fetched, patched, and repacked. Rather than download the output of that process, as the package has been, it’s now replicated within the build process, similar to how IceCat works. Change-Id: I0f1c2a10252cbbff9b3b3140f6ea3a594df0c97b --- gnu/packages/librewolf.scm | 120 +++++++++++++++++++++++++++++++++---- 1 file changed, 108 insertions(+), 12 deletions(-) diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm index fa83857c96..bb8bc8a283 100644 --- a/gnu/packages/librewolf.scm +++ b/gnu/packages/librewolf.scm @@ -40,10 +40,12 @@ (define-module (gnu packages librewolf) + #:use-module ((srfi srfi-1) #:hide (zip)) #:use-module (guix build-system gnu) #:use-module (guix build-system cargo) #:use-module (guix build-system trivial) #:use-module (guix download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) #:use-module (guix packages) @@ -62,6 +64,7 @@ (define-module (gnu packages librewolf) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gtk) #:use-module (gnu packages hunspell) #:use-module (gnu packages icu4c) @@ -81,6 +84,7 @@ (define-module (gnu packages librewolf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages rust) #:use-module (gnu packages rust-apps) #:use-module (gnu packages speech) @@ -89,6 +93,109 @@ (define-module (gnu packages librewolf) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) +(define (firefox-source-origin version hash) + (origin + (method url-fetch) + (uri (string-append + "https://ftp.mozilla.org/pub/firefox/releases/" + version "/source/" "firefox-" version + ".source.tar.xz")) + (sha256 (base32 hash)))) + +(define (librewolf-source-origin version hash) + (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/librewolf/source.git") + (commit version) + (recursive? #t))) + (file-name (git-file-name "librewolf-source" version)) + (sha256 (base32 hash)))) + +(define computed-origin-method (@@ (guix packages) computed-origin-method)) + +(define librewolf-source + (let* ((ff-src (firefox-source-origin "125.0.2" "16gpd6n52lshvkkha41z7xicggj64dw0qhr5gd07bcxsc4rmdl39")) + (version "125.0.2-1") + (lw-src (librewolf-source-origin version "17i36s2ny1pv3cz44w0gz48fy4vjfw6vp9jk21j62f5d3dl726x8"))) + + (origin + (method computed-origin-method) + (file-name (string-append "librewolf-" version ".source.tar.gz")) + (sha256 #f) + (uri + (delay + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (set-path-environment-variable + "PATH" '("bin") + (list #+python + #+(canonical-package bash) + #+(canonical-package gnu-make) + #+(canonical-package coreutils) + #+(canonical-package findutils) + #+(canonical-package patch) + #+(canonical-package xz) + #+(canonical-package sed) + #+(canonical-package grep) + #+(canonical-package gzip) + #+(canonical-package tar))) + (set-path-environment-variable + "PYTHONPATH" + (list #+(format #f "lib/python~a/site-packages" + (version-major+minor + (package-version python)))) + '#+(cons python-jsonschema + (map second + (package-transitive-propagated-inputs + python-jsonschema)))) + + ;; Copy LibreWolf source into the build directory and make + ;; everything writable. + (copy-recursively #+lw-src ".") + (for-each make-file-writable (find-files ".")) + + ;; Patch Makefile to use the upstream source instead of downloading. + (substitute* '("Makefile") + (("^ff_source_tarball:=.*") + (string-append "ff_source_tarball:=" #+ff-src))) + + ;; Stage locales + (begin + (format #t "Staging locales...~%") + (force-output) + (mkdir "l10n-staging") + (with-directory-excursion "l10n-staging" + (for-each + (lambda (locale-dir) + (let ((locale + (string-drop (basename locale-dir) + (+ 32 ; length of hash + (string-length "-mozilla-locale-"))))) + (format #t " ~a~%" locale) + (force-output) + (copy-recursively locale-dir locale + #:log (%make-void-port "w")) + (for-each make-file-writable (find-files locale)) + (with-directory-excursion locale + (when (file-exists? ".hgtags") + (delete-file ".hgtags"))))) + '#+all-mozilla-locales))) + + ;; Patch build script to use staged locales. + (begin + (substitute* '("scripts/generate-locales.sh") + (("wget") "# wget") + (("unzip") "# unzip") + (("mv browser/locales/l10n/\\$1-\\*/") + "mv ../l10n-staging/$1/"))) + + ;; Run the build script + (invoke "make" "all") + (copy-file (string-append "librewolf-" #$version ".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 @@ -104,18 +211,7 @@ (define-public librewolf (package (name "librewolf") (version "125.0.2-1") - (source - (origin - (method url-fetch) - - (uri (string-append "https://gitlab.com/api/v4/projects/32320088/" - "packages/generic/librewolf-source/" - version - "/librewolf-" - version - ".source.tar.gz")) - (sha256 - (base32 "09qzdaq9l01in9h4q14vyinjvvffycha2iyjqj5p4dd5jh6q5zma")))) + (source librewolf-source) (build-system gnu-build-system) (arguments (list -- 2.41.0