From Fedora Project Wiki
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.

New section for https://fedoraproject.org/wiki/Packaging:Guidelines#Filesystem_Layout See: https://fedorahosted.org/fpc/ticket/314

Effect of the UsrMove Fedora Feature

Fedora has merged several directories in / with their counterparts in /usr/.

/bin

/usr/bin aka %{_bindir}

/sbin

/usr/sbin aka %{_sbindir}

/lib64 or /lib

/usr/lib64 or /usr/lib aka %{_libdir}

/lib

/usr/lib aka %{_prefix}/lib

For example, end users will find that /bin/sh is the same file as /usr/bin/sh.

However, rpm file dependencies don't work according to what's on the filesystem, they work according to the path specified in the rpm %files section. So an rpm which specified:

%files
/bin/sh

would be able to satisfy a file dependency for /bin/sh but not for /usr/bin/sh. As a packager you may need to pay attention to where other packages expect to find your files. Things that history has placed into /bin, /sbin, /lib, or /lib64 should be listed in the %files section as being in those directories. Things that history placed in /usr/bin, /usr/sbin, etc, should be listed in the %files section as being in %{_bindir}, %{_sbindir}, etc. If you feel that there is some historical confusion as to which directory a program is placed in, you can use a Virtual Provides to list the alternate path. For instance:

Provides: %{_sbindir}/ifconfig
[...]
%files
/sbin/ifconfig

If you are a packager who uses file dependencies to Require the proper dependencies then you may need to make sure that the file dependencies are pointing to the location that the packager of that file specified to rpm. Here's an example of doing this:

$ rpm -ql $(rpm -qf /usr/sbin/ifconfig)|grep sbin/ifconfig
/sbin/ifconfig

So you'd want to use Requires: /sbin/ifconfig in your spec file.