From 948700a5c51f4fd0972317ba7c8199fb270007e4 Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune Date: Mon, 24 Apr 2023 08:00:05 +0000 Subject: [PATCH 01/14] Remove stale makeself.lsm reference from README (#303) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bcfb54..873426d 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ makeself.sh [args] archive_dir file_name label startup_script [script_args] * **`--nowait`** : When executed from a new X11 terminal, disable the user prompt at the end of the script execution. * **`--nomd5`** and **`--nocrc`** : Disable the creation of a MD5 / CRC checksum for the archive. This speeds up the extraction process if integrity checking is not necessary. * **`--sha256`** : Adds a SHA256 checksum for the archive. This is in addition to the MD5 / CRC checksums unless `--nomd5` is also used. - * **`--lsm` _file_** : Provide a Linux Software Map (LSM) file to makeself, that will be embedded in the generated archive. LSM files are describing a software package in a way that is easily parseable. The LSM entry can then be later retrieved using the `--lsm` argument to the archive. An example of a LSM file is provided with Makeself. + * **`--lsm` _file_** : Provide a Linux Software Map (LSM) file to makeself, that will be embedded in the generated archive. LSM files are describing a software package in a way that is easily parseable. The LSM entry can then be later retrieved using the `--lsm` argument to the archive. * **`--tar-format opt`** : Specify the tar archive format (default is ustar); you may use any value accepted by your tar command (such as posix, v7, etc). * **`--tar-extra opt`** : Append more options to the tar command line. From 64e126283849773e1f519cb3ccd8a428a12c9eb4 Mon Sep 17 00:00:00 2001 From: Aaron Queen Date: Mon, 24 Apr 2023 14:04:02 -0600 Subject: [PATCH 02/14] --accept should skip pager/more utility, allowing non-interactive install (#305) * --accept should skip using pager/more utility, allowing non-interactive install Fixes #304 --- makeself-header.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeself-header.sh b/makeself-header.sh index 17bf32d..20c8c9d 100755 --- a/makeself-header.sh +++ b/makeself-header.sh @@ -67,7 +67,7 @@ MS_PrintLicense() PAGER=\${PAGER:=more} if test x"\$licensetxt" != x; then PAGER_PATH=\`exec <&- 2>&-; which \$PAGER || command -v \$PAGER || type \$PAGER\` - if test -x "\$PAGER_PATH"; then + if test -x "\$PAGER_PATH" && test x"\$accept" != xy; then echo "\$licensetxt" | \$PAGER else echo "\$licensetxt" From 263bd2ef7daab0e4cda4e95bb801df8933313009 Mon Sep 17 00:00:00 2001 From: Stas Fomin Date: Tue, 16 May 2023 10:55:44 +0300 Subject: [PATCH 03/14] =?UTF-8?q?add=20description=20of=20makeself=20optio?= =?UTF-8?q?n=20=C2=ABtarget=C2=BB=20(#307)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add description of option target, see https://github.com/megastep/makeself/issues/306#issuecomment-1547649366 * https://github.com/megastep/makeself/pull/307#issuecomment-1548630300 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 873426d..6984ca0 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ makeself.sh [args] archive_dir file_name label startup_script [script_args] * **`--lsm` _file_** : Provide a Linux Software Map (LSM) file to makeself, that will be embedded in the generated archive. LSM files are describing a software package in a way that is easily parseable. The LSM entry can then be later retrieved using the `--lsm` argument to the archive. * **`--tar-format opt`** : Specify the tar archive format (default is ustar); you may use any value accepted by your tar command (such as posix, v7, etc). * **`--tar-extra opt`** : Append more options to the tar command line. + * **`--target dir`** : Specify the directory where the archive will be extracted. For instance, in order to exclude the `.git` directory from the packaged archive directory using the GNU `tar`, one can use `makeself.sh --tar-extra "--exclude=.git" ...` From 7ed7219157e7765894ee626e376a7b5a8803742f Mon Sep 17 00:00:00 2001 From: Peter Whittaker Date: Tue, 29 Aug 2023 16:30:11 -0400 Subject: [PATCH 04/14] Move "--target dir" to after the "--tar-extra" example (#313) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6984ca0..5ac62ab 100644 --- a/README.md +++ b/README.md @@ -107,10 +107,10 @@ makeself.sh [args] archive_dir file_name label startup_script [script_args] * **`--lsm` _file_** : Provide a Linux Software Map (LSM) file to makeself, that will be embedded in the generated archive. LSM files are describing a software package in a way that is easily parseable. The LSM entry can then be later retrieved using the `--lsm` argument to the archive. * **`--tar-format opt`** : Specify the tar archive format (default is ustar); you may use any value accepted by your tar command (such as posix, v7, etc). * **`--tar-extra opt`** : Append more options to the tar command line. - * **`--target dir`** : Specify the directory where the archive will be extracted. For instance, in order to exclude the `.git` directory from the packaged archive directory using the GNU `tar`, one can use `makeself.sh --tar-extra "--exclude=.git" ...` + * **`--target dir`** : Specify the directory where the archive will be extracted. * **`--keep-umask`** : Keep the umask set to shell default, rather than overriding when executing the self-extracting archive. * **`--packaging-date date`** : Use provided string as the packaging date instead of the current date. * **`--license` _file_** : Append a license file. 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 05/14] 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 06/14] 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 07/14] 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 08/14] 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 09/14] 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 10/14] 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 11/14] 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 12/14] 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 13/14] 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 14/14] 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