File: put-ruby-interpreter-inside-usr-bin.patch

package info (click to toggle)
ruby3.4 3.4.5-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 154,784 kB
  • sloc: ruby: 1,259,653; ansic: 829,955; yacc: 28,233; pascal: 7,359; sh: 3,864; python: 1,799; cpp: 1,158; asm: 808; makefile: 801; javascript: 414; lisp: 109; perl: 62; awk: 36; sed: 4; xml: 4
file content (58 lines) | stat: -rw-r--r-- 2,022 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Tue, 29 Jul 2025 08:59:52 +0200
Subject: put ruby interpreter inside /usr/bin

This was the behaviour up to ruby3.3
revert partially https://github.com/ruby/ruby/pull/10010
see also https://bugs.ruby-lang.org/issues/20800
---
 tool/mkrunnable.rb | 11 ++---------
 tool/rbinstall.rb  |  4 +---
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/tool/mkrunnable.rb b/tool/mkrunnable.rb
index ef358e2..890323a 100755
--- a/tool/mkrunnable.rb
+++ b/tool/mkrunnable.rb
@@ -34,16 +34,9 @@ vendordir = config["vendordir"]
 rubylibdir = config["rubylibdir"]
 rubyarchdir = config["rubyarchdir"]
 archdir = "#{extout}/#{arch}"
-exedir = bindir
-if libdirname == "archlibdir"
-  exedir = exedir.sub(%r[/\K(?=[^/]+\z)]) {extout+"/"}
-end
-[exedir, libdir, archdir].uniq.each do |dir|
+[bindir, libdir, archdir].uniq.each do |dir|
   File.directory?(dir) or mkdir_p(dir)
 end
-unless exedir == bindir
-  ln_dir_relative(exedir, bindir)
-end
 
 exeext = config["EXEEXT"]
 ruby_install_name = config["ruby_install_name"]
@@ -52,7 +45,7 @@ goruby_install_name = "go" + ruby_install_name
 [ruby_install_name, rubyw_install_name, goruby_install_name].each do |ruby|
   if ruby and !ruby.empty?
     ruby += exeext
-    ln_relative(ruby, "#{exedir}/#{ruby}", true)
+    ln_relative(ruby, "#{bindir}/#{ruby}", true)
   end
 end
 so = config["LIBRUBY_SO"]
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index b194f2c..6a20d56 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -366,9 +366,7 @@ rubyw_install_name = CONFIG["rubyw_install_name"]
 goruby_install_name = "go" + ruby_install_name
 
 bindir = CONFIG["bindir", true]
-if CONFIG["libdirname"] == "archlibdir"
-  archbindir = bindir.sub(%r[/\K(?=[^/]+\z)]) {CONFIG["config_target"] + "/"}
-end
+archbindir = nil
 libdir = CONFIG[CONFIG.fetch("libdirname", "libdir"), true]
 rubyhdrdir = CONFIG["rubyhdrdir", true]
 archhdrdir = CONFIG["rubyarchhdrdir"] || (rubyhdrdir + "/" + CONFIG['arch'])