[packages/ruby/DEVEL-3.4] Replace symlink with real binary

arekm arekm at pld-linux.org
Mon Mar 16 13:18:22 CET 2026


commit b92f2ad5590f043b29d0c203f01692274fa7143b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 16 13:18:09 2026 +0100

    Replace symlink with real binary

 ruby.spec | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ruby.spec b/ruby.spec
index 5fe352f..666fc4a 100644
--- a/ruby.spec
+++ b/ruby.spec
@@ -9,7 +9,7 @@
 %bcond_with	bootstrap	# build bootstrap version
 %bcond_with	tests		# build without tests
 
-%define		rel		2
+%define		rel		3
 %define		ruby_version	3.4
 %define		patchlevel	9
 %define		pkg_version	%{ruby_version}.%{patchlevel}
@@ -936,7 +936,12 @@ find $RPM_BUILD_ROOT${gem_dir}/extensions/*-%{_target_os}/%{ruby_version}.*/* -m
 # Clean up gem cache and leftover directories from gem_dir (outside system paths)
 %{__rm} -rf $RPM_BUILD_ROOT${gem_dir}
 
-# Remove multiarch cross binary (duplicate of /usr/bin/ruby)
+# ruby binary is installed in arch-specific dir with symlink from %{_bindir};
+# move it to %{_bindir} directly (https://bugs.ruby-lang.org/issues/20800)
+if [ -L $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix} ]; then
+	%{__rm} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix}
+	%{__mv} $RPM_BUILD_ROOT%{_prefix}/*-pld-linux-gnu/bin/ruby%{ruby_suffix} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix}
+fi
 %{__rm} -rf $RPM_BUILD_ROOT%{_prefix}/*-pld-linux-gnu
 
 # replace default irb with its not gemified version
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby.git/commitdiff/b92f2ad5590f043b29d0c203f01692274fa7143b



More information about the pld-cvs-commit mailing list