From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 7zCeB8VbnF/jGQAA0tVLHw (envelope-from ) for ; Fri, 30 Oct 2020 18:30:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0L0jA8VbnF+gQgAA1q6Kng (envelope-from ) for ; Fri, 30 Oct 2020 18:30:29 +0000 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 A5E669402A8 for ; Fri, 30 Oct 2020 18:30:28 +0000 (UTC) Received: from localhost ([::1]:45412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYZAP-0004Hc-Fr for larch@yhetil.org; Fri, 30 Oct 2020 14:30:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYZA2-0004HE-L9 for guix-patches@gnu.org; Fri, 30 Oct 2020 14:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48144) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYZA2-0007pe-9K for guix-patches@gnu.org; Fri, 30 Oct 2020 14:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYZA2-0003kb-3l for guix-patches@gnu.org; Fri, 30 Oct 2020 14:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44335] [PATCH 0/2] Install Chromium extensions with Guix! Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 30 Oct 2020 18:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44335 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44335@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160408257414348 (code B ref -1); Fri, 30 Oct 2020 18:30:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Oct 2020 18:29:34 +0000 Received: from localhost ([127.0.0.1]:59690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYZ9Z-0003jM-UY for submit@debbugs.gnu.org; Fri, 30 Oct 2020 14:29:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:34172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYZ9W-0003jD-7C for submit@debbugs.gnu.org; Fri, 30 Oct 2020 14:29:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYZ9W-0004Ef-0l for guix-patches@gnu.org; Fri, 30 Oct 2020 14:29:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49975) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYZ9V-0007mG-OB for guix-patches@gnu.org; Fri, 30 Oct 2020 14:29:29 -0400 Received: from ti0006q161-1594.bb.online.no ([46.9.75.77]:33656 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kYZ9U-0005BG-Li for guix-patches@gnu.org; Fri, 30 Oct 2020 14:29:29 -0400 From: Marius Bakke Date: Fri, 30 Oct 2020 19:29:25 +0100 Message-Id: <20201030182925.5151-1-marius@gnu.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) 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" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.49 X-TUID: TFq5DAEeWaQt Greetings Guix, These patches lay the groundwork for packaging Chromium extensions with Guix. Currently only uBlock Origin has been packaged, but adding others should be technically straight forward. Practically it turns out somewhat difficult because many extensions rely on the node.js ecosystem. Patch 1/2 adds a search path mechanism to ungoogled-chromium such that it looks for local extensions in $CHROMIUM_EXTENSION_DIRECTORY instead of the default "/usr/share/chromium/extensions". Patch 2/2 adds a generic MAKE-CHROMIUM-EXTENSION procedure that turns a object containing an uncompressed extension directory into a signed .crx file visible to Chromium through a crafted JSON file. There is one problem with the proposed patches: extensions are not automatically updated. That is, updating the "ublock-origin-chromium" package will not update the browser profile even after a browser restart. Worse, uninstalling the extension through Chromium will leave you no way to install it again even after it has been updated. Not sure if that should be a blocking issue. I'm also not sure whether (gnu packages browser-extensions) is a good home for the helper procedures that create signing key, etc. Thoughts? To aid testing I have started a build of the patched ungoogled-chromium on ci.guix.gnu.org[*]. It should be finished by tomorrow(!). (testers can use "chromium --user-data-dir=/tmp/foo" to avoid messing with their regular profile) I'm currently relocating to a new city and won't be able to follow up on this until next week. In the meantime, feedback very welcome! [*] on commit eee35fe3b7cb21792b90ecbf5a834b5a3fdb6f04. Marius Bakke (2): gnu: ungoogled-chromium: Add search path for installed extensions. gnu: Add ublock-origin-chromium. gnu/local.mk | 2 + gnu/packages/browser-extensions.scm | 274 ++++++++++++++++++ gnu/packages/chromium.scm | 18 +- .../ungoogled-chromium-search-path.patch | 28 ++ 4 files changed, 314 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/browser-extensions.scm create mode 100644 gnu/packages/patches/ungoogled-chromium-search-path.patch -- 2.28.0