Skip to content

Commit af3e78d

Browse files
committed
ansible: toolchain updates for RHEL machines
Pin `clang` to 19. Add and pin `rust` 1.84 toolchain for Temporal. Add `bindgen-cli` and `rustfmt` for V8 CI.
1 parent 0b670fc commit af3e78d

File tree

6 files changed

+80
-5
lines changed

6 files changed

+80
-5
lines changed

ansible/roles/baselayout/tasks/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@
111111
name: python3
112112
path: "/usr/bin/python3.8"
113113

114+
- name: run os-specific steps after package install
115+
include_tasks: "{{ post_include }}"
116+
loop_control:
117+
loop_var: post_include
118+
with_first_found:
119+
- files:
120+
- "{{ role_path }}/tasks/partials/postinstall/{{ os }}.yml"
121+
- "{{ role_path }}/tasks/partials/postinstall/{{ os|stripversion }}.yml"
122+
skip: true
123+
114124
- name: remove fortune from login shells
115125
when: os|stripversion == 'freebsd'
116126
lineinfile:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Red Hat Enterprise Linux
2+
3+
# Version lock packages to prevent them being updated. Unfortunately we cannot
4+
# lock a package before it is installed.
5+
# The generic "install packages" task in ansible/roles/baselayout/tasks/main.yml
6+
# doesn't allow downgrading, which means if a package is already installed at
7+
# a later version, specifying the version to install will not downgrade to that
8+
# version. So here we check the version and downgrade if necessary before
9+
# version locking to ensure we get what we want.
10+
11+
- name: get installed clang version
12+
ansible.builtin.command: clang -dumpversion
13+
changed_when: false
14+
register: clang_dumpversion_result
15+
16+
- name: get installed rust version
17+
ansible.builtin.command: rustc -vV
18+
changed_when: false
19+
register: rustc_vv_result
20+
21+
# We don't need this. Get rid of it to simplify the number of packages to lock.
22+
- name: remove tracker-miners packages
23+
ansible.builtin.dnf:
24+
autoremove: true
25+
name: tracker-miners
26+
state: absent
27+
28+
- name: downgrade packages
29+
ansible.builtin.dnf:
30+
allow_downgrade: true
31+
name:
32+
- llvm-toolset-{{rhel_llvm_version}}
33+
- rust-toolset-{{rhel_rust_version}}
34+
state: present
35+
when: 'clang_dumpversion_result.rc != 0 or clang_dumpversion_result.stdout != rhel_llvm_version or
36+
rustc_vv_result.rc != 0 or "release: " + rhel_rust_version not in rustc_vv_result.stdout_lines'
37+
38+
# Lock dependent packages as well to prevent those being updated.
39+
- name: lock package versions
40+
community.general.dnf_versionlock:
41+
name:
42+
- cargo-{{rhel_rust_version}}
43+
- clang-{{rhel_llvm_version}}
44+
- clang-libs-{{rhel_llvm_version}}
45+
- clang-resource-filesystem-{{rhel_llvm_version}}
46+
- compiler-rt-{{rhel_llvm_version}}
47+
- libomp-{{rhel_llvm_version}}
48+
- libomp-devel-{{rhel_llvm_version}}
49+
- lld-{{rhel_llvm_version}}
50+
- lld-libs-{{rhel_llvm_version}}
51+
- llvm-{{rhel_llvm_version}}
52+
- llvm-libs-{{rhel_llvm_version}}
53+
- llvm-toolset-{{rhel_llvm_version}}
54+
- rust-{{rhel_rust_version}}
55+
- rust-std-static-{{rhel_rust_version}}
56+
- rust-toolset-{{rhel_rust_version}}
57+
- rustfmt-{{rhel_rust_version}}
58+
state: present

ansible/roles/baselayout/vars/main.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
git_no_binpkg: [ ]
88
git_version: 2.10.2
99

10+
# toolchain versions
11+
rhel_llvm_version: 19.1.7
12+
rhel_rust_version: 1.84.1
13+
1014
ssh_config: /etc/ssh/sshd_config
1115

1216
sshd_service_map: {
@@ -87,11 +91,11 @@ packages: {
8791
],
8892

8993
rhel8: [
90-
'ccache,clang,cmake,gcc-c++,gcc-toolset-10,gcc-toolset-10-libatomic-devel,gcc-toolset-11,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,make,python3',
94+
'ccache,cmake,gcc-c++,gcc-toolset-10,gcc-toolset-10-libatomic-devel,gcc-toolset-11,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,llvm-toolset-{{rhel_llvm_version}},make,python3,python3-dnf-plugin-versionlock,rust-toolset-{{rhel_rust_version}}',
9195
],
9296

9397
rhel9: [
94-
'ccache,clang,cmake,gcc-c++,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,make,python3',
98+
'ccache,cmake,gcc-c++,gcc-toolset-12,gcc-toolset-12-libatomic-devel,gcc-toolset-13,gcc-toolset-13-libatomic-devel,gcc-toolset-14-libatomic-devel,git,llvm-toolset-{{rhel_llvm_version}},make,python3,python3-dnf-plugin-versionlock,rust-toolset-{{rhel_rust_version}}',
9599
],
96100

97101
smartos: [

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
state: enabled
1212

1313
# V8 builds still require Python 2.
14+
# rhel_llvm_version and rhel_rust_version from ansible/roles/baselayout/vars/main.yml
1415
- name: install packages required to build V8
1516
ansible.builtin.dnf:
16-
name: ['glib2-devel', 'llvm-toolset', 'ninja-build', 'python2', 'python2-pip']
17+
name: ['glib2-devel', 'bindgen-cli', 'llvm-toolset-{{rhel_llvm_version}}', 'ninja-build', 'python2', 'python2-pip', 'rustfmt-{{rhel_rust_version}}']
1718
state: present
1819
notify: package updated
1920

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
state: enabled
1212

1313
# Older V8 builds still require Python 2.
14+
# rhel_llvm_version and rhel_rust_version from ansible/roles/baselayout/vars/main.yml
1415
- name: install packages required to build V8
1516
ansible.builtin.dnf:
16-
name: ['GConf2-devel', 'llvm-toolset', 'ninja-build', 'python2', 'python2-pip']
17+
name: ['GConf2-devel', 'bindgen-cli', 'llvm-toolset-{{rhel_llvm_version}}', 'ninja-build', 'python2', 'python2-pip', 'rustfmt-{{rhel_rust_version}}']
1718
state: present
1819
notify: package updated
1920

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
state: enabled
1212

1313
# V8 builds still require Python 2.
14+
# rhel_llvm_version and rhel_rust_version from ansible/roles/baselayout/vars/main.yml
1415
- name: install packages required to build V8
1516
ansible.builtin.dnf:
16-
name: ['llvm-toolset', 'ninja-build', 'python2', 'python2-pip']
17+
name: ['bindgen-cli', 'llvm-toolset-{{rhel_llvm_version}}', 'ninja-build', 'python2', 'python2-pip', 'rustfmt-{{rhel_rust_version}}']
1718
state: present
1819
notify: package updated
1920

0 commit comments

Comments
 (0)