pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
I'm working on Fedora linux, and I want to compare the md5 sum of a current file with the md5 sum in the RPM database. This will tell me if the file has changed at all.
From the command line, I can run "rpm -q package --dump" to get gobs of data about every file in the RPM named "package", including the md5 sum of each file.
I'd like to use a perl module that uses the RPM api instead of running a thousand instances of the rpm command.
There several modules (RPM,RPM2,RPM4) that look like they might help. I'm playing with RPM2, but it's not giving me the love I need. RPM4's docs look discouraging and RPM is very old and probably doesn't match the current api.
If anyone out there has any ideas for me, please let me know. If you know that any of the existing RPM modules won't help me, please also tell me that so I can stop fiddling with it. Also speak up if you'd like something similer. If it doesn't exist, maybe I'll write it...
Oh, and if you're wondering, I'm trying to make a comprehensive list of files I've changed since installation. I can't just use tripwire or something like that because I want to find changes I might have made a while ago.
Thanks Update I'm trying to do this without calling the rpm command over and over. -Pileofrogs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RPMS and file md5s
by andyford (Curate) on Jan 03, 2007 at 01:22 UTC | |
|
Re: RPMS and file md5s
by quester (Vicar) on Jan 02, 2007 at 23:58 UTC |