Patching errors on a Sparc box

I applied the latest S10 Recommended patches on three systems with no problems. But, on the fourth system nearly every patch failed with the following message:

Installing 120719-01...

Installation of 120719-01 failed. Return code 5.

I checked the manpage for patchadd and there are no return codes listed. Where would I find the defined return codes for S10 patchadd? Also, the manpage lists a "-t" option that "Maintains the patchadd return codes from the Solaris release prior to Solaris 10." So, what changed?

Thanks,

Roger S.

[567 byte] By [Jo_nage] at [2007-11-26 8:03:56]
# 1

I don't have a sol10 box in front of me, but in Solaris patchadd is actually a script in /usr/sbin - you'll find the error codes in there.

The extremely informative explanation of Return code 5 in my version (TSOL 8) is "5 pkgadd failed".

Not much help here, but check your version, it may be a little more informative.

Red_Oregon at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2
Unfortunately, patchadd on S10 is a binary (I knew I should have mentioned it). I tried trussing patchadd and that was futile. I did a sum on pkgadd on this machine and a machine that succeeded and it's the same binary. Thanks,Roger S.
Jo_nage at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
You still have /usr/lib/patch/patchadd which is a shell script and lists the error codes.Is there anything interesting in the logfile /var/sadm/patch/<patch>/log ? 7/M.
mAbrante at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4

Thanks, the shell version gave a little more info in the /var/sadm/patch/xxx/log file. Here's the error

Packaging file

</var/tmp/dstreAAA0Baiag/SUNWgzip/install/checkinstallckpkgfiles=99>

is corrupt for package <SUNWgzip> on zone <tester1>

I ran a "pkgchk -v -n SUNWgzip" on both global and local zones and no errors were reported. The patch is failing in the global zone.

Thanks,

Roger S.

Jo_nage at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5
Well, its refering to the package included in the patch, not the package installed on your disk.Try and download the patch again, if you are using ftp, make sure you are downloading it in binary mode.. 7/M.
mAbrante at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 6
I opened a case with Sun SUpport and they reccommended doing a chmod 777 on the directories above the patch dir (10_Recommended). It didn't make any sense to me, but it couldn't hurt. I made the change and the patches applied with no problems. Roger S.
Jo_nage at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 7
There should be some log files in var that you can read that will tell you why the patch failed. Sometimes error codes are very general.
route1 at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 8

For future reference :

0 No error

1 Usage error

2 Attempt to apply a patch that's already been applied

3 Effective UID is not root

4 Attempt to save original files failed

5 pkgadd failed

6 Patch is obsoleted

7 Invalid package directory

8 Attempting to patch a package that is not installed

9 Cannot access /usr/sbin/pkgadd (client problem)

10 Package validation errors

11 Error adding patch to root template

12 Patch script terminated due to signal

13 Symbolic link included in patch

14 NOT USED

15 The prepatch script had a return code other than 0.

16 The postpatch script had a return code other than 0.

17 Mismatch of the -d option between a previous patch install and the current one.

18 Not enough space in the file systems that are targets of the patch.

19 $SOFTINFO/INST_RELEASE file not found

20 A direct instance patch was required but not found

21 The required patches have not been installed on the manager

22 A progressive instance patch was required but not found

23 A restricted patch is already applied to the package

24 An incompatible patch is applied

25 A required patch is not applied

26 The user specified backout data can't be found

27 The relative directory supplied can't be found

28 A pkginfo file is corrupt or missing

29 Bad patch ID format

30 Dryrun failure(s)

31 Path given for -C option is invalid

32 Must be running Solaris 2.6 or greater

33 Bad formatted patch file or patch file not found

usfsolve at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 9

> I opened a case with Sun SUpport and they

> reccommended doing a chmod 777 on the directories

> above the patch dir (10_Recommended). It didn't make

> any sense to me, but it couldn't hurt.

>

> I made the change and the patches applied with no

> problems.

The patch process runs its patch validation script as a non-root user.

If the non-privileged user cannot read the patch directory, it cannot run the patches check script to determine if it is safe to install.

This is one of the most common causes of return code 5 from patchadd.

FYI, chmod 777 is unecessary chmod o+rx [parent director(ies) above the {9|10}_Recommended directory] is all you need.

--Pete

plthomas at 2007-7-6 20:38:38 > top of Java-index,Solaris Operating System,Solaris 10 Features...