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

find-debuginfo.sh: sort output of find #485

Merged
merged 1 commit into from Aug 8, 2018

Conversation

bmwiedemann
Copy link
Contributor

sort output of find in find-debuginfo.sh
to make build results more reproducible
in spite of indeterministic filesystem readdir order.

Even where these lists do not become part of an rpm,
it makes it easier to debug unrelated issues
by having less overall diff from diffing build filesystem trees (one of the standard reproducibility-debugging techniques I use).

For openSUSE, this helped to make squid, openssh, postfix and shadow
packages build reproducibly.

See https://reproducible-builds.org/ for why this is good.

Note: elfbins.list has remaining indeterminism from the run_job function running in parallel unless using -j1

Note: only tested in a slightly different variant on openSUSE's rpm-4.14.1

@rpm-maint
Copy link

rpm-maint commented Jul 31, 2018 via email

@bmwiedemann
Copy link
Contributor Author

We could add on top export LC_ALL=C to make sure locales do not influence the result (and drop the other 2 inline instances of that).
I did not yet bisect which of the changes makes what difference because test-cycles are slow.

Note: elfbins.list has remaining indeterminism from the run_job
function running in parallel unless using -j1

So, this isn't a problem for creating reproducible builds?

No, that seems to not make a difference on rpms - only makes the build filesystem diff a bit messier.

@bmwiedemann
Copy link
Contributor Author

I experimented some more with it and found that only the sort in dwz_files
makes all the difference to the shadow binary rpm.
Do you prefer a minimal patch?

@bmwiedemann
Copy link
Contributor Author

updated to be minimal

to make build results more reproducible
in spite of indeterministic filesystem readdir order.

For openSUSE, this helped to make squid, openssh, postfix and shadow
packages build reproducibly.

See https://reproducible-builds.org/ for why this is good.
@pmatilai pmatilai merged commit 801ee2e into rpm-software-management:master Aug 8, 2018
@pmatilai
Copy link
Contributor

pmatilai commented Aug 8, 2018

Merged, thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants