-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbenv scripts no longer allowed in another directory besides <bin_dir>/../libexec #1437
Comments
Thanks for reporting! I better understand the breakage now and I really wish I could resolve BASH_SOURCE to a canonical path in case Alternatively, do you think I could somehow communicate to package maintainers that a #!/usr/bin/env sh
# GENERATED BY PACKAGE
exec /path/to/rbenv/libexec/rbenv "$@" It's a solution that's immediately available to them and I wouldn't have to change anything in this codebase to support it. |
So do you plan to not change anything at all and force It wouldn't work with |
@konsolebox Calling
Is there something that I am missing? |
To be fair the code in As for the package maintainers, I'm not sure if I can say anything about them. I made my own ebuild but it's not a |
It will work on that form but if |
Ah, I understand now what you mean. I don't think I want to support the case where a package maintainer significantly changes the project layout of rbenv codebase. But please let me think about this for a bit! |
For anyone needing a Googlewhack to find this issue, the exact error line we are seeing (in an Ubuntu Focal container) is: /usr/local/bin/rbenv: line 45: cd: /usr/local/bin/../libexec: No such file or directory |
@hlascelles Thanks for the info. I wasn't aware that people package rbenv from the latest |
That's OK, no rush! We're just bleeding edge. 🙂 Well use a tag, no problem. |
@hlascelles Resolving symlinks is back in master branch; you may continue to use bleeding edge and please report any problems. Thank you! |
Specifically in this change: 117a381#diff-91b53c00df854a3fb9a4dc150a0a3e37d6c6df79aa36b3731f492b7e23a7ffed
It no longer resolves the rbenv symbolic link and gets the path to the real rbenv script before getting the directory of it, and hardcodingly forces the libexec scripts to be only placed in
[rbenv_bin_dir]/../libexec
.Because of this, if the
rbenv
symbolic link is installed by a distro's package manager or script to/usr/bin/rbenv
, the libexec scripts can also only be installed to/usr/libexec
, and not in custom locations like/usr/lib/rbenv/libexec
. Debian as an example uses this location. See https://packages.debian.org/sid/all/rbenv/filelist.I also have an ebuild for Gentoo where I place the libexec scripts to
/usr/libexec/rbenv
instead of/usr/libexec
.I suggested a solution in the commit to have
bin/rbenv
installed as a script instead of a symbolic link and then make itsource
the realrbenv
in the preferred location configured by the package. This will allow the location of the real script to be known throughBASH_SOURCE
.bin/rbenv
:libexec/rbenv
:The text was updated successfully, but these errors were encountered: