From 50d87fed6a3a65c69579c37e1ba4045a49f241c7 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Wed, 26 Mar 2025 13:13:33 -0700 Subject: [PATCH] runners: Fix tarball build for zfs-qemu-packages workflow (#17158) The initial tarballs we built for for zfs-2.3.1 were incorrect since they did not have a ./configure script, and their files were not in a top level zfs-2.3.1/ directory. This commit copies the way we built them on buildbot so the tarballs are created as expected. Signed-off-by: Tony Hutter Reviewed-by: Tino Reichardt Reviewed-by: Brian Behlendorf --- .github/workflows/scripts/qemu-4-build-vm.sh | 28 +++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/scripts/qemu-4-build-vm.sh b/.github/workflows/scripts/qemu-4-build-vm.sh index 9d3cd76ca..7583c4ffa 100755 --- a/.github/workflows/scripts/qemu-4-build-vm.sh +++ b/.github/workflows/scripts/qemu-4-build-vm.sh @@ -301,6 +301,17 @@ function deb_build_and_install() { echo "##[endgroup]" } +function build_tarball { + if [ -n "$REPO" ] ; then + ./autogen.sh + ./configure --with-config=srpm + make dist + mkdir -p /tmp/repo/releases + # The tarball name is based off of 'Version' field in the META file. + mv *.tar.gz /tmp/repo/releases/ + fi +} + # Debug: show kernel cmdline if [ -f /proc/cmdline ] ; then cat /proc/cmdline || true @@ -340,6 +351,13 @@ case "$OS" in ;; fedora*) rpm_build_and_install "$extra" + + # Historically, we've always built the release tarballs on Fedora, since + # there was one instance long ago where we built them on CentOS 7, and they + # didn't work correctly for everyone. + if [ -n "$TARBALL" ] ; then + build_tarball + fi ;; debian*|ubuntu*) deb_build_and_install "$extra" @@ -349,16 +367,6 @@ case "$OS" in ;; esac -# Optionally build tarballs. The tarball's root directory name will be named -# after the current tag, like 'zfs-2.3.0' or 'master'. -if [ -n "$TARBALL" ] ; then - tag="$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)" - git archive --format=tar.gz -o $tag.tar.gz $tag - if [ -n "$REPO" ] ; then - mkdir -p /tmp/repo/releases - cp $tag.tar.gz /tmp/repo/releases - fi -fi # building the zfs module was ok echo 0 > /var/tmp/build-exitcode.txt