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

ENT-11166: Ubuntu-20 build host needs psycopg2 for python2 #1372

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ci/cfengine-build-host-setup.cf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ bundle agent cfengine_build_host_setup
comment => "note: centos-7 has installed instead of --installed argument, and that works on rhel-8 and rhel-9 so go with the sub-command instead of option";
redhat_8|centos_8::
"have_fakeroot" expression => returnszero("command -v fakeroot >/dev/null", "useshell");
ubuntu_20::
"have_python2_pip_and_psycopg2" expression => returnszero("/usr/local/bin/pip list psycopg2", "useshell"),
comment => "the way we install pip in ubuntu-20 case it will be at /usr/local/bin/pip so this class will not be defined both if pip(2) is not installed AND if psycopg2 for python2 is not installed.";

commands:
!have_opt_jdk21.(debian_9|ubuntu_16)::
Expand All @@ -145,6 +148,8 @@ bundle agent cfengine_build_host_setup
(redhat_8|centos_8).!have_fakeroot:: # special fakeroot, missing from _8 an d up?
"sudo rpm -iv https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-1.23-1.fc29.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/fakeroot/1.23/1.fc29/x86_64/fakeroot-libs-1.23-1.fc29.x86_64.rpm"
contain => in_shell;
ubuntu_20.!have_python2_pip_and_psycopg2::
"sh $(this.promise_dirname)/install-python2-pip-and-psycopg2.sh" contain => in_shell;


classes:
Expand Down
5 changes: 5 additions & 0 deletions ci/install-python2-pip-and-psycopg2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O get-pip.py
python2 get-pip.py
pip install psycopg2-binary
Loading