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

binaries vary across builds #60

Closed
bmwiedemann opened this issue Mar 15, 2022 · 11 comments
Closed

binaries vary across builds #60

bmwiedemann opened this issue Mar 15, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@bmwiedemann
Copy link

While working on reproducible builds for openSUSE, I found that our tuigreet-0.7.1 package varied across builds.

The variations stop when readdir order is not random.

--- old /usr/bin/tuigreet (objdump)
+++ new /usr/bin/tuigreet (objdump)
@@ -255,14 +255,14 @@
  21efa0 40000000 00000000 60000000 00000000  @.......`.......
  21efb0 01000000 00000000 02000000 00000000  ................
  21efc0 05000000 00000000 04000000 00000000  ................
- 21efd0 706c2d50 4c2f7475 69677265 65742e66  pl-PL/tuigreet.f
+ 21efd0 70742d42 522f7475 69677265 65742e66  pt-BR/tuigreet.f
  21efe0 746c0000 00000000 00000000 00000000  tl..............
  21eff0 63612d45 532f7475 69677265 65742e66  ca-ES/tuigreet.f
- 21f000 656e2d55 532f7475 69677265 65742e66  en-US/tuigreet.f
- 21f010 69742d49 542f7475 69677265 65742e66  it-IT/tuigreet.f
- 21f020 64652d44 452f7475 69677265 65742e66  de-DE/tuigreet.f
- 21f030 70742d42 522f7475 69677265 65742e66  pt-BR/tuigreet.f
- 21f040 66722d46 522f7475 69677265 65742e66  fr-FR/tuigreet.f
+ 21f000 66722d46 522f7475 69677265 65742e66  fr-FR/tuigreet.f
+ 21f010 706c2d50 4c2f7475 69677265 65742e66  pl-PL/tuigreet.f
+ 21f020 69742d49 542f7475 69677265 65742e66  it-IT/tuigreet.f
+ 21f030 64652d44 452f7475 69677265 65742e66  de-DE/tuigreet.f
+ 21f040 656e2d55 532f7475 69677265 65742e66  en-US/tuigreet.f

suggests, this comes from how contrib/locales/ is used without sorting the entries.
Can you help me find the right place to fix this?

@apognu
Copy link
Owner

apognu commented Mar 16, 2022

I don't have a lot of free time these days to look into it, but locale files and loaded and embedded by through the rust-embed crate, which if I remember correctly doesn't do any kind of sorting of the files in the included directory.

I'll open an issue there when I can to see if they can help.

I'll also try and reproduce the issue if I can. Did you have to do something in particular to see the different outputs? Or does it happen all the time?

@bmwiedemann
Copy link
Author

Issues from filesystem readdir order can be a bit tricky to reproduce as building twice on the same filesystem will still give identical results.

One way to reproduce can be a disorderfs fuse mount and another way can be to use mkfs.ext4 (defaults to enabled dirindex) to build on new scratch filesystems.

@bmwiedemann
Copy link
Author

I don't see an issue at https://github.com/pyros2097/rust-embed/issues - do you still plan to open one or is it in another place?

@apognu
Copy link
Owner

apognu commented Mar 26, 2022

I just created the issue upstream and will try and watch responses there. I offered to prepare a PR if necesary.

@apognu apognu added the enhancement New feature or request label Mar 26, 2022
@apognu
Copy link
Owner

apognu commented Mar 30, 2022

@bmwiedemann My PR in rust-embed was merged, waiting for the next release to use it here.

@bmwiedemann
Copy link
Author

pyrossh/rust-embed@5574de9 looks simple enough. Thanks for this.

apognu added a commit that referenced this issue Apr 18, 2022
@apognu
Copy link
Owner

apognu commented Apr 18, 2022

I updated tuigreet's dependencies (on master) with the updated upstream rust-embed, can you confirm if the issue is gone?

@bmwiedemann
Copy link
Author

I finally managed to test the 1-line change in rust-embed-utils and it made tuigreet reproducible.

@apognu
Copy link
Owner

apognu commented May 2, 2022

The bump is scheduled for the next release of tuigreet. I'm pretty busy nowadays, so I can't promise a date, but I'll try to make that sooner rather than later.

@denisok
Copy link

denisok commented Nov 17, 2022

0.8.0 is there: https://build.opensuse.org/request/show/1036285
@bmwiedemann could you please check if that is fixed ?

@bmwiedemann
Copy link
Author

Looks good now. Thanks.

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

No branches or pull requests

3 participants