summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-07-09 18:15:54 +0100
committerBaserock Gerrit <gerrit@baserock.org>2015-07-14 13:34:33 +0000
commitcf4a0dff3681935a736e67004ebeaf40aea62ccd (patch)
treed5307f6e309d1d7ff991f1eb34262dde77c42356
parent3dedf639fa39955f2bef27db41c745acc0324056 (diff)
downloadlorry-cf4a0dff3681935a736e67004ebeaf40aea62ccd.tar.gz
Make tarball lorries reproducible
We don't want the sha to depend on where the lorry was imported from or the time at which the lorry occurred, or the user's environment. Change-Id: Iccc54f358a1a6133438984e769485b702ebb1a2e
-rwxr-xr-xlorry.tar-importer12
1 files changed, 6 insertions, 6 deletions
diff --git a/lorry.tar-importer b/lorry.tar-importer
index eb17ef2..904f8d8 100755
--- a/lorry.tar-importer
+++ b/lorry.tar-importer
@@ -29,10 +29,10 @@ die "usage: import-tars [--metainfo=extension] *.tar.{gz,bz2,lzma,xz,Z}\n"
my $branch_name = 'master';
my $branch_ref = "refs/heads/$branch_name";
my $old_sha = `git show-ref $branch_ref 2>/dev/null`;
-my $author_name = $ENV{'GIT_AUTHOR_NAME'} || 'Lorry Tar Creator';
-my $author_email = $ENV{'GIT_AUTHOR_EMAIL'} || 'lorry-tar-importer@baserock.org';
-my $committer_name = $ENV{'GIT_COMMITTER_NAME'} || `git config --get user.name`;
-my $committer_email = $ENV{'GIT_COMMITTER_EMAIL'} || `git config --get user.email`;
+my $author_name = 'Lorry Tar Creator';
+my $author_email = 'lorry-tar-importer@lorry';
+my $committer_name = $author_name;
+my $committer_email = $author_email;
chomp($committer_name, $committer_email, $old_sha);
@@ -130,7 +130,7 @@ foreach my $tar_file (@ARGV)
$have_top_dir = 0 if $top_dir ne $1;
}
- my $commit_msg = "Imported from $tar_file.";
+ my $commit_msg = $tar_name;
my $this_committer_name = $committer_name;
my $this_committer_email = $committer_email;
my $this_author_name = $author_name;
@@ -164,7 +164,7 @@ foreach my $tar_file (@ARGV)
print FI <<EOF;
commit $branch_ref
author $this_author_name <$this_author_email> $author_time +0000
-committer $this_committer_name <$this_committer_email> $commit_time +0000
+committer $this_committer_name <$this_committer_email> $author_time +0000
data <<END_OF_COMMIT_MESSAGE
$commit_msg
END_OF_COMMIT_MESSAGE