From Fedora Project Wiki

Revision as of 17:00, 22 June 2011 by Toshio (talk | contribs) (Clarify how libexecdir is used.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Current

Libexecdir

The Filesystem Hierarchy Standard does not include any provision for libexecdir, but Fedora packages can store appropriate files there. Libexecdir (aka, /usr/libexec on Fedora systems) should be used as the directory for executable programs that are designed primarily to be run by other programs rather than by users.

Fedora's rpm includes a macro for libexecdir, %{_libexecdir}. Packagers are highly encouraged to store libexecdir files in a package-specific subdirectory of %{_libexecdir}, such as %{_libexecdir}/%{name}.


Proposed

Libexecdir

The Filesystem Hierarchy Standard does not include any provision for libexecdir, but Fedora packages may store appropriate files there. Libexecdir (aka, /usr/libexec on Fedora systems) should only be used as the directory for executable programs that are designed primarily to be run by other programs rather than by users.

Fedora's rpm includes a macro for libexecdir, %{_libexecdir}. Packagers are highly encouraged to store libexecdir files in a package-specific subdirectory of %{_libexecdir}, such as %{_libexecdir}/%{name}.

If upstream's build scripts support the use of /usr/libexec then that is the most appropriate place to use. If upstream's build scripts do not support that, %{_libdir}/%{name} is a valid second choice. If the helpers that the program can use may only be arch independent then %{_datadir}/%{name} may also be used but this is a distant third choice. If you have to patch support for using one of these directories in, then you should patch in LIBEXECDIR, preferably configurable at build time (so distributions that do not have /usr/libexec can set LIBEXECDIR to another directory more appropriate for their distro.