Operating System - HP-UX
1834533 Members
2744 Online
110069 Solutions
New Discussion

Re: How to swpackage a tar file to be installed with SD?

 
Domenico_1
Occasional Advisor

How to swpackage a tar file to be installed with SD?

Hi there,

I have a product delivered in tar format and would like to make it available in SD format. Would like to get some hints on how to proceed to be able to install it via swinstall.
The tar file is not swpackaged.
Many thanks.
4 REPLIES 4
Dietmar Konermann
Honored Contributor

Re: How to swpackage a tar file to be installed with SD?

Hi!

You need to create a PSF (product specification file) for swpackage. Have a look at man swpackage(4)... in section 4 is even an example.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Bill McNAMARA_1
Honored Contributor

Re: How to swpackage a tar file to be installed with SD?

attached is an example of a swpackage command line and the psf file for a simple product with only a few files in the depot.
If your tar includes hundreds of files you may be better off just creating a postinstall script that untars the tar.

Later,
Bill
It works for me (tm)
Stanimir
Trusted Contributor

Re: How to swpackage a tar file to be installed with SD?

Hi,
You can do the following:
1.Create the dir for new product and all subdirs, related to your new product:
/opt/newproduct
/opt/newproduct/bin
/opt/newproduct/doc
....

2.Create file newproduct.psf in /opt/newproduct
with description of your productand it's dirs and files. Tou can use a template to do this.
3.Remove from /opt/catalog old INDEX and from /opt/catalog/dfiles : INDEX,INFO
4. Use:
#/opt/newproduct > swpackage -s -v ./newproduct.psf @ ./opt
5.Use:
#tar -cvf ./newproduct.tar catalog/INDEX catalog/dfiles/INDEX catalog/dfiles/INFO
catalog/newproduct newproduct
6.Use:
#gzip ./newproduct.tar

So you will have:
newproduct.tar.gz

Regards, Stan
Domenico_1
Occasional Advisor

Re: How to swpackage a tar file to be installed with SD?

Thanks to you all,
I would like rather to go for the Bill's proposition as I have around 1 hundred files to package.
Bill,
do you have an example on how to proceed to swpackage the tar file (or the newproduct.tar.gz file) and and example of a postinstall script.

Many thanks,

Domenico.