WANTED: Tool to verify installed package/port consistancy

Ronald F. Guilmette rfg at tristatelogic.com
Thu May 9 22:00:34 UTC 2013

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.


More information about the freebsd-questions mailing list