From Fedora Project Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Packaging:Guidelines#Tags

This draft is not ready, yet. It is currently be worked on by [[User:Till|Till Maas].

Current content

  • The Packager tag should not be used in spec files. The identities of the packagers are evident from the changelog entries. By not using the Packager tag, you also avoid seeing bad binaries rebuilt by someone else with your name in the header. See also the Maximum RPM definition of the Packager tag at www.rpm.org . If you need to include information about the packager in the rpms you built, use %packager in your ~/.rpmmacros instead.
  • The Vendor tag should not be used. It is set automatically by the build system.
  • The Copyright tag is deprecated. Use the License tag instead, as detailed in Packaging:LicensingGuidelines . Contact the upstream author if there is any doubt about what license the software is distributed under.
  • The Summary tag value should not end in a period. If this bothers you from a grammatical point of view, sit down, take a deep breath, and get over it.
  • Usually, the PreReq tag should be replaced by plain Requires. For more info, see Maximum RPM snapshot's fine grained dependencies chapter .
  • The Source tag documents where to find the upstream sources for the rpm. In most cases this should be a complete URL to the upstream tarball. For special cases, please see the Packaging:SourceURL Guidelines

proposed content

Allowed RPM tags

Only the following RPM tags are allowed to be used in specfiles:

  • BuildRequires
  • BuildRoot (Not required and ignored by RPM in Fedora. EPEL (4 and 5) still requires it)
  • Epoch
  • Group
  • License
  • Name
  • PatchX
    • X is a numeric value, just Patch: is not allowed
  • Release
  • Requires
  • Requires(SCRIPTLET)
    • SCRIPTLET is one item out of: pre, post, preun, postun
  • SourceX
    • X is a numeric value, just Source: is not allowed
  • The Source0 tag documents where to find the upstream sources for the rpm. In most cases this should be a complete URL to the upstream tarball. For more details, please see the Packaging:SourceURL Guidelines.
  • Summary
    • The summary must not end in a period. If this bothers you from a grammatical point of view, sit down, take a deep breath, and get over it.
  • URL
  • Version

Alternatives and reasoning for some forbidden tags

  • The Packager tag is forbidden, because the identities of the packagers are evident from the changelog entries. By not using the Packager tag, you also avoid seeing bad binaries rebuilt by someone else with your name in the header. See also the Maximum RPM definition of the Packager tag. If you need to include information about the packager in the rpms you built, use %packager in your ~/.rpmmacros instead.
  • The Vendor tag is set automatically by the build system, therefore there is no use in setting it in the specfile.
  • The Copyright tag is deprecated by the License tag, as detailed in Packaging:LicensingGuidelines.
  • The PreReq tag is nowadays identically to Requires. For more info, see Maximum RPM snapshot's fine grained dependencies chapter.


TODO

* remove Packaging:Guidelines#PreReq to avoid redundancy
* move Packaging:Guidelines#.25clean after Summary and description
* make Packaging:Guidelines#BuildRoot_tag Packaging:Guidelines#Requires Packaging:Guidelines#BuildRequires and Packaging:Guidelines#Summary_and_description subsections Packaging:Guidelines#All_patches_should_have_an_upstream_bug_link_or_comment Packaging:Guidelines#Use_of_Epochs of #Tags