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

Adds build_path checks for deb pkg reprotest #244

Merged
merged 1 commit into from Apr 9, 2021

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Apr 8, 2021

In #231 we noticed that the filesystem path used to build the debian
packages was breaking reproducibility. That's due to the filepath being
recorded inside direct_url.json, as stipulated by PEP610.

Also relevant is PEP427, which describes the RECORD file for wheels.
Here we remove that file, as well, to ensure full reproducibility
regardless of path.

Testing

To evaluate change in the problematic behavior reported in #231, clone this branch fresh in a few different locations, e.g. in DispVMs, and try rebuilding. Make sure that the absolute path of the repo is different between builds! The checksum of the .deb packages should be identical.

@conorsch conorsch requested a review from kushaldas April 8, 2021 00:42
@kushaldas
Copy link
Contributor

In my system the tests are failing for a different reason:

 make[1]: Warning: File 'debian/rules' has modification time 206 s in the future
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
 debian/rules binary
make[1]: Warning: File 'debian/rules' has modification time 206 s in the future
make[2]: Warning: File 'debian/rules' has modification time 206 s in the future
/root/code/securedrop-debian-packaging/.venv/lib/python3.7/site-packages/virtualenv.py:1047: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
make[2]: Warning: File 'debian/rules' has modification time 203 s in the future
make[2]: warning:  Clock skew detected.  Your build may be incomplete.
dpkg-gencontrol: warning: Depends field of package securedrop-export: substitution variable ${python3:Depends} used, but is not defined
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
 dpkg-genbuildinfo
 dpkg-genchanges  >../securedrop-export_0.2.6+buster_amd64.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build .

In #231 we noticed that the filesystem path used to build the debian
packages was breaking reproducibility. That's due to the filepath being
recorded inside `direct_url.json`, as stipulated by PEP610.

Also relevant is PEP427, which describes the `RECORD` file for wheels.
Here we remove that file, as well, to ensure full reproducibility
regardless of path.
@conorsch conorsch requested a review from emkll April 8, 2021 18:20
@conorsch
Copy link
Contributor Author

conorsch commented Apr 8, 2021

CI was previously failing because I'd omitted a debian/rules update for the export package. Added, and now CI is passing. I've added a test plan, marking as ready for review.

@conorsch conorsch marked this pull request as ready for review April 8, 2021 18:21
@sssoleileraaa sssoleileraaa self-requested a review April 9, 2021 22:20
Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm: works with different build roots (repo paths) and across different machines (also learned about being able to specify PKG_GITREF=main from conor)

@sssoleileraaa sssoleileraaa merged commit 5073b4a into main Apr 9, 2021
@sssoleileraaa sssoleileraaa deleted the 231-build-path-variation branch September 13, 2021 23:18
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