From Fedora Project Wiki

Use license macro in RPMs for packages in Cloud Image

Summary

Use new %license macro to separate license files from documentation, so the latter can be excluded from container images without stripping license information which must be included.

Owner

  • Name: Matthew Miller, Tom Callaway
  • Email: mattdm at fedoraproject, spot at fedoraproject
  • Release notes owner:
  • Product: Cloud
  • Responsible WG: Cloud WG

Current status

Detailed Description

Background:

  1. Right now, license files are required to be marked as %doc files.
  2. There has long been a "nodocs" parameter to RPM which skips all doc files.
  3. In addition to the desired space-savings, this installs packages without their possibly-mandatory license files

This interaction hasn't been problematic before, because generally using nodocs is an endpoint choice with no distribution after that. But now, we are looking at building some official cloud and container images with nodocs, so it suddenly becomes important.

As a bonus, in the future, %license may handle automatic hardlinking of identical license files.

Specifically, I propose:

  1. We change the guidelines
  2. We start doing it for new packages
  3. We file a F21 system-wide change (that is, this change) for a proven packager to change all the packages that land in the cloud image for F21 (roughly, @core + dependencies plus a few extras)
  4. We may file a similar change for other packages in the base design for F22, but the work/reward ratio is much lower.
  5. It may also be valuable to focus on a few key packages commonly used in Docker images (like httpd)
  6. Other packages updated on a as-time-permits/best-effort basis.

Benefit to Fedora

Allows us to distribute minimal images without bulky documentation but including required license texts.

Scope

  • Proposal owners: Update guidelines. Identify target packages. Tom will use provenpackager to make changes to spec files.
  • Other developers: Be aware of possible provenpackager changes. Update other packages on best-effort basis if interested.
  • Release engineering: none
  • Policies and guidelines: Yes; packaging guidelines change. See https://fedorahosted.org/fpc/ticket/411

Upgrade/compatibility impact

No impact on upgrades.

How To Test

Look at a cloud image; license files for packages which require them should be included in /usr/share/licenses

User Experience

People may be accustomed to looking for licenses files in the %doc directory. Due to the implementation in RPM, these files will now be in a separate /usr/share/licenses hierarchy. Until all packages are changed, however, many will still be in /usr/doc.

Dependencies

This is a requirement for Changes/Smaller_Cloud_Image_Footprint, because documentation is both unnecessary and a meaningful fraction of the overhead. It would also be nice to have for other cloud images.

Contingency Plan

  • Contingency mechanism: ship all images with docs included
  • Contingency deadline: beta change deadline
  • Blocks release? no
  • Blocks product? no

Documentation

The FPC ticket and future guidelines will provide the required documentation.

Release Notes

Packages which are included in the official Fedora Docker Image (NOTE: update with actual images affected) now use a special location for license files, allowing those packages to be shipped with no other documentation. These licenses are found under the /usr/share/licenses hierarchy, rather than /usr/share/docs.

Migration of other packages to this new standard will be on a best-effort basis, so many packages will continue to have license files under /usr/share/docs and not in the new location.