#53 Path matching binaries with libraries
Closed: Fixed None Opened 13 years ago by spot.

It was pointed out to me that there was some recent confusion regarding placement of binaries in /bin and /sbin, specifically, that binaries placed in those directories will fail if they depend on libraries in /usr/lib* and /usr is not mounted. Technically, the FHS half-heartedly covers this scenario:

"Utilities used for system administration (and other root-only commands) are
stored in /sbin, /usr/sbin, and /usr/local/sbin. /sbin contains binaries
essential for booting, restoring, recovering, and/or repairing the system in
addition to the binaries in /bin. [18] Programs executed after /usr is known to
be mounted (when there are no problems) are generally placed into /usr/sbin.
Locally-installed system administration programs should be placed into
/usr/local/sbin. [19]"

So, I propose adding the following bit of common sense:

== Binaries in /bin and /sbin ==
Binaries placed into /bin and /sbin must not depend upon libraries stored in /usr/lib (or /usr/lib64). Binaries which depend on libraries in /usr/lib* must live in either /usr/bin or /usr/sbin.


Sounds reasonable. Do we(and by we, I of course mean you) have any idea what the current state of compliance with this is, so we can estimate the effort needed to get to 100%, which is obviously desirable?

No clue, but I expect it is scriptable.

Alternately, one could do a standard install, unmount /usr, and try to exec everything in /bin & /sbin. ;)

Hmmm... I know we passed a "Fedora packages must comply with the FHS" guideline a few years ago but I don't see it written up in the Guidelines. What does this add to that and do we want to either revisit FHS or just write it up?

A further question is whether we want to give guidance on whether to move a binary out of /bin,/sbin or move libraries into /lib,/lib64 in the general case to satisfy this.

Approved, (+1:6, 0:0, -1:0)

Announce text:

A subsection was added to the Packaging Guidelines section on Filesystem Layout in which it is made explicit that binaries in /bin or /sbin must NOT depend on any libraries in /usr/lib or /usr/lib64.

https://fedoraproject.org/wiki/Packaging:Guidelines#Binaries_in_.2Fbin_and_.2Fsbin

Metadata Update from @limb:
- Issue assigned to spot

7 years ago

Login to comment on this ticket.

Metadata