#138 Allow multiple file ownership
Closed: Fixed None Opened 8 years ago by cwickert.

== Summary ==

Currently the packaging guidelines do not allow files to be owned by multiple packages, even if rpm supports it and there are valid use cases. This ticket is an approach to relax this rule and allow multiple packages to own the same files if they are identical.

== Problem ==

Current guidelines clearly state: "Packages must not own files already owned by other packages".

However there are situations where it might be desired for files to be owned by more than one package. One example is the package gtkhash, which can build against gtk2 and gtk3. Both packages then share the locales and a single file /usr/share/gtkhash/gtkhash.xml. It is possible to install the gtkhash package and gtkhash3 (with the binary gtkhash3) alongside without any problems, so there is no need to make the packages conflict.

Strictly speaking "most not be owned by other packages" even forbids packages of multiple arches to be installed.

== Propsal ==
Allow multiple file ownership if the packages to own the file are built from a single SRPM or there is another way to ensure the files are always identical.

== Rationale ==

  1. There are valid uses cases.
  2. Introducing an artificial conflict that is not there is worse.
  3. We already allow this for directories.
  4. We already do this for multi-arch setups.
  5. rpm supports it in all Fedora releases. According to Panu it should even work in RHEL5 and rpm never had a problem with multiple file ownership but with detecting the differences between these files in certain situations.

== Further info==
http://lists.fedoraproject.org/pipermail/packaging/2012-January/008112.html and replies, in particular http://lists.fedoraproject.org/pipermail/packaging/2012-January/008117.html


New Proposal: Multiple packages may contain identical copies of the same file, as long as the following requirements are met:

  • The packages sharing ownership of the identical files are built from a single SRPM.
    OR
  • The packages sharing ownership of the identical files are not in a dependency chain (e.g. if package A requires package B, they should not both contain identical files, either A or B must own the common files, but not both.)

In addition, identical files are defined as files which are always identical in content, checksum, and location on the filesystem in each package.

Sounds good to me, but I'd like to add 'identical permissions' to the definition of identical files.

APPROVED: draft from comment 1, with change from comment 2, and additional addition:

In most cases, it should not be necessary for multiple packages to contain identical copies of the same file. However, if it is necessary, multiple packages may contain identical copies of the same file, as long as the following requirements are met:

  • The packages sharing ownership of the identical files are built from a single SRPM.

OR

  • The packages sharing ownership of the identical files are not in a dependency chain (e.g. if package A requires package B, they should not both contain identical files, either A or B must own the common files, but not both.)

In addition, identical files are defined as files which are always identical in content, checksum, permissions, and location on the filesystem in each package.

Announce Text:

The section on File and Directory Ownership has been updated to reflect the fact that while in most cases, it should not be necessary for multiple packages to contain identical copies of the same file, if it is necessary, multiple packages may contain identical copies of the same file, as long as the following requirements are met:

  • The packages sharing ownership of the identical files are built from a single SRPM.

OR

  • The packages sharing ownership of the identical files are not in a dependency chain (e.g. if package A requires package B, they should not both contain identical files, either A or B must own the common files, but not both.)

In addition, identical files are defined as files which are always identical in content, checksum, permissions, and location on the filesystem in each package.

https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Ownership

Metadata Update from @spot:
- Issue assigned to spot

3 years ago

Login to comment on this ticket.

Metadata