Operating System - HP-UX
1820592 Members
2280 Online
109626 Solutions
New Discussion юеВ

create a depot from patches using swcopy

 
ancel
Occasional Contributor

create a depot from patches using swcopy

I am trying to create a depot from many patches in HPUX 11.11, i'm using swcopy -s to create the depot, using a script to make it with every patch, but i want to know if there is any way to avoid the gui (sam interface) to make the process of creating faster, because it`s very noising when you have many patches . Thanks in advance. Mail me to javier@ancel.org
javivivi
7 REPLIES 7
Tom Geudens
Honored Contributor

Re: create a depot from patches using swcopy

Hi,
Example :
root/sv00220#swcopy -vv -s /var/adm/crash/patch/PHKL_18543.depot \*
@ /var/adm/crash/patch/oracle806

root/sv00220#swcopy -vv -s /var/adm/crash/patch/PHKL_22840.depot \*
@ /var/adm/crash/patch/oracle806

... and so on ...

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Mateja Bezjak
Respected Contributor

Re: create a depot from patches using swcopy

Hi,

You can use command line:
swcopy -s path patch_name @ target

or
swcopy -s /tmp/PHCO_22526.depot PHCO_22526 @ /tmp/patches

More info about using swcopy can be found in "man swcopy"

Regards,
Mateja
Schelstraete Bart_1
Frequent Advisor

Re: create a depot from patches using swcopy

user the following syntax:

swcopy -s $PATH_TO_DEPOT $NAME_OF_DEPOT @ $DESTINATION_DEPOT

rgrds,

Bart
James R. Ferguson
Acclaimed Contributor

Re: create a depot from patches using swcopy

Hi:

To collect a series of patches into a depot the can be installed with a single reboot, simply download your patches into the /tmp directory; "un-shar" them and do:

# cd /tmp
# for X in PH*.htm
> do
> sh ${X}
> done

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

# swlist -s ${PDIR}

There is no need to register the depot with 'swreg'. This is done automatically by 'swcopy'. The 'swlist' allows you to preview the depot's contents. Remember, of course, that you can also run 'swinstall' in preview mode to take it through its analysis phase, too.

The 'swcopy' syntax shown above can be ammended to specify '-x enforce_dependencies=false'. This forces 'swcopy' to ignore dependency verification deferring that until the actual 'swinstall' analysis phase. This is useful when you do not want to download dependency patches that you know you already have on your server.

Regards!

...JRF...

David Lodge
Trusted Contributor

Re: create a depot from patches using swcopy

In addition to the above.

You only need to register the depot *if* you are going to use it to be accessed by other systems. swcopy will only register it to be used by the current system by default.

I usually suggest that somebody on the network keeps a permanent depot for patches and makes it available for everybody else.

BTW sw* only goes into the GUI/TUI if it misses any information. If somebody from HP is reading this - could you ask the sw* team to give an option to return an error and not go into the *really annoying* GUI/TUI when all information has not been supplied.
Sachin Patel
Honored Contributor

Re: create a depot from patches using swcopy

Hi Ancel,
Here is what I have collected form this forum and works fine for me all the time.

Download all patches in to one directory for example /tmp/sachin/ and we are creating depot in /usr/local/sw

Uncompress all patches.
#for X in /tmp/sachin/PH*
#do
#sh $X
#rm $X
#rm ${X}.text
#done

Then copy all patches in to one directory
#for X in /tmp/sachin/PH*.depot
#do
#swcopy -s $X @ /usr/local/sw
#done

Then create bundle
#swpackage -s /usr/local/sw (this bundle will has no name)
#swlist -s /usr/local/sw (This will lists all patches in that bundle)

Install now
#swinstall -s /usr/local/sw (select all patch and install)

Update
.psf file should look like this. Use this on swpackage with -s option.
#swpackage -s file.psf @ /usr/local/sw

bundle
tag PERFORMANCE
title TIMSPATCHES
os_name HP-UX
revision B.11.00.01
architecture S700/S800_HP-UX_11
contents PHCO_21187,r=1.0,a=HP-UX_B.11.00_32/64,v=HP
.....
end

To get this "PHCO_21187,r=1.0,a=HP-UX_B.11.00_32/64,v=HP"

#swlist -l product -a software_spec -s /usr/local/sw |grep -v "^#" |awk '{print $2}'

Sachin
Is photography a hobby or another way to spend $
Francois Bariselle_3
Regular Advisor

Re: create a depot from patches using swcopy

Hi,

You can install all patch in one procedure. Try this:

1) Unshare all patch using:

for i in PH*
do
sh $i
done

2) Combine the separate depots into one depot:

mkdir /tmp/patches

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

4) Verify the contents of the depots:

swlist -d @ /tmp/patches

5) Install patch with swinstall, interactive method.

Good Luck

Frank.
Fais la ...