-
Notifications
You must be signed in to change notification settings - Fork 12
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 bootstrapping wheels for the build
tool
#238
Conversation
Here is the difference for ✦ ❯ diffoscope localwheels/idna-2.7-py2.py3-none-any.whl /tmp/dtmpdir/idna-2.7-py2.py3-none-any.whl
--- localwheels/idna-2.7-py2.py3-none-any.whl
+++ /tmp/dtmpdir/idna-2.7-py2.py3-none-any.whl
├── zipinfo /dev/stdin
│ @@ -3,13 +3,13 @@
│ -rw-r--r-- 2.0 unx 3299 b- defN 11-Jun-29 20:23 idna/codec.py
│ -rw-r--r-- 2.0 unx 232 b- defN 11-Jun-29 20:23 idna/compat.py
│ -rw-r--r-- 2.0 unx 11858 b- defN 11-Jun-29 20:23 idna/core.py
│ -rw-r--r-- 2.0 unx 39285 b- defN 11-Jun-29 20:23 idna/idnadata.py
│ -rw-r--r-- 2.0 unx 1749 b- defN 11-Jun-29 20:23 idna/intranges.py
│ -rw-r--r-- 2.0 unx 21 b- defN 11-Jun-29 20:23 idna/package_data.py
│ -rw-r--r-- 2.0 unx 197803 b- defN 11-Jun-29 20:23 idna/uts46data.py
│ --rwxr-xr-x 2.0 unx 3947 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/LICENSE.rst
│ +-rwx------ 2.0 unx 3947 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/LICENSE.rst
│ -rw-r--r-- 2.0 unx 8866 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/METADATA
│ -rw-r--r-- 2.0 unx 110 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/WHEEL
│ --rwxr-xr-x 2.0 unx 5 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/top_level.txt
│ +-rwx------ 2.0 unx 5 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/top_level.txt
│ ?rw-rw-r-- 2.0 unx 945 b- defN 11-Jun-29 20:23 idna-2.7.dist-info/RECORD
│ 13 files, 268178 bytes uncompressed, 56675 bytes compressed: 78.9%
|
20ca3ba
to
71c6ab8
Compare
Just now noticed that the I will push another time to update this. The current test failure is happening due to mismatch of the |
a05c2a5
to
4e7da57
Compare
Q: why is the
Thanks to @zenmonkeykstop now I know the answer, it is |
4e7da57
to
83e4c9b
Compare
with
But! I think this is legitimate, the expected hash is for the .whl and the returned hash is actually correct for the tarball on a local checkout. |
9d30621
to
e137924
Compare
Took an initial spin through. Solid work here. My questions at present are mostly around maintanance tasks. Why not store the new wheels for What is Based on prior discussion, mostly in #218, the benefits of these changes appear to be:
Are there more benefits you'd like to call the team's attention to? Regarding the failing CI, I haven't actually taken a look at that part yet, although @zenmonkeykstop has some pretty solid leads above. Thanks for preparing, @kushaldas, looking forward to a deeper review. |
8cf2c2a
to
4f97f84
Compare
Because I am signing the wheels for the bootstrap process, and I did not want to rebuild and resign the
We are using the
We need to use
As mentioned by upstream
This was happening as we are using Ubuntu Focal with Python3.8 on CI instead of the Debian Buster with Python3.7. For now I added a Cython wheel for the Python3.8 (built via same steps on a Focal box). This unblocks us for the CI. |
build
toolbuild
tool
This now works. python3 -m venv .venv source .venv/bin/activate python3 -m pip install -r build-requirements.txt pytest -vvs tests/test_reproducible_wheels.py https://github.com/pypa/build
Required for new-style wheel builds, using the "build" invocation.
The "vary" and "variations" options can be confusing. We want to specify a blocklist for tests NOT to run, running all tests not explicitly excluded.
This will help us to reuse our `build-sync-wheels` script to update our own bootstrapping wheels in future.
``` python3 -m venv .venv source .venv/bin/activate python3 -m pip install pip-tools pip-compile --allow-unsafe --generate-hashes --output-file=requirements.txt requirements.in python3 -m pip install -r requirements.txt ./scripts/build-sync-wheels --cache ./bootstrap -p $PWD BOOTSTRAP=true ./scripts/sync-sha256sums gpg --armor --output bootstrap-sha256sums.txt.asc --detach-sig bootstrap-sha256sums.txt BOOTSTRAP=true ./scripts/verify-sha256sum-signature PKG_DIR=$PWD BOOTSTRAP=true ./scripts/update-requirements ``` This PR also updates the CI steps for the reproducible wheels test.
We were previously installing git-lfs from a tarball, because Debian 9 didn't have it in the distro repos. Debian 10 does, so we'll just use that. Updates the lfs dirs to include the new "bootstrap" location.
Removes all use of Ubuntu VM images.
4f97f84
to
7bd13b6
Compare
The initial installation of pip-tools we can compare hashes with what's on PyPI. Thereafter, installation will be trusting the pinned reqs file during initial bootstrapping, and the custom-built wheel going forward.
7bd13b6
to
cc93232
Compare
Made some small adjustments to the CI logic:
Please have a look, @kushaldas. If you agree we're in good shape, then please go ahead and merge. The next steps as I see them are:
Is there anything else you can point to, that we should handle shortly after merging? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving. Requesting a visual spot-check from @kushaldas, since I pushed a few changes on top.
How to test?
Remember to put your OpenPGP public key in the pubkeys/ directory as maintainer_name.pub. Right now we have the release key, and @kushaldas's key there.
In future we can create another shell script for the whole bootstrapping process using the commands below.
python3 -m pytest -vv tests/test_reproducible_wheels.py
What is happening in the test?
In the test we are actually installing our bootstrapped wheels into the virtualenv, and then using the existing scripts to build the wheels. You can see the same in the readme of the branch https://github.com/freedomofpress/securedrop-debian-packaging/tree/build_with_build#0-enable-the-virtualenv
Points to remember
idna
project is getting extracted with different permissions than our previous wheels. Means differentsha256sum
than our existing wheel.sha256sums
than our existing wheels.