%{?dist} and changelog

Warren Togami wtogami at redhat.com
Tue Jan 24 06:52:45 UTC 2006


Ralf Corsepius wrote:
> On Tue, 2006-01-24 at 13:22 +0900, Warren Togami wrote:
>> http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/libevent/libevent.spec?root=extras&rev=1.2
>>
>> Hi folks,
>>
>> This is just a reminder to please do not include the %{?dist} suffix in 
>> the version field within a package %changelog like in this example 
>> package.
> 
> How do you want us to avoid it in cases, where you have to branch
> releases/"walk side ways" release-wise?
> 

Hard code it in the %changelog.

> The usual work-around would be to append a suffix to end of the release
> tag, e.g. xxx-3-4%{dist}.1 (cf. below).
> 
>>   It is misleading when the package is built in the future on 
>> newer distributions.  The release number(s) prior to the dist tag should 
>> be sufficient within your %changelog.
> 
> Sorry, but this doesn't apply.
> 
> Example: Given a package with a long history:
> 
> FC3: 1-1.fc3 
>      -> 1-2.fc3
> FC4: -> 1-2.fc4
> FC5: -> 1-2.fc5
> 
> Now modular was introduced to FC5, causing a cascade of rebuilds:
> FC5:   -> 1-3.fc5
>        -> 1-5.fc5
>        -> 1-6.fc5
> 
> At this point, a packaging bug was discovered, only applying to FC < 5.
> The maintainer chose to "fork" for FC < 5 i.e. to use 1-2%{dist}.1,
> because 1.3%{dist} already had been used on "HEAD" (FC5):
> FC3: 1-2.fc2.1
> FC4: 1-2.fc4.1
> 
> How to handle this case in %changelog?

Simply hard-code dist in the changelog if you have to branch sideways 
and diverge from the other distros.  I personally don't include the dist 
in changelogs at all in any packages when it is exactly identical 
between distros, but if they differ then it is good to differentiate it. 
  Hard coding is the only clean and future proof way.

Warren Togami
wtogami at redhat.com




More information about the fedora-extras-list mailing list