64-bit binaries in /usr/lib

Adam Osuchowski adwol at zonk.pl
Sun Oct 9 14:08:52 CEST 2016


Elan Ruusamäe wrote:
> every package probably has reason, given examples it would be easier to 
> explain.

$ rpm -qf `find {/usr,}/lib -type f -perm -0100 | xargs file | grep 'ELF 64-bit LSB executable' | cut -f1 -d:` | sort -u
ConsoleKit-0.4.6-3.x86_64
cups-filters-1.8.3-3.x86_64
git-core-2.10.0-1.x86_64
git-core-svn-2.10.0-1.x86_64
libinput-1.4.1-1.x86_64
nagios-plugin-check_load-2.1.3-1.x86_64
nagios-plugins-2.1.3-1.x86_64
polkit-0.113-3.x86_64
rpm-5.4.15-37.x86_64
rpm-build-5.4.15-37.x86_64
rpm-utils-5.4.15-37.x86_64
sysstat-11.2.0-3.x86_64
udisks-1.0.5-3.x86_64

In particular, git-core kept its binaries in /usr/lib64 formerly but it
was changed to /usr/lib. nagios-common contains both of them:

$ rpm -qf /usr/lib{,64}/nagios/plugins 
nagios-common-4.0.8-5.x86_64
nagios-common-4.0.8-5.x86_64

cups and rpm keep /usr/lib all the time.

> it may be deliberately packaged like this in pld, or just because 
> upstream uses such packaging (and it's not "fixed" in pld)

It is rather PLD issue.

> but the (--libdir) /usr/lib vs /usr/lib64 (and /usr/libx32) are for 
> libraries (libfoo.so.1), so you could parallel install libfoo.so.1(ix84) 
> and libfoo.so.1(x86-64).

That is, shared libraries on x86-64 arch should be placed in {/usr,}/lib64
and binaries (not intended to run directly by user), scripts and other 
private package files in {/usr,}/lib. Do I understand it correctly?

> there's also --libexecdir which is %{_libdir} in pld, but 
> %{_prefix}/libexec in other distros, and that path is used to provide 
> private binaries for application (not intended to be used from $PATH), that 
> is the most common case how binaries end up in /usr/lib* trees.
>
> i personally also think --libexecdir should be %{_prefix}/libexec. it would 
> make configurations simpler, don't need to patch for %{_libdir} everywhere.

I know but now it is totally removed and no package use it:

# ipoldek 'search -f /usr/libexec/*'
Loading [pndir]th...
Loading [pndir]th...
26078 packages read
Loading [rpmdbcache]/var/lib/rpm...
3352 packages loaded
Searching packages..........................................done.
No package matches '/usr/libexec/*'

Besides, FSB admits of using /usr/lib insted of /usr/libexec.


More information about the pld-devel-en mailing list