-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
3.9.0: tests make build non-reproducible #2324
Comments
So the problem is that the pkg-config and the cmake file contains the name of the binary directory? |
The problem is, that the tests change the contents of those files. This is even the case, if I make a copy of the build directory (e.g. |
Is there a way I can reproduce this without Arch Linux? |
I found a solution that is not pretty at all, but gets around the problem of the tests interfering with the packaged files: AFAICS the tests output things into the destination/output directory which overwrites previously set configuration and/or alters previously set configuration directly (see mention of Test data should never leak into whatever is installed to the system!
I'm not entirely sure. Other distributions also offer reproducible builds tools. I can't really provide any guidance for other distributions unfortunately. Apart from that you could look at the If you want to try Arch Linux in a virtual machine, we provide it as a vagrant box:
In the VM, you can prepare the system for building packages, import your own GPG public key and get the PKGBUILD for the package:
Here you'd have to modify the PKGBUILD to again run the tests against the initial build directory (i.e. change to
|
Looking at #2318, it seems that the test |
Yes, removing the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@dvzrv Did you check the fix I proposed in #2324 (comment) ? |
@nlohmann sorry for not getting back to you on this! I got swamped with other things and forgot to reply eventually. Version 3.9.1 definitely fixes this issue. Many thanks for looking into this! |
When building 3.9.0 as a package (using the test-data 3.0.0) for Arch Linux I ran our reproducible builds tools against the resulting package.
Beforehand I had to apply #2318 as install of the pkgconfig file fails otherwise.
What is the issue you have?
Running the tests (
ctest --output-on-failure -LE git_required
) after build renders the package unreproducible and alters the pkgconfig file to change cflags from-I/usr/include
to-I/usr/local/include
(amongst others).Please describe the steps to reproduce the issue.
After a package has been created (building in a clean systemd-nspawn container), the package is rebuilt using the exact same dependencies with the repro tool.
Can you provide a small but working code example?
n/a
What is the expected behavior?
Package is reproducible. Tests do not alter the build and resulting installed files.
And what is the actual behavior instead?
This is the output of diffoscope on the two packages:
When not running the tests the package is reproducible and the above discrepancy can not be found.
Which compiler and operating system are you using?
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you [compile and run the unit tests]
n/a
The text was updated successfully, but these errors were encountered: