Bug 105623 - OpenOffice wrapper script (/usr/bin/ooffice) contains errors
OpenOffice wrapper script (/usr/bin/ooffice) contains errors
Product: Red Hat Linux
Classification: Retired
Component: openoffice.org (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-09-25 23:01 EDT by Dale R. Worley
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-04 22:14:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dale R. Worley 2003-09-25 23:01:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716

Description of problem:
The OpenOffice start-up wrapper script (/usr/bin/ooffice) contains various errors.

1. Upon startup, ooffice seems to look for information regarding version
$OOVERSION of OpenOffice in $HOME/.sversionrc.  However, the script sets
$OOVERSION to be "641", whereas whatever part of OpenOffice adds the entry to
.sversionrc seems to use version number "1.0.1", as can be seen by the contents
of my .sversionrc:

    OpenOffice.org 1.0.1=file:///home/worley/.openoffice

The result of this is that the test at line 14 of ooffice will always be false
(since $oohome will always be empty).  I do not know the significance of this,
but it is probably not what you want.

2. In several places, uses of "." in regular expressions are not quoted when
they refer to literal periods and not to "any single character":

Line 13: perl -n -e "m|^OpenOffice.org ${OOVERSION}=file://(.*)$| and print \$1")

The "." in "OpenOffice.org" should be escaped with \\.  (Perl needs to see "\"
before ".", but since it is in a shell double-quote string, "\" is represented
by "\\".)  The use of ${OOVERSION} needs to be protected with the Perl \Q-\E
mechanism which operates in patterns as it does in double-quoted strings.  I
think this is what is needed:

    perl -n -e "m|^OpenOffice\\.org \\Q${OOVERSION}\\E=file://(.*)$| and print \$1")

Lines 26, 28-43:

Multiple occurrences of grep/sed patterns containing "." that should be
represented as "\." (since they appear in single-quoted strings).

Version-Release number of selected component (if applicable):
1.0.1 (appears to have internal version number 641)

How reproducible:

Steps to Reproduce:
1. Read /usr/bin/ooffice.

Additional info:
Comment 1 Dale R. Worley 2003-09-26 14:52:44 EDT
In the version of /usr/bin/ooffice in openoffice-1.0.2-4.i386.rpm from RH 9, the
value of $OOVERSION is what it (probably) should be, "1.0.2".  So it looks like
item 1. has been fixed in RH 9.

Note You need to log in before you can comment on or make changes to this bug.