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

Create Linux .tar.gz package archive deterministically #11981

Closed
aneeshusa opened this issue Jul 1, 2016 · 0 comments · Fixed by #12244
Closed

Create Linux .tar.gz package archive deterministically #11981

aneeshusa opened this issue Jul 1, 2016 · 0 comments · Fixed by #12244
Labels
A-build Related to or part of the build process

Comments

@aneeshusa
Copy link
Contributor

Follow-up from #11210. Part of #11980.

Our ./mach package implementation currently creates a .tar.gz archive for Linux using the Python tarfile module. However, this module does not support the right options for deterministic tarball creation. To fix this, we should use the recommendations from https://reproducible-builds.org/docs/archives/ and shell out to a tar binary.

TODO: make this E-easy after confirming tar version on the Linux builders (i.e. is GNU tar 1.28+ available or easily installed?)

Files:

  • python/servo/package_commands.py
  • No tests are necessary for this in particular; a more general approach to reproducibility testing is needed. However, if you can think of one, good tests are always welcome!
@aneeshusa aneeshusa added the A-build Related to or part of the build process label Jul 1, 2016
tonyo added a commit to tonyo/servo that referenced this issue Jul 1, 2016
Use the system 'tar' binary instead of the 'tarfile' Python module.
Fixes servo#11981.
tonyo added a commit to tonyo/servo that referenced this issue Jul 1, 2016
Use the system 'tar' binary instead of the 'tarfile' Python module.
Fixes servo#11981.
tonyo added a commit to tonyo/servo that referenced this issue Jul 2, 2016
Use the system 'tar' binary instead of the 'tarfile' Python module.
Fixes servo#11981.
tonyo added a commit to tonyo/servo that referenced this issue Jul 2, 2016
Use the system 'tar' binary instead of the 'tarfile' Python module.
Fixes servo#11981.
tonyo added a commit to tonyo/servo that referenced this issue Jul 4, 2016
tonyo added a commit to tonyo/servo that referenced this issue Jul 18, 2016
tonyo added a commit to tonyo/servo that referenced this issue Jul 21, 2016
tonyo added a commit to tonyo/servo that referenced this issue Jul 27, 2016
tonyo added a commit to tonyo/servo that referenced this issue Aug 4, 2016
bors-servo pushed a commit that referenced this issue Aug 4, 2016
Create .tar.gz package deterministically using Python's "tarfile"

<!-- Please describe your changes on the following line: -->
A development of #12108, creates a .tar.gz package using the `tarfile` and `gzip` modules, without external dependencies. Fixes #11981.
Also this fixes the issue when the existing `resources/` directory didn't allow to create a new package and failed with "File exists" error.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #11981 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because "more general approach to reproducibility testing is needed"

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12244)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build Related to or part of the build process
Projects
None yet
1 participant