Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

esotericnonsense
Copy link
Contributor

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 UnorderedHashmap we fix this, and now
the catalog is reproducible.

Motivation: https://reproducible-builds.org

Signed-off-by: Daniel Edgecumbe git@esotericnonsense.com

@esotericnonsense
Copy link
Contributor Author

esotericnonsense commented Sep 5, 2019

Note that this is a scriptable change FWIW

s/hashmap/ordered_hashmap/g
s/Hashmap/OrderedHashmap/g
s/HASHMAP/ORDERED_HASHMAP/g

in the relevant files

@keszybz
Copy link
Member

keszybz commented Sep 5, 2019

LGTM.

@keszybz keszybz added catalog good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Sep 5, 2019
@esotericnonsense
Copy link
Contributor Author

esotericnonsense commented Sep 5, 2019

The commit message should read OrderedHashmap not UnorderedHashmap. Thanks to eschwartz on IRC.

I will wait for CI to pass before changing it. Looks good so far.

@esotericnonsense
Copy link
Contributor Author

OK, only bionic-arm64 is left. Changing this now.

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>
@esotericnonsense
Copy link
Contributor Author

🎉

@keszybz keszybz merged commit a95686b into systemd:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
catalog good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed
Development

Successfully merging this pull request may close these issues.

None yet

2 participants