From owner-freebsd-ports@FreeBSD.ORG Thu May 9 22:00:34 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66581CD; Thu, 9 May 2013 22:00:34 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 44EAD601; Thu, 9 May 2013 22:00:33 +0000 (UTC) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 72F8C3AF45; Thu, 9 May 2013 15:00:23 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-ports@freebsd.org, freebsd-questions@freebsd.org Subject: WANTED: Tool to verify installed package/port consistancy Date: Thu, 09 May 2013 15:00:23 -0700 Message-ID: <58355.1368136823@server1.tristatelogic.com> X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2013 22:00:34 -0000 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