[Git][reproducible-builds/strip-nondeterminism][debian] 5 commits: Add a ".gitlab-ci.yml" to automatically run the testsuite on salsa.debian.org.
Chris Lamb
gitlab at salsa.debian.org
Mon Jul 15 13:32:43 UTC 2019
Chris Lamb pushed to branch debian at Reproducible Builds / strip-nondeterminism
Commits:
6947d6f6 by Chris Lamb at 2019-07-12T19:57:42Z
Add a ".gitlab-ci.yml" to automatically run the testsuite on salsa.debian.org.
- - - - -
88a6cd7c by Niko Tyni at 2019-07-15T13:14:47Z
Use Sub::Override for Archive::Zip workarounds instead of Monkey::Patch (see reproducible-builds/strip-nondeterminism#8 for more information). (Closes: #931730)
Monkey::Patch recursively depends on an XS binary Perl module which creates
build cycle issues for Perl transitions.
Use Sub::Override instead as it has no dependencies outside Perl core.
Signed-off-by: Chris Lamb <lamby at debian.org>
- - - - -
1d584672 by Chris Lamb at 2019-07-15T13:28:22Z
Release version 1.2.1
- - - - -
6c13d0eb by Chris Lamb at 2019-07-15T13:29:24Z
Merge tag '1.2.1' into debian
Release version 1.2.1
* tag '1.2.1':
Release version 1.2.1
Use Sub::Override for Archive::Zip workarounds instead of Monkey::Patch (see reproducible-builds/strip-nondeterminism#8 for more information). (Closes: #931730)
Add a ".gitlab-ci.yml" to automatically run the testsuite on salsa.debian.org.
- - - - -
0af5e742 by Chris Lamb at 2019-07-15T13:31:20Z
Update changelog for 1.2.1-1 release
- - - - -
5 changed files:
- + .gitlab-ci.yml
- Makefile.PL
- debian/changelog
- lib/File/StripNondeterminism.pm
- lib/File/StripNondeterminism/handlers/zip.pm
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -0,0 +1,16 @@
+image: debian:unstable
+
+test:
+ stage: test
+ except:
+ - debian
+ before_script:
+ - apt-get -q update
+ - mount -o remount,rw /dev
+ - env DEBIAN_FRONTEND=noninteractive apt-get -q -y install --no-install-recommends aspcud apt-cudf git
+ - git checkout debian
+ - env DEBIAN_FRONTEND=noninteractive apt-get -q -y --solver aspcud -o APT::Solver::Strict-Pinning=0 -o Debug::pkgProblemResolver=yes build-dep .
+ - git checkout -
+ script:
+ - perl Makefile.PL
+ - make test TEST_VERBOSE=1
=====================================
Makefile.PL
=====================================
@@ -17,7 +17,7 @@ WriteMakefile(
'Archive::Cpio' => 0, # required to pass tests
'Archive::Zip' => 0,
'Getopt::Long' => 0,
- 'Monkey::Patch' => 0,
+ 'Sub::Override' => 0,
},
LICENSE => "gpl",
dist => { COMPRESS => 'gzip -9nf', SUFFIX => 'gz', },
=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+strip-nondeterminism (1.2.1-1) unstable; urgency=medium
+
+ [ Niko Tyni ]
+ * Use Sub::Override for Archive::Zip workarounds instead of Monkey::Patch
+ (see reproducible-builds/strip-nondeterminism#8 for more information).
+ (Closes: #931730)
+
+ [ Chris Lamb ]
+ * Add a ".gitlab-ci.yml" to automatically run the testsuite on
+ salsa.debian.org.
+
+ -- Chris Lamb <lamby at debian.org> Mon, 15 Jul 2019 10:31:13 -0300
+
strip-nondeterminism (1.2.0-2) unstable; urgency=medium
* Bump standards version to 4.4.0, no changes needed.
=====================================
lib/File/StripNondeterminism.pm
=====================================
@@ -25,7 +25,7 @@ use POSIX qw(tzset);
our($VERSION, $canonical_time, $clamp_time);
-$VERSION = '1.2.0'; # <https://semver.org/>
+$VERSION = '1.2.1'; # <https://semver.org/>
sub init() {
$ENV{'TZ'} = 'UTC';
=====================================
lib/File/StripNondeterminism/handlers/zip.pm
=====================================
@@ -24,7 +24,7 @@ use warnings;
use File::Temp;
use File::StripNondeterminism;
use Archive::Zip qw/:CONSTANTS :ERROR_CODES/;
-use Monkey::Patch qw/patch_class/;
+use Sub::Override;
# A magic number from Archive::Zip for the earliest timestamp that
# can be represented by a Zip file. From the Archive::Zip source:
@@ -231,21 +231,24 @@ sub normalize {
# stored value of localExtraField (!) and reload it again from the existing
# file handle in/around rewindData.
#
- # We therefore monkey-patch the accessor methods of the Member class to
+ # We therefore override the accessor methods of the Member class to
# ensure that normalised values are used in this final save.
#
# <https://salsa.debian.org/reproducible-builds/strip-nondeterminism/issues/4>
- my @patches = map {
- patch_class('Archive::Zip::Member', $_, sub {
- my $fn = shift;
- my $result = $fn->(@_);
- return defined($result) ?
- normalize_extra_fields($canonical_time, $result) : $result;
- });
+ my @overrides = map {
+ my $full_name = "Archive::Zip::Member::$_";
+ my $orig_sub = \&$full_name;
+ Sub::Override->new(
+ $full_name => sub {
+ my $result = $orig_sub->(@_);
+ return defined($result) ?
+ normalize_extra_fields($canonical_time, $result) : $result;
+ }
+ );
} qw(cdExtraField localExtraField);
return 0 unless $zip->overwrite() == AZ_OK;
- undef @patches; # Remove our monkey patches
+ $_->restore for @overrides;
chmod($old_perms, $zip_filename);
return 1;
}
View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/compare/28d93c382b8093aaa0adf957eb22b270e9c34b7c...0af5e7423392fa102c4d010338131121a4039509
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/compare/28d93c382b8093aaa0adf957eb22b270e9c34b7c...0af5e7423392fa102c4d010338131121a4039509
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/20190715/e5872f83/attachment.html>
More information about the rb-commits
mailing list