From 44eb7d69fed78d25333e61a87d2256f39407c110 Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 07:00:38 -0700 Subject: [PATCH 1/9] bootstrap, cibuild: Double quote env var usages to prevent word splitting --- script/bootstrap | 38 +++++++++++++++++++------------------- script/cibuild | 8 ++++---- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 773a78e..0dd4c61 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -5,7 +5,7 @@ # @usage : sudo script/bootstrap # @param : none #==================================== -# Copyright (C) 2020-2021 Stephen G. Tuggy +# Copyright (C) 2020-2022 Stephen G. Tuggy # # This file is part of Vega Strike. # @@ -25,7 +25,7 @@ set -e echo "------------------------------" -echo "--- bootstrap | 2021-12-12 ---" +echo "--- bootstrap | 2022-06-11 ---" echo "------------------------------" if [ -f /etc/os-release ] @@ -45,7 +45,7 @@ echo "LINUX_CODENAME = ${LINUX_CODENAME}" export LINUX_VERSION_ID=$(cat $OS_RELEASE_LOCATION | grep ^VERSION_ID= | sed 's/^VERSION_ID=//' | tr -d '"\n') echo "LINUX_VERSION_ID = ${LINUX_VERSION_ID}" -if [ $LINUX_ID == "debian" ] && [ $LINUX_CODENAME == "bullseye" ] +if [ "$LINUX_ID" == "debian" ] && [ "$LINUX_CODENAME" == "bullseye" ] then apt-get update apt-get -qy upgrade @@ -76,7 +76,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "debian" ] && [ $LINUX_CODENAME == "buster" ] +elif [ "$LINUX_ID" == "debian" ] && [ "$LINUX_CODENAME" == "buster" ] then apt-get update apt-get -qy upgrade @@ -106,7 +106,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "debian" ] && [ $LINUX_CODENAME == "stretch" ] +elif [ "$LINUX_ID" == "debian" ] && [ "$LINUX_CODENAME" == "stretch" ] then apt-get update apt-get -qy upgrade @@ -136,7 +136,7 @@ then lsb-release \ python3-pip pip3 install --upgrade-strategy eager cmake -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "impish" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "impish" ] then apt-get update apt-get -qy upgrade @@ -169,7 +169,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "hirsute" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "hirsute" ] then apt-get update apt-get -qy upgrade @@ -201,7 +201,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "groovy" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "groovy" ] then apt-get update apt-get -qy upgrade @@ -233,7 +233,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "focal" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "focal" ] then apt-get update apt-get -qy upgrade @@ -264,7 +264,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "bionic" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "bionic" ] then apt-get update apt-get -qy upgrade @@ -288,7 +288,7 @@ then lsb-release \ python3-pip pip3 install --upgrade-strategy eager cmake -elif [ $LINUX_ID == "ubuntu" ] && [ $LINUX_CODENAME == "xenial" ] +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "xenial" ] then apt-get update apt-get -qy upgrade @@ -312,7 +312,7 @@ then python3-dev \ python3-pip pip3 install cmake -elif [ $LINUX_ID == "linuxmint" ] && [ $LINUX_CODENAME == "ulyana" ] +elif [ "$LINUX_ID" == "linuxmint" ] && [ "$LINUX_CODENAME" == "ulyana" ] then apt-get update apt-get -qy upgrade @@ -343,7 +343,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ $LINUX_ID == "opensuse-leap" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 15 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 2 ]) +elif [ "$LINUX_ID" == "opensuse-leap" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 15 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 2 ]) then zypper --non-interactive install -y \ libboost_log1_66_0-devel \ @@ -374,7 +374,7 @@ then git \ rpm-build \ clang -elif [ $LINUX_ID == "fedora" ] && ([ $LINUX_VERSION_ID -ge 34 ] && [ $LINUX_VERSION_ID -lt 36 ]) +elif [ "$LINUX_ID" == "fedora" ] && ([ $LINUX_VERSION_ID -ge 34 ] && [ $LINUX_VERSION_ID -lt 36 ]) then dnf install -y \ git \ @@ -394,7 +394,7 @@ then rpm-build \ make \ clang -elif [ $LINUX_ID == "fedora" ] && ([ $LINUX_VERSION_ID -ge 32 ] && [ $LINUX_VERSION_ID -lt 34 ]) +elif [ "$LINUX_ID" == "fedora" ] && ([ $LINUX_VERSION_ID -ge 32 ] && [ $LINUX_VERSION_ID -lt 34 ]) then dnf install -y \ git \ @@ -414,7 +414,7 @@ then rpm-build \ make \ clang -elif [ $LINUX_ID == "fedora" ] && ([ $LINUX_VERSION_ID -ge 30 ] && [ $LINUX_VERSION_ID -lt 32 ]) +elif [ "$LINUX_ID" == "fedora" ] && ([ $LINUX_VERSION_ID -ge 30 ] && [ $LINUX_VERSION_ID -lt 32 ]) then dnf install -y \ git \ @@ -434,7 +434,7 @@ then rpm-build \ make \ clang -elif [ $LINUX_ID == "centos" ] && [ $LINUX_VERSION_ID -eq 8 ] +elif [ "$LINUX_ID" == "centos" ] && [ $LINUX_VERSION_ID -eq 8 ] then dnf -y install dnf-plugins-core dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm @@ -457,7 +457,7 @@ then rpm-build \ make \ clang -elif ([ $LINUX_ID == "rhel" ] || [ $LINUX_ID == "redhat" ]) && [ $LINUX_VERSION_ID -eq 8 ] +elif ([ "$LINUX_ID" == "rhel" ] || [ "$LINUX_ID" == "redhat" ]) && [ $LINUX_VERSION_ID -eq 8 ] then dnf -y install dnf-plugins-core dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm @@ -481,7 +481,7 @@ then rpm-build \ make \ clang -elif [ $LINUX_ID == "rocky" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 8 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 4 ]) +elif [ "$LINUX_ID" == "rocky" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 8 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 4 ]) then dnf -y install dnf-plugins-core dnf -y install epel-release diff --git a/script/cibuild b/script/cibuild index cbcff9c..62b25e3 100755 --- a/script/cibuild +++ b/script/cibuild @@ -5,7 +5,7 @@ # @usage : script/cibuild # @param : none #==================================== -# Copyright (C) 2020-2021 Stephen G. Tuggy +# Copyright (C) 2020-2022 Stephen G. Tuggy # # This file is part of Vega Strike. # @@ -25,10 +25,10 @@ set -e if [ ${IS_RELEASE} -eq 1 ]; then - DOCKER_IMG_NAME="vegastrike/vega-strike-build-env:$(echo $FROM | sed 's/:/_/' | sed 's/\//_/')" - docker build --build-arg from=$FROM -t $DOCKER_IMG_NAME . + DOCKER_IMG_NAME="vegastrike/vega-strike-build-env:$(echo "$FROM" | sed 's/:/_/' | sed 's/\//_/')" + docker build --build-arg from="$FROM" -t "$DOCKER_IMG_NAME" . # NOTE: Login done by a Git Hub Action prior to this script being run - docker push $DOCKER_IMG_NAME + docker push "$DOCKER_IMG_NAME" fi echo "cibuild Done!" From 046bdf1c576da4ec706c24802e0a332d3a8d3fcf Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 08:13:36 -0700 Subject: [PATCH 2/9] bootstrap: Add Ubuntu Jammy --- script/bootstrap | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/script/bootstrap b/script/bootstrap index 0dd4c61..7321f7d 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -136,6 +136,39 @@ then lsb-release \ python3-pip pip3 install --upgrade-strategy eager cmake +elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "jammy" ] +then + apt-get update + apt-get -qy upgrade + apt-get -qy install \ + git \ + cmake \ + python3-dev \ + build-essential \ + automake \ + autoconf \ + libpng16-16 \ + libpng-dev \ + libpng-tools \ + libjpeg-turbo8-dev \ + libexpat1-dev \ + libgdk-pixbuf-2.0-dev \ + libgtk-3-dev \ + libopenal-dev \ + libogg-dev \ + libvorbis-dev \ + libglvnd-dev \ + libgl1-mesa-dev \ + libsdl1.2-dev \ + libopengl0 \ + libpostproc-dev \ + freeglut3-dev \ + libboost-python-dev \ + libboost-log-dev \ + libboost-regex-dev \ + libxmu-dev \ + clang \ + lsb-release elif [ "$LINUX_ID" == "ubuntu" ] && [ "$LINUX_CODENAME" == "impish" ] then apt-get update From 6cc6ad6f3da371830903c2c2b49dd50a2a0e19c1 Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 08:20:05 -0700 Subject: [PATCH 3/9] bootstrap: Add Manjaro; quote more variables --- script/bootstrap | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 7321f7d..080fb3c 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -376,7 +376,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ "$LINUX_ID" == "opensuse-leap" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 15 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 2 ]) +elif [ "$LINUX_ID" == "opensuse-leap" ] && ([ $(echo "${LINUX_VERSION_ID}" | cut -f 1 -d '.') -eq 15 ] && [ $(echo "${LINUX_VERSION_ID}" | cut -f 2 -d '.') -ge 2 ]) then zypper --non-interactive install -y \ libboost_log1_66_0-devel \ @@ -514,7 +514,7 @@ then rpm-build \ make \ clang -elif [ "$LINUX_ID" == "rocky" ] && ([ $(echo ${LINUX_VERSION_ID} | cut -f 1 -d '.') -eq 8 ] && [ $(echo ${LINUX_VERSION_ID} | cut -f 2 -d '.') -ge 4 ]) +elif [ "$LINUX_ID" == "rocky" ] && ([ $(echo "${LINUX_VERSION_ID}" | cut -f 1 -d '.') -eq 8 ] && [ $(echo "${LINUX_VERSION_ID}" | cut -f 2 -d '.') -ge 4 ]) then dnf -y install dnf-plugins-core dnf -y install epel-release @@ -540,6 +540,28 @@ then rpm-build \ make \ clang +elif [ "$LINUX_ID" == "manjaro" ] +then + pamac install cmake \ + boost \ + clang \ + gcc \ + gcc-libs \ + sdl \ + expat \ + gtk3 \ + libglvnd \ + mesa \ + python \ + autoconf \ + automake \ + freeglut \ + git \ + libjpeg-turbo \ + libpng \ + libvorbis \ + libxmu \ + openal else echo "Unsupported Linux distribution" exit 2 From edea262ff94daafb9bf1b7354200abc4bbf993de Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 08:54:12 -0700 Subject: [PATCH 4/9] bootstrap: Add openSUSE Leap 15.4 --- script/bootstrap | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 080fb3c..5d09035 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -376,7 +376,7 @@ then libxmu-dev \ clang \ lsb-release -elif [ "$LINUX_ID" == "opensuse-leap" ] && ([ $(echo "${LINUX_VERSION_ID}" | cut -f 1 -d '.') -eq 15 ] && [ $(echo "${LINUX_VERSION_ID}" | cut -f 2 -d '.') -ge 2 ]) +elif [ "$LINUX_ID" == "opensuse-leap" ] && ([ "${LINUX_VERSION_ID}" == "15.2" ] || [ "${LINUX_VERSION_ID}" == "15.3" ]) then zypper --non-interactive install -y \ libboost_log1_66_0-devel \ @@ -407,6 +407,37 @@ then git \ rpm-build \ clang +elif [ "$LINUX_ID" == "opensuse-leap" ] && [ "${LINUX_VERSION_ID}" == "15.4" ] +then + zypper --non-interactive install -y \ + libboost_log1_75_0-devel \ + libboost_python-py3-1_75_0-devel \ + libboost_system1_75_0-devel \ + libboost_filesystem1_75_0-devel \ + libboost_thread1_75_0-devel \ + libboost_regex1_75_0-devel \ + libboost_chrono1_75_0-devel \ + libboost_atomic1_75_0-devel \ + cmake \ + gcc-c++ \ + freeglut-devel \ + libopenal0 \ + openal-soft-devel \ + libSDL-1_2-0 \ + libSDL-devel \ + libvorbis-devel \ + libglvnd-devel \ + libjpeg-turbo \ + libjpeg62-devel \ + libpng16-devel \ + expat \ + libexpat-devel \ + libgtk-3-0 \ + gtk3-devel \ + python3-devel \ + git \ + rpm-build \ + clang elif [ "$LINUX_ID" == "fedora" ] && ([ $LINUX_VERSION_ID -ge 34 ] && [ $LINUX_VERSION_ID -lt 36 ]) then dnf install -y \ From e6259078b3f83766cb143e9738005dd261e328aa Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 08:55:11 -0700 Subject: [PATCH 5/9] bootstrap: Add Fedora 36 --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 5d09035..353c326 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -438,7 +438,7 @@ then git \ rpm-build \ clang -elif [ "$LINUX_ID" == "fedora" ] && ([ $LINUX_VERSION_ID -ge 34 ] && [ $LINUX_VERSION_ID -lt 36 ]) +elif [ "$LINUX_ID" == "fedora" ] && ([ "$LINUX_VERSION_ID" -ge 34 ] && [ "$LINUX_VERSION_ID" -lt 37 ]) then dnf install -y \ git \ From 1960a20e99bcb0ebc76b94eefa1e325e361633f9 Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 09:02:40 -0700 Subject: [PATCH 6/9] GitHub Actions: Add Ubuntu Jammy, Fedora 36 --- .github/workflows/Anchore-Container-Scan.yml | 2 ++ .github/workflows/gh-actions-pr.yml | 2 ++ .github/workflows/gh-actions-release.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/Anchore-Container-Scan.yml b/.github/workflows/Anchore-Container-Scan.yml index 42adf34..d95a903 100644 --- a/.github/workflows/Anchore-Container-Scan.yml +++ b/.github/workflows/Anchore-Container-Scan.yml @@ -21,6 +21,7 @@ jobs: fail-fast: false matrix: include: + - FROM: 'ubuntu:jammy' - FROM: 'ubuntu:impish' - FROM: 'ubuntu:hirsute' - FROM: 'ubuntu:focal' @@ -31,6 +32,7 @@ jobs: - FROM: 'debian:buster' - FROM: 'debian:stretch' - FROM: 'opensuse/leap' + - FROM: 'fedora:36' - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' diff --git a/.github/workflows/gh-actions-pr.yml b/.github/workflows/gh-actions-pr.yml index f0abfa5..8ae8dee 100644 --- a/.github/workflows/gh-actions-pr.yml +++ b/.github/workflows/gh-actions-pr.yml @@ -11,6 +11,7 @@ jobs: fail-fast: true matrix: include: + - FROM: 'ubuntu:jammy' - FROM: 'ubuntu:impish' - FROM: 'ubuntu:hirsute' - FROM: 'ubuntu:focal' @@ -21,6 +22,7 @@ jobs: - FROM: 'debian:buster' - FROM: 'debian:stretch' - FROM: 'opensuse/leap' + - FROM: 'fedora:36' - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' diff --git a/.github/workflows/gh-actions-release.yml b/.github/workflows/gh-actions-release.yml index 27c35e8..3bf7af4 100644 --- a/.github/workflows/gh-actions-release.yml +++ b/.github/workflows/gh-actions-release.yml @@ -18,6 +18,7 @@ jobs: fail-fast: false matrix: include: + - FROM: 'ubuntu:jammy' - FROM: 'ubuntu:impish' - FROM: 'ubuntu:hirsute' - FROM: 'ubuntu:focal' @@ -28,6 +29,7 @@ jobs: - FROM: 'debian:buster' - FROM: 'debian:stretch' - FROM: 'opensuse/leap' + - FROM: 'fedora:36' - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' From 1189d3acae31cdb756541e6d4c472fd58f47c06b Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 09:09:45 -0700 Subject: [PATCH 7/9] GitHub Actions: Add Manjaro --- .github/workflows/Anchore-Container-Scan.yml | 1 + .github/workflows/gh-actions-pr.yml | 1 + .github/workflows/gh-actions-release.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/Anchore-Container-Scan.yml b/.github/workflows/Anchore-Container-Scan.yml index d95a903..b65642b 100644 --- a/.github/workflows/Anchore-Container-Scan.yml +++ b/.github/workflows/Anchore-Container-Scan.yml @@ -36,6 +36,7 @@ jobs: - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' + - FROM: 'manjarolinux/base' # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/.github/workflows/gh-actions-pr.yml b/.github/workflows/gh-actions-pr.yml index 8ae8dee..9b4affb 100644 --- a/.github/workflows/gh-actions-pr.yml +++ b/.github/workflows/gh-actions-pr.yml @@ -26,6 +26,7 @@ jobs: - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' + - FROM: 'manjarolinux/base' steps: - name: Checkout repository diff --git a/.github/workflows/gh-actions-release.yml b/.github/workflows/gh-actions-release.yml index 3bf7af4..8400e77 100644 --- a/.github/workflows/gh-actions-release.yml +++ b/.github/workflows/gh-actions-release.yml @@ -33,6 +33,7 @@ jobs: - FROM: 'fedora:35' - FROM: 'fedora:34' - FROM: 'rockylinux/rockylinux' + - FROM: 'manjarolinux/base' steps: - name: Checkout repository From ae5f3436abb04dbcaf51179a2e43d11c6acfe443 Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 09:19:43 -0700 Subject: [PATCH 8/9] bootstrap: Use pacman instead of pamac? --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 353c326..5f0d1fc 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -573,7 +573,7 @@ then clang elif [ "$LINUX_ID" == "manjaro" ] then - pamac install cmake \ + pacman -S cmake \ boost \ clang \ gcc \ From 3c82dd43b61bf48e07932c4f9c1443d4b9468425 Mon Sep 17 00:00:00 2001 From: Stephen G Tuggy Date: Sat, 11 Jun 2022 09:33:12 -0700 Subject: [PATCH 9/9] bootstrap: Further Manjaro troubleshooting --- script/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bootstrap b/script/bootstrap index 5f0d1fc..493acea 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -573,7 +573,7 @@ then clang elif [ "$LINUX_ID" == "manjaro" ] then - pacman -S cmake \ + pacman -S --refresh --noconfirm cmake \ boost \ clang \ gcc \