[Git][reproducible-builds/strip-nondeterminism][master] Add deprecation plans to all handlers documenting how/if they could be...

Chris Lamb gitlab at salsa.debian.org
Thu Apr 30 10:20:54 UTC 2020



Chris Lamb pushed to branch master at Reproducible Builds / strip-nondeterminism


Commits:
c0d6b21d by Chris Lamb at 2020-04-30T11:19:59+01:00
Add deprecation plans to all handlers documenting how/if they could be disabled/removed, etc. (Re: reproducible-builds/strip-nondeterminism#3)

- - - - -


11 changed files:

- lib/File/StripNondeterminism/handlers/ar.pm
- lib/File/StripNondeterminism/handlers/bflt.pm
- lib/File/StripNondeterminism/handlers/cpio.pm
- lib/File/StripNondeterminism/handlers/gettext.pm
- lib/File/StripNondeterminism/handlers/gzip.pm
- lib/File/StripNondeterminism/handlers/jar.pm
- lib/File/StripNondeterminism/handlers/javadoc.pm
- lib/File/StripNondeterminism/handlers/jmod.pm
- lib/File/StripNondeterminism/handlers/png.pm
- lib/File/StripNondeterminism/handlers/uimage.pm
- lib/File/StripNondeterminism/handlers/zip.pm


Changes:

=====================================
lib/File/StripNondeterminism/handlers/ar.pm
=====================================
@@ -28,6 +28,15 @@ use Fcntl q/SEEK_SET/;
 
 use File::StripNondeterminism;
 
+=head1 DEPRECATION PLAN
+
+This handler was originally removed in late 2018 as binutils was deemed to be
+reproducible (781262, #843811, etc.)  However, it was re-introduced in late
+2019 via issue #3 as an optional handler in order to support "not just 'older'
+toolchains, it's also about 'other' toolchains".
+
+=cut
+
 sub normalize {
 	my ($file) = @_;
 


=====================================
lib/File/StripNondeterminism/handlers/bflt.pm
=====================================
@@ -33,6 +33,17 @@ use constant MAX_STACK_SIZE => 0xFFFFFF;
 use constant MAX_COUNT => 0xFFFFFF;
 use constant RESERVED_FLAGS => 0xFFFFFFC0;
 
+=head1 DEPRECATION PLAN
+
+bFLT format is used in uClibc/uCLinux systems. As of 2020-04-30 there are zero
+.bflt files being shipped in Debian packages so this handler is a good
+candidate to commence deprecation via first making it optional, etc., perhaps
+surveying whether any embedded distributions could be relying on this.
+
+Also see the uimage handler.
+
+=cut
+
 # From elf2flt flat.h
 # /*
 #  * To make everything easier to port and manage cross platform


=====================================
lib/File/StripNondeterminism/handlers/cpio.pm
=====================================
@@ -21,6 +21,17 @@ use warnings;
 
 use File::StripNondeterminism;
 
+=head1 DEPRECATION PLAN
+
+This was added in mid-2017. As-of 2020-04-30, Debian ships a total of 8 .cpio
+files in binary packages and none of these appear to be integral to the working
+of those package.
+
+After consulting with the original (Bernhard, ie. OpenSuse) this handler is a
+good candidate to commence deprecation via initially making it optional.
+
+=cut
+
 sub normalize {
 	my ($file) = @_;
 	# if we cannot load the Cpio module, we just leave the file alone


=====================================
lib/File/StripNondeterminism/handlers/gettext.pm
=====================================
@@ -27,6 +27,13 @@ use warnings;
 
 use File::StripNondeterminism;
 
+=head1 DEPRECATION PLAN
+
+Situation unclear. Whilst #792687 is closed, many Gettext related files are
+being normalised based on anecdotal viewings of build logs.
+
+=cut
+
 sub read_file($) {
 	my $filename = shift;
 


=====================================
lib/File/StripNondeterminism/handlers/gzip.pm
=====================================
@@ -35,6 +35,14 @@ use constant {
 	FCOMMENT => 1 << 4,
 };
 
+=head1 DEPRECATION PLAN
+
+Given that so many libraries and utilities generate gzip archives themselves
+(rather than delegating to one or two central libraries) it is infeasible to
+get this upstreamed everywhere.
+
+=cut
+
 sub normalize {
 	my ($filename) = @_;
 


=====================================
lib/File/StripNondeterminism/handlers/jar.pm
=====================================
@@ -30,6 +30,15 @@ use File::StripNondeterminism::handlers::zip;
 use File::StripNondeterminism::handlers::javadoc;
 use File::Temp;
 
+=head1 DEPRECATION PLAN
+
+Given that so many libraries and utilities generate .jar archives themselves
+(although there is some centralisation) it is infeasible to get this upstreamed
+everywhere. However, getting a change into OpenJDK would help a lot in Debian
+andwould be the next step here.
+
+=cut
+
 sub _jar_filename_cmp($$) {
 	my ($a, $b) = @_;
 	# META-INF/ and META-INF/MANIFEST.MF are expected to be the first


=====================================
lib/File/StripNondeterminism/handlers/javadoc.pm
=====================================
@@ -28,6 +28,12 @@ use File::Temp;
 use File::Basename;
 use POSIX qw(strftime);
 
+=head1 DEPRECATION PLAN
+
+This could almost-certainly be changed in OpenJDK itself and then removed here.
+
+=cut
+
 sub is_javadoc_file($) {
 	my ($filename) = @_;
 


=====================================
lib/File/StripNondeterminism/handlers/jmod.pm
=====================================
@@ -26,6 +26,13 @@ use File::StripNondeterminism::handlers::jar;
 use File::Temp;
 use File::Basename;
 
+=head1 DEPRECATION PLAN
+
+This could likely be changed in OpenJDK itself and then removed here; it does
+not appear that many other utilities generate (or even ship) .jmod files.
+
+=cut
+
 sub is_jmod_file($) {
 	# Only recent versions of file(1) can detect Jmod file so we perform a
 	# manual test.


=====================================
lib/File/StripNondeterminism/handlers/png.pm
=====================================
@@ -31,6 +31,13 @@ use POSIX qw/strftime/;
 use List::Util qw/min/;
 use Time::Local qw/timegm/;
 
+=head1 DEPRECATION PLAN
+
+Situtation is not promising as so many libraries can generate or convert .png
+files.
+
+=cut
+
 sub crc($) {
 	my ($data) = @_;
 	return Archive::Zip::computeCRC32($data);


=====================================
lib/File/StripNondeterminism/handlers/uimage.pm
=====================================
@@ -25,6 +25,17 @@ use Archive::Zip ();
 use File::StripNondeterminism;
 use Fcntl q/SEEK_SET/;
 
+=head1 DEPRECATION PLAN
+
+As of 2020-04-30 there are zero .uimage files being shipped in Debian packages
+so this handler is a good candidate to commence deprecation via first making it
+optional, etc., perhaps surveying whether any embedded distributions could be
+relying on this.
+
+Also see the uimage handler.
+
+=cut
+
 # /*
 #  * Legacy format image header,
 #  * all data in network byte order (aka natural aka bigendian).


=====================================
lib/File/StripNondeterminism/handlers/zip.pm
=====================================
@@ -27,6 +27,15 @@ use File::StripNondeterminism;
 use Archive::Zip qw/:CONSTANTS :ERROR_CODES/;
 use Sub::Override;
 
+=head1 DEPRECATION PLANS
+
+Given that so many libraries and utilities generate ZIP archives themselves
+(rather than delegating to one or two central libraries) it is infeasible to
+get this upstreamed everywhere. There are also countless formats that generate
+ZIP files under different names (notably Jar archives and its many variants).
+
+=cut
+
 # A magic number from Archive::Zip for the earliest timestamp that
 # can be represented by a Zip file.  From the Archive::Zip source:
 # "Note, this isn't exactly UTC 1980, it's 1980 + 12 hours and 1



View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/commit/c0d6b21db3405b2e27374e3c7ef324a0c17634cc

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/-/commit/c0d6b21db3405b2e27374e3c7ef324a0c17634cc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200430/ea5a0eb3/attachment.htm>


More information about the rb-commits mailing list