journal: Make the output of --update-catalog deterministic
authorDaniel Edgecumbe <git@esotericnonsense.com>
Thu, 5 Sep 2019 14:34:52 +0000 (15:34 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 21 Sep 2019 20:53:07 +0000 (22:53 +0200)
commitf500d2fa81292046e5360b49b38a46f34ca1f397
tree687e1ab31650f179cbaec2899b740a12919467dc
parent64d0f7042dfbaa306e16996d2fbb331ee7d59dc8
journal: Make the output of --update-catalog deterministic

The use of an unordered hashmap means that the output of
'journalctl --update-catalog' differs between runs despite there being no
changes in the input files.

By changing all instances of Hashmap to OrderedHashmap we fix this, and now
the catalog is reproducible.

Motivation: https://reproducible-builds.org

Signed-off-by: Daniel Edgecumbe <git@esotericnonsense.com>
(cherry picked from commit a95686bb5d615a73a14d451a25225a566f9af570)
src/fuzz/fuzz-catalog.c
src/journal/catalog.c
src/journal/catalog.h
src/journal/test-catalog.c