[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hash database



Almut Behrens wrote:

Not exactly sure whether I understand what you need, but the most basic
(and thus most flexible) way would be something like:

Generate the list of checksums:

$ find . -type f | xargs md5sum > chksums

Some time later, verify them:

$ md5sum -c chksums

Source (here '.', i.e. $PWD), and destination (chksums) can essentially
be any path -- only chksums needs to be writable, of course.

Before generating the hash list, think about how precisely you want the
paths to end up in the file chksums, so that they'll be found when you
later try to verify the files.
This depends on what start-path you give to 'find' to recurse from, e.g.
'find .'    will give you entries like ./some/relative/path, while
'find $PWD' will give you /the/absolute/path/to/the/file.

Also, if you can't get it the way you need it right from the start,
there's always sed/perl/whatever to fixup the path prefix to what it
needs to be for md5sum to locate the files when verifying hashes.

Is that roughly what you need?

Almut



Unfortunatly not. I want to verify each file installed using .deb's against the md5sum written inside the .deb itself. Debsum does this storing the hashes locally. I want the same control over a central db, independent from the machine I'm running debsums on.

I know my english is poor, sorry;)

Regards
Radel



Reply to: