README.install says: Note: The default install is relative to /usr/local The default install directory is /usr/local/bin The default plugin directory is /usr/local/lib/trace-cmd/plugins To change the default, you can set 'prefix', eg mkdir $HOME/test-trace make prefix=$HOME/test-trace make prefix=$HOME/test-trace install But this doesn't work due to: INSTALL /home/julia/trace-cmd/tracecmd/trace-cmd.bash to /etc/bash_completion.d install: cannot create regular file '/etc/bash_completion.d/trace-cmd.bash': Permission denied Makefile:333: recipe for target 'install_bash_completion' failed make: *** [install_bash_completion] Error 1 The obvious solution would be to add sudo, but the install is ona server and I don't want to overwrite a global version that someone else may be relying on.
Thanks Julia for the report! I'll look into this. Agreed that there's issues with the "local" verses "normal" install. The issue is that some installations need to be put into the root directories (like /etc and not /usr/local) otherwise they do not work at all. But for these cases we need to check if "prefix" has been changed, because then we need to change the installation of the "root" files. It appears that the bash completion installation is one of those that need to be handled and was missed.
Created attachment 287025 [details] trace-cmd: Have /etc paths honor $(prefix) if not the default This patch should fix the issue (at least it does for me). It checks if "prefix" has been set, and if it has then it will have the /etc directory honor it.
Fixed by: e8fb01140eb2 ("trace-cmd: Have /etc paths honor $(prefix) if not the default")