[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#862044: unblock: strip-nondeterminism/0.033-1



Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Dear Release Team,

Please consider unblocking strip-nondetermism 0.033-1. This is mostly
to:

 a) Enable logging so we can start to remove this ugly hack by looking
    at build logs. (#862031)

 b) Update the package description so that people do not start relying on
    the tool for similar reasons. (#862029)


The relevant changelog entry is:

strip-nondeterminism (0.033-1) unstable; urgency=medium

  [ Chris Lamb ]
  * Move from verbose_print to nonquiet_print so we print when normalising a
    file. This is so we can start to target the removal of
    strip-nondeterminism itself. (Closes: #862031)
  * Update package long descriptions to clarify that this tool is a temporary
    workaround. (Closes: #862029)
  * Include the filename when testing failure fixtures.

  [ Bernhard M. Wiedemann ]
  * Only call get_normalizer_by_name once
  * Make get_normalizer_by_name O(1)

 -- Chris Lamb <lamby@debian.org>  Sun, 07 May 2017 19:32:19 +0200

The full debdiff is attached.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
diffstat for strip-nondeterminism-0.032 strip-nondeterminism-0.033

 bin/dh_strip_nondeterminism     |    2 -
 bin/strip-nondeterminism        |   13 +++++----
 debian/changelog                |   16 +++++++++++
 debian/control                  |   55 +++++++++++++++++++++++-----------------
 lib/File/StripNondeterminism.pm |   32 +++++++++--------------
 t/failures.t                    |    2 -
 6 files changed, 70 insertions(+), 50 deletions(-)

diff -Nru strip-nondeterminism-0.032/bin/dh_strip_nondeterminism strip-nondeterminism-0.033/bin/dh_strip_nondeterminism
--- strip-nondeterminism-0.032/bin/dh_strip_nondeterminism	2017-03-17 09:25:00.000000000 +0100
+++ strip-nondeterminism-0.033/bin/dh_strip_nondeterminism	2017-05-07 19:31:07.000000000 +0200
@@ -83,7 +83,7 @@
 
 	foreach (@nondeterministic_files) {
 		my ($path, $normalize) = @$_;
-		verbose_print("Normalizing $path");
+		nonquiet_print("Normalizing $path");
 		eval { $normalize->($path); 1 }
 		  or error("$path: $@");
 	}
diff -Nru strip-nondeterminism-0.032/bin/strip-nondeterminism strip-nondeterminism-0.033/bin/strip-nondeterminism
--- strip-nondeterminism-0.032/bin/strip-nondeterminism	2017-03-17 09:25:00.000000000 +0100
+++ strip-nondeterminism-0.033/bin/strip-nondeterminism	2017-05-07 19:31:07.000000000 +0200
@@ -60,15 +60,16 @@
 
 die $usage if @ARGV == 0;
 
+my $normalizer;
+if (defined $filetype) {
+	$normalizer
+	  = File::StripNondeterminism::get_normalizer_by_name($filetype);
+	die "$filetype: Unknown file type\n" unless $normalizer;
+}
 for my $filename (@ARGV) {
 	die "$filename: Does not exist\n" unless -e $filename;
 
-	my $normalizer;
-	if (defined $filetype) {
-		$normalizer
-		  = File::StripNondeterminism::get_normalizer_by_name($filetype);
-		die "$filetype: Unknown file type\n" unless $normalizer;
-	} else {
+	if (!defined $filetype) {
 		$normalizer
 		  = File::StripNondeterminism::get_normalizer_for_file($filename);
 		next unless $normalizer;
diff -Nru strip-nondeterminism-0.032/debian/changelog strip-nondeterminism-0.033/debian/changelog
--- strip-nondeterminism-0.032/debian/changelog	2017-03-17 09:25:53.000000000 +0100
+++ strip-nondeterminism-0.033/debian/changelog	2017-05-07 19:32:19.000000000 +0200
@@ -1,3 +1,19 @@
+strip-nondeterminism (0.033-1) unstable; urgency=medium
+
+  [ Chris Lamb ]
+  * Move from verbose_print to nonquiet_print so we print when normalising a
+    file. This is so we can start to target the removal of
+    strip-nondeterminism itself. (Closes: #862031)
+  * Update package long descriptions to clarify that this tool is a temporary
+    workaround. (Closes: #862029)
+  * Include the filename when testing failure fixtures.
+
+  [ Bernhard M. Wiedemann ]
+  * Only call get_normalizer_by_name once
+  * Make get_normalizer_by_name O(1)
+
+ -- Chris Lamb <lamby@debian.org>  Sun, 07 May 2017 19:32:19 +0200
+
 strip-nondeterminism (0.032-1) unstable; urgency=medium
 
   * Add support for testing files we should reject.
diff -Nru strip-nondeterminism-0.032/debian/control strip-nondeterminism-0.033/debian/control
--- strip-nondeterminism-0.032/debian/control	2017-03-17 09:25:53.000000000 +0100
+++ strip-nondeterminism-0.033/debian/control	2017-05-07 19:32:19.000000000 +0200
@@ -26,13 +26,16 @@
  ${misc:Depends},
  ${perl:Depends},
 Description: file non-deterministic information stripper â?? Perl module
- StripNondeterminism is a library for stripping non-deterministic
- information, such as timestamps and file system order, from files. It
- is used as part of the Reproducible Builds project.
- .
- This can be used as a post-processing step to improve the
- reproducibility of a build product, when the build process itself
- cannot be made deterministic.
+ StripNondeterminism is a library for stripping non-deterministic information
+ such as timestamps and filesystem ordering from various file and archive
+ formats.
+ .
+ This can be used as a post-processing step to improve the reproducibility of a
+ build product, when the build process itself cannot be made deterministic.
+ .
+ It is used as part of the Reproducible Builds project, although it should be
+ considered a temmporary workaround which should not be needed in the long
+ term; upstream software should be reproducible even without using such a tool.
  .
  This package installs the Perl module â??File::StripNondeterminismâ??.
 
@@ -44,13 +47,16 @@
  ${perl:Depends},
 Multi-Arch: foreign
 Description: file non-deterministic information stripper â?? stand-alone tool
- StripNondeterminism is a library for stripping non-deterministic
- information, such as timestamps and file system order, from files. It
- is used as part of the Reproducible Builds project.
- .
- This can be used as a post-processing step to improve the
- reproducibility of a build product, when the build process itself
- cannot be made deterministic.
+ StripNondeterminism is a library for stripping non-deterministic information
+ such as timestamps and filesystem ordering from various file and archive
+ formats.
+ .
+ This can be used as a post-processing step to improve the reproducibility of a
+ build product, when the build process itself cannot be made deterministic.
+ .
+ It is used as part of the Reproducible Builds project, although it should be
+ considered a temmporary workaround which should not be needed in the long
+ term; upstream software should be reproducible even without using such a tool.
  .
  This package installs the stand-alone â??strip-nondeterminismâ?? tool.
 
@@ -64,13 +70,16 @@
  ${perl:Depends},
 Multi-Arch: foreign
 Description: file non-deterministic information stripper â?? Debhelper add-on
- StripNondeterminism is a library for stripping non-deterministic
- information, such as timestamps and file system order, from files. It
- is used as part of the Reproducible Builds project.
- .
- This can be used as a post-processing step to improve the
- reproducibility of a build product, when the build process itself
- cannot be made deterministic.
+ StripNondeterminism is a library for stripping non-deterministic information
+ such as timestamps and filesystem ordering from various file and archive
+ formats.
+ .
+ This can be used as a post-processing step to improve the reproducibility of a
+ build product, when the build process itself cannot be made deterministic.
+ .
+ It is used as part of the Reproducible Builds project, although it should be
+ considered a temmporary workaround which should not be needed in the long
+ term; upstream software should be reproducible even without using such a tool.
  .
- This package installs the â??dh_strip_nondeterminismâ?? Debhelper command
- that strips nondeterminism as part of a Debian package build process.
+ This package installs the â??dh_strip_nondeterminismâ?? Debhelper command that
+ strips nondeterminism as part of a Debian package build process.
diff -Nru strip-nondeterminism-0.032/lib/File/StripNondeterminism.pm strip-nondeterminism-0.033/lib/File/StripNondeterminism.pm
--- strip-nondeterminism-0.032/lib/File/StripNondeterminism.pm	2017-03-17 09:25:00.000000000 +0100
+++ strip-nondeterminism-0.033/lib/File/StripNondeterminism.pm	2017-05-07 19:31:07.000000000 +0200
@@ -34,7 +34,7 @@
 
 our($VERSION, $canonical_time, $clamp_time);
 
-$VERSION = '0.032'; # 0.032
+$VERSION = '0.033'; # 0.033
 
 sub init {
 	$ENV{'TZ'} = 'UTC';
@@ -107,26 +107,20 @@
 	return undef;
 }
 
+our %typemap = (
+	ar	=> \&File::StripNondeterminism::handlers::ar::normalize,
+	gettext	=> \&File::StripNondeterminism::handlers::gettext::normalize,
+	gzip	=> \&File::StripNondeterminism::handlers::gzip::normalize,
+	jar	=> \&File::StripNondeterminism::handlers::jar::normalize,
+	javadoc	=> \&File::StripNondeterminism::handlers::javadoc::normalize,
+	pearregistry => \&File::StripNondeterminism::handlers::pearregistry::normalize,
+	png	=> \&File::StripNondeterminism::handlers::png::normalize,
+	javaproperties => \&File::StripNondeterminism::handlers::javaproperties::normalize,
+	zip	=> \&File::StripNondeterminism::handlers::zip::normalize,
+);
 sub get_normalizer_by_name {
 	$_ = shift;
-	return \&File::StripNondeterminism::handlers::ar::normalize if $_ eq 'ar';
-	return \&File::StripNondeterminism::handlers::gettext::normalize
-	  if $_ eq 'gettext';
-	return \&File::StripNondeterminism::handlers::gzip::normalize
-	  if $_ eq 'gzip';
-	return \&File::StripNondeterminism::handlers::jar::normalize
-	  if $_ eq 'jar';
-	return \&File::StripNondeterminism::handlers::javadoc::normalize
-	  if $_ eq 'javadoc';
-	return \&File::StripNondeterminism::handlers::pearregistry::normalize
-	  if $_ eq 'pearregistry';
-	return \&File::StripNondeterminism::handlers::png::normalize
-	  if $_ eq 'png';
-	return \&File::StripNondeterminism::handlers::javaproperties::normalize
-	  if $_ eq 'javaproperties';
-	return \&File::StripNondeterminism::handlers::zip::normalize
-	  if $_ eq 'zip';
-	return undef;
+	return $typemap{$_};
 }
 
 1;
diff -Nru strip-nondeterminism-0.032/t/failures.t strip-nondeterminism-0.033/t/failures.t
--- strip-nondeterminism-0.032/t/failures.t	2017-03-17 09:25:00.000000000 +0100
+++ strip-nondeterminism-0.033/t/failures.t	2017-05-07 19:31:07.000000000 +0200
@@ -43,7 +43,7 @@
 		my $normalizer = File::StripNondeterminism::get_normalizer_for_file($in);
 		$normalizer->($in);
 	};
-	ok($@ ne "");
+	ok($@ ne "", $filename);
 }
 
 done_testing;

Reply to: