Skip to content

Commit edf845b

Browse files
committed
test hashsums in pip install
1 parent 6c9efa0 commit edf845b

File tree

4 files changed

+51
-16
lines changed

4 files changed

+51
-16
lines changed

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,20 @@ ENV GRR_SOURCE /usr/src/grr
6969
RUN python -m venv --system-site-packages $VIRTUAL_ENV
7070
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
7171

72-
RUN ${VIRTUAL_ENV}/bin/python -m pip install wheel nodeenv grpcio-tools==1.60
73-
74-
RUN ${VIRTUAL_ENV}/bin/nodeenv -p --prebuilt --node=16.13.0
75-
7672
RUN mkdir ${GRR_SOURCE}
7773
ADD . ${GRR_SOURCE}
7874

7975
WORKDIR ${GRR_SOURCE}
8076

81-
RUN ${VIRTUAL_ENV}/bin/python -m pip install \
77+
RUN ls
78+
79+
RUN ${VIRTUAL_ENV}/bin/python -m pip install --require-hashes -r requirements.txt
80+
81+
RUN ${VIRTUAL_ENV}/bin/nodeenv -p --prebuilt --node=16.13.0
82+
83+
84+
85+
RUN ${VIRTUAL_ENV}/bin/python -m pip install --no-deps --no-index \
8286
-e grr/proto \
8387
-e grr/core \
8488
-e grr/client \

build_requirements.txt

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
pip==24.0
2-
pytest==6.2.5
3-
pytest-xdist==2.2.1
4-
setuptools==69.5.1
5-
wheel==0.43.0
1+
pip==24.0 \
2+
--hash=sha256:ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2 \
3+
--hash=sha256:ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc
4+
pytest==6.2.5 \
5+
--hash=sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89 \
6+
--hash=sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134
7+
pytest-xdist==2.2.1 \
8+
--hash=sha256:718887296892f92683f6a51f25a3ae584993b06f7076ce1e1fd482e59a8220a2 \
9+
--hash=sha256:2447a1592ab41745955fb870ac7023026f20a5f0bfccf1b52a879bd193d46450
10+
setuptools==69.5.1 \
11+
--hash=sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987 \
12+
--hash=sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32
13+
wheel==0.43.0 \
14+
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
15+
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
16+
six==1.16.0 \
17+
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
18+
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
19+
attrs==23.2.0 \
20+
--hash=sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30 \
21+
--hash=sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1
22+

requirements.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
wheel==0.43.0 \
2+
--hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
3+
--hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
4+
nodeenv==1.9.1 \
5+
--hash=sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f \
6+
--hash=sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9
7+
grpcio-tools==1.60.1 \
8+
--hash=sha256:28ae665113affebdd109247386786e5ab4dccfcfad1b5f68e9cce2e326b57ee6 \
9+
--hash=sha256:da08224ab8675c6d464b988bd8ca02cccd2bf0275bceefe8f6219bfd4a4f5e85
10+
protobuf==4.25.3 \
11+
--hash=sha256:7c8daa26095f82482307bc717364e7c13f4f1c99659be82890dcfc215194554d \
12+
--hash=sha256:25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c
13+
grpcio==1.64.1 \
14+
--hash=sha256:e7cd5c1325f6808b8ae31657d281aadb2a51ac11ab081ae335f4f7fc44c1721d

travis/install_client_builder.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
set -e
77

88
source "${HOME}/INSTALL/bin/activate"
9-
pip install -r build_requirements.txt
10-
pip install --upgrade six
9+
pip install --require-hashes -r build_requirements.txt
1110

1211
# Get around a Travis bug: https://github.com/travis-ci/travis-ci/issues/8315#issuecomment-327951718
1312
unset _JAVA_OPTIONS
@@ -19,14 +18,14 @@ unset _JAVA_OPTIONS
1918
# Proto package.
2019
cd grr/proto
2120
python setup.py sdist
22-
pip install ./dist/grr_response_proto-*.tar.gz
21+
pip install --no-deps --no-index ./dist/grr_response_proto-*.tar.gz
2322
cd -
2423

2524
# Base package, grr-response-core, depends on grr-response-proto.
2625
# Running sdist first since it accepts --no-sync-artifacts flag.
2726
cd grr/core
2827
python setup.py sdist --no-sync-artifacts
29-
pip install ./dist/grr_response_core-*.tar.gz
28+
pip install --no-deps --no-index ./dist/grr_response_core-*.tar.gz
3029
cd -
3130

3231
# Depends on grr-response-core.
@@ -35,7 +34,7 @@ cd -
3534
# only gets copied during sdist step.
3635
cd grr/client
3736
python setup.py sdist
38-
pip install ./dist/grr_response_client-*.tar.gz
37+
pip install --no-deps --no-index ./dist/grr_response_client-*.tar.gz
3938
cd -
4039

4140
# Depends on grr-response-client.
@@ -44,5 +43,6 @@ cd -
4443
# only gets copied during sdist step.
4544
cd grr/client_builder
4645
python setup.py sdist
47-
pip install ./dist/grr_response_client_builder-*.tar.gz
46+
pip install --no-deps --no-index ./dist/grr_response_client_builder-*.tar.gz
4847
cd -
48+

0 commit comments

Comments
 (0)