Skip to content

Commit 168472d

Browse files
committed
unixPB: More updates to support CS10
Signed-off-by: Stewart X Addison <[email protected]>
1 parent 308cfb1 commit 168472d

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

ansible/docker/Dockerfile.CentOS10

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ RUN echo "localhost ansible_connection=local" > /ansible/hosts
1717

1818
RUN ansible-playbook --version
1919

20+
RUN dnf -y install epel-release
21+
2022
RUN set -eux; \
2123
cd /ansible; \
22-
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml -e "git_sha=$git_sha" --skip-tags="debug,hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit"
24+
ansible-playbook -i hosts ansible/playbooks/AdoptOpenJDK_Unix_Playbook/main.yml -e "git_sha=$git_sha" --skip-tags="hosts_file,hostname,adoptopenjdk,jenkins,nagios,superuser,docker,swap_file,crontab,nvidia_cuda_toolkit"
2325

2426
RUN rm -rf /ansible; dnf remove ansible; dnf clean all
2527

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/CentOS.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
- name: Enable CodeReady Builder repo for CentOS9 Stream
4040
shell: dnf config-manager --set-enabled crb
4141
when:
42-
- ansible_distribution_major_version == "9"
42+
when: ansible_distribution_major_version|int > 8
4343
tags: patch_update
4444

4545
- name: Clean dnf cache
@@ -69,27 +69,40 @@
6969
when: ansible_distribution_major_version == "7"
7070
tags: build_tools
7171

72-
- name: Install additional build tools for CentOS 8/9 Stream
72+
- name: Install additional build tools for CentOS 8+
7373
package: "name={{ item }} state=latest"
74-
with_items: "{{ Additional_Build_Tools_CentOS8_CentOS9Stream }}"
75-
when: ansible_distribution_major_version == "8" or ansible_distribution_major_version == "9" or ansible_distribution_major_version == "10"
74+
with_items: "{{ Additional_Build_Tools_CentOS8_Plus }}"
75+
when: ansible_distribution_major_version|int > 7
7676
tags: build_tools
7777

7878
- name: Install additional build tools for NOT CentOS8/9
7979
package: "name={{ item }} state=latest"
8080
with_items: "{{ Additional_Build_Tools_NOT_CentOS8_CentOS9Stream }}"
81-
when:
82-
- ansible_distribution_major_version != "8"
83-
- ansible_distribution_major_version != "9"
84-
- ansible_distribution_major_version != "10"
85-
81+
when: ansible_distribution_major_version|int < 8
8682
tags: build_tools
8783

88-
- name: Install Libdwarf.h for CentOS8 Stream
84+
- name: Install additional test tools for CentOS 10+ e.g. weston
85+
package: "name={{ item }} state=latest"
86+
with_items: "{{ Additional_Test_Tools_CentOS10_Plus }}"
87+
when: ansible_distribution_major_version|int > 9
88+
tags: test_tools
89+
90+
- name: Install additional tools for CentOS pre-10
91+
package: "name={{ item }} state=latest"
92+
with_items: "{{ Additional_Test_Tools_PreCentOS10 }}"
93+
when: ansible_distribution_major_version|int < 10
94+
tags: test_tools
95+
96+
- name: Install libdwarf.h for CentOS8 Stream
8997
shell: dnf --enablerepo=powertools install libdwarf-devel -y
9098
when: (ansible_distribution_major_version == "8") and (relfile_contents.stdout.find('Stream') != -1)
9199
tags: build_tools
92100

101+
#- name: Install texinfo for CentOS10+
102+
# shell: dnf --enablerepo=crb install texinfo -y
103+
# when: ansible_distribution_major_version|int > 10
104+
# tags: build_tools
105+
93106
- name: Install additional build tools for CentOS 8 Stream
94107
package: "name={{ item }} state=latest"
95108
with_items: "{{ Additional_Build_Tools_CentOS8_Stream }}"
@@ -119,7 +132,7 @@
119132
- name: Install jq for SBoM parsing for build reproducibility testing
120133
package: "name=jq state=latest"
121134
when:
122-
- ansible_distribution_major_version > "7"
135+
- ansible_distribution_major_version|int > 7
123136
tags: test_tools
124137

125138
- name: Add devtools-2 to yum repo list for gcc 4.8
@@ -303,8 +316,9 @@
303316
alternatives:
304317
name: java
305318
path: "{{ jre_path.stat.lnk_source }}/bin/java"
306-
when:
307-
- ansible_distribution_major_version > "6"
319+
uildwhen:
320+
- ansible_distribution_major_version|int > 6
321+
- ansible_distribution_major_version|int < 10
308322
tags: default_java
309323

310324
- name: Set Default JDK (CentOS 6)
@@ -320,7 +334,8 @@
320334
name: javac
321335
path: "{{ jdk_path.stat.lnk_source }}/bin/javac"
322336
when:
323-
- ansible_distribution_major_version > "6"
337+
- ansible_distribution_major_version != "6"
338+
- ansible_distribution_major_version != "10"
324339
tags: default_java
325340

326341
###########

ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/Common/vars/CentOS.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Build_Tool_Packages:
2929
- gmp-devel
3030
- gnutls
3131
- gnutls-utils
32-
# - java-1.8.0-openjdk-devel
3332
- libcurl-devel
3433
- libpng-devel
3534
- libXext-devel
@@ -57,7 +56,7 @@ Build_Tool_Packages:
5756
- pigz
5857
- strace # For SBOM dependency analysis
5958
- systemtap-sdt-devel
60-
# - texinfo # For DevKit creation (binutils build)
59+
- texinfo
6160
- unzip
6261
- wget
6362
- which
@@ -74,7 +73,7 @@ Additional_Build_Tools_CentOS7:
7473
- ccache
7574
- procps-ng
7675

77-
Additional_Build_Tools_CentOS8_CentOS9Stream:
76+
Additional_Build_Tools_CentOS8_Plus:
7877
- glibc-locale-source
7978
- glibc-langpack-ja # required for creating Japanese locales
8079
- glibc-langpack-ko # required for creating Korean locales
@@ -103,6 +102,13 @@ Additional_Build_Tools_CentOS8_Stream:
103102
Additional_Build_Tools_NOT_CentOS8_Stream:
104103
- libdwarf-devel # OpenJ9
105104

105+
Additional_Test_Tools_CentOS10_Plus:
106+
- weston
107+
- xwayland-run
108+
109+
Additional_Test_Tools_PreCentOS10:
110+
- xorg-x11-server-Xvfb
111+
106112
Test_Tool_Packages:
107113
- gcc
108114
- gcc-c++
@@ -115,7 +121,6 @@ Test_Tool_Packages:
115121
- perl
116122
- perl-Test-Simple
117123
- xorg-x11-xauth
118-
# - xorg-x11-server-Xvfb
119124
- fakeroot
120125
- gnutls
121126
- gnutls-utils

0 commit comments

Comments
 (0)