Wednesday, May 10, 2017

OpenOffice install

This post is intended as a memorial or historical mention of how good Solaris is as a desktop for general applications as well as it is a superb multipurpose back-end operating system for many kinds of IT infra-structure. Once more, please, note that I intend no Copyrights infringements or any other mis-purposed suggestions. On the contrary, I would recommend going for Solaris and perhaps attempting to build updated applications with the current tools and, of course, abiding to any associated policies and requirements, for instance, the ASF policy.

Following the above disclaimer, I would like to present a mainstream desktop application that once also run very well in a Solaris desktop system, OpenOffice. Nowadays, the current (at the time of this writing) 4.1.3 version isn't available as a pre-built Solaris package or so, but it may be possible to build from the source code that do is publicly available together with some developer's support basic documentation such as:

And some "archived" info that may still be useful: 

As to how to install it I'll show a sample installation of version 3.3.0 built by Oracle that still runs on Solaris 11.3, except to known / published Java 1.6 security issues to which there are no workarounds except to use the system disconnected from the Internet:

  


NOTE
Although marked as obsolete, the application features have always been far more than the average user would ever need, specially with the handy Unix goodies such as simple "print as PDF" and so on. Such goodies took more than a decade to decently appear on other more popular platforms...

In my case I will demonstrate the installation of the en-US version together with the addition of 1 (one) extension for the Brazilian-Portuguese Spelling Dictionary. This amounts to an "almost" (due to old Java issues) fully functional Office Suite for a partial multi-language scneario. The (quite small in relation to the final power) distribution files once were:
 
  • OOo_3.3.0_Solaris_x86_install-wJRE_en-US.tar.gz
    29c91b7a123f207ee636c909c563661c (~189 Mb)
     
  • OOo_3.3.0_Solaris_x86_langpack_pt-BR.tar.gz
    e338dfb3149d19b085328c2c47552e31 (~ 13 Mb)

Although the distribution includes a JRE at first I don't use it in this demonstration because it's obsolete and has security issues as you most probably know very well. Furthermore, I was curious to see how it would behave with the more current Java installation found in Solaris 11.3 (GA / Release) which is:
 
$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)


So I extracted the two aforementioned filesets each to a distinct subdirectory of /tmp, to know more about their contents:

$ mkdir -p /tmp/OO
$ cd /tmp/OO

$ tar xzf /.../OOo_3.3.0_Solaris_x86_install-wJRE_en-US.tar.gz
$ tar xzf /.../OOo_3.3.0_Solaris_x86_langpack_pt-BR.tar.gz

$ ll * 
OOO330_m20_native_packed-1_en-US.9567:
total 920
-rwxr-xr-x   1 ... update
drwxr-xr-x   2 ... readmes
drwxr-xr-x   2 ... licenses
-rwxr-xr-x   1 ... setup
-rw-r--r--   1 ... JavaSetup.jar
drwxr-xr-x  53 ... packages
drwxr-xr-x   5 ... installdata

OOO330_m20_native_packed-1_pt-BR.9567:
total 8
drwxr-xr-x  14 ... packages


I tried to install it as root, by adjusting X11 access under a SU. But it didn't succeed at first with a message complaining that no adequate Java support was available. And that was right as I got to know by inspecting the installation script and finding out the supported versions were 1.4, 1.5 and 1.6. Nevertheless, I edited the script (setup) and added my version, 1.8 and fortunately that let the script happy enough to go on.

#!/bin/sh

jarfilename="JavaSetup.jar"
tempdir=/var/tmp/install_$$
java_runtime="java"
java_runtime_set="no"
java_runtime_found="no"
java_runtime_sufficient="no"
java_versions_supported="1.4 1.5 1.6 1.8"
rpm2cpio_found="no"
rpm_found="no"
sunjavahotspot="HotSpot"
errortext=""
errorcode=""


...

Of course this ought to have some consequences.
The first one came right after launching setup:

# ./setup


I clicked OK and then:

 

I could only click Next:


Of course the Typical shouldn't work well due to the obsolescence.
So I chose Custom and clicked Next:



Having chosen what make more sense to me, I clicked Next:



As everything seemed fine, I clicked Install Now:


And after a while:


I finally clicked Finish.

As having a pending issue around Java, the first thing I did next was to launch the "basic hosting" of the suite and try to make sure (under Tools | Options) it shouldn't expect much of any Java installation (but not before passing through the 1st time registration dialog and one more Java warning message as previously shown...).




# which openoffice.org3
/usr/bin/openoffice.org3


# openoffice.org3



And that completed my installation.
The desktop integration was cool:


By the way, regarding Printer Administration I chose:





Finally, the last step was to install the additional extension for a convenience dictionary to one of my languages. At first I had no idea how to install it but browsing the fileset directory I saw:

# cd /tmp/OO/OOO330_m20_native_packed-1_pt-BR.9567
# ll packages/openofficeorg3-dict-pt/
 total 40
-rw-r--r--   1 ... pkginfo
drwxr-xr-x   3 ... reloc
-rw-r--r--   1 ... pkgmap
drwxr-xr-x   2 ... install
drwxr-xr-x   2 ... archive

 
This reminded me of another study I posted long ago: SVr4 relocatable package. More specifically, the output of pkgmk(1) before being streamed via pkgtrans(1). So I attempted to treat it as a non-streamed SVr4 package and it worked!

# pkgadd -d ./packages/

The following packages are available:
  1  ooobasis33-pt-BR            Language module ...  

  2  ooobasis33-pt-BR-base       Base language module ....
  3  ooobasis33-pt-BR-binfilter  Legacy filters ...
  4  ooobasis33-pt-BR-calc       Calc language module ...
  5  ooobasis33-pt-BR-draw       Draw language module ...
  6  ooobasis33-pt-BR-help       Language help module ...
  7  ooobasis33-pt-BR-impress    Impress language module ...  

  8  ooobasis33-pt-BR-math       Math language module ...
  9  ooobasis33-pt-BR-res        Language resource module ...

 10  ooobasis33-pt-BR-writer     Writer language module ...
 

... 2 more menu choices to follow;
<RETURN> for more choices, <CTRL-D> to stop display:

 11  openofficeorg3-dict-pt      Pt dictionary ...
 12  openofficeorg3-pt-BR        Brand language module ...

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
11


Processing ... <openofficeorg3-dict-pt> from </tmp/...>

Pt dictionary for OpenOffice.org 3.3(i386) 3.3.0,REV=...
Copyright 2000, 2010 Oracle and/or its affiliates. 

All rights reserved.
Use is subject to license terms.

This product is made available subject to the terms of GNU Lesser General Public License Version 3. A copy of the LGPL license can be found at http://www.openoffice.org/license.html

------------------------------------
Third Party Code. Additional copyright notices and license terms applicable to portions of the Software are set forth in the THIRDPARTYLICENSEREADME.html file.

------------------------------------
All trademarks and registered trademarks mentioned herein are the property of their respective owners. 

------------------------------------
Copyright (c) 2000,2010 Oracle and/or it affiliates. 

All rights reserved.

This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html.

------------------------------------

           GNU LESSER GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

...


Using </> as the package base directory.
## Processing package information.
## Processing system information.
   3 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

... contains scripts which will be executed with super-user
permission during the process of installing this package.

... continue with the installation ... [y,n,?]
y

Installing Pt dictionary for OpenOffice.org 3.3 ...

## Installing part 1 of 1.
10261 blocks
## Executing postinstall script.

Installation of <openofficeorg3-dict-pt> was successful.

 
Finally!



But that's not yet the whole story...
There pending issue around Java will seriously impair many functions.
So I decided to install Java 1.6 and use it disconnected from the Internet.
To find the missing piece of software I went to Oracle Java Archive.
I acknowledged the warnings and disclaimers and proceeded to Java 6 SE:
 

In my case I downloaded to /downloads/java:
  • jre-6u45-solaris-i586.sh
  • jre-6u45-solaris-x64.sh

The "special-purpose installation" was quite simple:

# cd /opt
# bash /downloads/java/jre-6u45-solaris-i586.sh

Finally, I "activated it" in OpenOffice by going to Tools | Options, clicking on the Add... button and by navigating to and selecting /opt/jre1.6.0_45:


NOTE
I perhaps should have considered a better location to install the Java 6 Update 45 package. According to part of another post, Updating Java ad hoc, I probably should have expanded it to /usr/jdk/instances/ and have created a symbolic link on the parent directory and have used this last symbolic link on the above dialog.
NOTE
I know that Java 8 didn't work, but I'm not sure if there's anything to do with bitness (Java 8 is always 64-bits). I haven't tested a 32-bits Java 7 Update 80 instead of Java 6 Update 45 on the above dialog, but if it works, then there could be a chance of using an up-to-date 32-bits manually built OpenJDK alternative; that would be cool.