From 18a44bd13b1c2b4048966fbe949dd7becda1540a Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 16 Jun 2024 14:55:55 +0000 Subject: [PATCH] start testing firefox latest in the loaded builds --- .../install-firefox-latest.hook.chroot | 42 +++++++++++++++++++ .../install-firefox-latest.hook.chroot | 42 +++++++++++++++++++ python_modules/conf.py | 4 +- 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100755 iso_configs/hooks/normal/debld_32/install-firefox-latest.hook.chroot create mode 100755 iso_configs/hooks/normal/debld_64/install-firefox-latest.hook.chroot diff --git a/iso_configs/hooks/normal/debld_32/install-firefox-latest.hook.chroot b/iso_configs/hooks/normal/debld_32/install-firefox-latest.hook.chroot new file mode 100755 index 00000000..d0483d91 --- /dev/null +++ b/iso_configs/hooks/normal/debld_32/install-firefox-latest.hook.chroot @@ -0,0 +1,42 @@ +#!/bin/bash + +# Script adapted for use as a hook in Debian Live-Build +# to install and allow automatic updates for Firefox + +# Set default locale to English (US) +locale="en-US" + +# Download the latest version of Firefox +firefox_version=$(curl -sL "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=${locale}" | grep -o 'firefox-[0-9.]*.tar.bz2' | sed 's/firefox-//g' | sed 's/.tar.bz2//g') +firefox_filename="firefox-${firefox_version}.tar.bz2" +wget -O /tmp/${firefox_filename} "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=${locale}" + +# Extract and install Firefox +tar -C /opt -xvf /tmp/${firefox_filename} + +# Create a symbolic link for Firefox +ln -sf /opt/firefox/firefox /usr/bin/firefox + +# Set permissions to allow automatic updates +# Grant write permissions to the group and others (non-root users). +# This allows Firefox to update itself while maintaining system security. +chmod -R 775 /opt/firefox + +# Ensure the directory is owned by a user who can perform updates, +# typically it is good practice to associate it with the group of the users who will use the system. +chown -R root:users /opt/firefox + +# Create a .desktop entry for Firefox +echo "[Desktop Entry] +Name=Firefox +Comment=Web Browser +GenericName=Web Browser +Exec=/usr/bin/firefox +Icon=firefox +Terminal=false +Type=Application +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true" > /usr/share/applications/firefox.desktop + +echo "Firefox latest installed successfully and is ready for auto-updates." diff --git a/iso_configs/hooks/normal/debld_64/install-firefox-latest.hook.chroot b/iso_configs/hooks/normal/debld_64/install-firefox-latest.hook.chroot new file mode 100755 index 00000000..d0483d91 --- /dev/null +++ b/iso_configs/hooks/normal/debld_64/install-firefox-latest.hook.chroot @@ -0,0 +1,42 @@ +#!/bin/bash + +# Script adapted for use as a hook in Debian Live-Build +# to install and allow automatic updates for Firefox + +# Set default locale to English (US) +locale="en-US" + +# Download the latest version of Firefox +firefox_version=$(curl -sL "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=${locale}" | grep -o 'firefox-[0-9.]*.tar.bz2' | sed 's/firefox-//g' | sed 's/.tar.bz2//g') +firefox_filename="firefox-${firefox_version}.tar.bz2" +wget -O /tmp/${firefox_filename} "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=${locale}" + +# Extract and install Firefox +tar -C /opt -xvf /tmp/${firefox_filename} + +# Create a symbolic link for Firefox +ln -sf /opt/firefox/firefox /usr/bin/firefox + +# Set permissions to allow automatic updates +# Grant write permissions to the group and others (non-root users). +# This allows Firefox to update itself while maintaining system security. +chmod -R 775 /opt/firefox + +# Ensure the directory is owned by a user who can perform updates, +# typically it is good practice to associate it with the group of the users who will use the system. +chown -R root:users /opt/firefox + +# Create a .desktop entry for Firefox +echo "[Desktop Entry] +Name=Firefox +Comment=Web Browser +GenericName=Web Browser +Exec=/usr/bin/firefox +Icon=firefox +Terminal=false +Type=Application +Categories=Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true" > /usr/share/applications/firefox.desktop + +echo "Firefox latest installed successfully and is ready for auto-updates." diff --git a/python_modules/conf.py b/python_modules/conf.py index 503f2824..a9c33f4c 100644 --- a/python_modules/conf.py +++ b/python_modules/conf.py @@ -270,8 +270,8 @@ LOADED_LIST = ('xfce4\n' 'transmission-gtk\n' 'thunderbird\n' 'thunderbird-l10n-all\n' - 'firefox-esr\n' - 'firefox-esr-l10n-all\n' + #'firefox-esr\n' start testing firefox latest install + #'firefox-esr-l10n-all\n' 'libreoffice\n' 'libreoffice-gtk3\n' 'libreoffice-l10n*\n'