qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] build: add make dist target (v2)


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] build: add make dist target (v2)
Date: Wed, 18 Jul 2012 15:07:39 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jul 17, 2012 at 01:33:32PM -0500, Anthony Liguori wrote:
> Let's stop screwing up releases by having a script do the work that Anthony's
> fat fingers can't seem to get right.
> 
> Cc: Michael Roth <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>
> ---
> v1 -> v2
>  - include the scripts for real this time
>  - remove tar/tarbin from PHONY
> ---
>  Makefile             |   19 ++++++++-----------
>  scripts/make-release |   24 ++++++++++++++++++++++++
>  2 files changed, 32 insertions(+), 11 deletions(-)
>  create mode 100755 scripts/make-release
> 
> diff --git a/Makefile b/Makefile
> index 9707fa0..abf825d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -31,7 +31,7 @@ Makefile: ;
>  configure: ;
>  
>  .PHONY: all clean cscope distclean dvi html info install install-doc \
> -     pdf recurse-all speed tar tarbin test build-all
> +     pdf recurse-all speed test build-all dist
>  
>  $(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
>  
> @@ -232,6 +232,13 @@ clean:
>       rm -f $$d/qemu-options.def; \
>          done
>  
> +VERSION ?= $(shell cat VERSION)
> +
> +dist: qemu-$(VERSION).tar.bz2
> +
> +qemu-%.tar.bz2:
> +     $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst 
> qemu-%.tar.bz2,%,$@)"
> +
>  distclean: clean
>       rm -f config-host.mak config-host.h* config-host.ld $(DOCS) 
> qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
>       rm -f config-all-devices.mak
> @@ -390,15 +397,5 @@ qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \
>       qemu-img.texi qemu-nbd.texi qemu-options.texi \
>       qemu-monitor.texi qemu-img-cmds.texi
>  
> -VERSION ?= $(shell cat VERSION)
> -FILE = qemu-$(VERSION)
> -
> -# tar release (use 'make -k tar' on a checkouted tree)
> -tar:
> -     rm -rf /tmp/$(FILE)
> -     cp -r . /tmp/$(FILE)
> -     cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude 
> .git --exclude .svn
> -     rm -rf /tmp/$(FILE)
> -
>  # Include automatically generated dependency files
>  -include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d 
> qapi/*.d qga/*.d)
> diff --git a/scripts/make-release b/scripts/make-release
> new file mode 100755
> index 0000000..196c755
> --- /dev/null
> +++ b/scripts/make-release
> @@ -0,0 +1,24 @@
> +#!/bin/bash -e
> +#
> +# QEMU Release Script
> +#
> +# Copyright IBM, Corp. 2012
> +#
> +# Authors:
> +#  Anthony Liguori <address@hidden>
> +#
> +# This work is licensed under the terms of the GNU GPLv2 or later.
> +# See the COPYING file in the top-level directory.
> +
> +src="$1"
> +version="$2"
> +destination=qemu-${version}
> +
> +git clone "${src}" ${destination}
> +pushd ${destination}
> +git checkout "v${version}"
> +git submodule update --init
> +rm -rf .git roms/*/.git
> +popd
> +tar cfj ${destination}.tar.bz2 ${destination}
> +rm -rf ${destination}

Fancy providing an XZ compressed archive, in addition to the bz2 one?
It is almost 20% smaller with XZ with default compression levels...

$ ls -ahl qemu-1.1.1-1.tar*
-rw-rw-r--. 1 berrange berrange 9.2M Jul 17 19:20 qemu-1.1.1-1.tar.bz2
-rw-rw-r--. 1 berrange berrange 7.6M Jul 18 15:03 qemu-1.1.1-1.tar.xz

You can get it down to 7.3M if you use xz --best

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]