Directory ownership (was: Re: Request for review (round3): libxslt-plugin-regexp ...)

Michael Schwendt bugs.michael at gmx.net
Fri Aug 5 10:47:19 UTC 2005


On Thu, 4 Aug 2005 20:44:13 -0400, joel reed wrote:

> any experts on fedora-extras care to provide any additional guidance here?
> is it ok for multiple packages to claim ownership of this dir? i don't see
> anything regarding this in the rpm.org HOWTO.

The question is phrased in an ambiguous way. Hence let's start somewhere
else:

Pitfall 1: Your package doesn't own the directory, but stores files in
it. None of your package's dependencies owns the directory either. During
installation of your package, the directory is created, however. And it
might be created with tight permissions depending on superuser's umask
(e.g. umask 0077 is not rare). None of such admin's users could read the
files within the directory. Upon removal of the package[s], the empty
orphaned directory will be left on the file-system.

Pitfall 2: Your package owns the directory and stores files in it. None of
your package's dependencies owns the directory, but at least one stores
files in it. RPM must figure out the order in which to erase packages, so
it can safely erase the empty directory after removing all files within
it. It cannot do that, if directory ownership is wrong or incomplete.

Pitfall 3: Multiple packages own the directory and store files in it.
This can break path-based dependencies really badly or make them
impossible. Sort of "Requires: %{_libdir}/libhome-2.0/plugins/"
would break, if the "plugin" packages own--and hence provide--that
directory path. And yes, path-based dependencies are superior to
package-name dependencies.


With regard to ownership of %{_libdir}/libxslt/, as a temporary
work-around it would be okay if you own the directory and all
sub-directories as long as the core libxslt package doesn't do that. It's
a trade-off between the likelihood of breaking due to case 1 above and
creating unowned directories. Fully correct for libxslt would be (quite
like Daniel Veillard outlined) that if libxlst supports loading
plugins/modules from a directory (which may be empty initially), it ought
to own those directories.




More information about the fedora-extras-list mailing list