Makefile: allow specifying /lib dir location #17846
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello 👋
This is my first PR to the podman project! I hope it is useful.
When running
make install
on Ubuntu, I noticed symlinks under/lib
to files under/libexec
were broken. I tracked it down to/lib
being a symlink to/usr/lib
on that platform, resulting in relative symlinks being a directory too "short". I included the explanation from the commit message below.With this patch applied, Ubuntu users can simply specify
Make install LIBDIR=/usr/lib
and things will work as expected.There could be some better way (perhaps the makefile could figure this out for itself somehow?) but this is the best I could think of.
Thanks!
On some platforms, /lib is not actually a directory, it is a symlink to /usr/lib:
When this is the case, "make install" will be operating under a false assumption when it generates any relative symlinks to files under a different root-level directory.
If linking to /libexec/... from /lib/... for example, the generated relative symlink will be 1 parent directory pointer (../) too short.
This PR allows the builder to specify LIBDIR=/usr/lib, explicitly installing files to the target of the symlink. This results in symlinks being generated with the correct depth.