Re: Re: Re: [PATCH 2/2] make: install/uninstall tools symlinks to kmod
From: Emil Velikov <hidden>
Date: 2024-02-14 16:22:57
On Tue, 6 Feb 2024 at 16:15, Lucas De Marchi [off-list ref] wrote:
On Mon, Feb 05, 2024 at 05:50:54PM +0000, Emil Velikov wrote:quoted
On Mon, 5 Feb 2024 at 14:30, Lucas De Marchi [off-list ref] wrote: [snip]quoted
quoted
I'm not a huge fan of using relative symlinks, especially if the tool> >is run as root. In my experience that makes things harder to audit and prevent accidental breakages.I'm completely in the opposite camp. Relative symlinks actually make sure the thing you are running is what you are expecting. Nothing should really point outside of $prefix expecting that is mounted on /.That is true and I fully agree. Yet the contents of DESTDIR are not meant to be run as-is - it's used for "staging" [1]. [1] https://www.gnu.org/software/make/manual/html_node/DESTDIR.htmlquoted
Several years back there was also the issue with packaging, which would complain when symlinks pointed outside what was being packaged. It is dangerous when using absolute symlinks because if the tool used to copy follows the symlinks, it ends up with the wrong binary, copying the host bin rather than what was just built.That sounds like a horrible bug, which can easily break your system regardless of the project. Would you consider dropping the leading `./` aka can we use `$(LN_S) kmod $(DESTDIR)$(bindir)/$$tool;`? Seems to be prevailing on my system with over 90% instances.seems good to me. I will squash that and push.
Respectful poke? Thanks Emil