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

commented Sep 5, 2019

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

LGTM.

@esotericnonsense

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

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 esotericnonsense force-pushed the esotericnonsense:esotericnonsense/repro-catalog branch from 9d7ef88 to 38ca797 Sep 5, 2019
@esotericnonsense

This comment has been minimized.

Copy link
Contributor Author

commented Sep 6, 2019

🎉

@keszybz keszybz merged commit a95686b into systemd:master Sep 6, 2019
11 of 13 checks passed
11 of 13 checks passed
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
CentOS CI (Arch in KVM with sanitizers) build passed (ping @mrc0mmand for any questions)
Details
CentOS CI (Arch in KVM) build passed (ping @mrc0mmand for any questions)
Details
CentOS CI (CentOS 7) build passed (ping @mrc0mmand for any questions)
Details
LGTM analysis: C/C++ No new or fixed alerts
Details
bionic-amd64 autopkgtest finished (success)
Details
bionic-arm64 autopkgtest finished (success)
Details
bionic-i386 autopkgtest finished (success)
Details
bionic-s390x autopkgtest finished (success)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
systemd.systemd Build #20190905.11 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.