On Mon, Jun 30, 2008 at 05:04:56PM +0100, Albert White wrote:
> I'm looking at ways to do some basic sanity testing of pkg upgrading.
... beyond what "pkg verify" already does, I presume ...
> Firstly there does not seem to be any way to get pkg install (or
> image-update) to tell you what files it is changing. The -v option is a
> little more verbose but does not help at the file level.
True. I think Dan's been looking at what to do there.
> Next I can't see a way to compare whats in the package on the repository
> and on the system. I can do a 'package contents -m' which will give the
> filename, owner etc. but not a chksum that I can then check with a query
> against the repository.
$ pkg contents -m SUNWzone | grep usr/sbin/zonecfg
file cbb70a752d63a4879cd42a56525f808df5d90f2b elfarch=i386 elfbits=32
elfhash=bcdb533592fea2c1acb788a74794edda4a0ff22c group=bin mode=0555 owner=root
path=usr/sbin/zonecfg pkg.size=220444
In fact, there are *two* hashes there! The first (the one that's not an
attribute in key=value form) is the sha-1 hash of the entire file. The
second (the elfhash attribute, on ELF files only, obviously) is the sha-1
hash of the ELF sections which get loaded into memory (and thus "matter").
In particular the first hash may not match what's on disk, because we
decide to update a file based on its elfhash, if the attribute exists.
Many ELF files will be rebuilt even if the source didn't change, and things
like the comment section will change, but there's little point in
retrieving that file, since there will be no difference in execution.
If you can suggest some documentation changes which might have helped you
through this, that'd be great.
Thanks,
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss