From d062fe2c8b99bbf740eee633060150af037adb36 Mon Sep 17 00:00:00 2001 From: ivan-boikov Date: Sat, 22 Jun 2024 19:45:47 +0200 Subject: firefox-policy v1.1, fixes Firefox update blocking --- www-misc/firefox-policy/Manifest | 2 +- www-misc/firefox-policy/firefox-policy-1.0.ebuild | 56 ----------------------- www-misc/firefox-policy/firefox-policy-1.1.ebuild | 56 +++++++++++++++++++++++ 3 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 www-misc/firefox-policy/firefox-policy-1.0.ebuild create mode 100644 www-misc/firefox-policy/firefox-policy-1.1.ebuild (limited to 'www-misc/firefox-policy') diff --git a/www-misc/firefox-policy/Manifest b/www-misc/firefox-policy/Manifest index 2c91811..848e1ee 100644 --- a/www-misc/firefox-policy/Manifest +++ b/www-misc/firefox-policy/Manifest @@ -1,2 +1,2 @@ -EBUILD firefox-policy-1.0.ebuild 1458 BLAKE2B 7b4a09191cdc63d0c147ca6fa002d9fd7eda9e79f43cc692215dff3dd0c55f1bcb1a10e64235e745ddfdba5c518d3659e83fecd3c50ce55f3b361175a184907a SHA512 3cfa50066382f722dccf408a36a6dca7aeca2b95791f1640b029e44a2b3e4b6c940827f24fd4966ee407edbca0a3370583a76574ce41a85fb29cf1768fb23c51 +EBUILD firefox-policy-1.1.ebuild 1457 BLAKE2B 0b7ed66995ba432810d94b916d2c20eb5d96bed16cf43f4d0d9f4eaf06fc320ebd66c3e42aa443fbde3f96699dfd017325ac63312ca1f3bf063f15b2b014af5c SHA512 9a03de3d3032995009c2737c5b10a0023787aac3ea485c52abba10191facdf93531d81b69b3f9e23e54c09d6881700f47c674f037e6df0288b4e2168956bc791 EBUILD firefox-policy-9999.ebuild 1460 BLAKE2B c6079d0d568942a6db70541dc8f0b4f7bcb2abc910fe5282157f2abd88bf75bf756f03242621478835660ec77ca223fc1ecb728385e20ebc37ccd0d8e986bdc2 SHA512 258156c0152a10070b29343e9f06458dff8a0f5b49a924f3b62983b9c3c3044cc46bf4a53469f2d93878479dd3c2ca12596001970f0113ec215e9e43d82ef6a7 diff --git a/www-misc/firefox-policy/firefox-policy-1.0.ebuild b/www-misc/firefox-policy/firefox-policy-1.0.ebuild deleted file mode 100644 index d96c539..0000000 --- a/www-misc/firefox-policy/firefox-policy-1.0.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2024 Ivan Boikov -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DESCRIPTION="Generating Firefox system-wide policies to handle addons and updates" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="+noupdate +ublock redirect nocookiespopup" - -RDEPEND=" - ublock? ( www-plugins/ublock-origin-bin ) - redirect? ( www-plugins/libredirect-bin ) - nocookiespopup? ( www-plugins/istilldontcareaboutcookies-bin ) -" -DEPEND="${RDEPEND}" -BDEPEND="app-misc/jq" - -S="${WORKDIR}" - -_add_addon_entry() { - echo "$1" | jq ".policies.ExtensionSettings += - { \"$2\" : - { - \"install_url\" : \"file:///usr/share/firefox-addons/$2.xpi\", - \"installation_mode\" : \"normal_installed\", - \"updates_disabled\" : true - } - }" -} - -src_install() { - # firefox-bin installs policies to /opt/firefox/distribution/policies.json - # policy in /etc overrides it - dodir /etc/firefox/policies - policy="" - if use noupdate ; then - # browser updates - policy="$(jq -n '.policies += { "DisableAppUpdates" : true }')" - fi - if use ublock ; then - # uBlockOrigin - policy="$(_add_addon_entry "$policy" "uBlock0@raymondhill.net")" - fi - if use redirect ; then - # LibRedirect - policy="$(_add_addon_entry "$policy" "7esoorv3@alefvanoon.anonaddy.me")" - fi - if use nocookiespopup ; then - # I still don't care about cookies - policy="$(_add_addon_entry "$policy" "idcac-pub@guus.ninja")" - fi - echo "$policy" > "${D}/etc/firefox/policies/policies.json" -} diff --git a/www-misc/firefox-policy/firefox-policy-1.1.ebuild b/www-misc/firefox-policy/firefox-policy-1.1.ebuild new file mode 100644 index 0000000..9e3d887 --- /dev/null +++ b/www-misc/firefox-policy/firefox-policy-1.1.ebuild @@ -0,0 +1,56 @@ +# Copyright 2024 Ivan Boikov +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Generating Firefox system-wide policies to handle addons and updates" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+noupdate +ublock redirect nocookiespopup" + +RDEPEND=" + ublock? ( www-plugins/ublock-origin-bin ) + redirect? ( www-plugins/libredirect-bin ) + nocookiespopup? ( www-plugins/istilldontcareaboutcookies-bin ) +" +DEPEND="${RDEPEND}" +BDEPEND="app-misc/jq" + +S="${WORKDIR}" + +_add_addon_entry() { + echo "$1" | jq ".policies.ExtensionSettings += + { \"$2\" : + { + \"install_url\" : \"file:///usr/share/firefox-addons/$2.xpi\", + \"installation_mode\" : \"normal_installed\", + \"updates_disabled\" : true + } + }" +} + +src_install() { + # firefox-bin installs policies to /opt/firefox/distribution/policies.json + # policy in /etc overrides it + dodir /etc/firefox/policies + policy="" + if use noupdate ; then + # browser updates + policy="$(jq -n '.policies += { "DisableAppUpdate" : true }')" + fi + if use ublock ; then + # uBlockOrigin + policy="$(_add_addon_entry "$policy" "uBlock0@raymondhill.net")" + fi + if use redirect ; then + # LibRedirect + policy="$(_add_addon_entry "$policy" "7esoorv3@alefvanoon.anonaddy.me")" + fi + if use nocookiespopup ; then + # I still don't care about cookies + policy="$(_add_addon_entry "$policy" "idcac-pub@guus.ninja")" + fi + echo "$policy" > "${D}/etc/firefox/policies/policies.json" +} -- cgit v1.2.3