Skip to content
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
13 changes: 13 additions & 0 deletions roles/separate_build_node/defaults/main/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,17 @@ working_directories:
- "{{ base_work_dir }}/castor/build_node"
- "{{ base_work_dir }}/castor/build_node/mock_configs"
- "{{ final_conf_dir }}"
# s390x builds requirements from source without build isolation:
# grpcio 1.58 setup.py needs pkg_resources (removed in setuptools 81),
# git deps with PEP 621 metadata need setuptools>=61 (system one is 53
# and satisfies a bare "<81" via --system-site-packages)
build_node_s390x_build_requirements:
- "setuptools>=61,<81"
- "cython<3"
- "wheel"
build_node_s390x_pip_environment:
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL: "1"
GRPC_PYTHON_BUILD_SYSTEM_ZLIB: "1"
GRPC_PYTHON_BUILD_SYSTEM_CARES: "1"
GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS: "1"
...
6 changes: 6 additions & 0 deletions roles/separate_build_node/defaults/main/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@ build_node_dnf_packages:
- "ubu-keyring"
- "xmlsec1-openssl-devel"
- "rsyslog-logrotate"
# s390x has no prebuilt wheels for some requirements (e.g. grpcio),
# they are compiled against these system libraries
build_node_s390x_dnf_packages:
- "c-ares-devel"
- "openssl-devel"
- "zlib-devel"
...
12 changes: 12 additions & 0 deletions roles/separate_build_node/tasks/create_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,24 @@
become_user: "{{ service_user }}"
ansible.builtin.command: "{{ build_node_venv_directory }}/bin/pip install --upgrade pip"

- name: Install s390x build requirements into virtualenv
become: yes
become_user: "{{ service_user }}"
ansible.builtin.pip:
name: "{{ build_node_s390x_build_requirements }}"
virtualenv: "{{ build_node_venv_directory }}"
when: ansible_facts['architecture'] == 's390x'
tags:
- update-env

- name: Install requirements into virtualenv
become: yes
become_user: "{{ service_user }}"
ansible.builtin.pip:
requirements: "{{ build_node_requirements_path }}"
virtualenv: "{{ build_node_venv_directory }}"
extra_args: "{{ '--no-build-isolation' if ansible_facts['architecture'] == 's390x' else omit }}"
environment: "{{ build_node_s390x_pip_environment if ansible_facts['architecture'] == 's390x' else {} }}"
tags:
- update-env
...
9 changes: 9 additions & 0 deletions roles/separate_build_node/tasks/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@
- buildnode
- "{{ powertools_repository_name }}"
update_cache: yes

- name: Install s390x build dependencies for Python packages
become: yes
ansible.builtin.dnf:
name: "{{ build_node_s390x_dnf_packages }}"
state: latest
enablerepo:
- "{{ powertools_repository_name }}"
when: ansible_facts['architecture'] == 's390x'
...
Loading