journal: Make the output of --update-catalog deterministic

System Internals / systemd - Daniel Edgecumbe [esotericnonsense.com] - 6 September 2019 13:13 EDT

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

a95686bb5d journal: Make the output of --update-catalog deterministic
src/fuzz/fuzz-catalog.c | 4 ++--
src/journal/catalog.c | 24 ++++++++++++------------
src/journal/catalog.h | 2 +-
src/journal/test-catalog.c | 30 +++++++++++++++---------------
4 files changed, 30 insertions(+), 30 deletions(-)

Upstream: github.com


  • Share