This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch fix/source-tarball-build
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git

commit d4d5957ab4f9dfe3b7021e8d55e8b956ccfa1083
Author: Wu Sheng <[email protected]>
AuthorDate: Mon Mar 16 16:59:32 2026 +0800

    Fix source tarball build and release SHA-512 checksums
    
    - version.properties: use distro version + own commit ID (like upstream),
      gracefully handle absent .git via resultproperty check.
    - release.sh: fix SHA-512 files to contain only hash + filename,
      re-upload darwin SHA-512 after signing, link to compiling.md.
    - compiling.md: add source tarball build instructions.
---
 changes/changes.md         |  8 ++++++++
 docs/compiling.md          | 33 +++++++++++++++++++++++++++------
 oap-graalvm-server/pom.xml | 34 ++++++++++++----------------------
 release/release.sh         | 10 ++++++++--
 4 files changed, 55 insertions(+), 30 deletions(-)

diff --git a/changes/changes.md b/changes/changes.md
index 9836004..d569e70 100644
--- a/changes/changes.md
+++ b/changes/changes.md
@@ -18,6 +18,7 @@ Upgrade to the latest Apache SkyWalking OAP server, with 
documentation restructu
 - Add Docker Hub README (`docker/DOCKERHUB_README.md`).
 - Add release guide (`docs/release-guide.md`).
 - Update root `README.md` with project intro, quick start, and image registry 
table.
+- Add "Building from Apache Source Tarball" section to `docs/compiling.md`.
 
 ### CI/CD
 
@@ -29,9 +30,16 @@ Upgrade to the latest Apache SkyWalking OAP server, with 
documentation restructu
 ### Release Tooling
 
 - `release/release.sh`: auto-create SVN `graalvm-distro` directory if it 
doesn't exist.
+- `release/release.sh`: fix SHA-512 checksum files to contain only hash + 
filename (no local paths).
+- `release/release.sh`: re-upload darwin SHA-512 to GitHub Release after GPG 
signing.
+- `release/release.sh`: link vote email to `compiling.md` instead of 
`quick-start.md`.
 - `release/full-release.sh`: end-to-end release script.
 - Generate vote email template with GPG signer info and submodule commit IDs.
 
+### Build
+
+- Fix source tarball build: gracefully handle absent `.git` in version 
generation (no git required for Apache source release builds).
+
 ### Testing
 
 - Replacement class staleness detector: add auto-discovery coverage check for 
untracked same-FQCN replacements in `oap-libs-for-graalvm/`.
diff --git a/docs/compiling.md b/docs/compiling.md
index 9777ab7..87fec8e 100644
--- a/docs/compiling.md
+++ b/docs/compiling.md
@@ -8,7 +8,7 @@ JVM distribution and the GraalVM native image binary.
 - **GraalVM JDK 25** with `native-image` installed
 - **Maven 3.9+** (the Maven wrapper `./mvnw` is included)
 - **Docker** (for macOS cross-compilation and container packaging)
-- **Git** (with submodule support)
+- **Git** (with submodule support; not required when building from Apache 
source tarball)
 
 Set `JAVA_HOME` to your GraalVM installation for all commands below:
 
@@ -16,7 +16,28 @@ Set `JAVA_HOME` to your GraalVM installation for all 
commands below:
 export JAVA_HOME=/path/to/graalvm-jdk-25
 ```
 
-## Step 1: Clone the Repository
+## Building from Apache Source Tarball
+
+If you are building from the official Apache source release tarball (no Git 
required):
+
+```bash
+tar -xzf apache-skywalking-graalvm-distro-<version>-src.tar.gz
+cd apache-skywalking-graalvm-distro-<version>-src
+
+# Install SkyWalking submodule artifacts to local Maven repo
+cd skywalking && ../mvnw flatten:flatten install -DskipTests 
-Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dgpg.skip=true
+cd ..
+
+# Build the distro
+make build-distro
+
+# Build the native image
+make native-image
+```
+
+## Building from Git Repository
+
+### Step 1: Clone the Repository
 
 ```bash
 git clone --recurse-submodules 
https://github.com/apache/skywalking-graalvm-distro.git
@@ -29,7 +50,7 @@ If you already cloned without `--recurse-submodules`:
 git submodule update --init --recursive
 ```
 
-## Step 2: Install SkyWalking Submodule (First Time Only)
+### Step 2: Install SkyWalking Submodule (First Time Only)
 
 The upstream SkyWalking artifacts must be installed into your local Maven 
repository before
 the distro modules can compile against them:
@@ -41,7 +62,7 @@ make init-skywalking
 This runs `mvn install` on the `skywalking/` submodule. The result is cached 
in `~/.m2/repository`
 and only needs to be re-run when the submodule is updated.
 
-## Step 3: Build the JVM Distribution
+### Step 3: Build the JVM Distribution
 
 ```bash
 make build-distro
@@ -78,7 +99,7 @@ make shutdown
 make docker-down
 ```
 
-## Step 4: Build the Native Image
+### Step 4: Build the Native Image
 
 After `make build-distro` (or `make compile`), build the native binary:
 
@@ -116,7 +137,7 @@ make native-image-macos
 This runs the `native-image` step inside a 
`ghcr.io/graalvm/native-image-community:25`
 container, producing a Linux binary while reusing your host's Maven cache and 
compiled classes.
 
-## Step 5: Package as Docker Image
+### Step 5: Package as Docker Image
 
 After building the native image:
 
diff --git a/oap-graalvm-server/pom.xml b/oap-graalvm-server/pom.xml
index ef5ed9b..11c128f 100644
--- a/oap-graalvm-server/pom.xml
+++ b/oap-graalvm-server/pom.xml
@@ -444,10 +444,9 @@
                             </target>
                         </configuration>
                     </execution>
-                    <!-- Copy version.properties from submodule, patch version 
for graal-distro.
-                         If version has -SNAPSHOT, replace it with the short 
commit ID.
-                         e.g. 10.4.0-SNAPSHOT -> 10.4.0-b537891-graal-distro
-                         Release versions just get the suffix: 10.4.0 -> 
10.4.0-graal-distro -->
+                    <!-- Generate version.properties for GraphQL version query.
+                         Same approach as upstream: git-commit-id style 
properties.
+                         failonerror=false: source tarball has no .git 
directory. -->
                     <execution>
                         <id>copy-version-properties</id>
                         <phase>generate-resources</phase>
@@ -456,28 +455,19 @@
                         </goals>
                         <configuration>
                             <target>
-                                <!-- Generate version.properties from 
submodule git metadata.
-                                     Does not depend on upstream's 
git-commit-id-plugin output. -->
-                                <exec executable="git" 
dir="${project.basedir}/../skywalking"
-                                      outputproperty="upstream.git.commit.id" 
failonerror="true">
+                                <exec executable="git" 
outputproperty="distro.git.raw"
+                                      resultproperty="distro.git.rc" 
failonerror="false">
                                     <arg value="rev-parse"/>
                                     <arg value="HEAD"/>
                                 </exec>
-                                <loadresource 
property="upstream.git.commit.id.short">
-                                    <string value="${upstream.git.commit.id}"/>
-                                    <filterchain>
-                                        <replaceregex pattern="^(.{7}).*$" 
replace="\1"/>
-                                    </filterchain>
-                                </loadresource>
-                                <!-- Build version: replace -SNAPSHOT with 
-<short-commit>, then append -graal-distro -->
-                                <loadresource 
property="upstream.build.version">
-                                    <string value="${skywalking.version}"/>
-                                    <filterchain>
-                                        <replaceregex pattern="-SNAPSHOT$" 
replace="-${upstream.git.commit.id.short}"/>
-                                    </filterchain>
-                                </loadresource>
+                                <!-- Use git output only when exit code is 0 
-->
+                                <condition property="distro.git.commit.id"
+                                           value="${distro.git.raw}">
+                                    <equals arg1="${distro.git.rc}" arg2="0"/>
+                                </condition>
+                                <property name="distro.git.commit.id" 
value=""/>
                                 <echo 
file="${project.build.outputDirectory}/version.properties"
-                                      message="#Generated by 
skywalking-graalvm-distro${line.separator}git.build.version=${upstream.build.version}-graal-distro${line.separator}git.commit.id=${upstream.git.commit.id}${line.separator}"/>
+                                      message="#Generated by 
skywalking-graalvm-distro${line.separator}git.build.version=${project.version}${line.separator}git.commit.id=${distro.git.commit.id}${line.separator}"/>
                             </target>
                         </configuration>
                     </execution>
diff --git a/release/release.sh b/release/release.sh
index 02d2b3f..561d3f6 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -67,7 +67,7 @@ sign_and_checksum() {
     log "Signing ${file}..."
     gpg --armor --detach-sign "${file}"
     log "Generating SHA-512 checksum for ${file}..."
-    shasum -a 512 "${file}" > "${file}.sha512"
+    (cd "$(dirname "${file}")" && shasum -a 512 "$(basename "${file}")" > 
"$(basename "${file}").sha512")
 }
 
 # ─── Validate arguments ─────────────────────────────────────────────────────
@@ -221,6 +221,12 @@ for tarball in "${DIST_DIR}"/*.tar.gz; do
     sign_and_checksum "${tarball}"
 done
 
+# Re-upload darwin sha512 to GitHub Release (regenerated after GPG signing)
+log "Uploading darwin SHA-512 checksum to GitHub Release..."
+gh release upload "${TAG}" --repo "${REPO}" \
+    "${DIST_DIR}/${DARWIN_SHA512}" \
+    --clobber
+
 # ─── Step 7: Clean up tmp ────────────────────────────────────────────────────
 log "Cleaning up temporary files..."
 rm -rf "${TMP_DIR}"
@@ -326,7 +332,7 @@ Keys to verify the Release Candidate :
 
 Guide to build the release from source :
 
- * 
https://github.com/apache/skywalking-graalvm-distro/blob/v${VERSION}/docs/quick-start.md
+ * 
https://github.com/apache/skywalking-graalvm-distro/blob/v${VERSION}/docs/compiling.md
 
 Voting will start now (${VOTE_DATE}) and will remain open for at least 72 
hours, Request all PMC members to give their vote.
 [ ] +1 Release this package.

Reply via email to