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

[Xen-changelog] [xen master] mktarball: For qemu upstream, use their scripts/archive-source.sh



commit bdfdf244f55ff11e8c4c607fff6815cb672cbdc1
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Tue Apr 17 17:53:01 2018 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Tue Apr 17 18:21:30 2018 +0100

    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.
    
    CC: Wei Liu <wei.liu2@xxxxxxxxxx>
    CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
    CC: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
 tools/misc/mktarball | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/tools/misc/mktarball b/tools/misc/mktarball
index 73282b55b7..42d543073c 100755
--- a/tools/misc/mktarball
+++ b/tools/misc/mktarball
@@ -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
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.