#!/bin/bash # Copyright 2009-2010 Erik Hanson, Minneapolis, MN, USA # Copyright 2011, 2015 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Author: ncmprhnsbl @ forum.porteus.org # version: 20250110 # Source porteus functions . /usr/share/porteus/porteus-functions get_colors # Check for root if [ $(whoami) != "root" ]; then echo "Only root can run this." exit 1 fi # functions set work directory(default is /tmp) to current work directory set_tmp() { WRKDIR=/tmp } set_pwd() { WRKDIR=$(pwd) } # echo usage show_help() { echo " options: -d : do operations in the present directory, instead of /tmp . " echo " -h : show this usage. " } while getopts ":-d:-h:" o; do case "$1" in -d) set_pwd;; -h) show_help exit 0;; *) show_help exit 1;; esac done case "$1" in "") set_tmp;; esac # tell us where the work will be done echo "Work will be done in: $txtgreen$WRKDIR$rst " ## Check if there's enough working space check_space() { [ $(df -l --output=avail $WRKDIR | tail -1) -lt 384000 ] && { red "There's not enough space to run this script"; exit 1; } } # Create variables TBURL=https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/ SERVER=$(awk -F= '/SERVER=/{print$NF}' /etc/porteus.conf) TMPDIR=$WRKDIR/portff PROFDIR="dxsqumip.default" EXT=.tar.bz2 TARG=$TMPDIR/ff.$$ CWD=$(pwd) LATVER1=$(lynx -dump --nonumbers --listonly $TBURL | grep -o "[0-9][0-9][0-9].0esr" | sort -V | tail -n1) LAT1=$(lynx -dump --nonumbers --listonly $TBURL | grep -v '0b\|esr' | grep -o "[0-9][0-9][0-9].[0-9].[0-9]" | sort -V | tail -n1) LAT2=$(lynx -dump --nonumbers --listonly $TBURL | grep -v '0b\|esr' | grep -o "[0-9][0-9][0-9].[0-9]" | sort -V | tail -n1) if (("${LAT2//.}0" > "${LAT1//.}")); then LATVER2="$LAT2" else LATVER2="$LAT1" fi LATVER3=$(lynx -dump --nonumbers --listonly $TBURL | grep -o "[0-9][0-9][0-9].0b[0-9]" | sort -V | tail -n1) case $(uname -m) in x86_64) ARCH=x86_64 SUFFIX=64 SARCH=x86_64 ;; *) ARCH=i686 SUFFIX= SARCH=i586 ;; esac txtbld=$(tput bold) txtred=${txtbld}$(tput setaf 1) txtgreen=${txtbld}$(tput setaf 2) txtwhite=${txtbld}$(tput setaf 7) txtcyan=${txtbld}$(tput setaf 6) rst=$(tput sgr0) function bold(){ echo -e $txtbld "$1" $rst; } function green() { echo -e $txtgreen "$1" $rst; } function red(){ echo $txtred "$1" $rst; } function cyan(){ echo $txtcyan "$1" $rst; } saypass(){ echo "[${txtbold}${txtgreen}PASS$rst] $1"; } sayfail(){ echo "[${txtbold}${txtred}FAIL$rst] $1"; } array_menu(){ echo echo "$1" echo "$2" select LOCALE in ${RESULT[@]}; do if [ -z "$LOCALE" ]; then bold "English locale chosen." && echo else echo "$txtgreen$LOCALE$rst locale chosen" fi break done } array_menu2(){ echo "$1" echo "$2" select CHOICE1 in ${RESULT1[@]}; do if [ -z "$CHOICE1" ]; then red "? version chosen." && echo else echo "$txtgreen${CHOICE1^^}$rst version chosen" echo fi break done } get_locale(){ # Set locales in array for a in af ar ast be bg bn br ca cak cs cy da de dsb el en-CA en-GB en-US es-AR es-ES es-MX et eu fi fr fy-NL ga-IE gd gl he hr hu hy-AM id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO pa-IN pl pt-BR pt-PT rm ro ru sk sl sq sr sv-SE th tr uk uz vi xpi zh-CN zh-TW; do RESULT+=( $a ) done array_menu "Choose a locale from the list." unset RESULT } get_release_type(){ array_menu2 "Please choose a release from the menu:" case $CHOICE1 in esr) LATVER=$LATVER1 ;; current) LATVER=$LATVER2 ;; beta) LATVER=$LATVER3 ;; *) echo "Invalid choice" $FUNCNAME ;; esac } create_default_settings(){ echo "W0dsb2JhbF0KaWQ9cG9ydGV1cwp2ZXJzaW9uPTEuMAphYm91dD1Nb3ppbGxhIFRodW5kZXJiaXJk IGZvciBQb3J0ZXVzIExpbnV4CgpbUHJlZmVyZW5jZXNdCmFwcC5kaXN0cmlidXRvcj1wb3J0ZXVz IGxpbnV4CmFwcC5kaXN0cmlidXRvci5jaGFubmVsPXRodW5kZXJiaXJkCg==" | base64 -d > $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1/distribution/distribution.ini } #~ disable_updates(){ #~ echo "ewoicG9saWNpZXMiOiAKICAgewogICAgICJEaXNhYmxlQXBwVXBkYXRlIjogdHJ1ZSwKICAgICAi #~ RGlzYWJsZVRlbGVtZXRyeSI6IHRydWUsCiAgICAgIkRpc2FibGVQb2NrZXQiOiB0cnVlCiAgICB9 #~ Cn0K" | base64 -d > $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1/distribution/policies.json #~ } create_fake_slack(){ cd $TARG PKGINFO=var/lib/pkgtools/packages mkdir -p $PKGINFO echo "PACKAGE NAME: thunderbird-$LATVER-$ARCH-$LOCALE" > $PKGINFO/thunderbird-$LATVER-$ARCH-$LOCALE cat >> $PKGINFO/thunderbird-$LATVER-$ARCH-$LOCALE << EOS PAKAGE DESCRIPTION: thunderbird: thunderbird (Mozilla Thunderbird mail reader) thunderbird: thunderbird: Standalone mail and news reader from mozilla.org thunderbird: thunderbird: thunderbird: thunderbird: thunderbird: Visit the Mozilla thunderbird project online: thunderbird: https://www.thunderbird.net/ thunderbird: thunderbird: FILE LIST: EOS find * | grep -v var >> $PKGINFO/thunderbird-$LATVER-$ARCH-$LOCALE } menu_from_variable(){ echo green "$(gettext " Is this an upgrade or a new install?")" echo "$(gettext "Choose an number to confirm.")" echo "$(gettext " ctrl+c to quit")" && echo select CHOICE in $RESULT; do if [ -z "$CHOICE" ]; then bold "$(gettext "Invalid choice!")" && echo $FUNCNAME fi break done } checksum () { echo "Verifying download integrity.." echo "Server : $SUM1" echo "Download: $SUM2" if [ "$SUM1" = "$SUM2" ]; then echo "Download verified." else read -p "Integrity check failed. Would you like to continue anyway? [y/n]" -n 1 -r -s && echo if [[ $REPLY =~ ^[Nn]$ ]]; then cleanup fi fi } cleanup(){ echo rm -rf $TARG [ -d $TMPDIR ] && rm -rf $TMPDIR exit } trap cleanup SIGHUP SIGINT SIGTERM ######### Start checks # Check if thunderbird is currently installed bold "Checking if thunderbird is installed ..." command -pv thunderbird >/dev/null && ISINSTALLED=0 # Get current thunderbird version if installed if [ "$ISINSTALLED" ]; then sayok "thunderbird is installed" CVER=$(find /var/lib/pkgtools/packages/thunderbird* 2>/dev/null | sort | tail -n1 | awk -F- '{print$2}') [ "$CVER" ] || CVER=$(su - guest -c 'thunderbird -v' | cut -d" " -f3) [ "$CVER" ] && sayok "thunderbird version: $txtgreen $CVER $rst" || echo "No thunderbird version found" else echo "thunderbird is not installed" fi ## Check for thunderbird file in $WRKDIR ## If it exists then ask to build from it. if [ $(find $WRKDIR/thunderbird-* 2>/dev/null | wc -l) -ge 1 ]; then # Make sure it is a tarball cfile=( $(find $WRKDIR/thunderbird-*.bz2 2>/dev/null | awk -F/ '{print$NF}') ) if [ ${#cfile[@]} -gt 0 ]; then RESULT=${cfile[@]} echo green "A thunderbird tarball was found in $WRKDIR" echo " We will use this archive to create thunderbird." menu_from_array "Choose the thunderbird file you want to process." echo "CHOICE:$CHOICE" fi fi bold "Checking for Porteus ..." is_porteus && saypass "Distro is Porteus" || { sayfail "Distro is not Porteus"; cleanup; } # Get version on porteus server SERVER_LATFILE=$(lynx -dump --nonumbers --listonly $SERVER/$SARCH/current/modules | awk -F/ '/thunderbird/{print$NF}' | tail -n1) SERVER_LATVER=$(awk -F- '{print$2}' <<<$SERVER_LATFILE) ############ Start input if [ -z $CHOICE ]; then echo bold "Fetching latest thunderbird version info..." # check installed version is up to date, if so offer escape. if [ "$LATVER1" = "$CVER" ] || [ "$LATVER2" = "$CVER" ] || [ "$LATVER3" = "$CVER" ]; then read -p " You already have the latest version $txtgreen$CVER$rst. Do you still want to continue? [y/n]" -n 1 -r -s && echo [[ $REPLY =~ ^[Nn]$ ]] && exit 0 fi # show all version information echo "The Porteus$txtgreen SERVER$rst version is :" $txtgreen "$SERVER_LATVER" $rst if [ "$LATVER1" ] || [ "$LATVER2" ] || [ "$LATVER3" ]; then echo "The Thunderbird$txtgreen ESR$rst version is :" $txtgreen "$LATVER1" $rst echo "The Thunderbird$txtgreen CURRENT$rst version is:" $txtgreen "$LATVER2" $rst echo "The Thunderbird$txtgreen BETA$rst version is :" $txtgreen "$LATVER3" $rst else sayfail "Could not get thunderbird version" cleanup fi ## Sanitize link (mozilla server is very fussy) FFLINK=$(awk -F"http://" '{print$NF}' <<<$LATLINK | sed -e 's@//@/@g' -e 's/\(.*\)./\1/') cyan "You can choose to download the premade module from our server(en-US locale)" cyan "or download one of the versions from mozilla," cyan "which enables you to choose your language." echo read -p " Would you like to download the porteus server version? [y/n]" -n 1 -r -s && echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo download $SERVER/$SARCH/current/modules/$SERVER_LATFILE $WRKDIR ## Check that we have a module in $WRKDIR if [ ! -f $WRKDIR/$SERVER_LATFILE ]; then echo sayerror "Download of the thunderbird module failed." echo cleanup else echo echo "Your file is at:" $txtcyan "$WRKDIR/$SERVER_LATFILE" $rst echo "Please move it to your modules folder to survive a reboot." echo cleanup fi else echo check_space RESULT1+=( 'esr' 'current' 'beta' ) get_release_type read -p " Would you like to download $txtgreen thunderbird-$LATVER $rst ? [y/n]" -n 1 -r -s && echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then cleanup fi fi get_locale else LOCALE=$(sed 's/_/-/' <<< ${LANG//.*}) fi ## Create TMPDIR [ ! -d $TMPDIR ] && mkdir -p $TMPDIR ## Download the latest file if [ -z $CHOICE ]; then if [ ! -e $TMPDIR/thunderbird-$LATVER.tar.bz2 ]; then download "$TBURL$LATVER/linux-$ARCH/$LOCALE/thunderbird-$LATVER.tar.bz2" $TMPDIR fi else LATVER=${CHOICE:8:-8} cp -a $WRKDIR/$CHOICE $TMPDIR fi ## Check that we have an archive in TMPDIR if [ ! -f $TMPDIR/thunderbird-$LATVER.tar.bz2 ]; then echo sayerror "File $TMPDIR/thunderbird-$LATVER.tar.bz2 not found" cleanup fi ## Check integrity of downloaded tarball using sha256sum if [ -z $CHOICE ]; then echo "Verifying download integrity.." SUM1=$(lynx -dump -dont_wrap_pre ${TBURL}${LATVER}/SHA256SUMS | grep "linux-${ARCH}/${LOCALE}/thunderbird-${LATVER}.tar.bz2" | cut -d" " -f1) SUM2=$(sha256sum $TMPDIR/thunderbird* | cut -d" " -f1) checksum fi ## Create distribution directory mkdir -p $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1/distribution || \ { red "Failed to create distibution directory."; cleanup; exit 1; } green "Decompressing thunderbird tarball ..." cd $TMPDIR tar xvf thunderbird-$LATVER.tar.bz2 || { red "Failed to decompress tarball."; exit 1; } [ ! -d $TARG ] && mkdir -p $TARG green "Linking thunderbird binary ..." cd $TARG/usr/lib${SUFFIX} ln -sf ./thunderbird-$CHOICE1 thunderbird cd - ## Create lib dir green "Copying thunderbird files ..." cp -a thunderbird/* $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1/ #|| { red "Failed to copy thunderbird directory."; cleanup; exit 1; } [ -e $TARG/usr/bin/thunderbird ] && unlink $TARG/usr/bin/thunderbird [ ! -d $TARG/usr/bin ] && mkdir -p $TARG/usr/bin cat > $TARG/usr/bin/thunderbird << EOF #!/bin/bash exec env GTK_CSD=1 /usr/lib${SUFFIX}/thunderbird-$CHOICE1/thunderbird "\$@" EOF chmod +x $TARG/usr/bin/thunderbird green "Creating default settings ..." create_default_settings #disable_updates chmod 755 $TARG/usr/bin chmod 755 $TARG/usr/lib${SUFFIX} chmod 755 $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1 chmod -R 755 $TARG/usr/lib${SUFFIX}/thunderbird-$CHOICE1/distribution mkdir -p $TARG/usr/share/applications 2>/dev/null echo "W0Rlc2t0b3AgRW50cnldCk5hbWU9VGh1bmRlcmJpcmQKQ29tbWVudD1TZW5kIGFuZCByZWNlaXZl IG1haWwgd2l0aCBUaHVuZGVyYmlyZApDb21tZW50W2FzdF09TGxlZXIgeSBlc2NyaWJpciBjb3Jy w6l1IGVsZWN0csOzbmljdQpDb21tZW50W2NhXT1MbGVnaXUgaSBlc2NyaXZpdSBjb3JyZXUKQ29t bWVudFtjc109xIx0ZW7DrSBhIHBzYW7DrSBwb8WhdHkKQ29tbWVudFtkYV09U2tyaXYvbMOmcyBl LXBvc3QvbnloZWRzZ3J1cHBlIG1lZCBNb3ppbGxhIFRodW5kZXJiaXJkCkNvbW1lbnRbZGVdPUUt TWFpbHMgdW5kIE5hY2hyaWNodGVuIG1pdCBUaHVuZGVyYmlyZCBsZXNlbiB1bmQgc2NocmVpYmVu CkNvbW1lbnRbZWxdPc6UzrnOsc6yzqzPg8+EzrUgzrrOsc65IM6zz4HOrM+Iz4TOtSDOs8+BzqzO vM68zrHPhM6xIM68zrUgz4TOvyBNb3ppbGxhIFRodW5kZXJiaXJkCkNvbW1lbnRbZXNdPUxlYSB5 IGVzY3JpYmEgY29ycmVvcyB5IG5vd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c2FyCk5hbWVbc3FdPUhhcG5p IGxpYsOrciBhZHJlc2FzaApOYW1lW3NyXT3QntGC0LLQvtGA0Lgg0LDQtNGA0LXRgdCw0YAKTmFt ZVtzdl9TRV09w5ZwcG5hIGFkcmVzc2Jva2VuCk5hbWVbdHJdPUFkcmVzIGRlZnRlcmluaSBhw6cK TmFtZVt1a1090JLRltC00LrRgNC40YLQuCDQsNC00YDQtdGB0L3RgyDQutC90LjQs9GDCk5hbWVb dmldPU3hu58gc+G7lSDEkeG7i2EgY2jhu4kKTmFtZVt6aF9DTl095omT5byA6YCa6K6v5b2VCk5h bWVbemhfVFddPemWi+WVn+mAmuioiumMhApFeGVjPXRodW5kZXJiaXJkIC1hZGRyZXNzYm9vawo=" | base64 -d > $TARG/usr/share/applications/org.mozilla.Thunderbird.desktop for i in 16 22 24 32 48 64 128 256; do mkdir -p $TARG/usr/share/icons/hicolor/{${i}x${i},symbolic}/apps install -Dm644 -o root -g root $TARG/usr/lib64/thunderbird/chrome/icons/default/default${i}.png \ "$TARG/usr/share/icons/hicolor/${i}x${i}/apps/org.mozilla.Thunderbird.png" install -Dm644 -o root -g root $TARG/usr/lib64/thunderbird/chrome/icons/default/TB-symbolic.svg \ "$TARG/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" done create_fake_slack green "Creating module ..." cd $WRKDIR dir2xzm $TARG $WRKDIR/thunderbird-$LATVER-$ARCH-$LOCALE.xzm echo "Your file is at:" $txtgreen "$WRKDIR/thunderbird-$LATVER-$ARCH-$LOCALE.xzm" $rst cyan "Please copy it to your modules folder to survive a reboot." echo cleanup