Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH 2/2] make-release: don't use --mtime and --transform tar options
Date: Fri, 24 Sep 2010 14:03:04 -0300	[thread overview]
Message-ID: <1285347784-21180-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1285347784-21180-1-git-send-email-ehabkost@redhat.com>

Those options are not available on older systems.

Instead of --transform, just create the file inside the expected directory.

Instead of --mtime, use 'touch' to set file mtime before running tar.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 kvm/scripts/make-release |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/kvm/scripts/make-release b/kvm/scripts/make-release
index c5f8c92..56302c3 100755
--- a/kvm/scripts/make-release
+++ b/kvm/scripts/make-release
@@ -52,20 +52,22 @@ mkdir -p "$(dirname "$tarball")"
 git archive --prefix="$name/" --format=tar "$commit" > "$tarball"
 
 mtime=`git show --format=%ct "$commit""^{commit}" --`
-tarargs="--owner=root --group=root --mtime=@$mtime"
+tarargs="--owner=root --group=root"
 
-mkdir -p "$tmpdir"
+mkdir -p "$tmpdir/$name"
 git cat-file -p "${commit}:roms" | awk ' { print $4, $3 } ' \
-    > "$tmpdir/EXTERNAL_DEPENDENCIES"
-tar -rf "$tarball" --transform "s,^,$name/," -C "$tmpdir" \
+    > "$tmpdir/$name/EXTERNAL_DEPENDENCIES"
+touch -d "@$mtime" "$tmpdir/$name/EXTERNAL_DEPENDENCIES"
+tar -rf "$tarball" -C "$tmpdir" \
     $tarargs \
-    "EXTERNAL_DEPENDENCIES"
+    "$name/EXTERNAL_DEPENDENCIES"
 rm -rf "$tmpdir"
 
 if [[ -n "$formal" ]]; then
-    mkdir -p "$tmpdir"
-    echo "$name" > "$tmpdir/KVM_VERSION"
-    tar -rf "$tarball" --transform "s,^,$name/," -C "$tmpdir" "KVM_VERSION" \
+    mkdir -p "$tmpdir/$name"
+    echo "$name" > "$tmpdir/$name/KVM_VERSION"
+    touch -d "@$mtime" "$tmpdir/$name/KVM_VERSION"
+    tar -rf "$tarball" -C "$tmpdir" "$name/KVM_VERSION" \
         $tarargs
     rm -rf "$tmpdir"
 fi
-- 
1.7.2.1


  parent reply	other threads:[~2010-09-24 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 17:03 [PATCH 0/2] qemu-kvm: make make-release work on older systems Eduardo Habkost
2010-09-24 17:03 ` [PATCH 1/2] make-release: don't use --tmpdir mktemp option Eduardo Habkost
2010-09-24 17:03 ` Eduardo Habkost [this message]
2010-09-29 21:10 ` [PATCH 0/2] qemu-kvm: make make-release work on older systems Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1285347784-21180-3-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox