-
Notifications
You must be signed in to change notification settings - Fork 602
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
Overriding executable rpath
with patchelf
#25059
base: dev
Are you sure you want to change the base?
Conversation
b9c472a
to
4152c60
Compare
Signed-off-by: Michał Maślanka <[email protected]>
By overriding an `executable` rpath we no longer need to care about setting correct `LB_LIBRARY_PATH` Signed-off-by: Michał Maślanka <[email protected]>
Signed-off-by: Michał Maślanka <[email protected]>
Signed-off-by: Michał Maślanka <[email protected]>
4152c60
to
2a5da25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing thank you 🙏
Just a couple of questions for my understanding
inputs = [original_binary], | ||
outputs = [patched_binary], | ||
executable = ctx.executable._patchelf, | ||
arguments = ["--force-rpath", "--set-rpath", path_override, original_binary.path, "--output", patched_binary.path], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we setting --force-rpath
? https://man.archlinux.org/man/patchelf.1.en#force-rpath
@@ -17,7 +17,6 @@ go_binary( | |||
visibility = ["//bazel/packaging:__pkg__"], | |||
x_defs = { | |||
"binaryPath": "/opt/redpanda/libexec/redpanda", | |||
"ldLibraryPath": "/opt/redpanda/lib", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we even need these anymore with this approach? Should we remove the wrappers and just put the real binaries in bin/ instead of libexec/?
Overriding Redpanda executable makes it easier to handle shared library loading.
Backports Required
Release Notes