mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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>
This commit is contained in:
1 parent
03299bb3ec
commit
04680f6237
1 file changed
+5
-12
+5
-12
@@ -5,14 +5,6 @@
|
||||
# Takes 2 arguments, the path to the dist directory and the version
|
||||
set -ex
|
||||
|
||||
function git_archive_into {
|
||||
mkdir -p "$2"
|
||||
|
||||
git --git-dir="$1"/.git \
|
||||
archive --format=tar HEAD | \
|
||||
tar Cxf "$2" -
|
||||
}
|
||||
|
||||
if [[ -z "$1" || -z "$2" ]] ; then
|
||||
echo "usage: $0 path-to-XEN_ROOT xen-version"
|
||||
exit 1
|
||||
@@ -21,14 +13,15 @@ fi
|
||||
xen_root="$1"
|
||||
desc="$2"
|
||||
|
||||
tdir="$xen_root/dist/tmp.src-tarball"
|
||||
tdir="$xen_root/dist"
|
||||
|
||||
rm -rf $tdir
|
||||
rm -f $tdir/xen-$desc.tar*
|
||||
|
||||
mkdir -p $tdir
|
||||
|
||||
git_archive_into $xen_root $tdir/xen-$desc
|
||||
git --git-dir="$xen_root/.git" archive --format=tar HEAD --prefix=xen-$desc/ \
|
||||
>"$tdir/xen-$desc.tar"
|
||||
|
||||
GZIP=-9v tar cz -f $xen_root/dist/xen-$desc.tar.gz -C $tdir xen-$desc
|
||||
gzip -9k "$tdir/xen-$desc.tar"
|
||||
|
||||
echo "Source tarball in $xen_root/dist/xen-$desc.tar.gz"
|
||||