From: Changqing Li <[email protected]>

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 <[email protected]>
---
 ...save-the-original-name-and-timestamp.patch | 33 +++++++++++++++++++
 meta/recipes-devtools/ruby/ruby_4.0.1.bb      |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 
meta/recipes-devtools/ruby/ruby/0001-Don-t-save-the-original-name-and-timestamp.patch

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
index 00000000000..3db53285653
--- /dev/null
+++ 
b/meta/recipes-devtools/ruby/ruby/0001-Don-t-save-the-original-name-and-timestamp.patch
@@ -0,0 +1,33 @@
+From 6250ed93d1d7407eb84241296d604e6f98ff0a82 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+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 <[email protected]>
+---
+ 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
+
diff --git a/meta/recipes-devtools/ruby/ruby_4.0.1.bb 
b/meta/recipes-devtools/ruby/ruby_4.0.1.bb
index 13d4a1b4ef0..e51d0d3e9cf 100644
--- a/meta/recipes-devtools/ruby/ruby_4.0.1.bb
+++ b/meta/recipes-devtools/ruby/ruby_4.0.1.bb
@@ -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/";
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232208): 
https://lists.openembedded.org/g/openembedded-core/message/232208
Mute This Topic: https://lists.openembedded.org/mt/118095123/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to