Multiple versions of Firefox packages on one Solaris system
By blogfinger on Dec 25, 2008
Up to now, in cases where I had to use multiple versions of Firefox on the same Solaris system, I installed the latest version as pkgadd, and the other versions as tar, for example in /usr/local. This is because the Solaris contributed builds always are published under the same name (which is probably OK for most users).
But it is also possible to install multiple versions of Firefox (3.0.5, 3.0.4, 126.96.36.199, and so forth) on the same system, after extracting and then changing each package before installation. Here's how it works:
- Expand the pkg.bz2 file to pkg, using bzip2 -dc.
- Create a temporary directory where the package content will be stored.
- Using the -s pkgadd option, spool (extract) the package into this directory.
- In the spool directory, rename the old Firefox directory to a new name (for example firefox to firefox-305).
- Change the pkginfo file to the new package name (e.g. MOZfirefox to MOZfirefox-305).
- Change the pkgmap file to match the new directoy name and the new size and checksum of the pkginfo file.
- Install the renamed package, using pkgadd -d . MOZfirefox-305, for example.
/tmp# ls -ald extr\* drwxr-xr-x 3 root root 188 2008-12-23 22:11 extracted-firefox-20081223-221103 drwxr-xr-x 3 root root 188 2008-12-23 22:15 extracted-firefox-20081223-221529 drwxr-xr-x 3 root root 190 2008-12-24 12:02 extracted-firefox-20081224-120152 /opt/sfw/lib# pkginfo | grep MOZ application MOZfirefox-20019 firefox 188.8.131.52 for Solaris 10 application MOZfirefox-304 firefox 3.0.4 for Solaris 11 application MOZfirefox-305 firefox 3.0.5 for Solaris 11 /opt/sfw/lib# ls -l drwxr-xr-x 13 root bin 46 2008-12-24 12:02 firefox-20019 drwxr-xr-x 13 root bin 47 2008-12-23 22:15 firefox-304 drwxr-xr-x 13 root bin 47 2008-12-23 22:15 firefox-305
I wrote a script which performs all these steps (except installation). I have tested it on various Solaris releases from Solaris 10 to OpenSolaris. So far, I have not seen any errors.
As always: No guarantee or similar. Please back up your files before using the script.