-
Notifications
You must be signed in to change notification settings - Fork 913
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
lightningd: fix up installs in subdirectories. #7618
lightningd: fix up installs in subdirectories. #7618
Conversation
lightningd/lightningd.c
Outdated
rel = path_rel(NULL, BINDIR, PKGLIBEXECDIR); | ||
ld->subdaemon_dir = path_join(ld, my_path, take(rel)); | ||
|
||
rel = path_rel(NULL, BINDIR, PLUGINDIR); |
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.
This works as long as the BINDIR and PLUGINDIR exist. Otherwise I get rel==NULL
here.
Is realpath
that checks if the path exists. Using path_simplify
instead of path_canon
inside path_rel
would fix it, but that would not resolve symlinks, right?
Alternatively one could hardcode the relative path: ../libexec/c-lightning
for subdaemons and ../libexec/c-lightning/plugins
for plugins.
895052d
to
d7eb717
Compare
d7eb717
to
e59d980
Compare
Commit a1fdeee "Makefile: clean up install path handling." broke the ability to configure with one path and then run in a different path. Turns out people actually do this! So, we have to use relative paths, compared to our existing binary. And we can't use path_rel, because that requires that the path exist (thanks @Lagrang3!). Fixes: ElementsProject#7595 Signed-off-by: Rusty Russell <[email protected]>
e59d980
to
a0f7225
Compare
With PR ElementsProject#7618, Core Lightning installation with relative paths has been fixed and can be used again. Changelog-None.
ACK a0f7225 |
With PR ElementsProject#7618, Core Lightning installation with relative paths has been fixed and can be used again. Changelog-None.
With PR #7618, Core Lightning installation with relative paths has been fixed and can be used again. Changelog-None.
Commit a1fdeee "Makefile: clean up install path handling." broke the ability to configure with one path and then run in a different path. Turns out people actually do this! So, we have to use relative paths, compared to our existing binary.
Fixes: #7595
Pull Request Title
Description
Please provide a brief summary of the changes made in this PR. What does it do, and why is it necessary?
Related Issues
List any related issues, bugs, or feature requests that are being addressed by this PR. Link them using GitHub's closing syntax (e.g.,
Closes #123
).Changes Made
Checklist
Ensure the following tasks are completed before submitting the PR:
TODOs
have been addressed or removed.Additional Notes
Any additional information or context about this PR that reviewers should know.