Files
xen/tools/misc/mktarball
T
Andrew Cooper 04680f6237 mktarball: Drop double-processing of the archive
This is a partial backport of commit 63ebd0e964 ("releases: use newer
compression methods for tarballs"), but keeping gz as the only compression
method.

In addition to efficiency, this causes the tarball to use root/root ownership,
rather than leak whomever produced the tarball.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2025-11-13 15:59:19 +00:00

28 lines
534 B
Bash
Executable File

#!/bin/bash
#
# mktarball: Make a release tarball (including just xen)
#
# Takes 2 arguments, the path to the dist directory and the version
set -ex
if [[ -z "$1" || -z "$2" ]] ; then
echo "usage: $0 path-to-XEN_ROOT xen-version"
exit 1
fi
xen_root="$1"
desc="$2"
tdir="$xen_root/dist"
rm -f $tdir/xen-$desc.tar*
mkdir -p $tdir
git --git-dir="$xen_root/.git" archive --format=tar HEAD --prefix=xen-$desc/ \
>"$tdir/xen-$desc.tar"
gzip -9k "$tdir/xen-$desc.tar"
echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz"