|
@@ -61,12 +61,11 @@ if [ ! -r $MOZ_LIB_DIR/firefox/$MOZ_FIREFOX_FILE ]; then
|
|
|
MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
|
|
|
fi
|
|
|
MOZ_DIST_BIN="$MOZ_LIB_DIR/firefox"
|
|
|
-MOZ_XUL_DIR="$MOZ_LIB_DIR/firefox"
|
|
|
MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
|
|
|
MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
|
|
MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE"
|
|
|
MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh"
|
|
|
-
|
|
|
+
|
|
|
##
|
|
|
## Set MOZ_GRE_CONF
|
|
|
##
|
|
@@ -83,20 +82,11 @@ MOZILLA_FIVE_HOME="$MOZ_DIST_BIN"
|
|
|
|
|
|
export MOZILLA_FIVE_HOME
|
|
|
|
|
|
-##
|
|
|
-## Select the propper plugin dir
|
|
|
-## Wrapped plug-ins are located in /lib/mozilla/plugins-wrapped
|
|
|
-##
|
|
|
-if [ -x "/usr/bin/mozilla-plugin-config" ]
|
|
|
-then
|
|
|
- MOZ_PLUGIN_DIR="plugins-wrapped"
|
|
|
-else
|
|
|
- MOZ_PLUGIN_DIR="plugins"
|
|
|
-fi
|
|
|
-
|
|
|
##
|
|
|
## Make sure that we set the plugin path
|
|
|
##
|
|
|
+MOZ_PLUGIN_DIR="plugins"
|
|
|
+
|
|
|
if [ "$MOZ_PLUGIN_PATH" ]
|
|
|
then
|
|
|
MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:$MOZ_LIB_DIR/mozilla/$MOZ_PLUGIN_DIR:$MOZ_DIST_BIN/$MOZ_PLUGIN_DIR
|
|
@@ -110,14 +100,6 @@ export MOZ_PLUGIN_PATH
|
|
|
##
|
|
|
export MOZ_APP_LAUNCHER="/usr/bin/firefox"
|
|
|
|
|
|
-##
|
|
|
-## If plugins are wrapped, check them
|
|
|
-##
|
|
|
-if [ -x "/usr/bin/mozilla-plugin-config" ]
|
|
|
-then
|
|
|
- /usr/bin/mozilla-plugin-config
|
|
|
-fi
|
|
|
-
|
|
|
##
|
|
|
## Set FONTCONFIG_PATH for Xft/fontconfig
|
|
|
##
|
|
@@ -175,12 +157,22 @@ export GNOME_DISABLE_CRASH_DIALOG
|
|
|
##
|
|
|
VINE_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.vine-langpack-install"
|
|
|
|
|
|
+# Since Firefox 60 the installation of individual langpack cannot be done by
|
|
|
+# copying xpi file to the home directory, because the langpack is loaded
|
|
|
+# as to the available languages after the language has been decided and
|
|
|
+# for the first run it won't be in language according to the locale.
|
|
|
+#
|
|
|
+# The current workaround is to put all langpacks to the location
|
|
|
+# for system wide extensions. So we set MOZ_DISABLE_LANGPACKS=1 for this moment
|
|
|
+export MOZ_DISABLE_LANGPACKS=1
|
|
|
# MOZ_DISABLE_LANGPACKS disables language packs completely
|
|
|
MOZILLA_DOWN=0
|
|
|
if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
|
|
|
- # Is firefox running?
|
|
|
- exec ps ax | grep $MOZ_PROGRAM | grep -v grep > /dev/null 2>&1
|
|
|
- MOZILLA_DOWN=$?
|
|
|
+ if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then
|
|
|
+ # Is firefox running?
|
|
|
+ /usr/bin/pidof firefox > /dev/null 2>&1
|
|
|
+ MOZILLA_DOWN=$?
|
|
|
+ fi
|
|
|
fi
|
|
|
|
|
|
# Modify language pack configuration only when firefox is not running
|
|
@@ -192,37 +184,44 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
|
|
|
if [ -f $VINE_LANGPACK_CONFIG ]; then
|
|
|
rm `cat $VINE_LANGPACK_CONFIG` > /dev/null 2>&1
|
|
|
rm $VINE_LANGPACK_CONFIG > /dev/null 2>&1
|
|
|
+ # remove all empty langpacks dirs while they block installation of langpacks
|
|
|
+ rmdir $MOZ_EXTENSIONS_PROFILE_DIR/langpack* > /dev/null 2>&1
|
|
|
fi
|
|
|
|
|
|
# Get locale from system
|
|
|
CURRENT_LOCALE=$LC_ALL
|
|
|
CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES}
|
|
|
CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG}
|
|
|
-
|
|
|
- # Try without a local variant first, then with a local variant
|
|
|
- # So that pt-BR doesn't try to use pt for example
|
|
|
+
|
|
|
+ # Try with a local variant first, then without a local variant
|
|
|
SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
|
|
|
MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
|
|
|
|
|
|
- MOZARGS=""
|
|
|
-
|
|
|
function create_langpack_link() {
|
|
|
local language=$*
|
|
|
local langpack=langpack-${language}@firefox.mozilla.org.xpi
|
|
|
if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then
|
|
|
rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
|
|
|
+ # If the target file is a symlink (the fallback langpack),
|
|
|
+ # install the original file instead of the fallback one
|
|
|
+ if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then
|
|
|
+ langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack`
|
|
|
+ fi
|
|
|
ln -s $MOZ_LANGPACKS_DIR/$langpack \
|
|
|
$MOZ_EXTENSIONS_PROFILE_DIR/$langpack
|
|
|
echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $VINE_LANGPACK_CONFIG
|
|
|
- MOZARGS="-UILocale $MOZLOCALE"
|
|
|
return 0
|
|
|
fi
|
|
|
return 1
|
|
|
}
|
|
|
|
|
|
- create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
|
|
|
+ create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true
|
|
|
fi
|
|
|
|
|
|
+# BEAST fix (rhbz#1005611)
|
|
|
+NSS_SSL_CBC_RANDOM_IV=${NSS_SSL_CBC_RANDOM_IV-1}
|
|
|
+export NSS_SSL_CBC_RANDOM_IV
|
|
|
+
|
|
|
# Prepare command line arguments
|
|
|
script_args=""
|
|
|
pass_arg_count=0
|