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

[python] add hashes to python-requirements.txt #19531

Merged

Conversation

timothytrippel
Copy link
Contributor

This fixes #19401.

@timothytrippel
Copy link
Contributor Author

Appologize for the large PR size, it is mostly auto-generated text.

@timothytrippel timothytrippel force-pushed the add-hashes-to-python-packages branch 2 times, most recently from 77a0505 to 8fee847 Compare August 25, 2023 22:44
@timothytrippel timothytrippel marked this pull request as draft August 25, 2023 23:05
Move the `python-requirements.txt` to a `python-requirements.in` file to
prepare for adding a complete `python-requirements.txt` with pinned
versions and hashes for compliance with partner software supply chain
requirements.

Signed-off-by: Tim Trippel <ttrippel@google.com>
@timothytrippel timothytrippel force-pushed the add-hashes-to-python-packages branch 7 times, most recently from 24083a4 to e18ef86 Compare September 7, 2023 23:46
@timothytrippel timothytrippel self-assigned this Sep 7, 2023
@timothytrippel timothytrippel marked this pull request as ready for review September 8, 2023 20:39
util/sh/lib/banners.sh Outdated Show resolved Hide resolved
To comply with partner organization python package supply chain
requirements we add hashes for all python packages (including all
transitive dependencies). To do so we:
1. move the existing `python-requirements.txt` file to
   `python-requirements.in`, as this will become the input to the tool
   (i.e., `pip-compile`) that generates the `python-requirements.txt` file
   we check in,
2. add `pip-tools` as a project dependency, it contains the
   `pip-compile` tool,
3. add `importlib-resources` and `pkgutil_resolve_name` dependencies as these do
   not seem to be pinned by the `jsonschema` package and causes CI errors when
   pinning hashes,
4. change the git VCS link references to fusesoc, edalize, and chipwhisperer
   packages to use plain HTTPS URLs to github hosted zip archives (so
   `pip-compile` can generate the hashes), and
5. autogenerate a `python-requirements.txt` file with `pip-compile
   --generate-hashes python-requirements.in` and check it into the repo.

This partially addresses lowRISC#19401.

Signed-off-by: Tim Trippel <ttrippel@google.com>
This adds a CI check to ensure the auto-generated `python-requirements.txt`
file checked-in does not get stale. This partially addresses lowRISC#19401.

Signed-off-by: Tim Trippel <ttrippel@google.com>
To fix lowRISC#19401, we have a new process for adding Python packages to the
project.

Signed-off-by: Tim Trippel <ttrippel@google.com>
@timothytrippel timothytrippel force-pushed the add-hashes-to-python-packages branch from e18ef86 to 5082568 Compare September 13, 2023 04:28
@timothytrippel timothytrippel merged commit 7cc4161 into lowRISC:master Sep 14, 2023
25 checks passed
@timothytrippel timothytrippel deleted the add-hashes-to-python-packages branch September 14, 2023 19: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.

[python] secure python package software supply chain to comply with partner org requirements
2 participants