From 88835aed51faf1b42ae039e85fff6ebff8df5af6 Mon Sep 17 00:00:00 2001 From: Scott Fryer Date: Thu, 12 Sep 2024 16:30:53 +0100 Subject: [PATCH 1/5] VPC: Add Ubuntu 24.04 Support --- ansible/pbTestScripts/vmDestroy.sh | 3 ++ .../roles/nasm/files/nasm_patch.patch | 31 +++++++++++++++++++ .../roles/nasm/tasks/main.yml | 29 +++++++++++++++-- ansible/vagrant/Vagrantfile.Ubuntu2404 | 27 ++++++++++++++++ 4 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/files/nasm_patch.patch create mode 100644 ansible/vagrant/Vagrantfile.Ubuntu2404 diff --git a/ansible/pbTestScripts/vmDestroy.sh b/ansible/pbTestScripts/vmDestroy.sh index bc0762e511..fba9bf2521 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/files/nasm_patch.patch b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/files/nasm_patch.patch new file mode 100644 index 0000000000..ed73a47252 --- /dev/null +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/files/nasm_patch.patch @@ -0,0 +1,31 @@ +From 5eb1838b4d3752fd863d19442943983a2a5ee87c Mon Sep 17 00:00:00 2001 +From: Cyrill Gorcunov +Date: Sat, 10 Feb 2018 00:33:41 +0300 +Subject: [PATCH] nasmlib: Drop unused seg_init + +The helper has been eliminated in 2c4a4d5810d0a59b033a07876a2648ef5d4c2859 + +https://bugzilla.nasm.us/show_bug.cgi?id=3392461 + +Signed-off-by: Cyrill Gorcunov +--- + include/nasmlib.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/include/nasmlib.h b/include/nasmlib.h +index 79e866b5..fee1b5ea 100644 +--- a/include/nasmlib.h ++++ b/include/nasmlib.h +@@ -188,10 +188,8 @@ int64_t readnum(char *str, bool *error); + int64_t readstrnum(char *str, int length, bool *warn); + + /* +- * seg_init: Initialise the segment-number allocator. + * seg_alloc: allocate a hitherto unused segment number. + */ +-void pure_func seg_init(void); + int32_t pure_func seg_alloc(void); + + /* +-- +2.17.0 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..f9c617ae15 100644 --- a/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/nasm/tasks/main.yml @@ -93,13 +93,38 @@ - (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 ) +- name: Running ./configure & make for nasm ( Ubuntu 22 x64 ) shell: cd /tmp/nasm-2.13.03 && 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('2.13.03', operator='ne')) ) + tags: nasm + +- name: Copy Nasm Patch ( Ubuntu 24+ ) + copy: + src: files/nasm_patch.patch + dest: /tmp/nasm-2.13.03 + owner: root + group: root + mode: 0755 + 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('2.13.03', operator='ne')) ) + tags: nasm + +- name: Apply Patch For NASM ( Ubuntu 24+ x64 ) + shell: cd /tmp/nasm-2.13.03 && git apply nasm_patch.patch + 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('2.13.03', operator='ne')) ) + tags: nasm + +- name: Running ./configure & make for nasm ( Ubuntu 24+ x64 ) + shell: cd /tmp/nasm-2.13.03 && ./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('2.13.03', operator='ne')) ) tags: nasm - name: Remove downloaded packages for 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 = <