Skip to content
ᴀɴᴛᴏɴ ɴᴏᴠᴏᴊɪʟᴏᴠ edited this page Jun 23, 2024 · 5 revisions

Description

Checks release tag for using %{?dist} macro.

Problematic code

Release: 1

Correct code

Release: 1%{?dist}

Rationale

There are several uses for a %{?dist} tag. The original purpose was so that a single spec file could be used for multiple distribution releases. In doing this, there are cases in which BuildRequires: and Requires: will need to be different for different distribution releases. Hence, %{?dist} does double duty:

  • it differentiates multiple packages which would otherwise have the same %{name}-%{version}-%{release}, but very different dependencies.
  • it allows for a conditional check in the spec to deal with the differing dependencies.

Links

Clone this wiki locally