Changes/Use license macro in RPMs for packages in Cloud Image
Use license macro in RPMs for packages in Cloud Image
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.
- Name: Matthew Miller, Tom Callaway
- Email: mattdm at fedoraproject, spot at fedoraproject
- Release notes owner:
- Product: Cloud
- Responsible WG: Cloud WG
- Right now, license files are required to be marked as %doc files.
- There has long been a "nodocs" parameter to RPM which skips all doc files.
- 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:
- We change the guidelines
- We start doing it for new packages
- 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)
- We may file a similar change for other packages in the base design for F22, but the work/reward ratio is much lower.
- It may also be valuable to focus on a few key packages commonly used in Docker images (like httpd)
- 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.
- 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
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
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.
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 mechanism: ship all images with docs included
- Contingency deadline: beta change deadline
- Blocks release? no
- Blocks product? no
The FPC ticket and future guidelines will provide the required documentation.
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.