1820592 Members
1670 Online
109626 Solutions
New Discussion юеВ

How do I make a depot?

 
Jeff Thomas_1
Contributor

How do I make a depot?

Hi,

I have a .tar file that I want to make into a depot of files, so I can run swinstall.

Can anyone share how to do this?

Thanks
Thanks so much for helping a newbie!
7 REPLIES 7
Pedro Sousa
Honored Contributor

Re: How do I make a depot?

Hi.
swcopy -s @

for example:
swcopy -s /tmp/xxx @ /tmp/SW

swinstall -s /tmp/SW

good luck.
Rob Smith
Respected Contributor

Re: How do I make a depot?

Hi, Just use swinstall. Example:

swinstall -s /path to file.

You use swreg to register a depot.

If you have a bunch of patches that you want to register then:

# mkdir /tmp/patch_depot
# for i in PH*.depot
> do
> swcopy -s ${PWD}/$i \* @ /tmp/patch_depot
> done
#
Rob

Learn the rules so you can break them properly.
Steffi Jones_1
Esteemed Contributor

Re: How do I make a depot?

Hi Jeff,

the command you need to use for this operation is swpackage.
It has quiet a long manpage and I know that there are docs on the www.docs.hp.com webpage with examples too.

Steffi Jones
Vincenzo Restuccia
Honored Contributor

Re: How do I make a depot?

Hi again:
swcopy -s file.tar.depot file.tar @ /var/spool/sw
Mark Mitchell
Trusted Contributor

Re: How do I make a depot?

You can register a depot by useing
swreg -l depot /path
then follow the instructions here to combine
sotware in the depot

HP patch Depot
1. Obtain the set of patches you want to install in your depot.

For example:

[PHCO_7891/PACHRDME/English] , [PHCO_9348/PACHRDME/English] ,
[PHKL_9361/PACHRDME/English] , [PHSS_7726/PACHRDME/English] ,
[PHSS_8966/PACHRDME/English] , [PHSS_9400/PACHRDME/English] ,
[PHCO_8353/PACHRDME/English] , [PHKL_8376/PACHRDME/English] ,
[PHKL_9569/PACHRDME/English] , [PHSS_8667/PACHRDME/English] ,
[PHSS_9201/PACHRDME/English]

HP patches as delivered by the HP Response Center or by HP web sites are
shar format files consisting of a product depot and README file.

2. Unshar the patches:

# for i in PH*
do
sh $i
done

3. Combine all these separate depots into one depot. To do this, use the
swcopy command. First, create the directory to store the patches:

# mkdir /tmp/patches

4. Now take the patch depots and copy them into the target depot:

# for i in PH*depot
do
swcopy -s ${PWD}/$i \* @ /tmp/patches
done

5. Verify the contents of the depot:

# swlist -d @ /tmp/patches
Herve BRANGIER
Respected Contributor

Re: How do I make a depot?

Hi,

I think you want to make a depot with all
files on your .tar file. I know to solutions
to do that :

- untar your file in a directory, for example in /tmp/prepare_depot, write a PSF
file to describe your package and use swpackage

- write a PSF file with a postinstall file
which untar your .tar file.

I prefer the first solution for two resons :
1) you have not to write any postinstall,
postremove,... files
2) You can really simply change the content
of you package.

To create a depot (in a file named
test.depot for example) you need :

1) a PSF file to describe your product
2) the datas you want to put in your depot
3) use swpackage -s -d

After you can copy your depot on a depot
server. See swpackage manpage to see how to
create your depot directly on a depot server,
it's almost the same command line.

Now an example for your PSF file (PSF is
Product Specifications File if I well remember)

Here is a small example with some values you
can change :

Product
tag NameOfYourProduct
title Complete name of your new product
revision
architecture HP_UX_B.11.00_700/800
machine_type 9000/[78]??
os_name HPUX
os_release ?.11.*

fileset
tag Files1
title First part of all my files
revision 1.0
directory =
file_permissions -o -g -m
end
end


You can put several filesets in a product. You can put several directory tags in a fileset.

For example if you tar file content's is :
/config
/binaries/...

you can make a product with two filesets :

fileset
tag Config
...
...
directory /tmp/prepare_depot/etc=/etc
...
end
fileset
tag Binaries
...
...
directory /tmp/prepare_depot/bin=/usr/bin
...
end

For more information on how to make a depot,
to know all options of PSF, swXXX you can read
this documentation :
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90154/B2355-90154_top.html&con=/hpux/onlinedocs/B2355-90154/00/00/1-con.html&toc=/hpux/onlinedocs/B2355-90154/00/00/1-toc.html&searchterms=HP%7csoftware%7cwith%7cSD%7cmanaging&queryid=20010423-031648

Bye,

Herve