From 99aabc111bbcbc345991a1b719c38349126bf8ff Mon Sep 17 00:00:00 2001 From: kyodev <> Date: Wed, 24 Jan 2018 17:29:41 +0100 Subject: [PATCH] getFirefox 4.13.0 --- scripts/getFirefox | 147 ++++++++++++++------------------ scripts/getFirefox_changelog.md | 33 +++++++ 2 files changed, 98 insertions(+), 82 deletions(-) diff --git a/scripts/getFirefox b/scripts/getFirefox index 0d9d200..52beda1 100755 --- a/scripts/getFirefox +++ b/scripts/getFirefox @@ -1,7 +1,7 @@ #!/bin/bash -version=4.12.0 -date="16/01/2018" +version=4.13.0 +date="24/01/2018" projet="simpledeb" contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/" script="getFirefox" @@ -260,59 +260,53 @@ f__wget_test(){ # 16/01/2018 exit 0 } -f_affichage(){ # 22/12/2017 +f_affichage(){ # 24/01/2018 + local affichage_text=" _ _____ _ __ + __ _ ___| |_| ___(_)_ __ ___ / _| _____ __ + / _' |/ _ \ __| |_ | | '__/ _ \ |_ / _ \ \/ / +| (_| | __/ |_| _| | | | | __/ _| (_) > < + \__, |\___|\__|_| |_|_| \___|_| \___/_/\_\ + |___/" clear - echo -n "$BLUE" -cat << 'EOF' - _ _____ _ __ - __ _ ___| |_| ___(_)_ __ ___ / _| _____ __ - / _' |/ _ \ __| |_ | | '__/ _ \ |_ / _ \ \/ / - | (_| | __/ |_| _| | | | | __/ _| (_) > < - \__, |\___|\__|_| |_|_| \___|_| \___/_/\_\ - |___/ -EOF - echo -e "$YELLOW version $version - $date$STD\n" + echo -e "$BLUE$affichage_text$YELLOW version $version - $date$STD\n" } # affichage help -f_help(){ # 15/01/2018 - local ih help=( - " ----------------------------------------------------------------------" - " canaux possibles:$GREEN latest, beta, nightly, dev, esr$STD" - " = tous les canaux" - " " - " exemple, installation version Release (latest): $BLUE$script i-latest$STD" - " " - " $BLUE$script i-$STD$GREEN""canal$STD : $RED""i$STD""nstallation de $appli $RED(root)$STD" - " avec option $GREEN--sauve$STD l'archive téléchargée est sauvegardée dans le répertoire courant" - " " - " $BLUE$script d-$STD$GREEN""canal$STD : copier un profil $RED"".d$STD""efault existant sur " - " $BLUE$script m-$STD$GREEN""canal$STD : installation sur le d'une archive téléchargée $RED""m$STD""anuellement $RED(root)$STD" - " $BLUE$script r-$STD$GREEN""canal$STD : désinstallation ($RED""r$STD""emove) du $RED(root)$STD" - " $BLUE$script ri$STD : $RED""r$STD""éparation$RED i$STD""cône(s) dans le menu" - " $BLUE$script u-$STD$GREEN""canal$STD : profil pour l'$RED""u$STD""tilisateur en cours et comme défaut système $RED(root)$STD" - " " - " $BLUE$script p-$STD$GREEN""canal$STD : $RED""p$STD""ersonnalisation sur le de user.js & userChrome.css" - " $BLUE$script pr-$STD$GREEN""canal$STD : suppression des $RED""p$STD""ersonnalisations ($RED""r$STD""emove) sur le " - " $BLUE$script pu$STD : mise à jour des $RED""p$STD""ersonnalisations ($RED""u$STD""pdate) installées" - " " - " $BLUE$script version$STD : versions installées et en ligne" - " ----------------------------------------------------------------------" - " " - " $BLUE./$script$STD (ou $BLUE./$script -i$STD) : installation du script dans le système $RED(root)$STD" - " $BLUE$script -h$STD, --help : affichage aide" - " $BLUE$script -r$STD, --remove : désinstallation du script du système $RED(root)$STD" - " $BLUE$script -u$STD, --upgrade : mise à jour du script" - " $BLUE$script -v$STD, --version : versions du script" +f_help(){ # 24/01/2018 + local ligne help=( + "----------------------------------------------------------------------" + " canaux possibles:$GREEN latest, beta, nightly, dev, esr$STD" + " = tous les canaux" + "exemple, installation version Release (latest): $BLUE$script i-latest$STD" + "" + "$BLUE$script i-$STD$GREEN""canal$STD : $RED""i$STD""nstallation de $appli $RED(root)$STD" + " avec option $GREEN--sauve$STD l'archive téléchargée est sauvegardée dans le répertoire courant" + "" + "$BLUE$script d-$STD$GREEN""canal$STD : copier un profil $RED"".d$STD""efault existant sur " + "$BLUE$script m-$STD$GREEN""canal$STD : installation sur le d'une archive téléchargée $RED""m$STD""anuellement $RED(root)$STD" + "$BLUE$script r-$STD$GREEN""canal$STD : désinstallation ($RED""r$STD""emove) du $RED(root)$STD" + "$BLUE$script ri$STD : $RED""r$STD""éparation$RED i$STD""cône(s) dans le menu" + "$BLUE$script u-$STD$GREEN""canal$STD : profil pour l'$RED""u$STD""tilisateur en cours et comme défaut système $RED(root)$STD" + "" + "$BLUE$script p-$STD$GREEN""canal$STD : $RED""p$STD""ersonnalisation sur le de user.js & userChrome.css" + "$BLUE$script pr-$STD$GREEN""canal$STD : suppression des $RED""p$STD""ersonnalisations ($RED""r$STD""emove) sur le " + "$BLUE$script pu$STD : mise à jour des $RED""p$STD""ersonnalisations ($RED""u$STD""pdate) installées" + "" + "$BLUE$script version$STD : versions installées et en ligne" + "----------------------------------------------------------------------" + "$BLUE./$script$STD (ou $BLUE./$script -i$STD) : installation du script dans le système $RED(root)$STD" + "$BLUE$script -h$STD, --help : affichage aide" + "$BLUE$script -r$STD, --remove : désinstallation du script $RED(root)$STD" + "$BLUE$script -u$STD, --upgrade : mise à jour du script" + "$BLUE$script -v$STD, --version : version du script" ) - IFS=$'\n' - for ih in ${help[@]}; do - echo -e "$ih" + tput cuu1 # une ligne plus haut + for ligne in "${help[@]}"; do + echo -e " $ligne" done - IFS="$IFS_INI" - echo -e "\n$STD plus d'infos: $YELLOW$url_notice$STD" + echo -e "\n$STD plus d'infos: $GREEN$url_notice$STD" echo -e "$STD Tor Browser, voir getXfox:$YELLOW https://kyodev.frama.io/kyopages/scripts/getXfox/\n$STD" } @@ -431,7 +425,7 @@ ffx_get_canalBas(){ # 18/12/2017 } # version en ligne et installée, affichage -ffx_get_version(){ # 14/01/2018 +ffx_get_version(){ # 24/01/2018 local recup_url ver_latest ver_esr ver_beta ver_nightly ii local verFfxInstall='' verFfxOnline='' pointeur fileTmp="/tmp/$script-getVersion_ffx" @@ -439,7 +433,7 @@ ffx_get_version(){ # 14/01/2018 #recup url # version latest & esr recup_url="https://www.mozilla.org/en-US/firefox/notes/" - wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -o "$wget_log" -O - "$recup_url" &>"$fileTmp" + wget -q --tries=2 --timeout=15 --user-agent="$user_agent" -o /dev/null -O - "$recup_url" &>"$fileTmp" [ "$?" -ne 0 ] && f__wget_test "$recup_url" ver_latest=$( grep -Eos 'data-latest-firefox="[0-9\.]+"' $fileTmp | grep -Eo '[0-9\.]+' ) echo -n "." @@ -512,7 +506,7 @@ EOF } # installation, $1 canal [$2='manuel', $3 archive] -ffx_install(){ # 15/01/2017 +ffx_install(){ # 24/01/2017 local fileTemp canal="$1" verArchive dirTemp="/tmp/$script-install_ffx" fileTemp="$dirTemp/flash_player_npapi-linux$(getconf LONG_BIT).tar.gz" @@ -537,7 +531,7 @@ ffx_install(){ # 15/01/2017 recup_url="https://download.mozilla.org/?product=firefox-$canal-latest-l10n-ssl&os=$fu_archi&lang=fr" fi mkdir -p "$dirTemp" - wget -q -c --show-progress --tries=2 --timeout=15 --user-agent="$user_agent" -o "$wget_log" -O "$fileTemp" "$recup_url" + wget -q -c --show-progress --tries=2 --timeout=15 --user-agent="$user_agent" -o /dev/null -O "$fileTemp" "$recup_url" [ "$?" -ne 0 ] && f__wget_test "$recup_url" fi f__archive_test "$fileTemp" || f__error "Le fichier $fileTemp n'est pas une archive tar.gz valide" @@ -555,7 +549,7 @@ ffx_install(){ # 15/01/2017 chown -R "$fu_user:" "$dirInstallFfx$canal/" chmod -R g+wrs,a+r "$dirInstallFfx$canal/" if [ "$dl_to_svg" == "ok" ]; then - chown -R "$fu_user:" "$fileTemp" + chown "$fu_user:" "$fileTemp" mv "$fileTemp" ./ fi rm -rf "$dirTemp/" @@ -626,7 +620,7 @@ ffx_lanceur_desktop(){ # 16/01/2018 } # version personnalisation en ligne, [$1=quiet], assigne $perso_ffx_afaire -ffx_pers_get_version(){ # 14/01/2018 +ffx_pers_get_version(){ # 24/01/2018 local ii verEnPlace persEnPlace verPersOnline x_ffx_pers_get_version=1 @@ -635,7 +629,7 @@ ffx_pers_get_version(){ # 14/01/2018 verEnPlace=$( sed -n '2p' $dirProfilFfx/$ii/personnalisation ) persEnPlace+="$ii: $verEnPlace " fi - verPersOnline=$( wget -q --tries=2 --timeout=15 -o "$wget_log" -O - "$urlPersFfx/$userFfx" | sed -En 's/\/\*v(.*)\*\//\1/p' ) + verPersOnline=$( wget -q --tries=2 --timeout=15 -o /dev/null -O - "$urlPersFfx/$userFfx" | sed -En 's/\/\*v(.*)\*\//\1/p' ) [ "$?" -ne 0 ] && f__wget_test "$urlPersFfx/$userFfx" if [ -z "$verPersOnline" ]; then verPersOnline="$RED""non accessible" @@ -654,7 +648,7 @@ ffx_pers_get_version(){ # 14/01/2018 } # recup user.js et chrome/userChrome.css, $1=canal à personnaliser ou mettre à jour -ffx_pers_install(){ # 14/01/2018 +ffx_pers_install(){ # 24/01/2018 local verPersDL canal="$1" dirTemp="/tmp/$script-persInstall_ffx" if [ ! -d "$dirProfilFfx/$canal" ]; then @@ -663,10 +657,10 @@ ffx_pers_install(){ # 14/01/2018 fi # chargement fichiers personnalisation mkdir -p "$dirTemp" - wget -q --tries=2 --timeout=15 -o "$wget_log" -O "$dirTemp/user.js" "$urlPersFfx/$userFfx" + wget -q --tries=2 --timeout=15 -o /dev/null -O "$dirTemp/user.js" "$urlPersFfx/$userFfx" [ "$?" -ne 0 ] && f__wget_test "$urlPersFfx/$userFfx" verPersDL=$( sed -En 's/\/\*v(.*)\*\//\1/p' $dirTemp/user.js ) # version uniquement sur user.js - wget -q --tries=1 --timeout=15 -o "$wget_log" -O "$dirTemp/userChrome.css" "$urlPersFfx/$chromeFfx" + wget -q --tries=1 --timeout=15 -o /dev/null -O "$dirTemp/userChrome.css" "$urlPersFfx/$chromeFfx" [ "$?" -ne 0 ] && f__wget_test "$urlPersFfx/$chromeFfx" # installation mkdir -p "$dirProfilFfx/$canal/chrome" # répertoire pour userChrome.css @@ -782,16 +776,12 @@ fscript_cronAnacron(){ # 29/12/2017 } # version script, [$1=quiet], assigne $ver_script_install, $ver_script_online, $script_a_jour=ok|KO -fscript_get_version(){ # 03/01/2018 - local wget_log="/tmp/wget_$RANDOM.log" +fscript_get_version(){ # 24/01/2018 x_script_get_version=1 # version online - ver_script_online=$( wget -q --timeout=15 -o "$wget_log" -O - "$url_script" | grep -m1 '^version=' | cut -d'=' -f2 ) - if [ "$?" -ne 0 ]; then - rm "$wget_log" - f__wget_test "$url_script" - fi + ver_script_online=$( wget -q --timeout=15 -o /dev/null -O - "$url_script" | grep -m1 '^version=' | cut -d'=' -f2 ) + [ "$?" -ne 0 ] && f__wget_test "$url_script" # version installée if [ -e "$script_install" ]; then ver_script_install=$( grep -m1 '^version=' $script_install | cut -d'=' -f2 ) @@ -802,7 +792,6 @@ fscript_get_version(){ # 03/01/2018 fi [ "$ver_script_online" ] || ver_script_online="$RED""n/a" [ "$ver_script_install" ] || ver_script_install="Non installé" - rm "$wget_log" [ "$1" == "quiet" ] && return 0 f__info "raw" "script en place: $GREEN$ver_script_install" @@ -858,8 +847,8 @@ fscript_remove(){ # 15/01/2018 } # mise à jour script, [$1 != "" si upgrade en place, $1 dans message info] -fscript_update(){ # 27/12/2017 - local dirTemp="/tmp/$script-maj" wget_log="/tmp/wget_$RANDOM.log" upgradeEnPlace="$1" +fscript_update(){ # 24/01/2018 + local dirTemp="/tmp/$script-maj" upgradeEnPlace="$1" [ "$(type -t fscript_update_special)" ] && fscript_update_special # test, si fonction spécifique, appel if [ -z "$upgradeEnPlace" ] && ! grep -q 'bin' <<< "$( dirname $0 )" ; then @@ -874,10 +863,9 @@ fscript_update(){ # 27/12/2017 f__info "mise à jour en cours" fi mkdir -p "$dirTemp" - wget -q --tries=2 --timeout=15 -o "$wget_log" -O "$dirTemp/$script" "$url_script" + wget -q --tries=2 --timeout=15 -o /dev/null -O "$dirTemp/$script" "$url_script" if [ "$?" -ne 0 ]; then - rm -rf "$dirTemp/" - rm -f "$wget_log" + rm -rf "$dirTemp" f__wget_test "$url_script" fi if grep -q '#!/bin/bash' "$dirTemp/$script" && grep -q '^### END CONTROL' "$dirTemp/$script"; then @@ -890,7 +878,6 @@ fscript_update(){ # 27/12/2017 f_info "log" "$script: échec update" "mauvais téléchargement, réessayer plus tard" fi rm -rf "$dirTemp/" - rm -f "$wget_log" } prg_init(){ # 22/12/2017 @@ -927,10 +914,6 @@ prg_init(){ # 22/12/2017 # définition couleurs f__color - - # fichier log pour wget, évite bug wget? sur testing - touch "/tmp/wget.log" && wget_log="/tmp/wget.log" || wget_log="/tmp/wget-$RANDOM.log" # accessible?: wget.log sinon avec un random - chmod 666 "$wget_log" 2>/dev/null # rw pour tous, écrasable et effaçable par tous } ######## début script / initialisation @@ -952,13 +935,10 @@ url_notice="https://kyodev.frama.io/kyopages/scripts/$script/" # paramètres firefox appli="Firefox" dirInstallFfx="/opt/usr/share/firefox-" -dirProfilFfx="/home/$fu_user/.mozilla/firefox" # emplacement profiles.ini +dirProfilFfx="/home/$fu_user/.mozilla/firefox" # emplacement profiles.ini produit_all="esr latest beta nightly" # tous les canaux sauf dev (=beta) produit_all_inverse="nightly beta latest esr" # tous les canaux sauf dev (=beta) # url chargement fichiers personnalisation, std ou spécifique, une seule url possible, arrêt à la première trouvée -for ii in $produit_all dev; do # renommage anciens fichiers personnalisation - [ -e "$dirProfilFfx/$ii/personnalisation.getFirefox" ] && mv "$dirProfilFfx/$ii/personnalisation.getFirefox" "$dirProfilFfx/$ii/personnalisation" # ancien nom -done for ii in $produit_all dev; do if [ -e "$dirProfilFfx/$ii/personnalisation" ]; then urlPersFfx=$( sed -n '1p' $dirProfilFfx/$ii/personnalisation ) @@ -970,6 +950,11 @@ done userFfx="user.js" # nom du fichier user.js sur un dépôt distant chromeFfx="userChrome.css" # nom du fichier userChrome.css sur un dépôt distant + # renommage anciens fichiers personnalisation +for ii in $produit_all dev; do + [ -e "$dirProfilFfx/$ii/personnalisation.getFirefox" ] && mv "$dirProfilFfx/$ii/personnalisation.getFirefox" "$dirProfilFfx/$ii/personnalisation" # ancien nom +done + options=$@ # auto-installation script éventuel, si pas de marqueur $fileDev @@ -1014,7 +999,7 @@ for j in $options; do # deuxième passe options, actions m-latest | m-esr | m-dev | m-beta | m-nightly ) produit=${j#*-} ffx_install_manuel "$produit" "$2" # installation manuelle d'une archive, $2=archive - ;; + exit ;; p-latest | p-esr | p-dev | p-beta | p-nightly | p-all ) produit=${j#*-} [ "$produit" == "all" ] && produit="$produit_all" @@ -1081,8 +1066,6 @@ for j in $options; do # deuxième passe options, actions esac done -rm -f wget_log - exit ### END CONTROL (contrôle chargement) diff --git a/scripts/getFirefox_changelog.md b/scripts/getFirefox_changelog.md index d162eeb..061ee20 100644 --- a/scripts/getFirefox_changelog.md +++ b/scripts/getFirefox_changelog.md @@ -3,11 +3,44 @@ todo * protéger aussi x-www-browser +* numérotation archive sauvée +* révision extraction n° version * pocket toujours pas libéré, toujours imposé, de plus présent, maintenant dans reader: * voire à désactivation propre et effacement dans emplacement de merde extensions forcées * extensions.pocket.enabled;true * debian en janvier 2018 répercute civilement cette escroquerie, pocket est livrée et activée par défaut dans esr et fermé un bug rapportant cet état de fait sur des promesses non tenues pas mozilla +* effacer? /usr/lib/firefox-esr/browser/features/firefox@getpocket.com.xpi +* effacer /opt/usr/share/firefox-canal/browser/features/firefox@getpocket.com.xpi (1Mo!) +* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882073 + + +! houlà, IMPOSSIBLE de désactiver télémétrie: Autoriser Firefox à envoyer des données techniques et des données +d’interaction à Mozilla +RÉACTIVÉ à chaque démarrage! BUG ou lié surveillance activité/newtab/pub? +à investiguer + + +! houlà +The Snippets Service and the code that it embeds onto about:home collect data about user interaction with snippets +in order to help us determine the effectiveness of certain types of snippets and measure ... +https://abouthome-snippets-service.readthedocs.io/en/latest/data_collection.html + +3 mois après, support toujours pas à jour sur quantum ;;; ! :/ + + +??? nouveau?: impossible de désactiver notifications (et cam/microphone/localisations) + +investiguer sur /opt/usr/share/firefox-latest/browser/features/activity-stream@mozilla.org.xpi (1.4Mo) +about:config activity-stream :/ beaucoup de merdes, liaison pockets + +https://support.mozilla.org/en-US/questions/1181551 + +## getFirefox 4.13.0 24/01/2018 + +* révision: f_help, f_affichage +* révision: ffx_install +* révision: général wget_log: fscript_get_version, fscript_update ## getFirefox 4.12.0 16/01/2018