Skip to content

Commit

Permalink
Fail explicitly on hash mismatch at build-time
Browse files Browse the repository at this point in the history
Before, build would fail due to absence of wheels in the /var/securedrop/wheelhouse, at a later step.
  • Loading branch information
emkll committed May 15, 2019
1 parent f988710 commit 75dfbd3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
--requirement {{ securedrop_pip_requirements }} \
--wheel-dir {{ securedrop_wheelhouse }} 2>&1 | tee /tmp/w.out
! grep -i --quiet 'Failed to build' /tmp/w.out
register: wheel_build_output
tags: pip

- name: Ensure source hash sums matched at wheel build-time
fail: msg="Source hash sum mismatch, build cannot continue."
failed_when: "'THESE PACKAGES DO NOT MATCH THE HASHES' in wheel_build_output.stdout"

# Here we need to regenerate a new securedrop-app-code-requirements.txt file
# *without* hashes to bundle in the .deb package, for reasons that follow:
# If requirements hashes are in the requirments file, pip will automatically
Expand Down

0 comments on commit 75dfbd3

Please sign in to comment.