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

ansible: add httplib2 #2881

Merged
merged 1 commit into from
Mar 2, 2022
Merged
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
2 changes: 1 addition & 1 deletion ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ hosts:
user: admin
remote_env:
PATH: /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
intel-ubuntu1604-x64-1: {ip: 92.51.196.114}
intel-ubuntu1604-x64-1: {ip: 92.51.196.114, build_test_v8: yes}
intel-ubuntu1604-x64-2: {ip: 92.51.196.115}


Expand Down
10 changes: 0 additions & 10 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@
state: link
src: "/usr/local/bin/python2"

# Required for V8 builds
- name: rhel8 | update python package alternatives
community.general.alternatives:
link: /usr/bin/python
name: python
path: /usr/bin/python2
when:
- os == "rhel8"
- build_test_v8|default(False)

Comment on lines -144 to -153
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to ansible/roles/build-test-v8/tasks/partials/rhel8.yml.

- name: smartos17 | update gcc symlinks
when: os == "smartos17"
file:
Expand Down
4 changes: 0 additions & 4 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ packages: {
'gcc-c++,sudo,git,zip,unzip,iptables-services,GConf2-devel,openssl-devel,python3',
],

rhel8_s390x: [
'GConf2-devel,python2' # Needed for V8 builds
],

Comment on lines -147 to -150
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to ansible/roles/build-test-v8/tasks/partials/rhel8.yml.

rhel8: [
'ccache,cmake,gcc-c++,gcc-toolset-11,git,make,python3',
],
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/rhel7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---

# Red Hat Enterprise Linux 7

- name: register Red Hat subscription
community.general.redhat_subscription:
activationkey: "{{ type }}"
org_id: "{{ rh_org }}"
state: present
16 changes: 16 additions & 0 deletions ansible/roles/build-test-v8/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

#
# Install packages for V8 builds.
#

- name: install packages required for V8 builds
include: "{{ v8deps_include }}"
loop_control:
loop_var: v8deps_include
with_first_found:
- files:
- "{{ role_path }}/tasks/partials/{{ os }}-{{ arch }}.yml"
- "{{ role_path }}/tasks/partials/{{ os }}.yml"
- "{{ role_path }}/tasks/partials/{{ os|stripversion }}.yml"
skip: true
10 changes: 10 additions & 0 deletions ansible/roles/build-test-v8/tasks/partials/centos7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

#
# Install packages for V8 builds.
#

- name: install httplib2
ansible.builtin.yum:
name: ['python2-httplib2', 'python3-httplib2']
state: present
33 changes: 33 additions & 0 deletions ansible/roles/build-test-v8/tasks/partials/rhel7-s390x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

#
# Install packages for V8 builds.
#

# RHEL 7 doesn't have a package for pip and EPEL 7 doesn't support s390x.
# Install pip via `get-pip.py`.
- name: download pip install script
ansible.builtin.get_url:
dest: "{{ home }}/{{ server_user }}/get-pip.py"
url: https://bootstrap.pypa.io/pip/2.7/get-pip.py

- name: install pip
ansible.builtin.shell:
cmd: python {{ home }}/{{ server_user }}/get-pip.py
creates: /usr/bin/pip2

# With pip2 we're getting a `No module named glob` error when pep517 is used
# (defaults to use). httplib2 0.18.0 is the last version that is installable
# with `--no-use-pep517`.
- name: install httplib2 for python 2
ansible.builtin.pip:
executable: pip2
extra_args: --no-use-pep517
name: httplib2==0.18.0
state: present

- name: install httplib2 for python 3
ansible.builtin.pip:
executable: pip-3
name: httplib2
state: present
24 changes: 24 additions & 0 deletions ansible/roles/build-test-v8/tasks/partials/rhel8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

#
# Install packages for V8 builds.
#

# V8 builds still require Python 2.
- name: install packages required to build V8
ansible.builtin.dnf:
name: ['GConf2-devel', 'python2', 'python2-pip', 'python3-httplib2']
state: present

- name: update python package alternatives
community.general.alternatives:
link: /usr/bin/python
name: python
path: /usr/bin/python2

# RHEL 8 doesn't have a package for httplib2 for Python 2 so install via pip.
- name: install httplib2
ansible.builtin.pip:
executable: pip2
name: httplib2
state: present
10 changes: 10 additions & 0 deletions ansible/roles/build-test-v8/tasks/partials/ubuntu1604.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

#
# Install packages for V8 builds.
#

- name: install httplib2
ansible.builtin.apt:
name: ['python-httplib2', 'python3-httplib2']
state: present
5 changes: 2 additions & 3 deletions ansible/roles/java-base/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ packages: {
'freebsd': 'openjdk8-jre',
'ibmi': 'openjdk-11-ea',
'macos': 'adoptopenjdk8',
'rhel7': 'java-1.8.0-openjdk',
'rhel7': 'java-11-openjdk',
'rhel8': 'java-17-openjdk',
'smartos': 'openjdk8',
'ubuntu': 'openjdk-8-jre-headless',
Expand All @@ -30,8 +30,7 @@ java_package_name: "{{ packages[os]|default(packages[os|stripversion])|default('
adoptopenjdk: {
aix71_ppc64: { arch: ppc64 },
aix72_ppc64: { arch: ppc64 },
centos7_ppc64: {},
rhel7_s390x: {}
centos7_ppc64: {}
}

adoptopenjdk_arch: "{{ adoptopenjdk[os+'_'+arch].arch | default(ansible_architecture) }}"
Expand Down
13 changes: 11 additions & 2 deletions jenkins/scripts/select-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,17 @@ case $NODE_NAME in
;;
*)
echo "Setting compiler for Node.js $NODEJS_MAJOR_VERSION on" `cat /etc/redhat-release`
# Default gcc on RHEL 8 is gcc 8
echo "Compiler left as system default:" `g++ -dumpversion`
# Default gcc on RHEL 8 is gcc 8.
if [ "$v8test" != "" ]; then
# For V8 builds make `gcc` and `g++` point to non-ccache shims.
export PATH=/usr/bin:$PATH
export CC="ccache gcc"
export CXX="ccache g++"
else
export CC="gcc"
export CXX="g++"
fi
echo "Compiler left as system default:" `${CXX} -dumpversion`
return
;;
esac
Expand Down