Source: compass-h5bp-plugin
Version: 1.0.0-4
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that compass-h5bp-plugin could not be built reproducibly.

This was because the 2002_avoid_git_in_gemspec.patch patch was
incorrectly splitting the string, resulting in a .gemspec line
as follows:

   s.files = ["Gemfile\nLICENSE\nREADME.md\nRakefile\nco  […]

... which in turn meant that the file list was never sorted and
thus inherited non-determinstic filesystem ordering.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/2002_avoid_git_in_gemspec.patch    2017-05-08 
12:38:53.994362786 +0200
--- b/debian/patches/2002_avoid_git_in_gemspec.patch    2017-05-08 
12:53:09.663542348 +0200
@@ -2,18 +2,18 @@
 Author: Jonas Smedegaard <d...@jones.dk>
 Last-Update: 2015-03-05
 
---- a/compass-h5bp.gemspec
-+++ b/compass-h5bp.gemspec
-@@ -14,9 +14,9 @@
+--- compass-h5bp-plugin-1.0.0.orig/compass-h5bp.gemspec
++++ compass-h5bp-plugin-1.0.0/compass-h5bp.gemspec
+@@ -14,9 +14,9 @@ Gem::Specification.new do |s|
    s.description           = 'Compass extension of HTML5 mixins extracted from 
the HTML5 Boilerplate project (h5bp.com)'
    s.license               = 'MIT'
  
 -  s.files         = `git ls-files`.split('\n')
 -  s.test_files    = `git ls-files -- {test,spec,features}/*`.split('\n')
 -  s.executables   = `git ls-files -- bin/*`.split('\n').map { |f| 
File.basename(f) }
-+  s.files         = `find * -not -path 'debian/*' -type f`.split('\n')
-+  s.test_files    = `find * -regextype posix-extended -regex 
'(test|spec|features)/.*`.split('\n')
-+  s.executables   = `find * -path 'bin/*' -type f`.split('\n').map{ |f| 
File.basename(f) }
++  s.files         = `find * -not -path 'debian/*' -type f`.split("\n")
++  s.test_files    = `find * -regextype posix-extended -regex 
'(test|spec|features)/.*`.split("\n")
++  s.executables   = `find * -path 'bin/*' -type f`.split("\n").map{ |f| 
File.basename(f) }
    s.require_paths = ['lib']
  
    s.add_dependency('sass', ['~>3.3'])

Reply via email to