|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
At the moment, making a release tarball is an annoyingly manual
process that involves running "git archive" into a temporary directory.
Script this process up and make a target, so that the release manager
can simply type "make src-tarball" and have everything show up nice and neat
in dist/xen-$version.tar.gz.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
I realize we don't normally backport this sort of thing, but I thought
it might be worth considering an exception, just to make future releases
much more consistent.
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
---
Makefile | 19 ++++++++++++-------
tools/misc/mktarball | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 7 deletions(-)
create mode 100755 tools/misc/mktarball
diff --git a/Makefile b/Makefile
index 41dabbf..f309034 100644
--- a/Makefile
+++ b/Makefile
@@ -135,6 +135,15 @@ debball: dist
rpmball: dist
bash ./tools/misc/mkrpm $(XEN_ROOT) $$($(MAKE) -C xen xenversion
--no-print-directory)
+# Make a source tarball
+.PHONY: src-tarball
+src-tarball:
+ $(MAKE) -C tools qemu-xen-dir-find
+ $(MAKE) -C tools qemu-xen-dir-force-update
+ $(MAKE) -C tools qemu-xen-traditional-dir-find
+ $(MAKE) -C tools qemu-xen-traditional-dir-force-update
+ bash ./tools/misc/mktarball $(XEN_ROOT) $$($(MAKE) -C xen xenversion
--no-print-directory)
+
.PHONY: clean
clean::
$(MAKE) -C xen clean
@@ -163,13 +172,6 @@ endif
.PHONY: mrproper
mrproper: distclean
-# Prepare for source tarball
-.PHONY: src-tarball
-src-tarball: distclean
- $(MAKE) -C xen .banner
- rm -rf xen/tools/figlet .[a-z]*
- $(MAKE) -C xen distclean
-
.PHONY: help
help:
@echo 'Installation targets:'
@@ -202,6 +204,9 @@ help:
@echo ' install-tboot - download, build, and install the tboot
module'
@echo ' clean-tboot - clean the tboot module if it exists'
@echo
+ @echo 'Tarball targets:'
+ @echo ' src-tarball - make a source tarball with xen and qemu
suitable for a release'
+ @echo
@echo 'Environment:'
@echo ' [ this documentation is sadly not complete ]'
diff --git a/tools/misc/mktarball b/tools/misc/mktarball
new file mode 100755
index 0000000..95ef480
--- /dev/null
+++ b/tools/misc/mktarball
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# mktarball: Make a release tarball (including xen, qemu, and qemu-traditional)
+#
+# Takes 2 arguments, the path to the dist directory and the version
+function finish {
+ [[ -n "$tdir" ]] && rm -rf $tdir
+}
+trap finish EXIT
+
+set -e
+
+if [[ -z "$1" || -z "$2" ]] ; then
+ echo "usage: $0 path-to-XEN_ROOT xen-version"
+ exit 1
+fi
+
+xen_root=$1
+desc=$2
+
+tdir=$(mktemp -d $xen_root/dist/xen.XXXXXXXX) || exit 1
+
+mkdir $tdir/xen-$desc || exit 1
+
+git archive --format=tar HEAD |tar Cxf $tdir/xen-$desc - || exit 1
+
+mkdir $tdir/xen-$desc/tools/qemu-xen || exit 1
+mkdir $tdir/xen-$desc/tools/qemu-xen-traditional || exit 1
+
+pushd $xen_root/tools/qemu-xen-traditional-dir-remote || exit 1
+git archive --format=tar HEAD |tar Cxf
$tdir/xen-$desc/tools/qemu-xen-traditional - || exit 1
+popd || exit 1
+
+pushd $xen_root/tools/qemu-xen-dir-remote || exit 1
+git archive --format=tar HEAD |tar Cxf $tdir/xen-$desc/tools/qemu-xen - ||
exit 1
+popd || exit 1
+
+pushd $tdir
+GZIP=-9v tar zcf $xen_root/dist/xen-$desc.tar.gz xen-$desc
+popd
+
+echo "Tarball in $xen_root/dist/xen-$desc.tar.gz"
\ No newline at end of file
--
1.7.9.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |