[Rpm-maint] [rpm-software-management/rpm] Please support smaller build-ids (#950)

Mark Wielaard mark at klomp.org
Mon Nov 25 11:20:45 UTC 2019


On Sat, 2019-11-23 at 09:53 -0800, Rafael Ávila de Espíndola wrote:
> 
> If we really need 128 bits, which hash would you suggest for a fast
> buildid? Farmhash comes to mind.

128 bits is the minimum that GNU binutils ld and gold support, you can
choose between uuid (128bits), md5 (128bits) and sha1 (160bits). Where
sha1 is the default. If you want maximum compatibility you would use a
hash that is 160bits/20bytes. I have seen code that simply hardcodes
build-ids being 20 bytes (those should be fixed of course, but that
might take time).

But I don't know if 64bits/8bytes is enough, assuming the hash code is
good the the birthday problem probabilty table shows the difference
between using 64bit and 128bit hashes:
https://en.wikipedia.org/wiki/Birthday_problem#Probability_table

I'll ask some people who have tried to index all executables of a
distribution what number of executables they have encountered.


More information about the Rpm-maint mailing list