Re: How to install multiple patches in one swinstall command (1439 Views)
Reply
Advisor
Stephen Keogh
Posts: 25
Registered: ‎11-01-2000
Message 1 of 10 (1,439 Views)
Accepted Solution

How to install multiple patches in one swinstall command

I have used swinstall to install a single depot file e.g.
swinstall -x autoreboot=true -x patch_match_target=true -s /tmp/PHCO_21187.depot

but, how do I invoke swinstall to install all the depot files in my /tmp directory at the same time, with a single reboot

Thanks

Steve
Please use plain text.
Valued Contributor
kish_1
Posts: 102
Registered: ‎04-24-2002
Message 2 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

you can create bundle with following command
swcopy -s /tmp/PHKL.XXXX.depot PHKL.XXXX @ /tmp/patch_depo
Once you create the depo, here is example patch_depot

After creating the depot
you can issue the swinstall
command


swinstall -s /tmp/path_depo
share the power of the knowledge
Please use plain text.
Respected Contributor
Mateja Bezjak
Posts: 149
Registered: ‎11-11-1998
Message 3 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

Hi,

You need to swcopy the patches to one depot and then run swinstall. Here is a good link:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x85d9f715edc6d5118ff10090279cd0f9,00.html

Regards,
Mateja
Please use plain text.
Honored Contributor
harry d brown jr
Posts: 8,418
Registered: ‎12-12-2000
Message 4 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

You have to JOIN them into a single bundle using swcopy. Or the simple way, use custom patch manager from the "IT Resource Center" to build your bundles.

live free or die
harry
Live Free or Die
Please use plain text.
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 5 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

Hi Steve:

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...
Please use plain text.
Trusted Contributor
Sukant Naik
Posts: 192
Registered: ‎06-10-1999
Message 6 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

Hi Stephen,

This problem has been answered many times. Please search in the ITRC website before sending the query.

You can create a depot containing multiple patches by doing the following. This is an excerpt from the "Ignite-UX adminstrators guide". You can get this manual from docs.hp.com

Create a Patch Depot:
Obtain the set of patches you want to place and manage in an SD depot. For example:

PHCO_7891 PHCO_9348 PHKL_9361 PHSS_7726 PHSS_8966
PHSS_9400 PHCO_8353 PHKL_8376 PHKL_9569 PHSS_8667
PHSS_9201

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


Unshar the patches:
# for i in PH*
do
sh $i
done

Combine all these separate depots into one depot. To do this, use the swcopy command. First, create the directory to store the patches:
# mkdir /var/opt/ignite/Patches


Now take the patch depots and copy them into the target depot:
# for i in PH*.depot
do
swcopy -s ${PWD}/$i \* @ /var/opt/ignite/Patches
done

Verify the contents of the depot:
# swlist -d @ /var/opt/ignite/Patches


Assuming the above example list of patches, you would see the following:
# Initializing... # Contacting target "interop1"... # # Target:
interop1:/var/opt/ignite/Patches #

#
# No Bundle(s) on interop1:/var/opt/ignite/Patches
# Product(s):
#

PHCO_7891 B.10.00.00.AA allows mount to turnon hfs-specific opts
PHCO_8353 B.10.00.00.AA cumulative awk(1) patch
PHCO_9348 B.10.00.00.AA cron(1M) and at(1) patch
PHKL_8376 B.10.00.00.AA Fix vmtrace bug.
PHKL_9361 B.10.00.00.AA Fix panic caused by MP race
PHKL_9569 B.10.00.00.AA NFS and VxFS (JFS) cumulative patch
PHSS_7726 B.10.00.00.AA CDE Dtterm August 96 patch
PHSS_8667 B.10.00.00.AA CDE Runtime Nov96 Patch
PHSS_8966 B.10.00.00.AA LIBCL cumulative patch
PHSS_9201 B.10.00.00.AA fix for aC++ dld.sl
PHSS_9400 B.10.00.00.AA ld(1) cumulative patch


In the above output, swlist states that the depot has "No Bundles". HP-UX Patches are SD "products", but Ignite-UX can only manage SD "Bundles".


Convert the individual patches into a single bundle using the /opt/ignite/bin/make_bundles command. Run the script and create a bundle in the Patches depot:
# make_bundles -B -n Misc_Patches -t "HP-UX 10.20 Patches" /var/opt/ignite/Patches

Rerun swlist on this depot to verify the Bundle has been created:
# swlist -d @ /var/opt/ignite/Patches


(Output of swlist command assuming the example patches)
# Initializing...
# Contacting target "interop1"...
#
# Target: interop1:/var/opt/ignite/Patches
#

#
# Bundle(s):
#

Misc_Patches HP-UX 10.20 Patches

The default behavior of swlist is to now show only the higher level software bundles. Individual patches in the bundle can still be viewed by using swlist options. The following will show the patch "products" contained in the bundle:
# swlist -l product -d @ /var/opt/ignite/Patches


Regards,

Sukant
Who dares he wins
Please use plain text.
Honored Contributor
Trond Haugen
Posts: 808
Registered: ‎10-10-2001
Message 7 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

If you have a support contract you could call inn and have the Response Center create a tape with all the patches and dependencies.
But the suggested building of one depot with swcopy will of course solve you problem too.

Regards,
Trond
Please use plain text.
Advisor
Stephen Keogh
Posts: 25
Registered: ‎11-01-2000
Message 8 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

Many thanks to all that replied. I am a humble DBA using Oracle/Sybase/DB2 and get to use many database forums but I have to say this forum, given the format and active reader participation is the best.
I accept the comment made by Sukant that the question has been asked many time before, but
without knowledge of the terms "swcopy" and "bundle" I struggled to find the answer I was looking for.
Good job, Sukant and all you other HP guru's.

Steve
Please use plain text.
Occasional Contributor
Neil Smith_3
Posts: 5
Registered: ‎08-08-2002
Message 9 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

This is what I do when I have multiple depots in a single directory.

#####

for FILE in *.depot
do
swinstall -s /path/$FILE \*
done

### path is the full path of the directory containing the depots.

Warning, this is not interactive. It will install every depot in that given directory.



Please use plain text.
Honored Contributor
Bob E Campbell
Posts: 764
Registered: ‎03-31-2004
Message 10 of 10 (1,439 Views)

Re: How to install multiple patches in one swinstall command

Another solution is to not use individual .depot files to begin with. You can use the Software Assistant (SWA) tool to download patches directly into a depot. SWA is intended to identify the patches that a system needs, but can be given a list of required patches if desired.

Find more information and download the bits from https://www.hp.com/go/swa.
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation