Hello,
> rversion=2.1
> subversion=400
>
>
> Spec file extract:
> Version: %{rversion}.%{subversion}
>
> Source: ...../%{name}-%{version}.tar.gz
IMO, it would be more clear to separate strictly between upstream version
(= tarball version) and Fedora package version. Apparently, both are the
same in your case, so why reconstruct them? Once you've started a particular
versioning scheme, you don't win a lot of flexibility by hiding the real
version in variables. You only increase the risk that an improper version
bump breaks the upgrade path, i.e. one cannot mess with %subversion anyway
and must increment it correctly in the context of the full %version. The
full %version is also absolutely important with regard to versioned
dependencies, Obsoletes and Provides. It would be fine to just use
Version: 2.1.400
and if the 2.1 prefix is really needed elsewhere in the spec file and
perhaps has a meaning other than being just a number, assign it to a
separate variable.
This is historical.
Within the spec file there is
#-----------------------------------------------------------
#to define the revision number
%define revision %(R="$Revision: 2.1.0.401 $"; RR="${R##: }"; echo
${RR%
% ?})
%define rversion %(echo %{revision} | cut -d'.' -f1-2)
%define subversion %(echo %{revision}| cut -d'.' -f4)
#-----------------------------------------------------------
In our development (upstream) a Makefile with
a "make version" is calling RCS to tag and freeze
all file with an increased version mark (project
started well before GIT time :-}})
My whole questioning about version started when I
found "My" spec file within Fedora to be now 1.30!!
(if the version is 1.30... how come good tar file be used
and rpm 2.1.320 could have been be generated within rawhide??).
As we are GIT now, I do not think putting
"$Revision: 2.1.0.401 $" strings within spec is a good thing
anymore.
--
A bientôt
==========================================================================
Jean-Marc Pigeon Internet: jmp(a)safe.ca
SAFE Inc. Phone: (514) 493-4280
Fax: (514) 493-1946
Clement, 'a kiss solution' to get rid of SPAM (at last)
Clement' Home base <"http://www.clement.safe.ca">
==========================================================================