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 <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Tony Hutter 2025-03-26 13:13:33 -07:00 committed by GitHub
parent 240fc4a6d1
commit 50d87fed6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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