From 616412c6f250b1699506e0aa29b0568c1df6be12 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:14:17 -0400 Subject: [PATCH] Firefox Rapid Release: switch to using focal/jammy ppa on bullseye/bookworm fixes issue when firefox tabs crash when using bionic build on newer distros (observed using bionic arm64 build on bookworm arm64) --- apps/Firefox Rapid Release/install | 24 +++++++++++++++++++++--- apps/Firefox Rapid Release/uninstall | 8 +++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/apps/Firefox Rapid Release/install b/apps/Firefox Rapid Release/install index a937a8bf81..82eb8b6ceb 100755 --- a/apps/Firefox Rapid Release/install +++ b/apps/Firefox Rapid Release/install @@ -31,9 +31,27 @@ Pin-Priority: -1' | sudo tee /etc/apt/preferences.d/firefox >/dev/null ;; *) # Add repository source to apt sources.list - debian_ppa_installer "mozillateam/ppa" "bionic" "0AB215679C571D1C8325275B9BDB3D89CE49EC21" || exit 1 - # allow unattented upgrades to upgrade from this ppa if unattented upgrades is enabled - echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:bionic";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox >/dev/null + # also allow unattented upgrades to upgrade from this ppa if unattented upgrades is enabled + case $__os_codename in + bookworm) + # remove old ppa if present + sudo rm -f /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-bionic.list + debian_ppa_installer "mozillateam/ppa" "jammy" "0AB215679C571D1C8325275B9BDB3D89CE49EC21" || exit 1 + echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:jammy";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox >/dev/null + ;; + bullseye) + # remove old ppa if present + sudo rm -f /etc/apt/sources.list.d/mozillateam-ubuntu-ppa-bionic.list + debian_ppa_installer "mozillateam/ppa" "focal" "0AB215679C571D1C8325275B9BDB3D89CE49EC21" || exit 1 + echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:focal";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox >/dev/null + ;; + *) + debian_ppa_installer "mozillateam/ppa" "bionic" "0AB215679C571D1C8325275B9BDB3D89CE49EC21" || exit 1 + echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:bionic";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox >/dev/null + ;; + esac install_packages firefox || exit 1 + sudo apt --only-upgrade install firefox -y | less_apt + true ;; esac diff --git a/apps/Firefox Rapid Release/uninstall b/apps/Firefox Rapid Release/uninstall index 6f2efbad22..b77b0e4a39 100755 --- a/apps/Firefox Rapid Release/uninstall +++ b/apps/Firefox Rapid Release/uninstall @@ -8,6 +8,12 @@ sudo rm -f /etc/apt/sources.list.d/firefox-ubuntu.list ppa_name="mozillateam/ppa" case "$__os_id" in Ubuntu) ppa_dist="$__os_codename" ;; -*) ppa_dist="bionic" ;; +*) + case $__os_codename in + bookworm) ppa_dist="jammy" ;; + bullseye) ppa_dist="focal" ;; + *) ppa_dist="bionic" ;; + esac + ;; esac remove_repofile_if_unused /etc/apt/sources.list.d/${ppa_name%/*}-ubuntu-${ppa_name#*/}-${ppa_dist}.list