public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bpftrace] rawhide: Add test-release.sh script
@ 2026-09-03 10:43 Viktor Malik
0 siblings, 0 replies; only message in thread
From: Viktor Malik @ 2026-09-03 10:43 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/bpftrace
Branch : rawhide
Commit : ff33069cce9e09e6a3fce5bb495cf9d6dc3a3b3e
Author : Viktor Malik <vmalik@redhat.com>
Date : 2026-09-03T12:36:48+02:00
Stats : +32/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/bpftrace/c/ff33069cce9e09e6a3fce5bb495cf9d6dc3a3b3e?branch=rawhide
Log:
Add test-release.sh script
The script allows to run a scratch build of an upcoming future release
from the GitHub release branch. It accepts the release number as a
parameter and does:
- download the tarball from the corresponding release branch,
- unpacks the tarball, renames the contained directory with the expected
released name, and repacks it back to the tarball,
- runs a scratch build.
This is useful to check if the upcoming release builds in Fedora and
successfully runs unit tests.
Signed-off-by: Viktor Malik <vmalik@redhat.com>
---
diff --git a/test-release.sh b/test-release.sh
new file mode 100755
index 0000000..169097a
--- /dev/null
+++ b/test-release.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+set -euo pipefail
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 <version>" >&2
+ echo "Example: $0 0.27.0" >&2
+ exit 1
+fi
+
+VERSION="$1"
+BRANCH_VERSION="${VERSION%.*}.x"
+TARBALL="bpftrace-${VERSION}.tar.gz"
+BRANCH_DIR="bpftrace-release-${BRANCH_VERSION}"
+TARGET_DIR="bpftrace-${VERSION}"
+
+echo "Downloading tarball from release/${BRANCH_VERSION} branch..."
+curl -Lo "${TARBALL}" \
+ "https://github.com/bpftrace/bpftrace/archive/refs/heads/release/${BRANCH_VERSION}.tar.gz"
+
+echo "Repacking tarball as ${TARBALL}..."
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT
+tar xzf "${TARBALL}" -C "$tmpdir"
+mv "$tmpdir/${BRANCH_DIR}" "$tmpdir/${TARGET_DIR}"
+tar czf "${TARBALL}" -C "$tmpdir" "${TARGET_DIR}"
+
+echo "Updating spec file version to ${VERSION}..."
+sed -i "s/^Version:.*/Version: ${VERSION}/" bpftrace.spec
+sed -i "s/^Release:.*/Release: 1%{?dist}/" bpftrace.spec
+
+echo "Running scratch build..."
+fedpkg scratch-build --srpm
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-03 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 10:43 [rpms/bpftrace] rawhide: Add test-release.sh script Viktor Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox