[FHS] helper scripts location

Toshio Kuratomi a.badger at gmail.com
Fri Jun 10 16:56:31 UTC 2011


On Thu, Jun 09, 2011 at 12:14:45PM +0200, 80 wrote:
> Hi,
> 
> I'm reviewing osc and osc-source_validators (osc is Opensuse Build
> Service CLI, the latter a plugin to the former).
> An issue arose about helpers script location:
> 1) Fedora packaging guidelines suggests helpers *should go*
> /usr/libexec for helpers ==> requires patching since osc search
> helpers in /usr/lib
> since it's not in FHS, it's almost certain that a patch won't be upstream-able
>
This would be the most proper location on Fedora.  Note that many upstreams
do take patches of this sort as long as the libexecdir is settable.
libexecdir is a GNU Coding Standard directory; on Debian or other systems
that disallow /usr/libexecdir, libexecdir gets set to /usr/lib.

http://www.gnu.org/prep/standards/html_node/Directory-Variables.html

> 2) FHS explicitely allows shell scripts in /usr/lib

I don't actually see this.  Could you point me to the quote and section?

Additionally, the GNU Coding standards explicitly prohibit this (to be clear
the GNU coding standards are not definitive for Fedora like the FHS is at
this time; I'm including the quotation to show what current best practices
are in this regard):
"""
‘libdir’
The directory for object files and libraries of object code. Do not install
executables here, they probably ought to go in ‘$(libexecdir)’ instead.
"""

At similar weight is the fact that some programs currently violate the GNU
Coding Standard recommendation here.  However, I can't think of one of those
off the top of my head that is a unix-y program so those may be more
workaround than paradigm setters.

> 3) FHS doesn't forbid putting them in /usr/share as helpers could be
> considered as "arch independent data"
> 
<nod>

> There are recent packages that choose options 2 && 3 (namely, systemd
> and dracut).
> According to me, guidelines doesn't enforce any of these options, and
> choice is left to packager/reviewer appreciation, though you may
> distinguish an order of precedence.
> 
> So, what's the take of my fellow packagers on that particular matter ?
> 
Preference-wise, I would say $LIBEXECDIR; settable at build time to
/usr/libexec on Fedora-style distros and /usr/lib on Debian-style distros is
the best method here.  Since we're talking scripts (architecture
independent), /usr/share may also make sense but I'm not a big fan of it.
If you can find me the piece of FHS that explicitly allows shell scripts in
/usr/lib I can figure out how that compares to using /usr/lib.


-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110610/2a2cdc03/attachment.bin 


More information about the devel mailing list