From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mMGYF3+rWWdmMwEAe85BDQ:P1 (envelope-from ) for ; Wed, 11 Dec 2024 15:10:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id mMGYF3+rWWdmMwEAe85BDQ (envelope-from ) for ; Wed, 11 Dec 2024 16:10:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=hHGISUMn; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=mail header.b=MhTTpDDk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=ultrarare.space (policy=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-Seal: i=1; s=key1; d=yhetil.org; t=1733929855; a=rsa-sha256; cv=none; b=lHz65cNrAZ/apiSK0Z5RzUMhBPI3Llzrm2JfVDWgVbBsOsQOZbXC1bagwIaQNiue0+oM8e 4YgeZiyJDdOcrDHARPUKgg5EaI20FIWynklpsDHHAoeYkbng468C6UPDDrq3H2rr1UDx5I UzBl61sbAMEofrIivg3MRRJKb8D120PXou+5OHKDjtMJAknIj2+fqCIOXTi5SvE5ddSEVB 8zdRZQzkTa8SIR6STB6hX/zvUpAR1TNRaqtFLW1mU6ep4j09rfu9O6ERwfF34bbQjwSAp4 HpX08A/ibQUo5kNjOqpfosp98xSb1QrOawH1GHR8/y0E0qROKP1FCRD72AiT/w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=hHGISUMn; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=mail header.b=MhTTpDDk; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=ultrarare.space (policy=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=1733929855; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iGlW/qLILT6+zmpTEjiWW+pqgsmy6qeHrT6iQXYj5Rw=; b=heHgo9Qs4+dU5Q+hfIA14iP1mO+JJysa9tLjj+ovAtWmY4PE3SoZZq4EerYuVUpjBWYUJ+ 4IPMpP1EcF6VP8/9j6Hq3P1pXDkFIqmvgQGnDz+Y39wYb0pkI9MLTOSy8YeAr6w47KD2iP krZ3BrnxZz0dULDIRDM9eR4seRQDSjRKphV/VwhGukswJc6byq/jUcE2b1ZlDY2eZcH5Pm dC6C8WP/xRvgNTxuoKkjyc1pwzHL1IU+3pXhzFWV66Fz2glwtuqT4VPusgy13ZzLsRndMZ XtT+ggCiJt7wwo+6y5ifMWSBEpGA4uGHXI1+oDD9n31sOFviRiY/Jcy8S9Ruzg== 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 068EA67807 for ; Wed, 11 Dec 2024 16:10:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLOLw-00066F-E0; Wed, 11 Dec 2024 10:10:16 -0500 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 1tLOLp-00063I-TD for guix-patches@gnu.org; Wed, 11 Dec 2024 10:10:10 -0500 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 1tLOLo-0006sq-6k for guix-patches@gnu.org; Wed, 11 Dec 2024 10:10:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=iGlW/qLILT6+zmpTEjiWW+pqgsmy6qeHrT6iQXYj5Rw=; b=hHGISUMnRe1yp8ACYdXXp+ynOF63N9dWRVSveHQY2fKufad9q9uwO7rrqbXNsN+apZzE5zgaAqAnOde4ZhmlUr9YEP2WHqg1LDofF59dE2pENZbwt6Fuf1JZUCB6vgAo5txI/t9PtvGad1wN5nqmtThDEPCdXvhlX4sZjr8RLyS+XPk7LzX8QEFjrJz1nYk/Klm+csOLWB1ryOcf3bHy3wUHcYwwt3yN1QOhMVndpELXvI7DpiXssDehPOLImqodbgKENX+csIU+RQOTqddxEWi5AA5SR8XcFmVXFFRDoymuqP6qDoMFriEZ8fYhQgzExSbssWHvvXsQ1sCCqsbjWA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLOLi-0005xA-5R; Wed, 11 Dec 2024 10:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74790] [PATCH] gnu: librewolf: Support Guix icecat browser extensions. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: nandre@riseup.net, clement@lassieur.org, jonathan.brielmaier@web.de, mhw@netris.org, ian@retrospec.tv, guix-patches@gnu.org Resent-Date: Wed, 11 Dec 2024 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74790 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74790@debbugs.gnu.org Cc: Hilton Chain , =?UTF-8?Q?Andr=C3=A9?= Batista , =?UTF-8?Q?Cl=C3=A9ment?= Lassieur , Jonathan Brielmaier , Mark H Weaver , Ian Eure X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: =?UTF-8?Q?Andr=C3=A9?= Batista , =?UTF-8?Q?Cl=C3=A9ment?= Lassieur , Jonathan Brielmaier , Mark H Weaver , Ian Eure Received: via spool by submit@debbugs.gnu.org id=B.173392977922843 (code B ref -1); Wed, 11 Dec 2024 15:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Dec 2024 15:09:39 +0000 Received: from localhost ([127.0.0.1]:35676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLOLL-0005wN-6g for submit@debbugs.gnu.org; Wed, 11 Dec 2024 10:09:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:39866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLOLI-0005wC-4i for submit@debbugs.gnu.org; Wed, 11 Dec 2024 10:09:37 -0500 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 1tLOLH-00060t-TA for guix-patches@gnu.org; Wed, 11 Dec 2024 10:09:35 -0500 Received: from mx.boiledscript.com ([88.99.243.112]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLOLF-0006cZ-IV for guix-patches@gnu.org; Wed, 11 Dec 2024 10:09:35 -0500 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1733929762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iGlW/qLILT6+zmpTEjiWW+pqgsmy6qeHrT6iQXYj5Rw=; b=MhTTpDDkrCZW/dWve5fXkCBzkR8UKO00UHueTptChglPl35FsT8rriX782jBX0VGN16NG7 xyLj21fokHTogxp8CkoBJmuL34gxMG8Trctb/xLhsDYzgCtE2RJOCcL5xEboDKwQBTUL/o IoyHcWg3KdQGYnXCDmyr55I9lfCx8MPJBb1eYystSA3I1YTCKzeZsVRb3uOwu9c4DvnKtl Zm8cjn+P+EPJPppyGtrdi1hCzLvtLjY5/I9BPWpteO0vLS3pliSvw0AmrcOAwWiJN9kK62 MqcyWsbjuKbgJD0AQkOXxnPDJyMymp8n6w2Hp+U6p/g2AAmUguTU7wBG0/mKLQ== Date: Wed, 11 Dec 2024 23:07:28 +0800 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@ultrarare.space; helo=mx.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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.09 X-Spam-Score: -1.09 X-Migadu-Queue-Id: 068EA67807 X-Migadu-Scanner: mx12.migadu.com X-TUID: 1O/Wvk8+A0sR * gnu/packages/patches/librewolf-use-system-wide-dir.patch: New file. * gnu/local.mk (dist_patch_DATA): Regisiter it. * gnu/packages/librewolf.scm (make-librewolf-source)[patches]: Add it along with torbrowser-compare-paths.patch. (librewolf)[native-search-paths]: Add ICECAT_SYSTEM_DIR. Change-Id: I8609d25a7e2725ad94ab257d720326639eb06778 --- Reused torbrowser-compare-paths.patch, mind it for future updates. :) gnu/local.mk | 1 + gnu/packages/librewolf.scm | 11 +++++- .../librewolf-use-system-wide-dir.patch | 37 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/librewolf-use-system-wide-dir.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2d85c485f6..0faa3a70a9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1635,6 +1635,7 @@ dist_patch_DATA = \ %D%/packages/patches/libgpg-error-hurd64.patch \ %D%/packages/patches/libguestfs-syms.patch \ %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ + %D%/packages/patches/librewolf-use-system-wide-dir.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/lightdm-arguments-ordering.patch \ diff --git a/gnu/packages/librewolf.scm b/gnu/packages/librewolf.scm index 5d432cfad8..7ea14c9182 100644 --- a/gnu/packages/librewolf.scm +++ b/gnu/packages/librewolf.scm @@ -188,7 +188,11 @@ (define* (make-librewolf-source #:key version firefox-hash librewolf-hash) (invoke "make" "all") (copy-file (string-append "librewolf-" #$version ".source.tar.gz") - #$output)))))))) + #$output))))) + (patches + (search-patches + "torbrowser-compare-paths.patch" + "librewolf-use-system-wide-dir.patch"))))) ;; Define the versions of rust needed to build librewolf, trying to match ;; upstream. See the file taskcluster/ci/toolchain/rust.yml at @@ -705,6 +709,11 @@ (define-public librewolf rust-cbindgen-0.26 which yasm)) + (native-search-paths + (list (search-path-specification + (variable "ICECAT_SYSTEM_DIR") + (separator #f) ;single entry + (files '("lib/icecat"))))) (home-page "https://librewolf.net/") (synopsis "Custom version of Firefox, focused on privacy, security and freedom") diff --git a/gnu/packages/patches/librewolf-use-system-wide-dir.patch b/gnu/packages/patches/librewolf-use-system-wide-dir.patch new file mode 100644 index 0000000000..c8a4d8cb12 --- /dev/null +++ b/gnu/packages/patches/librewolf-use-system-wide-dir.patch @@ -0,0 +1,37 @@ +Replace "/usr/lib/librewolf" (the system-wide directory for extensions and +native manifests) with "$ICECAT_SYSTEM_DIR". + +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +index 0cbc825738..5c0bf6ae7f 100644 +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -280,25 +280,11 @@ nsresult nsXREDirProvider::GetBackgroundTasksProfilesRootDir( + static nsresult GetSystemParentDirectory(nsIFile** aFile) { + nsresult rv; + nsCOMPtr localDir; +-# if defined(XP_MACOSX) +- rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType, +- getter_AddRefs(localDir)); +- if (NS_SUCCEEDED(rv)) { +- rv = localDir->AppendNative("LibreWolf"_ns); +- } +-# else +- constexpr auto dirname = +-# ifdef HAVE_USR_LIB64_DIR +- "/usr/lib64/librewolf"_ns +-# elif defined(__OpenBSD__) || defined(__FreeBSD__) +- "/usr/local/lib/librewolf"_ns +-# else +- "/usr/lib/librewolf"_ns +-# endif +- ; +- rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir)); +-# endif ++ const char* systemParentDir = getenv("ICECAT_SYSTEM_DIR"); ++ if (!systemParentDir || !*systemParentDir) return NS_ERROR_FAILURE; + ++ rv = NS_NewNativeLocalFile(nsDependentCString(systemParentDir), ++ getter_AddRefs(localDir)); + if (NS_SUCCEEDED(rv)) { + localDir.forget(aFile); + } base-commit: c2e2b0376b82a503e064fa826d1b153d94bf0b06 prerequisite-patch-id: f132b4af7b85df465998e4f459bf729f8b66f320 prerequisite-patch-id: ecd87e69b7aebebd64256db106ed96dc12f6c12d prerequisite-patch-id: f27c33b6c7f5dcb37c36551ecde29f1f0c734935 prerequisite-patch-id: fc6ad5af54f75869a657c065c86b262d74a1efff prerequisite-patch-id: 1665e62d1990a460bc5679bc89d600e94bab407a prerequisite-patch-id: e1cd1fdc5036bbd74d338df158ae7c348b180cf4 prerequisite-patch-id: bea29848814b393ccd3619f0a744ee36632ac5df -- 2.46.0