From cf4a0dff3681935a736e67004ebeaf40aea62ccd Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 9 Jul 2015 18:15:54 +0100 Subject: 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 --- lorry.tar-importer | 12 ++++++------ 1 file 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 < $author_time +0000 -committer $this_committer_name <$this_committer_email> $commit_time +0000 +committer $this_committer_name <$this_committer_email> $author_time +0000 data <