mktarball: For qemu upstream, use their scripts/archive-source.sh
PATCH 1/1 mktarball: For qemu upstream, use their scripts/archive-source.sh
qemu upstream uses git submodules. git archive does not work with git submodules (and could not work properly with them, because this is one of the many things it is inherently impossible to do correctly with git submodules).
qemu upstream have worked around this by providing a rather scary shell script which attempts to do roughly the right thing. It's close enough that we can use it with only minor precautions.
Unfortunately this does mean that `mktarball' now executes the qemu source code it was using, rather than merely shuffling it about, as it did previously. I think this is a less bad ill than copying (and, effectively, forking) the scary script.
--- tools/misc/mktarball | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
tools/misc/mktarball +15 -1
@@ -29,7 +29,21 @@ mkdir -p $tdir git_archive_into $xen_root $tdir/xen-$desc -git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu-xen +# We can't use git_archive_into with qemu upstream because it uses +# git-submodules. git-submodules are an inherently broken git feature +# which should never be used in any circumstance. Unfortunately, qemu +# upstream uses them. Relevantly for us, git archive does not work +# properly when there are submodules. +( + cd $xen_root/tools/qemu-xen-dir-remote + # if it's not clean, the qemu script will call `git stash' ! + git --no-pager diff --stat HEAD + scripts/archive-source.sh $tdir/xen-$desc/tools/qemu-xen.tar + cd $tdir/xen-$desc/tools + mkdir qemu-xen + tar <qemu-xen.tar Cxf qemu-xen - + rm qemu-xen.tar +) git_archive_into $xen_root/tools/qemu-xen-traditional-dir-remote $tdir/xen-$desc/tools/qemu-xen-traditional
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 34 lines · Ian Jackson
qemu upstream uses git submodules. git archive does not work with git submodules (and could not work properly with them, because this is one of the many things it is inherently impossible to do correctly with git submodules).
qemu upstream have worked around this by providing a rather scary shell script which attempts to do roughly the right thing. It's close enough that we can use it with only minor precautions.
Unfortunately this does mean that `mktarball' now executes the qemu source code it was using, rather than merely shuffling it about, as it did previously. I think this is a less bad ill than copying (and, effectively, forking) the scary script.
CC Wei Liu <[email protected]>CC George Dunlap <[email protected]>CC Juergen Gross <[email protected]>Signed-off-by Ian Jackson <[email protected]>--- tools/misc/mktarball | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)tools/misc/mktarball +3
-1@@ -29,7 +29,21 @@ mkdir -p $tdir git_archive_into $xen_root $tdir/xen-$desc -git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu-xen +# We can't use git_archive_into with qemu upstream because it uses +# git-submodules. git-submodules are an inherently broken git feature +# which should never be used in any circumstance. Unfortunately, qemu
tools/misc/mktarball mkdir -p $tdir · line 44
Quoted 10 lines
tools/misc/mktarball +10
-0+# upstream uses them. Relevantly for us, git archive does not work +# properly when there are submodules. +( + cd $xen_root/tools/qemu-xen-dir-remote + # if it's not clean, the qemu script will call `git stash' ! + git --no-pager diff --stat HEAD + scripts/archive-source.sh $tdir/xen-$desc/tools/qemu-xen.tar + cd $tdir/xen-$desc/tools + mkdir qemu-xen + tar <qemu-xen.tar Cxf qemu-xen -
I'm not sure why we're piping from a file and then specifying -, but now's not really the time for bike shedding:
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
George Dunlap writes ("Re: [PATCH] mktarball: For qemu upstream, use their scripts/archive-source.sh"):
Quoted 5 lines · Ian Jackson
Quoted 1 line
+ tar <qemu-xen.tar Cxf qemu-xen -
I'm not sure why we're piping from a file and then specifying
-, but now's not really the time for bike shedding:
C and f interact in a way that I find odd, so I prefer to use <.
Quoted 1 line
Acked-by George Dunlap <[email protected]>
Thanks. Now in 4.11.0-rc1 and in staging.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
tools/misc/mktarball mkdir -p $tdir · line 34
Quoted 12 lines · Ian Jackson
tools/misc/mktarball +3
-1@@ -29,7 +29,21 @@ mkdir -p $tdir git_archive_into $xen_root $tdir/xen-$desc -git_archive_into $xen_root/tools/qemu-xen-dir-remote $tdir/xen-$desc/tools/qemu-xen +# We can't use git_archive_into with qemu upstream because it uses +# git-submodules. git-submodules are an inherently broken git feature +# which should never be used in any circumstance. Unfortunately, qemu
I don't think xen.git is the right place to bash the use of git submodule. Especially when there is no way, in xen.git, to find out ahead of time which git trees the xen build system is going to want to download.
tools/misc/mktarball mkdir -p $tdir · line 39
Quoted 5 lines
tools/misc/mktarball +5
-0+# upstream uses them. Relevantly for us, git archive does not work +# properly when there are submodules. +( + cd $xen_root/tools/qemu-xen-dir-remote + # if it's not clean, the qemu script will call `git stash' !
It's actually git stash create. The script doesn't modify the source worktree. The script seems to be intended to make a tarball of the worktree (so also things not commited yet), and we use it make a tarball of a commit.
There is scripts/make-release that is simpler (called via make dist), but it probably stuff the tarball with more than we need (roms).
Quoted 7 lines
tools/misc/mktarball +7
-0+ git --no-pager diff --stat HEAD + scripts/archive-source.sh $tdir/xen-$desc/tools/qemu-xen.tar + cd $tdir/xen-$desc/tools + mkdir qemu-xen + tar <qemu-xen.tar Cxf qemu-xen - + rm qemu-xen.tar +)
Signature · 6 lines
Anthony PERARD _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel