Skip to content

Commit

Permalink
sepolicy/manpage.py: make output deterministic
Browse files Browse the repository at this point in the history
The list entries in the alphabetically grouped dict are
not sorted, which results in non-deterministic output for
index.html.

Sort entries of those lists to make the output deterministic
to be able to have reproducible builds.

See https://reproducible-builds.org/ for reasoning.
This patch was done while working on reproducible builds for openSUSE.

Signed-off-by: Cathy Hu <cahu@suse.de>
Acked-by: Petr Lautrbach <lautrbach@redhat.com>
  • Loading branch information
ca-hu authored and jwcart2 committed Nov 7, 2023
1 parent e533a45 commit 84e0884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/sepolicy/sepolicy/manpage.py
Expand Up @@ -156,7 +156,7 @@ def get_alphabet_manpages(manpage_list):
if j.split("/")[-1][0] == i:
temp.append(j.split("/")[-1])

alphabet_manpages[i] = temp
alphabet_manpages[i] = sorted(temp)

return alphabet_manpages

Expand Down

0 comments on commit 84e0884

Please sign in to comment.