All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
@ 2014-07-02 16:15 George Dunlap
  2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-02 16:15 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell, Jan Beulich

Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
repositories, but when we release them as a tarball, qemu-xen and
qemu-xen-traditional are in-lined into the tools/ directory.

In order to make this "just work", at the moment developer doing the
release manually modifies Config.mk as part of the relase process so
that CONFIG_QEMU and QEMU_UPSTREAM_URL point into the tools/ directory
instead.

Modify Config.mk to automatically check there before trying a remote
repository.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

---

Since we're essentially manually doing this for each release anyway, I
propose this c/s be backported to all currently-maintained branches.

CC: Ian Campbell <ian.campbell@citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
---
 Config.mk |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Config.mk b/Config.mk
index e7f14ef..dac9893 100644
--- a/Config.mk
+++ b/Config.mk
@@ -224,6 +224,19 @@ else
 QEMU_REMOTE ?= git://xenbits.xen.org/qemu-xen-unstable.git
 endif
 
+# Specify which qemu-dm to use. This may be `ioemu' to use the old
+# Mercurial in-tree version, or a local directory, or a git URL.
+# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
+ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
+CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
+else
+CONFIG_QEMU ?= $(QEMU_REMOTE)
+endif
+
+ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen))
+QEMU_UPSTREAM_URL ?= $(XEN_ROOT)/tools/qemu-xen
+endif
+
 ifeq ($(GIT_HTTP),y)
 OVMF_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/ovmf.git
 QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git
@@ -241,11 +254,6 @@ SEABIOS_UPSTREAM_TAG ?= rel-1.7.4
 
 ETHERBOOT_NICS ?= rtl8139 8086100e
 
-# Specify which qemu-dm to use. This may be `ioemu' to use the old
-# Mercurial in-tree version, or a local directory, or a git URL.
-# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
-CONFIG_QEMU ?= $(QEMU_REMOTE)
-
 QEMU_TAG ?= d0395cc49b2ec6d1723c01f1daf2394b9264ca29
 # Tue Apr 8 16:50:06 2014 +0000
 # qemu-xen-trad: free all the pirqs for msi/msix when driver unloads
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-02 16:15 [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading George Dunlap
@ 2014-07-02 16:15 ` George Dunlap
  2014-07-03  8:29   ` Ian Campbell
  2014-07-03 11:22   ` Anthony PERARD
  2014-07-03  8:25 ` [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading Ian Campbell
  2014-07-08  9:57 ` Ian Jackson
  2 siblings, 2 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-02 16:15 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Ian Campbell, Jan Beulich

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@eu.citrix.com>

---

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@citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
---
 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
  2014-07-02 16:15 [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading George Dunlap
  2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
@ 2014-07-03  8:25 ` Ian Campbell
  2014-07-03  9:04   ` George Dunlap
  2014-07-08  9:57 ` Ian Jackson
  2 siblings, 1 reply; 14+ messages in thread
From: Ian Campbell @ 2014-07-03  8:25 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Jan Beulich, xen-devel

On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
> Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
> repositories, but when we release them as a tarball, qemu-xen and
> qemu-xen-traditional are in-lined into the tools/ directory.
> 
> In order to make this "just work", at the moment developer doing the
> release manually modifies Config.mk as part of the relase process so
> that CONFIG_QEMU and QEMU_UPSTREAM_URL point into the tools/ directory
> instead.

Since this mainly means Ian I'll mostly leave both of these patches to
him.

> +# Specify which qemu-dm to use. This may be `ioemu' to use the old
> +# Mercurial in-tree version, or a local directory, or a git URL.
> +# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
> +CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
> +else
> +CONFIG_QEMU ?= $(QEMU_REMOTE)
> +endif

Does this DTRT on subsequent runs after the automatic git clone has
happened on the first run? I suspect so, but I'm not 100% sure. f.e.
does "make tools/qemu-xen-traditional-dir-force-update" still work?

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
@ 2014-07-03  8:29   ` Ian Campbell
  2014-07-03 12:48     ` George Dunlap
  2014-07-03 11:22   ` Anthony PERARD
  1 sibling, 1 reply; 14+ messages in thread
From: Ian Campbell @ 2014-07-03  8:29 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Jan Beulich, xen-devel

On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
> +tdir=$(mktemp -d $xen_root/dist/xen.XXXXXXXX) || exit 1

Doesn't set -e make all (or most) of these "|| exit 1" bits unnecessary?

> +
> +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

FWIW I think you could avoid much of this pushd/popd stuff with tar -C
and git --git-dir= (perhaps --work-dir, not sure for git archive).

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
  2014-07-03  8:25 ` [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading Ian Campbell
@ 2014-07-03  9:04   ` George Dunlap
  2014-07-03  9:10     ` Ian Campbell
  0 siblings, 1 reply; 14+ messages in thread
From: George Dunlap @ 2014-07-03  9:04 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Jan Beulich, xen-devel

On 07/03/2014 09:25 AM, Ian Campbell wrote:
> On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
>> Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
>> repositories, but when we release them as a tarball, qemu-xen and
>> qemu-xen-traditional are in-lined into the tools/ directory.
>>
>> In order to make this "just work", at the moment developer doing the
>> release manually modifies Config.mk as part of the relase process so
>> that CONFIG_QEMU and QEMU_UPSTREAM_URL point into the tools/ directory
>> instead.
> Since this mainly means Ian I'll mostly leave both of these patches to
> him.
>
>> +# Specify which qemu-dm to use. This may be `ioemu' to use the old
>> +# Mercurial in-tree version, or a local directory, or a git URL.
>> +# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
>> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
>> +CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
>> +else
>> +CONFIG_QEMU ?= $(QEMU_REMOTE)
>> +endif
> Does this DTRT on subsequent runs after the automatic git clone has
> happened on the first run? I suspect so, but I'm not 100% sure. f.e.
> does "make tools/qemu-xen-traditional-dir-force-update" still work?

Yes, all that still works, because the directories it creates when 
automatically cloning the qemu repos are named differently 
(qemu-xen[-traditional]-dir[-remote]).

  -George

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
  2014-07-03  9:04   ` George Dunlap
@ 2014-07-03  9:10     ` Ian Campbell
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Campbell @ 2014-07-03  9:10 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Jan Beulich, xen-devel

On Thu, 2014-07-03 at 10:04 +0100, George Dunlap wrote:
> On 07/03/2014 09:25 AM, Ian Campbell wrote:
> > On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
> >> Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
> >> repositories, but when we release them as a tarball, qemu-xen and
> >> qemu-xen-traditional are in-lined into the tools/ directory.
> >>
> >> In order to make this "just work", at the moment developer doing the
> >> release manually modifies Config.mk as part of the relase process so
> >> that CONFIG_QEMU and QEMU_UPSTREAM_URL point into the tools/ directory
> >> instead.
> > Since this mainly means Ian I'll mostly leave both of these patches to
> > him.
> >
> >> +# Specify which qemu-dm to use. This may be `ioemu' to use the old
> >> +# Mercurial in-tree version, or a local directory, or a git URL.
> >> +# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
> >> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
> >> +CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
> >> +else
> >> +CONFIG_QEMU ?= $(QEMU_REMOTE)
> >> +endif
> > Does this DTRT on subsequent runs after the automatic git clone has
> > happened on the first run? I suspect so, but I'm not 100% sure. f.e.
> > does "make tools/qemu-xen-traditional-dir-force-update" still work?
> 
> Yes, all that still works, because the directories it creates when 
> automatically cloning the qemu repos are named differently 
> (qemu-xen[-traditional]-dir[-remote]).

Ah, I thought tools/qemu-xen-traditional ended up being a symlink to
that, but you are right it has a -dir suffix.

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
  2014-07-03  8:29   ` Ian Campbell
@ 2014-07-03 11:22   ` Anthony PERARD
  2014-07-03 11:25     ` George Dunlap
  1 sibling, 1 reply; 14+ messages in thread
From: Anthony PERARD @ 2014-07-03 11:22 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Ian Campbell, Jan Beulich, xen-devel

On Wed, Jul 02, 2014 at 05:15:12PM +0100, George Dunlap wrote:
> At the moment, making a release tarball is an annoyingly manual
> process that involves running "git archive" into a temporary directory.

Does the source tarball would need to includes tarball of ipxe and the
different stuff to build a stubdom ?

> 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@eu.citrix.com>
> 
> ---
> 
> 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@citrix.com>
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Jan Beulich <jbeulich@suse.com>
> ---
>  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

Many missing " around variables, better safe than sorry :).

-- 
Anthony PERARD

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-03 11:22   ` Anthony PERARD
@ 2014-07-03 11:25     ` George Dunlap
  0 siblings, 0 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-03 11:25 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Ian Jackson, Ian Campbell, Jan Beulich, xen-devel

On 07/03/2014 12:22 PM, Anthony PERARD wrote:
> On Wed, Jul 02, 2014 at 05:15:12PM +0100, George Dunlap wrote:
>> At the moment, making a release tarball is an annoyingly manual
>> process that involves running "git archive" into a temporary directory.
> Does the source tarball would need to includes tarball of ipxe and the
> different stuff to build a stubdom ?

At the moment, AFAIK, the normal xen release tarballs do not.

We could call this target "release-tarball" instead.

>
>> +xen_root=$1
>> +desc=$2
>> +
>> +tdir=$(mktemp -d $xen_root/dist/xen.XXXXXXXX) || exit 1
> Many missing " around variables, better safe than sorry :).

Ack.

  -George

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-03  8:29   ` Ian Campbell
@ 2014-07-03 12:48     ` George Dunlap
  2014-07-03 13:46       ` Ian Campbell
  2014-07-08  9:50       ` Ian Jackson
  0 siblings, 2 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-03 12:48 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Jan Beulich, xen-devel

On 07/03/2014 09:29 AM, Ian Campbell wrote:
> On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
>> +tdir=$(mktemp -d $xen_root/dist/xen.XXXXXXXX) || exit 1
> Doesn't set -e make all (or most) of these "|| exit 1" bits unnecessary?

Er, yes.  Sorry.

>
>> +
>> +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
> FWIW I think you could avoid much of this pushd/popd stuff with tar -C
> and git --git-dir= (perhaps --work-dir, not sure for git archive).

  The --git-dir think seemed to work differently enough to hg's "-C" 
option that I didn't really trust it.  If you think it's better I can 
try to work it out.

  -George

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-03 12:48     ` George Dunlap
@ 2014-07-03 13:46       ` Ian Campbell
  2014-07-08  9:50       ` Ian Jackson
  1 sibling, 0 replies; 14+ messages in thread
From: Ian Campbell @ 2014-07-03 13:46 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Jan Beulich, xen-devel

On Thu, 2014-07-03 at 13:48 +0100, George Dunlap wrote:
> On 07/03/2014 09:29 AM, Ian Campbell wrote:
> > On Wed, 2014-07-02 at 17:15 +0100, George Dunlap wrote:
> >> +tdir=$(mktemp -d $xen_root/dist/xen.XXXXXXXX) || exit 1
> > Doesn't set -e make all (or most) of these "|| exit 1" bits unnecessary?
> 
> Er, yes.  Sorry.
> 
> >
> >> +
> >> +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
> > FWIW I think you could avoid much of this pushd/popd stuff with tar -C
> > and git --git-dir= (perhaps --work-dir, not sure for git archive).
> 
>   The --git-dir think seemed to work differently enough to hg's "-C" 
> option that I didn't really trust it.  If you think it's better I can 
> try to work it out.

You might need work-dir too?

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-03 12:48     ` George Dunlap
  2014-07-03 13:46       ` Ian Campbell
@ 2014-07-08  9:50       ` Ian Jackson
  2014-07-08 11:00         ` George Dunlap
  1 sibling, 1 reply; 14+ messages in thread
From: Ian Jackson @ 2014-07-08  9:50 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Campbell, Jan Beulich, xen-devel

George Dunlap writes ("Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball"):
> On 07/03/2014 09:29 AM, Ian Campbell wrote:
> > FWIW I think you could avoid much of this pushd/popd stuff with tar -C
> > and git --git-dir= (perhaps --work-dir, not sure for git archive).
> 
>   The --git-dir think seemed to work differently enough to hg's "-C" 
> option that I didn't really trust it.  If you think it's better I can 
> try to work it out.

Firstly, thanks for cleaning up this area, which sorely needs it.

Please don't.  I wouldn't really trust it either :-).

Instead of pushd/popd, you might consider ( ).

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
  2014-07-02 16:15 [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading George Dunlap
  2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
  2014-07-03  8:25 ` [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading Ian Campbell
@ 2014-07-08  9:57 ` Ian Jackson
  2014-07-08 10:57   ` George Dunlap
  2 siblings, 1 reply; 14+ messages in thread
From: Ian Jackson @ 2014-07-08  9:57 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Campbell, Jan Beulich, xen-devel

George Dunlap writes ("[PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading"):
> Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
> repositories, but when we release them as a tarball, qemu-xen and
> qemu-xen-traditional are in-lined into the tools/ directory.
...
> +# Specify which qemu-dm to use. This may be `ioemu' to use the old
> +# Mercurial in-tree version, or a local directory, or a git URL.
> +# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
> +CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
> +else
> +CONFIG_QEMU ?= $(QEMU_REMOTE)
> +endif

Perhaps this could be better written as
  CONFIG_QEMU ?= $(or $(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional),\
                      $(QEMU_REMOTE))
?

> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen))
> +QEMU_UPSTREAM_URL ?= $(XEN_ROOT)/tools/qemu-xen
> +endif

I'm tempted to complain about the repetition here.  Perhaps
  QEMU_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/qemu-xen
and use it twice ?

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading
  2014-07-08  9:57 ` Ian Jackson
@ 2014-07-08 10:57   ` George Dunlap
  0 siblings, 0 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-08 10:57 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Ian Campbell, Jan Beulich, xen-devel

On 07/08/2014 10:57 AM, Ian Jackson wrote:
> George Dunlap writes ("[PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading"):
>> Currently xen, qemu-xen, and qemu-xen-traditional are kept in separate
>> repositories, but when we release them as a tarball, qemu-xen and
>> qemu-xen-traditional are in-lined into the tools/ directory.
> ...
>> +# Specify which qemu-dm to use. This may be `ioemu' to use the old
>> +# Mercurial in-tree version, or a local directory, or a git URL.
>> +# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
>> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional))
>> +CONFIG_QEMU ?= $(XEN_ROOT)/tools/qemu-xen-traditional
>> +else
>> +CONFIG_QEMU ?= $(QEMU_REMOTE)
>> +endif
>
> Perhaps this could be better written as
>    CONFIG_QEMU ?= $(or $(wildcard $(XEN_ROOT)/tools/qemu-xen-traditional),\
>                        $(QEMU_REMOTE))

I'll give that a try.

> ?
>
>> +ifneq (,$(wildcard $(XEN_ROOT)/tools/qemu-xen))
>> +QEMU_UPSTREAM_URL ?= $(XEN_ROOT)/tools/qemu-xen
>> +endif
>
> I'm tempted to complain about the repetition here.  Perhaps
>    QEMU_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/qemu-xen
> and use it twice ?

Oh, you mean duplicating the path for the inlined repo.  Yeah, I could 
do something like that.

I was thinking about adding a CONFIG_QEMU_UPSTREAM option, so that _URL 
could actually mean URL, rather than sometimes meaning URL and sometimes 
meaning PATH.  But I thought that might be too much change to backport.

  -George

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball
  2014-07-08  9:50       ` Ian Jackson
@ 2014-07-08 11:00         ` George Dunlap
  0 siblings, 0 replies; 14+ messages in thread
From: George Dunlap @ 2014-07-08 11:00 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Ian Campbell, Jan Beulich, xen-devel

On 07/08/2014 10:50 AM, Ian Jackson wrote:
> George Dunlap writes ("Re: [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball"):
>> On 07/03/2014 09:29 AM, Ian Campbell wrote:
>>> FWIW I think you could avoid much of this pushd/popd stuff with tar -C
>>> and git --git-dir= (perhaps --work-dir, not sure for git archive).
>>
>>    The --git-dir think seemed to work differently enough to hg's "-C"
>> option that I didn't really trust it.  If you think it's better I can
>> try to work it out.
>
> Firstly, thanks for cleaning up this area, which sorely needs it.
>
> Please don't.  I wouldn't really trust it either :-).
>
> Instead of pushd/popd, you might consider ( ).

Well I've rewritten it with --git-dir already, and it looks a lot 
cleaner.  I'll send that version and you can see what you think.

(May be a few days.)

  -George

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-07-08 11:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 16:15 [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading George Dunlap
2014-07-02 16:15 ` [PATCH 2/2] make: Make "src-tarball" target actually make a source tarball George Dunlap
2014-07-03  8:29   ` Ian Campbell
2014-07-03 12:48     ` George Dunlap
2014-07-03 13:46       ` Ian Campbell
2014-07-08  9:50       ` Ian Jackson
2014-07-08 11:00         ` George Dunlap
2014-07-03 11:22   ` Anthony PERARD
2014-07-03 11:25     ` George Dunlap
2014-07-03  8:25 ` [PATCH 1/2] make: Check tools/qemu-xen[-traditional] for qemu before downloading Ian Campbell
2014-07-03  9:04   ` George Dunlap
2014-07-03  9:10     ` Ian Campbell
2014-07-08  9:57 ` Ian Jackson
2014-07-08 10:57   ` George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.