Installing LibreOffice

LibreOffice (a new branch of OpenOffice.Org) ships in a tar.gz format.  Included in this archive are many RPM files.  RPM files are useful for installing operating system content. But what if you desire simultaneous access to two versions of the same package, or install it on a network share? This is where RPM has no answer.

For example, let us start with a desire to share LibreOffice to all systems network-wide. To accomplish this, I have shared network space in /tools/. Here we’ll create a temporary working directory in /tools, and download the latest version of LibreOffice there:

$ cd /tools/
$ mkdir tmp
$ cd /tools/tmp
$ pwd
/tools/tmp
$ wget -nv http://download.documentfoundation.org/libreoffice/stable/3.3.0/rpm/x86_64/LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
2011-01-30 01:40:54 URL:http://ftp.osuosl.org/pub/tdf/libreoffice/stable/3.3.0/rpm/x86_64/LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz [172035289/172035289] -> "LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz" [1]
$ wget -nv http://download.documentfoundation.org/libreoffice/stable/3.3.0/rpm/x86_64/LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz
2011-01-30 01:42:28 URL:http://ftp.osuosl.org/pub/tdf/libreoffice/stable/3.3.0/rpm/x86_64/LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz [9181046/9181046] -> "LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz" [1]

The next step will be to extract the archives:

$ tar xf LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
$ tar xf LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz
$ ls
LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz
LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
LibO_3.3.0rc4_Linux_x86-64_helppack-rpm_en-US
LibO_3.3.0rc4_Linux_x86-64_install-rpm_en-US
$ cd LibO_3.3.0rc4_Linux_x86-64_install-rpm_en-US
$ ls
readmes  RPMS  update
$ cd RPMS
$ ls
libobasis3.3-base-3.3.0-6.x86_64.rpm
libobasis3.3-binfilter-3.3.0-6.x86_64.rpm
...

Here we have all of our RPMs. The next step is to convert them all to CPIO archives and extract them, which can be easily done:

$ for RPM in *rpm
> do
> rpm2cpio $RPM | cpio -id
> done
16908 blocks
56013 blocks
...

At this point the tool is now installed, and we just need to rearrange things a bit.

$ pwd
/tools/tmp/LibO_3.3.0rc4_Linux_x86-64_install-rpm_en-US/RPMS
$ ls
desktop-integration  opt
$ cd opt
$ ls
libreoffice
$ mv libreoffice /tools/libreoffice-3.3.0

Now, to add the helppack RPM.

$ cd /tmp/tools
$ ls
LibO_3.3.0_Linux_x86-64_helppack-rpm_en-US.tar.gz
LibO_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
LibO_3.3.0rc4_Linux_x86-64_helppack-rpm_en-US
LibO_3.3.0rc4_Linux_x86-64_install-rpm_en-US
$ cd LibO_3.3.0rc4_Linux_x86-64_helppack-rpm_en-US
$ find .
.
./RPMS
./RPMS/libobasis3.3-en-US-help-3.3.0-6.x86_64.rpm
$ cd RPMS
$ rpm2cpio libobasis3.3-en-US-help-3.3.0-6.x86_64.rpm | cpio -id
$ ls
libobasis3.3-en-US-help-3.3.0-6.x86_64.rpm  opt
$ cd opt
$ ls
libreoffice
$ cd libreoffice
$ ls
basis3.3
$ find .
.
./basis3.3
./basis3.3/help
./basis3.3/help/en
./basis3.3/help/en/smath.db
./basis3.3/help/en/smath.jar

So it looks like this is the directory overlay into the main distribution:

$ ls -al  /tools/libreoffice-3.3.0/basis3.3/help/
total 52
drwxr-xr-x 2 tools release  4096 Jan 30 02:05 .
drwxr-xr-x 6 tools release  4096 Jan 30 02:05 ..
-r--r--r-- 1 tools release  1180 Jan 30 02:05 idxcaption.xsl
-r--r--r-- 1 tools release  2565 Jan 30 02:05 idxcontent.xsl
-r--r--r-- 1 tools release 34774 Jan 30 02:05 main_transform.xsl
$ pwd
$ ls -al basis3.3/help/*xsl
ls: cannot access basis3.3/help/*xsl: No such file or directory

Overlaying the helppack over the top of the install will not overwrite anything (specifically the .xsl files listed from the install). To do the overlay:

$ rsync -a basis3.3 /tools/libreoffice-3.3.0/

Now, clean up our tmp working area:

$ cd /tools
$ rm -fr tmp

Adding the tool to my PATH and invoking is the last thing needed:

$ cd
$ export PATH=/tools/libreoffice-3.3.0/program:$PATH
$ soffice &

And voila!

Comments are closed.