SCIENTIFIC-LINUX-USERS Archives

August 2010

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Thu, 5 Aug 2010 01:20:42 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (101 lines)
I was avoiding replying in case what we do confuses things even more, but 
just in case anyone is interested...

Since for each OOo release we want to install it and make it available for 
user testing before we make it the default we cheat and install each into 
a tree with it's own rpm database...

Please don't read this unless you have a fairly strong constitution, and 
don't mind risking your sanity :-)



So our hack openoffice procedure goes like (roughly and my mailer may 
break some of the longer lines):

INSTU=[user running this script]
VER=3.2.1
SVER=$(echo $VER | sed 's/\.//g')
SMVER=$(echo $VER | sed 's/\.[0-9]*$//')
SMMVER=$(echo $VER | sed 's/\.[0-9]*\.[0-9]*$//')
# while testing!
#OORCV=rc4
OORCV=
# OORCV='' once release version!

...
OODIR=/opt/openoffice-$SVER
...
[ arrange for /opt/openoffice-$SVER to exist and be owned by $INSTU ]
...
OOH=[path to where we keep some OOo scripts etc]

OOU=/tmp/$INSTU/OO-unpack-$VER-$OORCV-$LOGNAME
if [ -d $OOU ]; then
   cd / && /bin/rm -rf $OOU
fi

mkdir -p $OOU
cd $OOU

# Name of the supplied tgz file that we will be using...
TGZ=OOo_${VER}_Linux_x86_install-rpm_en-US.tar.gz
...
tar -zvxpf $OOH/NOBACKUP/$TGZ
...

# make up a fake rpm tree to install into
$OOH/rpmfake -dir $OODIR/rpmfake -top $OODIR

# now use that to install the set of rpms
$OODIR/rpmfake/bin/rpm -initdb

# it wants to install into /opt/openoffice.org$SMVER and also
# /opt/openoffice.org, the pointless /. of the end of $OODIR is just
# to stop rpm from complaining about /opt not being writable...
#
$OODIR/rpmfake/bin/rpm -Uvh OO*/RPMS/*.rpm --nodeps --relocate /opt/openoffice.org$SMMVER=$OODIR/. --relocate /opt/openoffice.org=$OODIR/.

# Now do the normal sets of 'tweaks' to set things up for use in DAMTP...
cd $OODIR/program/
...
# Copy over the hack locale fixup script
rsync -rtplv  $OOH/fixuserlocale.pl .

# install our (now somewhat trivial) wrapper
sed "s:__OOHOME__:$OODIR:g;s:__OOVER__:$VER:g;s:__OOSVER__:$SVER:g;s:__OORCV__:$OORCV:g" < $OOH/openoffice.wrap > openoffice
chmod 755 openoffice

[ apply some local patches to configs ]
...

# Fix symlink to basis3.x
cd ..
rm -f basis-link
ln -s basis3.2 basis-link

...


the only _important_ bits in there are to set up the 'rpmfake' bits, use 
that wrapper rpm with the required --relocate options and fix up the 
basis-link - the rest is just stuff we do to fix up the default OOo 
locales and install a few extensions etc etc...

BTW we arrange for /opt/openoffice-$SVER to be mounted on all sl boxes so 
we only need to do this once per version of OOo, but we could do it 
locally on every box if we really wanted to.

I'm sorry for any upset that looking at this evil hack may cause.

  -- Jon

-- 
/--------------------------------------------------------------------\
| "Computers are different from telephones.  Computers do not ring." |
|       -- A. Tanenbaum, "Computer Networks", p. 32                  |
---------------------------------------------------------------------|
| Jon Peatfield, _Computer_ Officer, DAMTP,  University of Cambridge |
| Mail:  [log in to unmask]     Web:  http://www.damtp.cam.ac.uk/ |
\--------------------------------------------------------------------/

ATOM RSS1 RSS2