[OpenIndiana-discuss] Firefox 10
cpforum
cpforum at orange.fr
Wed Feb 1 19:07:17 UTC 2012
Extended release support / thunderbird and Firefox 10 are now available here :
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/
Here is my contrib to openindiana distro. Just a script for easy updating from mozilla (with pkgadd)
==== Example of update
$ pfexec upfirefox
Updating Firefox to latest release 10.0
Downloading Firefox firefox-10.0.en-US.opensolaris-i386-pkg.bz2 ...
firefox-10.0.en-US.opensolaris-i386-pkg.bz2 computed MD5 match reference
The following package is currently installed:
SFWfirefox Mozilla Firefox Web browser
(i386) 9.0.1,REV=110.0.4.2011.12.22.22.12
Do you want to remove this package? [y,n,?,q]
...
Removal of was successful.
The following packages are available:
1 SFWfirefox Mozilla Firefox Web browser
(i386) 10.0,REV=110.0.4.2012.01.30.10.14
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 1
...
/opt/sfw/share/applications/firefox.desktop
/opt/sfw/share/pixmaps/firefox-icon.png
[ verifying class ]
Installation of was successful.
Firefox successuly installed
Now from firefox update locale by loading /tmp/fr.xpi
Here is the script (I don't know if attachements are accepted,may be they are ?)
==== CUT HERE
#!/bin/ksh
#
# Download and Update Firefox
#
# Christian Pelissier
# 7/11/2009 1.0
# 9/11/2009 1.1
export PATH=/usr/sbin:/usr/bin:/usr/sfw/bin
# Base URL
#STABLE=latest-9.0
STABLE=latest
UNIX="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$STABLE"
# Solaris Package
FFOX="$UNIX/contrib/solaris_pkgadd/"
# Get first 2 letters of current locale
#LC=${LC_MESSAGES%_*}.xpi
LC=${LANG%_*}.xpi
# Get Linux locale extension
FXPI="$UNIX/linux-i686/xpi/$LC"
# Debug 1 to debug
DEBUG=0
# Get OS release
OSR="$(uname -r)"
case $OSR in
5.10)
ID="solaris-10-fcs"
;;
5.11)
ID="opensolaris"
;;
esac
# Get i386 or Sparc
ARCH="$(uname -p)"
cd /tmp
# Get Firefox Current Release index.html
if ! wget -q $FFOX
then
print "Can't load index.html"
exit 1
fi
MD5F=$( grep "firefox-.*$ID-$ARCH-pkg.bz2.md5sum" index.html | sed -e 's/.* href="//' -e 's/">.*//' )
rm index.html
FFR=$(print $MD5F | sed -e 's/firefox-//' -e 's/.en-US.*//')
if [[ -x /opt/sfw/bin/firefox ]]
then
# Mozilla Firefox X.Y.Z, Copyright (c) 1998 - 2009 mozilla.org
if /opt/sfw/bin/firefox -v | grep "Firefox $FFR" > /dev/null
then
print "Last Firefox $FFR release already installed"
exit
fi
fi
print "Updating Firefox to latest release $FFR"
PKGF="${MD5F%.md5sum}"
if [[ "$DEBUG" == "1" ]]
then
print "OSRelease=$OSR"
print "ARCH=$ARCH"
print "Firefox Release=$FFR"
print "MD5 Firefox Package File=$MD5F"
print "Firefox Package File=$PKGF"
print "Firefox base URL=$FFOX"
print "Firefox locale XPI=$FXPI"
exit
fi
# Get Package
rm -f /tmp/$PKGF
print "Downloading Firefox $PKGF ..."
if ! wget -q $FFOX/$PKGF
then
print "Can't load $FFOX/$PKGF"
exit 1
fi
md5c="$(digest -a md5 $PKGF)"
# Get MD5
if ! wget -q $FFOX/$MD5F
then
print "Can't load $FFOX/$MD5F"
exit 1
fi
# Compare MD5
cat $MD5F | read md5r pkg
if [[ "$md5c" != "$md5r" ]]
then
print "$PKGF computed MD5 is corrupted : update failure."
exit
else
print "$PKGF computed MD5 match reference"
rm $MD5F
fi
# Get .xpi localisation extension
if ! wget -q $FXPI
then
print "Can't load locale $FXPI"
fi
# Install
if cp /dev/null /firefox
then
rm /firefox
else
print "Install needs privileges. Please su - root and install from /tmp"
exit
fi
if bunzip2 $PKGF
then
pkgrm SFWfirefox
if pkgadd -d ${PKGF%.bz2}
then
rm ${PKGF%.bz2}
print "Firefox successuly installed"
print "Now from firefox update locale by loading /tmp/$LC"
else
print "Firefox installation failure"
fi
else
print "bunzip2 failure"
fi
More information about the OpenIndiana-discuss
mailing list