[Fedora-packaging] disttag

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Fri Feb 25 10:55:05 UTC 2005


Tom 'spot' Callaway wrote :

> Maintainers would not be required to use %{disttag}. However, should
> they choose to do so, it should be placed at the end of the release
> field, preceeded by a period, e.g. Release: 1.%{disttag}.
> 
> %{disttag} should never be hardcoded in a spec, it will be assigned by
> the buildsystem based on the version of the package owning 
> /etc/redhat-release.
> 
> Feedback, thoughts, and macro improvements welcome.

I'm a bit confused... you mean that initial spec files will contain this
%{disttag} but that the final one in the source rpm will contain the
hardcoded value instead? This will produce quite a lot of confusion for
"quick rebuilds" of source packages with hardcoded releases on other
distributions... and I don't really understand why we want to use rpm and
macros for this whole substitution if mangling of the spec gets done in the
end.

An easy to way to fix this would be to have "%{?disttag}" appended to the
"Release:" line of the spec by the build system, and have the "." returned
by the macro (or use a longer "%{?disttag:.%{disttag}}"). That way, when
disttag is defined (by a newer redhat-rpm-config for instance) it'll be
expanded for the build, but if it isn't, the build will still work with no
changes and produce a package with a simple integer release tag.

More thoughts?

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 3 (Heidelberg) - Linux kernel 2.6.10-1.766_FC3.radeon
Load : 0.15 0.14 0.31




More information about the Fedora-packaging mailing list