make-release: make mtime, owner, group consistent
PATCH 1/1 make-release: make mtime, owner, group consistent
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.
--- kvm/scripts/make-release | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
kvm/scripts/make-release +7 -2
@@ -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
Signature · 1 line
1.7.1.12.g42b7f
Marcelo Tosatti
AppliedQuoted 5 lines · Michael S. Tsirkin
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.
Quoted 8 lines
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 <[email protected]>--- kvm/scripts/make-release | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
Applied, thanks.
Quoted 10 lines · Marcelo Tosatti
Quoted 9 lines · Michael S. Tsirkin
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.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Michael S. Tsirkin <[email protected]>--- 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?
Signature · 1 line
MST