From a39cca2b1406207ef9cf9a092cb116074eadb75a Mon Sep 17 00:00:00 2001 From: Scott Fryer <60462088+steelhead31@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:37:15 +0100 Subject: [PATCH] Fix issue 3577 (#3732) * VPC: Add Ubuntu 24.04 Support * VPC: Add Ubuntu 24 Support To Build Test * Test using Devkit on noble * VPC: Add Ubuntu 24 Support To Build Test * VPC: Bump NASM to v2.16.03 and abstract Linter Fix Linter fix VPC: Fix whitespace VPC: Bump NASM to 2.16.03 This removes the need for a patch to support gcc > 7.5 Co-Authored-By: Martijn Verburg Co-Authored-By: Stewart X Addison <6487691+sxa@users.noreply.github.com> --------- Co-authored-by: Martijn Verburg Co-authored-by: Stewart X Addison <6487691+sxa@users.noreply.github.com> --- ansible/pbTestScripts/buildJDK.sh | 13 ++++---- ansible/pbTestScripts/vmDestroy.sh | 3 ++ .../roles/nasm/tasks/main.yml | 30 +++++++++++++------ ansible/vagrant/Vagrantfile.Ubuntu2404 | 27 +++++++++++++++++ 4 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 ansible/vagrant/Vagrantfile.Ubuntu2404 diff --git a/ansible/pbTestScripts/buildJDK.sh b/ansible/pbTestScripts/buildJDK.sh index 0ca8a291e5..eb6375e12f 100755 --- a/ansible/pbTestScripts/buildJDK.sh +++ b/ansible/pbTestScripts/buildJDK.sh @@ -47,7 +47,6 @@ processArgs() { usage() { echo "Usage: ./buildJDK.sh - Options: --version | -v Specify the JDK version to build --fork | -f Specify the fork of openjdk-build to build from (Default: adoptopenjdk) @@ -55,7 +54,6 @@ usage() { --hotspot | -hs Builds hotspot, default is openj9 --clean-workspace | -c Removes old openjdk-build folder before cloning --help | -h Shows this message - If not specified, JDK8-J9 will be built with the standard openjdk-build repo" echo } @@ -92,7 +90,7 @@ findJDK7() { if [[ $jdkPath == "" ]]; then jdkPath="/usr/lib/jvm/jdk8" fi - + export JDK7_BOOT_DIR=$jdkPath } @@ -165,7 +163,7 @@ if [[ "$(uname -m)" == "armv7l" && "$VARIANT" == "openj9" ]]; then fi if [[ "$JAVA_TO_BUILD" == "jdk8u" ]]; then - findJDK7 + findJDK7 fi # Don't build the debug-images as it takes too much space, and doesn't benefit VPC @@ -173,6 +171,11 @@ fi export CONFIGURE_ARGS="--with-native-debug-symbols=none" export BUILD_ARGS="--custom-cacerts false" +# For Ubuntu24.04 Support - Don't Use gcc-7 +if grep 'noble' /etc/*-release >/dev/null 2>&1; then + export BUILD_ARGS="--custom-cacerts false --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b03" +fi + echo "buildJDK.sh DEBUG: TARGET_OS=${TARGET_OS:-} ARCHITECTURE=${ARCHITECTURE:-} @@ -185,7 +188,7 @@ echo "buildJDK.sh DEBUG: BRANCH=$GIT_BRANCH:-} FILENAME=${FILENAME:-}" -cloneRepo +cloneRepo cd $WORKSPACE/openjdk-build build-farm/make-adopt-build-farm.sh diff --git a/ansible/pbTestScripts/vmDestroy.sh b/ansible/pbTestScripts/vmDestroy.sh index bc0762e511..616b4bd3f7 100755 --- a/ansible/pbTestScripts/vmDestroy.sh +++ b/ansible/pbTestScripts/vmDestroy.sh @@ -49,6 +49,8 @@ checkOS() { osToDestroy="U21";; "Ubuntu2204" | "U22" | "u22" ) osToDestroy="U22";; + "Ubuntu2404" | "U24" | "u24" ) + osToDestroy="U24";; "CentOS6" | "centos6" | "C6" | "c6" ) osToDestroy="C6" ;; "CentOS7" | "centos7" | "C7" | "c7" ) @@ -83,6 +85,7 @@ listOS() { - Ubuntu2004 - Ubuntu2104 - Ubuntu2204 + - Ubuntu2404 - CentOS6 - CentOS7 - CentOS8 diff --git a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml index 9e234bb3df..1a725ba2e8 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml @@ -11,6 +11,10 @@ # If so, nasm_installed.rc will equal 0, then check if its the version required # If not, download, compile and install +- name: Set NASM version + set_fact: + nasm_version: "2.16.03" + # checking the common location for ubuntu package installs - name: Checking for /usr/bin/gcc-7 stat: path=/usr/bin/gcc-7 @@ -71,14 +75,14 @@ tags: nasm - name: Download nasm sources - shell: cd /tmp && wget https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.gz + shell: cd /tmp && wget https://www.nasm.us/pub/nasm/releasebuilds/{{ nasm_version }}/nasm-{{ nasm_version }}.tar.gz when: - - (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) + - (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) ) tags: nasm - name: Extract nasm sources unarchive: - src: /tmp/nasm-2.13.03.tar.gz + src: /tmp/nasm-{{ nasm_version }}.tar.gz dest: /tmp/ copy: False when: @@ -86,20 +90,28 @@ tags: nasm - name: Running ./configure & make for nasm ( Not Ubuntu 22+ ) - shell: cd /tmp/nasm-2.13.03 && CC={{ CC }} && ./configure -prefix=/usr/local && make install + shell: cd /tmp/nasm-{{ nasm_version }} && CC={{ CC }} && ./configure -prefix=/usr/local && make install environment: CC: "{{ CC }}" when: - (ansible_distribution != "Ubuntu" or ansible_distribution == "Ubuntu" and ansible_distribution_major_version < "22") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) tags: nasm -- name: Running ./configure & make for nasm ( Ubuntu 22+ x64 ) - shell: cd /tmp/nasm-2.13.03 && CC={{ CC }} && ./configure -prefix=/usr/local && make install +- name: Running ./configure & make for nasm ( Ubuntu 22 x64 ) + shell: cd /tmp/nasm-{{ nasm_version }} && CC={{ CC }} && ./configure -prefix=/usr/local && make install environment: CC: "{{ CC }}" LIBRARY_PATH: /usr/lib/x86_64-linux-gnu when: - - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version >= "22" and ansible_architecture == "x86_64") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare('2.13.03', operator='ne')) ) + - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "22" and ansible_architecture == "x86_64") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) ) + tags: nasm + +- name: Running ./configure & make for nasm ( Ubuntu 24+ x64 ) + shell: cd /tmp/nasm-{{ nasm_version }} && ./configure -prefix=/usr/local && make install + environment: + LIBRARY_PATH: /usr/lib/x86_64-linux-gnu + when: + - (ansible_distribution == "Ubuntu" and ansible_distribution_major_version >= "24" and ansible_architecture == "x86_64") and (nasm_installed.rc is defined) and ((nasm_installed.rc != 0 ) or (nasm_installed.rc == 0 and nasm.stdout is version_compare(nasm_version, operator='ne')) ) tags: nasm - name: Remove downloaded packages for nasm @@ -107,7 +119,7 @@ path: "{{ item }}" state: absent with_items: - - /tmp/nasm-2.13.03 - - /tmp/nasm-2.13.03.tar.gz + - /tmp/nasm-{{ nasm_version }} + - /tmp/nasm-{{ nasm_version }}.tar.gz failed_when: false tags: nasm diff --git a/ansible/vagrant/Vagrantfile.Ubuntu2404 b/ansible/vagrant/Vagrantfile.Ubuntu2404 new file mode 100644 index 0000000000..6dbed64547 --- /dev/null +++ b/ansible/vagrant/Vagrantfile.Ubuntu2404 @@ -0,0 +1,27 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +$script = <