Generate a file+MD5 checksum filesystem manifest from packages?

Matthew Braun mjbraun at leydenjar.com
Wed Nov 30 22:06:25 UTC 2011


I apologize if I'm posting to the wrong mailing list and I'd be thankful
for pointers in the right direction, as I am very new to getting under the
hood of my systems in the way that I'm asking about.

I want to come up with a programatic way to construct a "reference"
manifest of a filesystem. In other words, "System Foo has xxxx packages
installed. For each package installed, "dpkg --contents" each .deb (for
now, I'm assuming they're cached locally) and list the directories it would
create as well as the files (conffiles included) it would install or
generate. For all files, store the MD5 checksums."

When all is said and done, I should have a complete directory structure of
the system with MD5 checksums. But I see two problems:
     1) It seems like multiple packages may create the same directory (i.e.
the first one in handles it, the rest just skip over it). This is fine, but
I could see a case where the permissions might be different. I could, of
course, just flag it and move on.
      2) MD5 sums for conffiles don't appear to be stored in the
/var/lib/dpkg/info/*.md5sums files but perhaps can be calculated on the fly.


So, I was wondering if there were any suggestions for dry-running an entire
system install (and post install) to get a filesystem list with checksums?



PS: why I'm looking to do this: I want to be able to take a running system
and say "Ok, so it has all these packages installed. Now, given all these
packages, what has been added/updated/removed since installation?" Somewhat
similar in concept to Tripwire but whereas Tripwire would build an index of
a running system and compare to changes later in time, I want to build an
index of a stock system and compare the running system to that and see how
they vary.

Again, thank you very much for any pointers or suggestions!

-- 
Matthew Braun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20111130/20efb4f9/attachment.html>


More information about the ubuntu-users mailing list