[Reproducible-builds] Bug#835447: libmodule-build-withxspp-perl: please make the output reproducible

Chris Lamb lamby at debian.org
Thu Aug 25 19:10:48 UTC 2016


Source: libmodule-build-withxspp-perl
Version: 0.14-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: build-path
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], I noticed that
libmodule-build-withxspp-perl was causing packages to not build
reproducibly (eg. libboost-geometry-utils-perl).

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/lib/Module/Build/WithXSpp.pm b/lib/Module/Build/WithXSpp.pm
index 340d51e..280d1b6 100644
--- a/lib/Module/Build/WithXSpp.pm
+++ b/lib/Module/Build/WithXSpp.pm
@@ -2,6 +2,7 @@ package Module::Build::WithXSpp;
 use strict;
 use warnings;
 
+use File::Spec;
 use Module::Build;
 use ExtUtils::CppGuess ();
 
@@ -228,11 +229,11 @@ MODULE = $module_name	PACKAGE = $module_name
 HERE
 
   my $typemap_args = '';
-  $typemap_args .= '-t "' . _naive_shell_escape(Cwd::abs_path($_)) . '" ' foreach keys %$xspt_files;
+  $typemap_args .= '-t "' . _naive_shell_escape(File::Spec->abs2rel($_, $this->build_dir)) . '" ' foreach keys %$xspt_files;
 
   foreach my $xsp_file (keys %$xsp_files) {
-    my $full_path_file = _naive_shell_escape( Cwd::abs_path($xsp_file) );
-    my $cmd = qq{INCLUDE_COMMAND: \$^X -MExtUtils::XSpp::Cmd -e xspp -- $typemap_args "$full_path_file"\n\n};
+    my $relative_path_file = _naive_shell_escape( File::Spec->abs2rel($xsp_file, $this->build_dir) );
+    my $cmd = qq{INCLUDE_COMMAND: \$^X -MExtUtils::XSpp::Cmd -e xspp -- $typemap_args "$relative_path_file"\n\n};
     $xs_code .= $cmd;
   }
 


More information about the Reproducible-builds mailing list