Bug #20800
closedDon't place `ruby` executable into `/usr/libexec/x86_64-linux/bin`
Description
Trying to prepare Ruby 3.4 package for Fedora, it seems that since 1, the ruby
executable is installed into /usr/libexec/x86_64-linux/bin
:
installing binary commands: /usr/libexec/x86_64-linux/bin
Unfortunately, the PR does not explain anything about reasons why. To me, using libexec
is surprising, because according to FHS 2, the directory is for internal binaries. What is even more surprising is usage of the bin
subdirectory there, which IMHO does not follow any standard or convention (I don't have /usr/libexec/x86_64-linux/bin
directory on my Fedora yet).
Just FTR, these are the configuration options used:
/builddir/build/BUILD/ruby-3.4.0_20241016git3da3cabf98-build/ruby-3.4.0-3da3cabf98/configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-rubylibprefix=/usr/share/ruby --with-archlibdir=/usr/lib64 --with-rubyarchprefix=/usr/lib64/ruby --with-sitedir=/usr/local/share/ruby/site_ruby --with-sitearchdir=/usr/local/lib64/ruby/site_ruby --with-vendordir=/usr/share/ruby/vendor_ruby --with-vendorarchdir=/usr/lib64/ruby/vendor_ruby --with-rubyhdrdir=/usr/include --with-rubyarchhdrdir=/usr/include '--with-sitearchhdrdir=$(sitehdrdir)/$(arch)' '--with-vendorarchhdrdir=$(vendorhdrdir)/$(arch)' --with-rubygemsdir=/usr/share/rubygems --with-ruby-pc=ruby.pc --with-compress-debug-sections=no --disable-rpath --enable-mkmf-verbose --enable-shared --with-ruby-version= --enable-multiarch --enable-yjit
The --enable-multiarch
is among the options. It is used not because Fedora would be multiarch
, but because it provides the highest flexibility.
Updated by alanwu (Alan Wu) about 1 month ago
I'm not familiar with this area, but using --enable-multiarch
when not multiarch seems like a misuse of the feature. Also, can you explain where you'd like it to place ruby
?
Updated by vo.x (Vit Ondruch) about 1 month ago · Edited
but using --enable-multiarch when not multiarch seems like a misuse of the feature.
I don't disagree. If I had other option, I'd use it. If somebody is interested to help, I'll gladly open separate ticket to share what are my thoughts on this topic.
can you explain where you'd like it to place ruby?
It is hard to guess what was the reason for 1 (and actually that should be the content of PR / commit message. Can this be improved, please?). So to me, it is questionable why the /usr/libexec/
+ symlink are used on the first place. But given this is reasonable change, then the path should likely be /usr/libexec/x86_64-linux/ruby
. At least this is my interpretation of FHS 2 and that would be aligned with what is the standard on Fedora (although admittedly, we would also leave out the x86_64-linux
, because Fedora is not multilib).
BTW I also don't understand why if usage of /usr/libexec/
+ symlink was deemed useful, why it should be mulitilib only.
Updated by vo.x (Vit Ondruch) about 1 month ago
vo.x (Vit Ondruch) wrote in #note-2:
the path should likely be
/usr/libexec/x86_64-linux/ruby
Just to clarify, the ruby
would be the binary. Of course it could also be directory should there be need for more files in libexec
Updated by nobu (Nobuyoshi Nakada) 13 days ago
- Status changed from Open to Closed
Applied in changeset git|303a52c201a693345cf789e9fb7edbcefcb34ec9.
[Bug #20800] Locate executable binary file under "libexec" directly
"libexec" means the directory for executable or binary files already.
Updated by vo.x (Vit Ondruch) 7 days ago
With the PR#12043, the executable is not installed into /usr/x86_64-redhat-linux-gnu/bin/ruby
. But I can't say I understand the motivations. I am going to move the executable for Fedora where it always was 🤷