1834149 Members
2155 Online
110064 Solutions
New Discussion

Re: Create depot

 
Marcelo De Florio_1
Frequent Advisor

Create depot

How can i create a depot file for install software ?

MDF
Marcelo De Florio
11 REPLIES 11
Alex Glennie
Honored Contributor

Re: Create depot

Take a look at this thread point to the other threads or use the search facility top left ...this has been covered a few times now


http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0xb9ec660142b2d5118ff10090279cd0f9,00.html
Vincent Farrugia
Honored Contributor

Re: Create depot

First you have to create a patch depot directory:

mkdir /depot/patches

Then, copy each p[atch into the depot:

swcopy -s /PHxx_yyy1.depot PHxxx_yyy1 @ /depot/patches
swcopy -s /PHxx_yyy2.depot PHxxx_yyy2 @ /depot/patches
....

you can then register the depot using:

swreg -l depot /depot/patches

but it is registered automatically by swcopy by default, so you don't usually need to.

HTH,
Vince
Tape Drives RULE!!!
Sanjay_6
Honored Contributor

Re: Create depot

Hi Marcelo,

Refer to the link below for more info. The HP Manual in the thread below would be a big help to you.

http://docs.hp.com/hpux/onlinedocs/B2355-90127/B2355-90127.html

http://docs.hp.com/hpux/onlinedocs/B2355-90740/B2355-90740.html

Hoep this helps.

Regds
Deshpande Prashant
Honored Contributor

Re: Create depot

HI
To copy different patches downloaded at dir /tmp/patches can be copied in to a depot at /PATCHES using following command.

for i in `ls /tmp/patches/*.depot`
{
swcopy -x enforce_dependencies=false -s $(i) \* @/PATCHES
}
swreg -l depot /PATCHES

Thanks.
Prashant.
Take it as it comes.
Marcelo De Florio_1
Frequent Advisor

Re: Create depot

I haven't copy software, I need generate a depot file.

MDF
Marcelo De Florio
Vincent Farrugia
Honored Contributor

Re: Create depot

Hello,

The steps that we gave you creates a depot file of patches requested in the swcopy.

swcopy is the command to compile the depot.

Vince
Tape Drives RULE!!!
Robin Wakefield
Honored Contributor

Re: Create depot

Hi Marcelo,

If you have your required patches in a depot, create a depot file using:

swpackage -s depot_name -x target_type=tape @ target_filename

For example,

depot_name directory = /source/builds/Jun01_LVM_patches

target_filename = /source/builds/Jun01_LVM_patches.depot

Rgds, Robin.
Marcelo De Florio_1
Frequent Advisor

Re: Create depot

I need a create depot with JAD software, so I execute swpackage -s /desa_produccion/fuentes/opt_bin/jad @ /tmp/soft/depot/jad.depot, the output is
NOTE: Adding unrecognized keyword "H@?? at line 2841.
NOTE: Adding unrecognized keyword "
B@:H" at line 2843.
NOTE: Adding unrecognized keyword "" at line 2844.
NOTE: Adding unrecognized keyword "
" at line 2846.
WARNING: No value defined for the keyword "H@p4\", at line 2847.
WARNING: Exiting due to keyboard interrupt.

Any ideas


Marcelo De Florio
Vincent Farrugia
Honored Contributor

Re: Create depot

Hello,

Man swpackage states that the filename after the -s switch is used to:

"describe the product, subproduct, fileset, and file definitions used to build a software product from a set of source files. The source can also be an existing directory depot (which already contains products).

The file should be a product specification file. I guess you gave it a file which is not a PSF and therefore is giving out all sorts of errors.

HTH,
Vince
Tape Drives RULE!!!
Kevin O'Donovan
Regular Advisor

Re: Create depot

Hi,

to create a depot, you need to create a package specification file (.psf) to define what goes into the depot. This includes prerequisites (software that needs to be installed before your depot is installed), where software to put into the depot is found, where to put that software on the destination install machine, file ownerships and permission settings, etc.

I'm sure theres some good docs somewhere you could get your hands on, or man pages that will give you the full lowdown on this, but here's a sample of what you can put into it:

#
# Vendor Definition
#
vendor
tag companytag
title Mycompany Ltd.
description The company that does stuff
end
#
# Product Definition
#
product

tag namethatappearsinswinstall
title Mycompany's cool software
revision 2.3
description <./description
copyright <./copyright
architecture S700/S800_HPUX_11.0
machine_type 9000/[78]*
os_name HP-UX
os_release ?.11.*
os_version [A-Z]
directory /

#
# Fileset Definitions
#

fileset
#dependencies
tag fileset1
title MCS Product Fileset
revision 2.3
prerequisites othersw,r=1.0
corequisites othersw,r=1.0
directory ./ = /home/mcsuser
configure mcsconfigure.ksh
preremove mcspreremove.ksh

directory ./ = /opt/mcs/bin
file -m 0755 -o mcsuser -g bin mcsbin1
file -m 0755 -o mcsuser -g bin mcsbin2

end
# End of PSF

To be honest I haven't gone to the trouble of working out whether all of this stuff is completely necessary, but it works so...

One or two notes, the configure part is a script that is run to do the configuring part of the swinstall process, after the files are put in place. The preremove is the script that is run by swremove before the files are deleted on the system, to do various cleaning up things, like delete databases that your product created, or whatever else needs to be done to clean up a system. I don't think these are mandatory, but can be useful. You can also have preinstall, postinstall, and a couple like that I think, but again check out the docs to get those.

You can repeat the directory/file part as often as you like for whatever files/directories your software needs files in. The ./ = /opt/mcs/bin means that it'll get the software from the current directory (pwd of shell that swinstall is run from), and when installing it, it'll put it into /opt/mcs/bin. Swinstall will create these directories so theres no need to have a preinstall script to create these. Change these to whatever suits.

Hope that helps?

regards,
Kevin.
Bill McNAMARA_1
Honored Contributor

Re: Create depot

# lsf /var/tmp/patches PHCO_17891 PHCO_19348 PHKL_19361 PHSS_17726 PHSS_18966 PHSS_19400 PHCO_18353 PHKL_18376 PHKL_19569 PHSS_18667

# cd /var/tmp/patches# for i in PH*
do
sh $i
done


# for i in PH*.depot do
swcopy -s ${PWD}/$i \* @ /var/opt/ignite/PATCHES

done

This will make a single installable bundle
You'll need http://www.hp.com/products/IUX/

# make_bundles -B -n Nov2001 -t "HP-UX 11.00 Nov 2001 Patches" \ /var/opt/ignite/PATCHES
It works for me (tm)