Sample Header Ad - 728x90

Is subdirectory in /usr/bin really forbidden by FHS

1 vote
1 answer
896 views
Lintian tag description: >The Filesystem Hierarchy Standard forbids the installation of new directories in /usr/bin other than /usr/bin/mh. However, all I can find the linked document is >This is the primary directory of executable commands on the system. This *allows* executable commands to go there, but it does not forbid anything. What paragraph doees Lintian refer to? The reason I like to put a subdirectory there is that I have a wrapper script, that the user uses instead of the binary, and I want the wrapper script to work without changes when "installing" the program. In short, the script looks like options=() debug=0 mode="rel" for option in "$@"; do if [ "$option" == "--debug" ]; then debug=1 mode="dbg" else options+=("$option") fi done current_dir=$(dirname "readlink -f "${BASH_SOURCE}"") binary="$current_dir"/__anja_"$mode"_"$arch"/anja if [ $debug -eq 1 ]; then gdb --args "$binary" "${options[@]}" else exec "$binary" "${options[@]}" fi where arch is deduced from /proc/cpuinfo. The build system emits the binary in the directory __anja_"$mode"_"$arch", in the project root directory. Yes, the correct place for the real binaries is /usr/libexec, but then the script must be changed during the installation procedure.
Asked by user877329 (761 rep)
Jul 28, 2017, 06:15 PM
Last activity: Jul 28, 2017, 09:35 PM