koji

Mike McLean mikem at redhat.com
Wed Nov 17 16:30:53 UTC 2010


On 11/16/2010 08:39 PM, Jinze Xue wrote:
> hello
> when a system version update ,for example,f11 to f12, how were packages with
> release fc11 changed to fc12?
> I create new build tag new target and change the release package in the
>   group of the build tag,but when I build a package ,it says the release of
> build and the release of rpms is different .
> so ,I can build the rpms out ,but I can't submit builds to the
> database,failed,
> any help ? thanks

Spec files use the %{dist} macro in the release value. This value can be 
set in the same way as other rpm macros. Fedora does it by including the 
file /etc/rpm/macros.dist in the fedora-release package, which is part 
of their base buildroot installs.

If you build from SCM, then your source rpm should be generated in a 
buildroot and see the same dist value as the build. However if you build 
from srpm, it depends on how you make your srpm.

If, for example, you build your srpm by hand on an f13 box and don't do 
anything to adjust the dist macro, then you'll get a value of .f13. If 
you try to build that srpm in an f14 buildroot, you'll get an n-v-r 
mismatch and see the error you described.

So short answer. Pick one of the following:
1) build from SCM
2) if building and srpm with fedpkg, use the appropriate branch
3) manually set the dist macro when building the srpm
4) don't use %{dist} in your spec file


More information about the buildsys mailing list