From 0fff9f225bb2e52f7a065e79d8848d5ab31a8eaa Mon Sep 17 00:00:00 2001 From: redcatbear Date: Fri, 27 Nov 2026 11:00:25 +0100 Subject: [PATCH 1/5] #656: Compress binaries in GitHub release. --- .github/workflows/github_release.sh | 40 +++++++++++++++++++++----- doc/spec/design.md | 12 ++++++++ doc/spec/system_requirements.md | 13 +++++++++ doc/user_guide/installation/linux.md | 7 +++-- doc/user_guide/installation/macos.md | 7 +++-- doc/user_guide/installation/windows.md | 5 ++-- 6 files changed, 69 insertions(+), 15 deletions(-) diff --git a/.github/workflows/github_release.sh b/.github/workflows/github_release.sh index 61afd1eb..514cc4a1 100755 --- a/.github/workflows/github_release.sh +++ b/.github/workflows/github_release.sh @@ -30,13 +30,39 @@ calculate_checksum "$sbom_path" readonly sbom_checksum_path="${sbom_path}.sha256" shopt -s nullglob -native_assets=() native_release_assets=() -for native_asset in "$base_dir"/native-image/target/openfasttrace-*; do - [[ ${native_asset##*/} =~ ^openfasttrace-(linux|windows|macos)([-._].*)?$ ]] && - native_assets+=("$native_asset") - calculate_checksum "$native_asset" - native_release_assets+=("$native_asset" "${native_asset}.sha256") +# [bld->dsn~cli.native-executable.release-packaging~1] +package_native_binary() { + local native_binary="$1" + local temporary_directory + local package_path + temporary_directory=$(mktemp -d) + readonly temporary_directory + cp "$native_binary" "$temporary_directory/oft" + + case "${native_binary##*/}" in + openfasttrace-windows*) + package_path="${native_binary%.exe}.zip" + (cd "$temporary_directory" && zip --quiet "$package_path" oft) + ;; + openfasttrace-linux* | openfasttrace-macos*) + package_path="${native_binary}.tar.gz" + tar --create --gzip --file "$package_path" --directory "$temporary_directory" oft + ;; + *) + rm -rf "$temporary_directory" + return 1 + ;; + esac + + rm -rf "$temporary_directory" + calculate_checksum "$package_path" + native_release_assets+=("$package_path" "${package_path}.sha256") +} + +for native_binary in "$base_dir"/native-image/target/openfasttrace-*; do + [[ ${native_binary##*/} =~ ^openfasttrace-(linux|windows|macos)([-._].*)?$ ]] || continue + package_native_binary "$native_binary" done # Create GitHub release @@ -56,7 +82,7 @@ echo "Artifact file : $artifact_path" echo "Artifact checksum: $artifact_checksum_path" echo "SBOM file : $sbom_path" echo "SBOM checksum : $sbom_checksum_path" -printf 'Platform binaries: %s\n' "${native_assets[@]}" +printf 'Platform binary packages: %s\n' "${native_release_assets[@]}" release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" \ "$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path" \ diff --git a/doc/spec/design.md b/doc/spec/design.md index b7d266eb..75e6c048 100644 --- a/doc/spec/design.md +++ b/doc/spec/design.md @@ -1513,6 +1513,18 @@ Covers: Needs: itest, bld +#### Native Binary Release Packages +`dsn~cli.native-executable.release-packaging~1` + +The GitHub release workflow creates compress archives containing the native executable called `oft`. +Archives are `.tar.gz` for Linux and macOS or a `.zip` package for Windows. The workflow calculates the SHA-256 checksum of each compressed package. + +Covers: + +* [`req~cli.native-executable.release-packaging~1`](system_requirements.md#native-command-line-executable-release-packages) + +Needs: bld + # Quality Requirements See [Quality Requirements](design/quality_requirements.md). diff --git a/doc/spec/system_requirements.md b/doc/spec/system_requirements.md index 55e5b637..3bd04f5d 100644 --- a/doc/spec/system_requirements.md +++ b/doc/spec/system_requirements.md @@ -1146,6 +1146,19 @@ Covers: Needs: dsn +#### Native Command Line Executable Release Packages +`req~cli.native-executable.release-packaging~1` + +OpenFastTrace distributes native command line executables as GitHub release packages. +Linux and macOS packages use the `.tar.gz` format, Windows packages use the `.zip` format, and every package contains the executable named `oft`. +Each package has a SHA-256 checksum file calculated from the compressed package. + +Covers: + +* [feat~command-line-interface~1](#command-line-interface) + +Needs: dsn + ### Third Party Plugins #### Loading Plugins diff --git a/doc/user_guide/installation/linux.md b/doc/user_guide/installation/linux.md index 532e8aa5..f21c464c 100644 --- a/doc/user_guide/installation/linux.md +++ b/doc/user_guide/installation/linux.md @@ -12,11 +12,12 @@ There are several ways to install OpenFastTrace on Linux, depending on your dist ### Native Executable -Download `openfasttrace-linux-x64` or `openfasttrace-linux-arm64` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. The native executable does not require Java. Make it executable and run it: +Download `openfasttrace-linux-x64.tar.gz` or `openfasttrace-linux-arm64.tar.gz` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. Extract the archive, make the included `oft` executable runnable, and start it. The native executable does not require Java: ```bash -chmod +x openfasttrace-linux-x64 -./openfasttrace-linux-x64 --help +tar -xzf openfasttrace-linux-x64.tar.gz +chmod +x oft +./oft --help ``` Use the executable JAR below when you need third-party Java plugin JARs. diff --git a/doc/user_guide/installation/macos.md b/doc/user_guide/installation/macos.md index ed4c5623..d40d1a33 100644 --- a/doc/user_guide/installation/macos.md +++ b/doc/user_guide/installation/macos.md @@ -12,11 +12,12 @@ OpenFastTrace can be installed on macOS using Homebrew, JBang or manually via a ### Native Executable -Download the matching executable, `openfasttrace-macos-arm64` for Apple Silicon from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. The native executable does not require Java. Run it from Terminal: +Download `openfasttrace-macos-arm64.tar.gz` for Apple Silicon from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. Extract the archive and run the included `oft` executable from Terminal. The native executable does not require Java: ```bash -chmod +x openfasttrace-macos-arm64 -./openfasttrace-macos-arm64 --help +tar -xzf openfasttrace-macos-arm64.tar.gz +chmod +x oft +./oft --help ``` Use the executable JAR below when you need third-party Java plugin JARs. diff --git a/doc/user_guide/installation/windows.md b/doc/user_guide/installation/windows.md index cf968f90..da72a71b 100644 --- a/doc/user_guide/installation/windows.md +++ b/doc/user_guide/installation/windows.md @@ -12,10 +12,11 @@ On Windows, OpenFastTrace can be run via JBang or manually via the JAR file. ### Native Executable -Download `openfasttrace-windows-x64.exe` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page and run it from PowerShell: +Download `openfasttrace-windows-x64.zip` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. Extract it and run the included `oft` executable from PowerShell: ```powershell -.\openfasttrace-windows-x64.exe --help +Expand-Archive openfasttrace-windows-x64.zip -DestinationPath oft +.\oft\oft --help ``` The native executable does not require Java. Use the executable JAR below when you need third-party Java plugin JARs. From 274211e69de8c69fb442515d6fc32e529705e843 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Fri, 27 Nov 2026 11:04:53 +0100 Subject: [PATCH 2/5] #656: Added changelog entry. --- doc/changes/changes.md | 3 ++- doc/changes/changes_4.12.1.md | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 doc/changes/changes_4.12.1.md diff --git a/doc/changes/changes.md b/doc/changes/changes.md index 91f22d77..babdb83c 100644 --- a/doc/changes/changes.md +++ b/doc/changes/changes.md @@ -6,7 +6,8 @@ nav_order: 9 # Changes -* [4.12.0](changes_4.12.0.md) unreleased +* [4.12.1](changes_4.12.1.md) unreleased +* [4.12.0](changes_4.12.0.md) * [4.11.0](changes_4.11.0.md) * [4.10.0](changes_4.10.0.md) * [4.9.0](changes_4.9.0.md) diff --git a/doc/changes/changes_4.12.1.md b/doc/changes/changes_4.12.1.md new file mode 100644 index 00000000..89ca8092 --- /dev/null +++ b/doc/changes/changes_4.12.1.md @@ -0,0 +1,12 @@ +# OpenFastTrace 4.12.1, Unreleased on GitHub + +Code name: Compressed Native Release Packages + +## Summary + +Native command-line executables in GitHub releases are now compressed for faster downloads and reduced storage use. Linux and macOS packages use `.tar.gz`; the Windows package uses `.zip`. +Each package contains the executable named `oft` and has a SHA-256 checksum for the compressed package. + +## Features + +* #656: Compress native binaries in GitHub releases From 389bfe2cf2a0f4466aed5e448b02bb95863fc0f0 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Fri, 27 Nov 2026 11:19:21 +0100 Subject: [PATCH 3/5] #656: Fixed self-trace. --- .github/workflows/github_release.sh | 1 - .github/workflows/release.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github_release.sh b/.github/workflows/github_release.sh index 514cc4a1..b5b7b3bc 100755 --- a/.github/workflows/github_release.sh +++ b/.github/workflows/github_release.sh @@ -31,7 +31,6 @@ readonly sbom_checksum_path="${sbom_path}.sha256" shopt -s nullglob native_release_assets=() -# [bld->dsn~cli.native-executable.release-packaging~1] package_native_binary() { local native_binary="$1" local temporary_directory diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 876aa604..ad729304 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -165,6 +165,7 @@ jobs: MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} - name: Create GitHub Release + # [bld->dsn~cli.native-executable.release-packaging~1] run: ./.github/workflows/github_release.sh env: GH_TOKEN: ${{ github.token }} From c24f19ee956144baf93845982fd150171f102bb0 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Fri, 27 Nov 2026 11:29:21 +0100 Subject: [PATCH 4/5] #656: Added missing path in ITestSelfTrace. --- .../test/java/org/itsallcode/openfasttrace/ITestSelfTrace.java | 1 + 1 file changed, 1 insertion(+) diff --git a/product/src/test/java/org/itsallcode/openfasttrace/ITestSelfTrace.java b/product/src/test/java/org/itsallcode/openfasttrace/ITestSelfTrace.java index b4e43644..1eec14d3 100644 --- a/product/src/test/java/org/itsallcode/openfasttrace/ITestSelfTrace.java +++ b/product/src/test/java/org/itsallcode/openfasttrace/ITestSelfTrace.java @@ -69,6 +69,7 @@ private ImportSettings buildOftSettings() final Path baseDir = getProjectBaseDir(); return ImportSettings.builder() .addInputs(baseDir.resolve("doc/spec/")) + .addInputs(baseDir.resolve(".github/workflows/")) .addInputs(baseDir.resolve("product/pom.xml")) .addInputs(baseDir.resolve("native-image/pom.xml")) .addInputs(findInputDirectories(baseDir)) From 630776475b795b5018706d1485cfd9617d68b171 Mon Sep 17 00:00:00 2001 From: redcatbear Date: Fri, 27 Nov 2026 11:43:16 +0100 Subject: [PATCH 5/5] #656: Applied review result. --- doc/spec/design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/spec/design.md b/doc/spec/design.md index 75e6c048..0e0d73d5 100644 --- a/doc/spec/design.md +++ b/doc/spec/design.md @@ -1516,7 +1516,7 @@ Needs: itest, bld #### Native Binary Release Packages `dsn~cli.native-executable.release-packaging~1` -The GitHub release workflow creates compress archives containing the native executable called `oft`. +The GitHub release workflow creates compressed archives containing the native executable called `oft`. Archives are `.tar.gz` for Linux and macOS or a `.zip` package for Windows. The workflow calculates the SHA-256 checksum of each compressed package. Covers: