On Mon, 5 Feb 2024 at 14:30, Lucas De Marchi <lucas.demarchi@xxxxxxxxx> wrote: [snip] > >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.html > 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. Thanks, Emil