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

Regenerate wheels and build-requirements.txt files for projects #239

Closed
kushaldas opened this issue Apr 5, 2021 · 2 comments · Fixed by #240
Closed

Regenerate wheels and build-requirements.txt files for projects #239

kushaldas opened this issue Apr 5, 2021 · 2 comments · Fixed by #240
Assignees

Comments

@kushaldas
Copy link
Contributor

kushaldas commented Apr 5, 2021

As we merged #238, now we have to rebuild the wheels, this will create new wheels for the all extension based wheels, and also idna wheel.

Initial steps

  • python3 -m venv .venv
  • source .venv/bin/activate
  • python3 -m pip install --require-hashes --no-index --no-deps --no-cache-dir -r build-requirements.txt --find-links ./bootstrap/
  • ./scripts/build-sync-wheels --clobber -p /path/to/securedrop-client
  • ./scripts/build-sync-wheels --clobber -p /path/to/securedrop-log
  • ./scripts/build-sync-wheels --clobber -p /path/to/securedrop-proxy
  • git status # and verify if we are missing any other wheels, if yes, git revert them to get back
  • ./scripts/sync-sha256sums # To create a new sha256sums file and then also sign it with your key
  • PKG_DIR=/path/to/securedrop-client ./scripts/update-requirements
  • PKG_DIR=/path/to/securedrop-log ./scripts/update-requirements
  • PKG_DIR=/path/to/securedrop-proxy ./scripts/update-requirements

What are doing in the steps above

  • First create a new virtualenv and then installs our bootstrapped wheels.
  • We then delete all the wheels from our ./localwheels directory
  • Next 3 build-sync-wheels commands will rebuild all the wheels
  • Next we create the new sha256sums files
  • Next 3 commands to create the build-requirements.txt files, if new wheels then we will see in git status/diff
@eloquence eloquence added this to Sprint #68 (3/24-4/7) in SecureDrop Team Board Apr 5, 2021
@conorsch
Copy link
Contributor

conorsch commented Apr 5, 2021

Great plan! To clarify, we expect only a select few wheels to change checksums once rebuilt, specifically those with shared object (C code) files shipped inside of them. For example:

$ git status --porcelain
 M localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl
 M localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl
 M localwheels/idna-2.7-py2.py3-none-any.whl

Maybe also pyyaml? But don't be surprised if the vast majority of wheel files show the same checksum! Just make sure you use the --clobber flag to overwrite any pre-existing wheels stored locally, so git will detect a difference, if any.

@sssoleileraaa
Copy link
Contributor

I can confirm that I see the same checksums for the wheels minus the three conor mentioned above.

securedrop-log

checksums are the same

securedrop-client

(.venv) user@dev-workstation:~/securedrop-debian-packaging(main⚡) » git status --porcelain                                       
 M localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl
 M localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl
 M localwheels/idna-2.7-py2.py3-none-any.whl
diff --git a/localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl b/localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl
index 3756c60..f5b07c1 100644
--- a/localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl
+++ b/localwheels/MarkupSafe-1.1.1-cp37-cp37m-linux_x86_64.whl
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ab68abcb133e25365454d0572e20c096cfebd3c350b51fe2cf8f54f495e0ca9d
-size 33689
+oid sha256:2cbead4fb0a1c34655c6e11505e6bc165cbaf2f0b7429bec57c3729e3b846a5b
+size 33698
diff --git a/localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl b/localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl
index 6196c10..39bfd0b 100644
--- a/localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl
+++ b/localwheels/SQLAlchemy-1.3.3-cp37-cp37m-linux_x86_64.whl
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a06165a69eab0db62d673c84fd021b209d1036577e7ca7a9e6e16455fc15fc56
-size 1187841
+oid sha256:dc0eb75221aefc3bfd912c5e10630194728f8af5124619e898c9b22049c62ddc
+size 1187904
diff --git a/localwheels/idna-2.7-py2.py3-none-any.whl b/localwheels/idna-2.7-py2.py3-none-any.whl
index e4dd7fe..a11ba3d 100644
--- a/localwheels/idna-2.7-py2.py3-none-any.whl
+++ b/localwheels/idna-2.7-py2.py3-none-any.whl
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a967a752dba5492be34f30f8633cee512d2ec923fe3a2e201d87353b540d2955
+oid sha256:69bbcd9c42b0add994610a68202532e9b327992b61344cd76e743ee592725f50
 size 58211

securedrop-proxy

git status --porcelain
 M localwheels/idna-2.7-py2.py3-none-any.whl
diff --git a/localwheels/idna-2.7-py2.py3-none-any.whl b/localwheels/idna-2.7-py2.py3-none-any.whl
index e4dd7fe..a11ba3d 100644
--- a/localwheels/idna-2.7-py2.py3-none-any.whl
+++ b/localwheels/idna-2.7-py2.py3-none-any.whl
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a967a752dba5492be34f30f8633cee512d2ec923fe3a2e201d87353b540d2955
+oid sha256:69bbcd9c42b0add994610a68202532e9b327992b61344cd76e743ee592725f50
 size 58211
(END)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants