[tbb-commits] [tor-browser-bundle/maint-4.0] Bug #13776: Incremental MAR files not reproducible

gk at torproject.org gk at torproject.org
Fri Jan 9 19:45:15 UTC 2015


commit 1fa248e28610b14a41228cd0533a8fb147c0b928
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Fri Dec 12 11:54:40 2014 -0500

    Bug #13776: Incremental MAR files not reproducible
    
    Set the locale and umask to avoid differences across systems and users when
    generating incremental MAR files.
---
 tools/update-responses/update_responses |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses
index c788586..b28b575 100755
--- a/tools/update-responses/update_responses
+++ b/tools/update-responses/update_responses
@@ -10,9 +10,16 @@ use Cwd;
 use File::Temp;
 use File::Find;
 use File::Which;
+use POSIX qw(setlocale LC_ALL);
 use IO::CaptureOutput qw(capture_exec);
 use Parallel::ForkManager;
 
+# Set umask and locale to provide a consistent environment for MAR file
+# generation, etc.
+umask(0022);
+$ENV{"LC_ALL"} = "C";
+setlocale(LC_ALL, "C");
+
 my $htdocsdir = "$FindBin::Bin/htdocs";
 my $config = LoadFile("$FindBin::Bin/config.yml");
 my %htdocsfiles = ( '.' => 1, '..' => 1, 'no-update.xml' => 1 );



More information about the tbb-commits mailing list