* [PATCH] make-release: make mtime, owner, group consistent
@ 2010-06-02 15:27 Michael S. Tsirkin
2010-06-04 16:46 ` Marcelo Tosatti
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-06-02 15:27 UTC (permalink / raw)
To: mtosatti, kvm, ehabkost
Files from git have modification time set to one
of commit, and owner/group to root.
Making it so for generated files as well makes
it easier to generate an identical tarball from git.
Setting owner/group to root is especially important because
otherwise you must have a user/group with same name
to generate an identical tarball.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
kvm/scripts/make-release | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
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
--
1.7.1.12.g42b7f
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] make-release: make mtime, owner, group consistent
2010-06-02 15:27 [PATCH] make-release: make mtime, owner, group consistent Michael S. Tsirkin
@ 2010-06-04 16:46 ` Marcelo Tosatti
2010-06-06 16:02 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Marcelo Tosatti @ 2010-06-04 16:46 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kvm, ehabkost
On Wed, Jun 02, 2010 at 06:27:20PM +0300, Michael S. Tsirkin wrote:
> Files from git have modification time set to one
> of commit, and owner/group to root.
> Making it so for generated files as well makes
> it easier to generate an identical tarball from git.
>
> Setting owner/group to root is especially important because
> otherwise you must have a user/group with same name
> to generate an identical tarball.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> kvm/scripts/make-release | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] make-release: make mtime, owner, group consistent
2010-06-04 16:46 ` Marcelo Tosatti
@ 2010-06-06 16:02 ` Michael S. Tsirkin
0 siblings, 0 replies; 3+ messages in thread
From: Michael S. Tsirkin @ 2010-06-06 16:02 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm, ehabkost
On Fri, Jun 04, 2010 at 01:46:25PM -0300, Marcelo Tosatti wrote:
> On Wed, Jun 02, 2010 at 06:27:20PM +0300, Michael S. Tsirkin wrote:
> > Files from git have modification time set to one
> > of commit, and owner/group to root.
> > Making it so for generated files as well makes
> > it easier to generate an identical tarball from git.
> >
> > Setting owner/group to root is especially important because
> > otherwise you must have a user/group with same name
> > to generate an identical tarball.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > kvm/scripts/make-release | 9 +++++++--
> > 1 files changed, 7 insertions(+), 2 deletions(-)
>
> Applied, thanks.
Could you re-generate and upload the qemu-kvm-0.12.4 release
tarball with this applied?
--
MST
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-06 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 15:27 [PATCH] make-release: make mtime, owner, group consistent Michael S. Tsirkin
2010-06-04 16:46 ` Marcelo Tosatti
2010-06-06 16:02 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).