Skip to content

Commit

Permalink
VPC: Bump NASM to v2.16.03 and abstract
Browse files Browse the repository at this point in the history
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 <martijnverburg@gmail.com>
Co-Authored-By: Stewart X Addison <6487691+sxa@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 19, 2024
1 parent f1f0015 commit b4ade61
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 64 deletions.
6 changes: 2 additions & 4 deletions ansible/pbTestScripts/buildJDK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ processArgs() {

usage() {
echo "Usage: ./buildJDK.sh <options>
Options:
--version | -v Specify the JDK version to build
--fork | -f Specify the fork of openjdk-build to build from (Default: adoptopenjdk)
--branch | -b Specify the branch of the fork to build from (Default: master)
--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
}
Expand Down Expand Up @@ -173,9 +171,9 @@ fi
export CONFIGURE_ARGS="--with-native-debug-symbols=none"
export BUILD_ARGS="--custom-cacerts false"

# For Ubutu24.04 Support - Dont Use gcc-7
# 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"
export BUILD_ARGS="--custom-cacerts false --use-adoptium-devkit gcc-11.3.0-Centos7.9.2009-b03"
fi

echo "buildJDK.sh DEBUG:
Expand Down
4 changes: 2 additions & 2 deletions ansible/pbTestScripts/vmDestroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ checkOS() {
osToDestroy="U21";;
"Ubuntu2204" | "U22" | "u22" )
osToDestroy="U22";;
"Ubuntu2404" | "U24" | "u24" )
osToDestroy="U24";;
"Ubuntu2404" | "U24" | "u24" )
osToDestroy="U24";;
"CentOS6" | "centos6" | "C6" | "c6" )
osToDestroy="C6" ;;
"CentOS7" | "centos7" | "C7" | "c7" )
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,68 +75,51 @@
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:
- (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 ( 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
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')) )
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')) )
- (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-2.13.03 && ./configure -prefix=/usr/local && make install
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('2.13.03', operator='ne')) )
- (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
file:
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

0 comments on commit b4ade61

Please sign in to comment.