#90 add checksum option to choose checksum algorithm
Closed: Fixed None Opened 11 years ago by hguemar.

Some reviewers prefer using more robust hash algorithms than default md5 such as sha1. Besides Fedora Packaging guidelines recommends now using sha256.

To do so, i've patched fedora-review to use hashlib module instead of running md5sum command-line utils and added -k/--checksum option to choose which hash algorithms will be used for review.

  • test suite has been runned and expanded
  • man page has been updated
  • from test reports, the hashlib version of checksum method is pretty much as fast as the previous when using md5 algorithm (still default).

Following pingou's advice on #fedora-review, i updated the patch to set sha256 as the hashing algorithm by default (as recommended by packaging guidelines)

nit-picking: Shouldn't the syntax for command line options should be <md5|sha1|sha224|sha256|sha384|sha512> to be consistent?

I'll fix up the manpage quirk. Note that I am putting this in 0.2.1 release branch. Will be added into devel afterwards

Hm... There's no need to skip these tests if there's no network so the @unittest.skipIf decorators should be removed IMHO.

Edit: spelling

I agree with leamas, they're not necessary.

Fixed in 270caf3, fcb201b and 3298f12. Many thanks for these patches!

For the record, tests had to be run only with network since they download things from fedorahosted. This could be fixed I guess

Login to comment on this ticket.

Metadata