Operating System - HP-UX
1833178 Members
2870 Online
110051 Solutions
New Discussion

swinstall change location / install another directory

 
SOLVED
Go to solution
Joël Techer
Advisor

swinstall change location / install another directory

hi,

I want to install by command line a product in an other directory.

1)So i don't understand the difference between two commands

swinstall -s /tmp/soft.depot soft,l=/my_rep
and
swinstall -s /tmp/soft.depot @ /my_rep

swinstall' man page is a little bit confusiong about the difference.

2) see attached file a zip.depot product and try to install it into another directory (by command line) , unfortunatlly, i can't.

do i have to apply swconfig command for postconfigure scripts

Regards

Jean-Louis





6 REPLIES 6
Srimalik
Valued Contributor

Re: swinstall change location / install another directory

-l option is to simply relocate a product to another location other than the default "/". This option effect only the SW_LOCATION variable.

while @ specifies the system root dir in which the SW seesion is executing and default is /.

@ effects both SW_LOCATION and SW_ROOT_DIRECTORY

-l effects only SW_LOCATION

http://docs.hp.com/en/B2355-90754/ch11s04.html


Thanks
Sri
abandon all hope, ye who enter here..
Robert-Jan Goossens
Honored Contributor

Re: swinstall change location / install another directory

Jean-louis,

An other option is to untar the depot file in a temp directory, search for the configuration files, change the location to the desired install directory with vi and tar it up again.

# mkdir /tmp/rjg
# mv 294652.depot /tmp/rjg
# cd /tmp/rjg;tar xvf 294652.depot
# find . -type f | xargs /usr/local
change the install location with vi
/catalog/INDEX
directory /usr/local
/catalog/zip/pfiles/INDEX
directory /usr/local
/catalog/zip/zip-RUN/INFO
path /usr/local/bin/zip
etc
# rm 294652.depot
# tar cvf 294652.depot catalog zip
# swinstall .....

Regards,
Robert-Jan
Joël Techer
Advisor

Re: swinstall change location / install another directory

hi,
What do your following sentense do?

find . -type f | xargs /usr/local

I followed your action plan
tar -untar file depot , modify each file
but i've an error

The file "/tmp/jlp/toto/bin/zip" was not loaded because it is
missing from the source media

Robert-Jan Goossens
Honored Contributor

Re: swinstall change location / install another directory

Jean-Louis,

The find command is just for exploring the files which include /usr/local

/catalog/INDEX
directory /usr/local
/catalog/zip/pfiles/INDEX
directory /usr/local

Just did a test on a spare system, only changed the two INDEX files (/usr/local/ to /opt/usr/) and the swlist command did not give an error.
Joël Techer
Advisor

Re: swinstall change location / install another directory

hi,
i think you 've probably done a mistake for the "find" command :
find -type f | xargs /usr/local => "grep"

after change the values i redo the swlist command => oK

#swlist -l file -s /tmp/jlp/zip-2.31-hppa-11.11.depot
# Initializing...
# Contacting target "BS300072"...
#
# Target: TEST:/tmp/jlp/zip-2.31-hppa-11.11.depot
#

# zip 2.31 zip
# zip.zip-RUN
/tmp/jlp/doc/zip/HPUX.Install
/tmp/jlp/toto/bin/zip
/tmp/jlp/toto/bin/zipcloak
/tmp/jlp/toto/bin/zipnote
/tmp/jlp/toto/bin/zipsplit
/tmp/jlp/toto/doc/zip/BUGS
/tmp/jlp/toto/doc/zip/CHANGES
/tmp/jlp/toto/doc/zip/INSTALL
/tmp/jlp/toto/doc/zip/LICENSE
/tmp/jlp/toto/doc/zip/README
/tmp/jlp/toto/doc/zip/TODO
/tmp/jlp/toto/man/man1/zip.1

swinstall -s /tmp/jlp/zip-2.31-hppa-11.11.depot zip

Beginning Analysis and Execution
* Session selections have been saved in the file
"/.sw/sessions/swinstall.last".
* The analysis phase succeeded for "BS300072:/".
ERROR: "BS300072:/": 24 files had errors during this operation.
ERROR: "BS300072:/": 1 filesets had errors.

swjob command
--------------

* Installing fileset "zip.zip-RUN,r=2.31" (1 of 1).
ERROR: The file "/tmp/jlp/doc/zip/HPUX.Install" was not loaded
because it is missing from the source media.
ERROR: The file "/tmp/jlp/toto/bin/zip" was not loaded because it is
missing from the source media.
ERROR: The file "/tmp/jlp/toto/bin/zipcloak" was not loaded because
it is missing from the source media.
d reports:

Perhaps something about checksum file when i had modified the catalog INDEX INFO files

I will test that tomorrow
Regards
Jean-Louis
Dennis Handly
Acclaimed Contributor
Solution

Re: swinstall change location / install another directory

>1)So i don't understand the difference between
>swinstall -s /tmp/soft.depot soft,l=/my_rep

Your attached depot doesn't allow this:
$ swlist -a is_locatable -l fileset -s $PWD/294652.depot
# zip false
zip.zip-RUN

>Robert-Jan: An other option is to untar the depot file in a temp directory, search for the configuration files, change the location to the desired install directory with vi

This of course is not supported. :-)

># tar cvf 294652.depot catalog zip

You can't do this. You must use swpackage to make a tape depot. So swcopy, edit, swpackage.

>Robert-Jan: The find command is just for exploring the files which include /usr/local
>i think you 've probably done a mistake for the "find" command:

Exactly, RJ forgot a grep:
find . -type f -exec grep /usr/local +

>Perhaps something about checksum file when i had modified the catalog INDEX INFO files

I first thought that some years ago and cleverly adjusted the size and timestamp but I don't think there is any checking for that. In fact one INDEX file has itself but with the wrong size.

I think the problem is that a depot is a very special tar file and you must use swpackage to make it. See my reply here:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1155691

# swpackage -x media_type=tape -s $PWD/esm-ice-scripts-1.9.d @ \
$PWD/esm-ice-scripts-1.9.depot