From patchwork Wed Jun 2 15:27:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 103834 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o52FUL76020623 for ; Wed, 2 Jun 2010 15:32:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758389Ab0FBPbd (ORCPT ); Wed, 2 Jun 2010 11:31:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65190 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211Ab0FBPbb (ORCPT ); Wed, 2 Jun 2010 11:31:31 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o52FVVSZ009007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 2 Jun 2010 11:31:31 -0400 Received: from redhat.com (vpn1-4-231.ams2.redhat.com [10.36.4.231]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o52FVTEK008079; Wed, 2 Jun 2010 11:31:30 -0400 Date: Wed, 2 Jun 2010 18:27:20 +0300 From: "Michael S. Tsirkin" To: mtosatti@redhat.com, kvm@vger.kernel.org, ehabkost@redhat.com Subject: [PATCH] make-release: make mtime, owner, group consistent Message-ID: <20100602152719.GA11840@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 02 Jun 2010 15:32:17 +0000 (UTC) diff --git a/kvm/scripts/make-release b/kvm/scripts/make-release index fdc402b..e8051f4 100755 --- a/kvm/scripts/make-release +++ b/kvm/scripts/make-release @@ -1,7 +1,7 @@ #!/bin/bash -e usage() { - echo "usage: $0 [--upload] [--formal] commit [name] [tarball]" + echo "usage: $0 [--upload] [--formal] commit [name] [tarball] [user]" exit 1 } @@ -51,17 +51,22 @@ cd "$(dirname "$0")"/../.. mkdir -p "$(dirname "$tarball")" git archive --prefix="$name/" --format=tar "$commit" > "$tarball" +mtime=`git show --format=%ct "$commit" --` +tarargs="--owner=root --group=root --mtime=@$mtime" + mkdir -p "$tmpdir" git cat-file -p "${commit}:roms" | awk ' { print $4, $3 } ' \ > "$tmpdir/EXTERNAL_DEPENDENCIES" tar -rf "$tarball" --transform "s,^,$name/," -C "$tmpdir" \ + $tarargs \ "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" + tar -rf "$tarball" --transform "s,^,$name/," -C "$tmpdir" "KVM_VERSION" \ + $tarargs rm -rf "$tmpdir" fi