Re: WANTED: Tool to verify installed package/port consistancy
In message <[email protected]>, you wrote: >On 05/10/2013 03:04 PM, Ronald F. Guilmette wrote: > >> pkg_sanity: ImageMagick-6.8.0.7_1: +CONTENTS file does not exist -- skipped >> pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBit-2.so: File failed MD5 >> checksum >> pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBit-imodule-2.so: File >> failed MD5 checksum >> pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBitCosNaming-2.so: File >> failed MD5 checksum >> pkg_sanity: OpenEXR-1.7.1: /usr/local/lib/libIlmImf.so: File failed MD5 >> checksum >> pkg_sanity: aalib-1.4.r5_6: /usr/local/lib/libaa.so: File failed MD5 checksum > > >Are these mismatches symlinks? Some are. >If so, are you checking the contents of >the symlink (with, for instance, stat(1) or readlink(1)), or the >contents of the file to which the symlink is referring? The latter. (I would have had to have done something special in order to compute the md5 fo teh symlink itself, and I did not do so. I have just now checked, and my script is indeed getting the md5 of the files to which the various symlinks refer.) It is clear to me now that "pkg_info -g" is either skipping certain files that are listed in the relevant +CONTENTS files or else it is computing the MD5 checksums in an odd way. I do not think that the latter possibility is at all likely. I will be looking at this more deeply as time permits. Regards, rfg ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
Re: WANTED: Tool to verify installed package/port consistancy
On 05/10/2013 03:04 PM, Ronald F. Guilmette wrote: > pkg_sanity: ImageMagick-6.8.0.7_1: +CONTENTS file does not exist -- skipped > pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBit-2.so: File failed MD5 > checksum > pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBit-imodule-2.so: File failed > MD5 checksum > pkg_sanity: ORBit2-2.14.19: /usr/local/lib/libORBitCosNaming-2.so: File > failed MD5 checksum > pkg_sanity: OpenEXR-1.7.1: /usr/local/lib/libIlmImf.so: File failed MD5 > checksum > pkg_sanity: aalib-1.4.r5_6: /usr/local/lib/libaa.so: File failed MD5 checksum Are these mismatches symlinks? If so, are you checking the contents of the symlink (with, for instance, stat(1) or readlink(1)), or the contents of the file to which the symlink is referring? -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://www.fur.com/peace/ ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
Re: WANTED: Tool to verify installed package/port consistancy
On 10/05/2013 21:04, Ronald F. Guilmette wrote: > Anyway, at the moment, and for me at least, my results remain entirely > perplexing. I cannot imagine what might possibly be the explanation for > the results attached below. If anyone can offer a theory, I'm all ears. > Meanwhile, I'll be cleaning up my script a little bit and then, in short > order I hope, posting it here so that others can perhaps give it a try and > tell me if their results from it are at all similar to mine. I'd very much like to see results from a pkgng system with an equivalent number and types of packages and that has been maintained for a similar amount of time. But I think that's impossible: Ronald's machine almost certainly predates the availability of pkgng. Obviously the script would have to be modified, as you'll need to do a DB query to get all the checksums, rather than reading +CONTENTS files. Plus this shouldn't be a system that was converted to pkgng but that has used pkgng from the start. One of the big drivers for switching to using sqlite in pkgng rather than a collection of files is that it does give better protection against accidental corruption of package meta-data during normal package updates. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey signature.asc Description: OpenPGP digital signature
Re: WANTED: Tool to verify installed package/port consistancy
"Ronald F. Guilmette" wrote:
>
> The subject line pretty much says it all.
Additional to other ideas so far,
You could also make a chroot, install normal bins from src,
install all your ports, ^D to exit chroot, then do a compare & strip with eg:
cd chroot ;
find . -type f -exec cmpd -d {} / \;
# compare & delete http://berklix.com/~jhs/src/bsd/jhs/bin/public/cmpd/
find . -type l | xargs rm
find . -type d -depth -exec rmdir {} \;
find . -type f -print | sort | more
then consider what got trashed, where, & maybe why,
& then reinstall from ports, or crudely
cd /chroot/var/db/pkg ; tar cf - */+CONTENTS| (cd /var/db/pkg && tar xf -)
PS I find /usr/ports/textproc/mgdiff nice for a visual diff of 2 files.
( if theres lots of small changes in a file )
Cheers,
Julian
--
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
Reply below not above, like a play script. Indent old text with "> ".
Send plain text. No quoted-printable, HTML, base64, multipart/alternative.
___
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"
Re: WANTED: Tool to verify installed package/port consistancy
I expect the reason you won't find a port verifier is that the usual way to recover from a situation like yours is to reinstall them all: # portupgrade --all --force This might take longer than trying to verify them, but it has the advantage of not needing a lot of attention (use -DBATCH to skip config steps) and when you're done, the packages have all been updated and fixed. Doing a general port verifier is a pain because the scripts called from make install can run arbitrary programs. R's, John ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
WANTED: Tool to verify installed package/port consistancy
The subject line pretty much says it all. As I explained here the other day, numerous of my installed ports have semi-mysteriously had their corresponding +CONTENTS files just disappear. I do have a backup of my /var partition, from which I could, in theory, fetch replacements for the specific +CONTENTS files that went missing, but I know of no way to be able to check those backed-up +CONTENTS files to make sure that they are at all consistant with what I actually have installed in the way of ports/ packages on this system at the present time. Looking at the +CONTENTS files that were not "disappeared" and that are still present on the system in question, it is abundantly clear that each of these contains two valuable things relative to the installed package/port that it corresponds to, i.e.: 1) A list of all of the installed files corresponding to the specific port/package in question, and 2) For each installed file that is part of the package/port in question, an MD5 checksum value corresponding to that specific installed file. I searched within the /usr/ports/ports-mgmt directory, to see if there might be any tools there that could be applied to a given +CONTENTS file (or to all of them) to simply verify the presence and (MD5 checksum) validity of each file of a given installed port/package, but the only things whose pkg-descr files make them seem like they might be relevant (i.e. pchecker & portlint) turn out to be tools meant for utterly different purposes. :-( Having found nothing useful, I stareted to write a small script of my own to simply chcek that all files of an installed package/port exist, and that they have the "right" MD5 checksums, but then I paused halfway through when I realized that i am probably just re-inventing the wheel here. It occurs to me that *something*, i.e. some tool(s) within the FreeBSD panoply, *must* already be reading and/or otherwise making use of those MD5 checksums within the +CONTENTS files. Otherwise, why would they even be there? So my question really comes down to this: What pre-existing software tools are available that can and do check the MD5 checksums, as given the the +CONTENTS file(s), of various files associated with some given installed port or package? It is inconceivable to me that there no already existing tool within FreeBSD that is already doing this exact job. Regards, rfg ___ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[email protected]"
