Source: ruby-regexp-parser Version: 2.6.1-1 Severity: wishlist Tags: patch User: [email protected] Usertags: buildpath X-Debbugs-Cc: [email protected]
Hi, Whilst working on the Reproducible Builds effort [0] we noticed that ruby-regexp-parser could not be built reproducibly. This is because it uses the ragel compiler that, by default, will add line annotations that include the absolute build path: /usr/share/rubygems-integration/all/gems/regexp_parser-2.6.1/lib/regexp_parser/scanner.rb @@ -1,12 +1,12 @@ # -*- warn-indent:false; -*- -# line 1 "/build/1st/ruby-regexp-parser-2.6.1/tasks/../lib/regexp_parser/scanner/scanner.rl" +# line 1 "/build/2/ruby-regexp-parser-2.6.1/2nd/tasks/../lib/regexp_parser/scanner/scanner.rl" (etc.) A patch is attached that adjusts the call to ragel to include the -L argument that suppresses these additions. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` [email protected] / chris-lamb.co.uk `-
--- a/debian/patches/reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/reproducible-build.patch 2023-04-10 12:33:48.022769023 +0100 @@ -0,0 +1,15 @@ +Description: Make the build reproducible +Author: Chris Lamb <[email protected]> +Last-Update: 2023-04-10 + +--- ruby-regexp-parser-2.6.1.orig/tasks/ragel.rake ++++ ruby-regexp-parser-2.6.1/tasks/ragel.rake +@@ -8,7 +8,7 @@ namespace :ragel do + RAGEL_SOURCE_FILES.each do |source_file| + output_file = "#{RAGEL_OUTPUT_DIR}/#{source_file}.rb" + # using faster flat table driven FSM, about 25% larger code, but about 30% faster +- sh "ragel -F1 -R #{RAGEL_SOURCE_DIR}/#{source_file}.rl -o #{output_file}" ++ sh "ragel -L -F1 -R #{RAGEL_SOURCE_DIR}/#{source_file}.rl -o #{output_file}" + + contents = File.read(output_file) + --- a/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 --- b/debian/patches/series 2023-04-10 12:33:46.366759334 +0100 @@ -0,0 +1 @@ +reproducible-build.patch
_______________________________________________ Pkg-ruby-extras-maintainers mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers
