I am looking for the file that represents the solaris 10 package database - if there is such thing. The reason is that I want to be able to efficiently compute a checksum that represents the current patch level (including any third party packages), so that after a possible rollback I can "prove" the rollback was a success (e.g. rolling back using zfs snapshots). So I tough the package database where pkginfo
gets its data from would be a natural choice. Any ideas?
2 Answers
Solaris 10 uses /var/sadm/pkg
and /var/sadm/patch
to track package and patch versions. It does not use a database like RPM does. If you are using ZFS snapshots as a way to rollback from patches, try checking the contents of /var/sadm/patch
before patching, post patching, and post rollback.
If you are not already using the feature, investigate Alternate Boot Environments for Solaris especially since you are already using ZFS. Here is a whitepaper to get you started. You create your ABE, patch it, activate it, and reboot. If things don't work, activate the previous boot environment, activate it, and reboot again. It's a great feature of Solaris.
With this methodology, you have an explicit copy (or zfs snapshot/clone) that you apply patches to, so there is a clear delineation between the pre and post patching environments for your validation purposes.
Not sure I follow what you need, but the file you're looking for is most likely /var/sadm/install/contents.
And as MikeA noted, maybe you want to look at using ABEs if you're not already doing so--it works quite well and efficiently at patching and maintaining the system and even more so if you're using ZFS.