Skip to content

Commit 863db6d

Browse files
tonyhutterFedorUporovVstack
authored andcommitted
runners: Fix tarball build for zfs-qemu-packages workflow (openzfs#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 <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]>
1 parent 1dab4a5 commit 863db6d

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/workflows/scripts/qemu-4-build-vm.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,17 @@ function deb_build_and_install() {
301301
echo "##[endgroup]"
302302
}
303303

304+
function build_tarball {
305+
if [ -n "$REPO" ] ; then
306+
./autogen.sh
307+
./configure --with-config=srpm
308+
make dist
309+
mkdir -p /tmp/repo/releases
310+
# The tarball name is based off of 'Version' field in the META file.
311+
mv *.tar.gz /tmp/repo/releases/
312+
fi
313+
}
314+
304315
# Debug: show kernel cmdline
305316
if [ -f /proc/cmdline ] ; then
306317
cat /proc/cmdline || true
@@ -340,6 +351,13 @@ case "$OS" in
340351
;;
341352
fedora*)
342353
rpm_build_and_install "$extra"
354+
355+
# Historically, we've always built the release tarballs on Fedora, since
356+
# there was one instance long ago where we built them on CentOS 7, and they
357+
# didn't work correctly for everyone.
358+
if [ -n "$TARBALL" ] ; then
359+
build_tarball
360+
fi
343361
;;
344362
debian*|ubuntu*)
345363
deb_build_and_install "$extra"
@@ -349,16 +367,6 @@ case "$OS" in
349367
;;
350368
esac
351369

352-
# Optionally build tarballs. The tarball's root directory name will be named
353-
# after the current tag, like 'zfs-2.3.0' or 'master'.
354-
if [ -n "$TARBALL" ] ; then
355-
tag="$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)"
356-
git archive --format=tar.gz -o $tag.tar.gz $tag
357-
if [ -n "$REPO" ] ; then
358-
mkdir -p /tmp/repo/releases
359-
cp $tag.tar.gz /tmp/repo/releases
360-
fi
361-
fi
362370

363371
# building the zfs module was ok
364372
echo 0 > /var/tmp/build-exitcode.txt

0 commit comments

Comments
 (0)