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

make build-debs is failing on develop #5471

Closed
1 task
kushaldas opened this issue Aug 31, 2020 · 2 comments · Fixed by #5472
Closed
1 task

make build-debs is failing on develop #5471

kushaldas opened this issue Aug 31, 2020 · 2 comments · Fixed by #5472

Comments

@kushaldas
Copy link
Contributor

kushaldas commented Aug 31, 2020

Description

The package build for xenial is now failing on develop.

Steps to Reproduce

  • make build-debs

Expected Behavior

All packages should be built properly.

Actual Behavior

securedrop-app-code is failing to build with steps related to python packages installation (most probably pip).

randomerror.txt

Note: In the focal_pacakge_bulid branch make build-debs-focal is working.

Comments

Suggestions to fix, any other relevant information.

@emkll
Copy link
Contributor

emkll commented Aug 31, 2020

Looks like the following diff resolves for me locally (h/t @chigby @SaptakS)

We should understand why this regression occurred. While we pin setuptools in dev-requirements.txt, is this specific version of setuptools not used with dh_virtualenv?

diff --git a/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/tasks/main.yml b/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/tasks/main.yml
index c34bb8542..268b0c87f 100644
--- a/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/tasks/main.yml
+++ b/install_files/ansible-base/roles/build-securedrop-app-code-deb-pkg/tasks/main.yml
@@ -106,6 +106,7 @@
     chdir: "{{ securedrop_app_code_deb_dir }}"
   environment:
     DH_VIRTUALENV_INSTALL_ROOT: "/opt/venvs"
+    SETUPTOOLS_USE_DISTUTILS: "stdlib"
 
 - name: Find newly built Debian package
   find:

@rmol
Copy link
Contributor

rmol commented Aug 31, 2020

I think this comment explains it well enough.

As far as I've been able to find, only in dh-virtualenv 1.0 or later can you specify the version of setuptools you want it to use, with the DH_UPGRADE_SETUPTOOLS environment variable.

Getting a recent version of dh-virtualenv to install on Xenial is probably going to take some time, if it's possible at all.

Looks to me like the expedient fix is SETUPTOOLS_USE_DISTUTILS.

kushaldas added a commit that referenced this issue Sep 1, 2020
This patched deployment.py file for dh-virtualenv installs
known working setuptools==46.0.0 in the virtualenv, and then
it will try to install dependencies for SecureDrop.

Fixes #5471
kushaldas added a commit that referenced this issue Sep 1, 2020
This patched deployment.py file for dh-virtualenv installs
known working setuptools==46.0.0 in the virtualenv, and then
it will try to install dependencies for SecureDrop.

Fixes #5471
kushaldas added a commit that referenced this issue Sep 1, 2020
This patched deployment.py file for dh-virtualenv installs
known working setuptools==46.0.0 in the virtualenv, and then
it will try to install dependencies for SecureDrop.

Fixes #5471
@conorsch conorsch mentioned this issue Sep 2, 2020
11 tasks
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 a pull request may close this issue.

3 participants