From 98b312a3329690efc201604bf01710b4263385c4 Mon Sep 17 00:00:00 2001 From: OMRON SENTECH <38231753+ose-support-ros@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:21:00 +0900 Subject: [PATCH 01/10] Add -e to PAGER options. (#317) Added option -e to exit automatically after displaying licenses in more. --- makeself-header.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeself-header.sh b/makeself-header.sh index 20c8c9d..a9d16ae 100755 --- a/makeself-header.sh +++ b/makeself-header.sh @@ -68,7 +68,7 @@ MS_PrintLicense() if test x"\$licensetxt" != x; then PAGER_PATH=\`exec <&- 2>&-; which \$PAGER || command -v \$PAGER || type \$PAGER\` if test -x "\$PAGER_PATH" && test x"\$accept" != xy; then - echo "\$licensetxt" | \$PAGER + echo "\$licensetxt" | \$PAGER -e else echo "\$licensetxt" fi From 9414c665380576976c02cd23730cf6238e705c91 Mon Sep 17 00:00:00 2001 From: the-real-neil <44631+the-real-neil@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:53:04 +0000 Subject: [PATCH 02/10] fix #318: document and test SETUP_NOCHECK (#319) --- makeself-header.sh | 4 ++++ makeself.1 | 3 +++ makeself.sh | 4 ++++ test/nochecktest | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100755 test/nochecktest diff --git a/makeself-header.sh b/makeself-header.sh index a9d16ae..53e3577 100755 --- a/makeself-header.sh +++ b/makeself-header.sh @@ -191,6 +191,10 @@ Makeself version $MS_VERSION --cleanup-args args Arguments to the cleanup script. Wrap in quotes to provide multiple arguments. -- Following arguments will be passed to the embedded script\${helpheader} + + ENVIRONMENT + SETUP_NOCHECK + If set to 1, then checksum validation will be skipped. EOH } diff --git a/makeself.1 b/makeself.1 index 392384e..be84973 100644 --- a/makeself.1 +++ b/makeself.1 @@ -140,7 +140,10 @@ Append a license file. .TP .B --packaging-date date Use provided string as the packaging date instead of the current date. +.SH "ENVIRONMENT" .TP +.B SETUP_NOCHECK +If set to 1, then checksum validation will be skipped. .SH "EXAMPLES" Here is an example, assuming the user has a package image stored in a /home/joe/mysoft, and he wants to generate a self-extracting package named mysoft.sh, which will launch diff --git a/makeself.sh b/makeself.sh index aa55dc0..478b0ab 100755 --- a/makeself.sh +++ b/makeself.sh @@ -110,6 +110,10 @@ MS_Usage() echo " --keep-umask : Keep the umask set to shell default, rather than overriding when executing self-extracting archive." echo " --export-conf : Export configuration variables to startup_script" echo + echo "ENVIRONMENT" + echo " SETUP_NOCHECK" + echo " If set to 1, then checksum validation will be skipped." + echo echo "Do not forget to give a fully qualified startup script name" echo "(i.e. with a ./ prefix if inside the archive)." exit 1 diff --git a/test/nochecktest b/test/nochecktest new file mode 100755 index 0000000..dd826a7 --- /dev/null +++ b/test/nochecktest @@ -0,0 +1,42 @@ +#!/bin/bash +set -eu +THIS="$(readlink -f "$0")" +THISDIR="$(dirname "${THIS}")" +SUT="$(dirname "${THISDIR}")/makeself.sh" + +testNoCheck() { + # Create a directory with a simple payload. + local archive_dir + archive_dir="$(mktemp -dt archive_dir.XXXXXX)" + ( + cd "${archive_dir}" + touch foo.txt bar.txt qux.txt + ) + + # Create a self-extracting archive. + local file_name + file_name="$(mktemp -t file_name.XXXXXX)" + "${SUT}" --nox11 --sha256 "${archive_dir}" "${file_name}" "no check test" true + assertEquals "$?" 0 + + printf '\nArchive verification enabled:\n' >&2 + sync + "${file_name}" 2>&1 + assertEquals "$?" 0 + + "${file_name}" 2>&1 | grep -qF 'Verifying archive integrity...' + assertEquals "$?" 0 + + printf '\nArchive verification disabled:\n' >&2 + SETUP_NOCHECK=1 "${file_name}" 2>&1 + assertEquals "$?" 0 + + SETUP_NOCHECK=1 "${file_name}" 2>&1 | grep -qFv 'Verifying archive integrity...' + assertEquals "$?" 0 + + # Clean up. + rm -rf "${archive_dir}" "${file_name}" +} + +# Load and run shUnit2. +source "./shunit2/shunit2" From 096ca3e54fbcc6ef1b46d77968ef263703183a21 Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Mon, 6 Nov 2023 13:56:27 -0800 Subject: [PATCH 03/10] Upgrade FreeBSD VM actions for CI --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc243cd..01e5df8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,13 +56,13 @@ jobs: test-freebsd: needs: test - runs-on: macos-12 + runs-on: ubuntu-22.04 name: Test Makeself on FreeBSD steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 - name: Test on FreeBSD - uses: vmactions/freebsd-vm@v0 + uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: pkg install -y pbzip2 From 87f1c8232fd3d25b54987c06abb301f3242d2949 Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Wed, 22 Nov 2023 02:06:10 -0800 Subject: [PATCH 04/10] Updated Github actions --- .github/workflows/build.yml | 24 ++++++++++++------------ .github/workflows/release.yml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01e5df8..f6ca44c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-22.04 name: Test Makeself on FreeBSD steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on FreeBSD uses: vmactions/freebsd-vm@v1 @@ -72,13 +72,13 @@ jobs: test-openbsd: needs: test - runs-on: macos-12 + runs-on: ubuntu-22.04 name: Test Makeself on OpenBSD steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on OpenBSD - uses: vmactions/openbsd-vm@v0 + uses: vmactions/openbsd-vm@v1 with: usesh: true prepare: pkg_add pbzip2 @@ -88,13 +88,13 @@ jobs: test-netbsd: needs: test - runs-on: macos-12 + runs-on: ubuntu-22.04 name: Test Makeself on NetBSD steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on NetBSD - uses: vmactions/netbsd-vm@v0 + uses: vmactions/netbsd-vm@v1 with: usesh: true prepare: pkg_add pbzip2 @@ -104,10 +104,10 @@ jobs: test-solaris: needs: test - runs-on: macos-12 + runs-on: ubuntu-22.04 name: Test Makeself on Solaris steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on Solaris uses: vmactions/solaris-vm@v0 @@ -124,7 +124,7 @@ jobs: runs-on: ubuntu-latest container: alpine:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on Alpine run: sh ./test/run-makeself.sh @@ -137,7 +137,7 @@ jobs: IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: pull windows container ${{ env.IMAGE_NAME }} @@ -159,7 +159,7 @@ jobs: steps: - name: Checkout Makeself - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run ShellCheck uses: megastep/shell-linter@develop with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ceb269..7df58d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: run: sudo env DEBIAN_FRONTEND=noninteractive apt-get -qq -y install pbzip2 - name: Checkout Makeself - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build release run: | From bb4e871ccb1360a72828d41d5272c85cbc47a3ff Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Wed, 22 Nov 2023 02:15:39 -0800 Subject: [PATCH 05/10] Fix OpenBSD package install --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6ca44c..aa8f535 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: uses: vmactions/openbsd-vm@v1 with: usesh: true - prepare: pkg_add pbzip2 + prepare: /usr/sbin/pkg_add pbzip2 run: | pwd sh ./test/run-makeself.sh From c418cad997728d1ba635241a1287e2b9ec5ea713 Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Wed, 22 Nov 2023 02:24:58 -0800 Subject: [PATCH 06/10] Fix for NetBSD tests, revert Solaris VM to using macOS --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa8f535..2bb5de2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -97,14 +97,14 @@ jobs: uses: vmactions/netbsd-vm@v1 with: usesh: true - prepare: pkg_add pbzip2 + prepare: /usr/sbin/pkg_add pbzip2 run: | pwd sh ./test/run-makeself.sh test-solaris: needs: test - runs-on: ubuntu-22.04 + runs-on: macos-12 name: Test Makeself on Solaris steps: - uses: actions/checkout@v4 From 5f79d74a910f4b9fd4f9998fce6486cafcd3a253 Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Wed, 21 Feb 2024 02:27:32 -0800 Subject: [PATCH 07/10] Updated test actions versions --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bb5de2..a2e4143 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,7 +56,7 @@ jobs: test-freebsd: needs: test - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Test Makeself on FreeBSD steps: - uses: actions/checkout@v4 @@ -72,7 +72,7 @@ jobs: test-openbsd: needs: test - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Test Makeself on OpenBSD steps: - uses: actions/checkout@v4 @@ -88,7 +88,7 @@ jobs: test-netbsd: needs: test - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest name: Test Makeself on NetBSD steps: - uses: actions/checkout@v4 @@ -104,13 +104,13 @@ jobs: test-solaris: needs: test - runs-on: macos-12 + runs-on: ubuntu-latest name: Test Makeself on Solaris steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v3 - name: Test on Solaris - uses: vmactions/solaris-vm@v0 + uses: vmactions/solaris-vm@v1 with: mem: 2048 prepare: pkgutil -y -i pbzip2 From 1f4baba44cce910c80775722bb815e3a137674ad Mon Sep 17 00:00:00 2001 From: Stephane Peter Date: Wed, 21 Feb 2024 02:34:39 -0800 Subject: [PATCH 08/10] Upgraded more actions for Node 20 --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2e4143..8eda282 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,14 +39,14 @@ jobs: run: brew install pbzip2 coreutils zstd - name: Checkout Makeself - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'true' - name: Build release run: make - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: build-${{ matrix.artifact }} path: release @@ -60,7 +60,7 @@ jobs: name: Test Makeself on FreeBSD steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Test on FreeBSD uses: vmactions/freebsd-vm@v1 with: @@ -76,7 +76,7 @@ jobs: name: Test Makeself on OpenBSD steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Test on OpenBSD uses: vmactions/openbsd-vm@v1 with: @@ -92,7 +92,7 @@ jobs: name: Test Makeself on NetBSD steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Test on NetBSD uses: vmactions/netbsd-vm@v1 with: @@ -108,7 +108,7 @@ jobs: name: Test Makeself on Solaris steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Test on Solaris uses: vmactions/solaris-vm@v1 with: @@ -125,7 +125,7 @@ jobs: container: alpine:latest steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Test on Alpine run: sh ./test/run-makeself.sh @@ -138,7 +138,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: pull windows container ${{ env.IMAGE_NAME }} shell: cmd From 6b5ff564315bd81601c161845a1a0df2a6b5b6c2 Mon Sep 17 00:00:00 2001 From: zero-pytagoras <91202914+zero-pytagoras@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:43:39 +0200 Subject: [PATCH 09/10] Update makeself.sh adding `-pbkdf2` to ENCRYPT_CMD and DECRYPT_CMD in order fix the error of `deprecated key derivation used` --- makeself.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makeself.sh b/makeself.sh index 478b0ab..0efcef8 100755 --- a/makeself.sh +++ b/makeself.sh @@ -546,8 +546,8 @@ if test x"$ENCRYPT" = x"openssl"; then echo "Appending to existing archive is not compatible with OpenSSL encryption." >&2 fi - ENCRYPT_CMD="openssl enc -aes-256-cbc -salt" - DECRYPT_CMD="openssl enc -aes-256-cbc -d" + ENCRYPT_CMD="openssl enc -aes-256-cbc -salt -pbkdf2" + DECRYPT_CMD="openssl enc -aes-256-cbc -d -salt -pbkdf2" if test x"$OPENSSL_NO_MD" != x"y"; then ENCRYPT_CMD="$ENCRYPT_CMD -md sha256" From 1e94247c6fe4fa1a9fedaa265267d2e4a5e9aa5a Mon Sep 17 00:00:00 2001 From: zero-pytagoras <91202914+zero-pytagoras@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:05:04 +0200 Subject: [PATCH 10/10] adding RockyLinux to build.yml --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8eda282..19a11b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,14 @@ jobs: container: 'ubuntu:latest' artifact: 'ubuntu' - - os: ubuntu-latest + - os: alpine-latest container: 'alpine:latest' artifact: 'alpine' - + + - os: rockylinux + container: 'rockylinux:9' # they do not have latest, but 9 will be covered for all the defaults for all latest 9 version + artifact: 'rockylinux' + - os: windows-latest artifact: 'windows' @@ -29,7 +33,13 @@ jobs: run: | apt update apt -y install git make pbzip2 binutils bzip2 zstd gnupg - + + - name: Install RockyLinux packages + if: matrix.container == 'rockylinux:9' + run: | + dnf groupinstall -y "Development Tools" "RPM Development Tools" + dnf install -y zstd binutils binutils-devel gnupg2 pbzip2 + - name: Install Alpine packages if: matrix.container == 'alpine:latest' run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd