]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
ruby: Fix reproducibility issue in docs package
authorChangqing Li <changqing.li@windriver.com>
Mon, 2 Mar 2026 15:08:25 +0000 (15:08 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Mar 2026 11:24:55 +0000 (11:24 +0000)
Add a patch, submitted upstream to address a timestamp sometimes added to the
docs files.

[RP: Extracted the missing pieces of a v2 patch into a separate commit]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/ruby/ruby/0001-Don-t-save-the-original-name-and-timestamp.patch [new file with mode: 0644]
meta/recipes-devtools/ruby/ruby_4.0.1.bb

diff --git a/meta/recipes-devtools/ruby/ruby/0001-Don-t-save-the-original-name-and-timestamp.patch b/meta/recipes-devtools/ruby/ruby/0001-Don-t-save-the-original-name-and-timestamp.patch
new file mode 100644 (file)
index 0000000..3db5328
--- /dev/null
@@ -0,0 +1,33 @@
+From 6250ed93d1d7407eb84241296d604e6f98ff0a82 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Fri, 27 Feb 2026 16:59:24 +0800
+Subject: [PATCH] Don't save the original name and timestamp
+
+Explictly pass -n option to not save the original name and timestamp for
+improving reproducibility. In our test, always set mantype to man, but
+the output like erb.1.gz is not stable, sometimes, "last modified: xxx"
+is added to the file type, which make the build not reproducible.
+
+Upstream-Status: Submitted [https://github.com/ruby/ruby/pull/16265]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ tool/rbinstall.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
+index 874c3ef..0bba588 100755
+--- a/tool/rbinstall.rb
++++ b/tool/rbinstall.rb
+@@ -173,7 +173,7 @@ def parse_args(argv = ARGV)
+   end
+ end
+-Compressors = {".gz"=>"gzip", ".bz2"=>"bzip2"}
++Compressors = {".gz"=>"gzip -n", ".bz2"=>"bzip2"}
+ def Compressors.for(type)
+   ext = File.extname(type)
+   if compress = fetch(ext, nil)
+-- 
+2.34.1
+
index 13d4a1b4ef0e461249c9c90f53edfee7f07be73b..e51d0d3e9cfcf1c3ede0c42de884f43a200b7b0e 100644 (file)
@@ -28,6 +28,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
            file://0006-Make-gemspecs-reproducible.patch \
            file://0001-vm_dump.c-Define-REG_S1-and-REG_S2-for-musl-riscv.patch \
            file://0007-Skip-test_rm_r_no_permissions-test-under-root.patch \
+           file://0001-Don-t-save-the-original-name-and-timestamp.patch \
            "
 UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"