where to change the %version

Petr Mladek pmladek at suse.cz
Fri Oct 12 04:37:44 PDT 2012

On Fri, 2012-10-12 at 10:34 +0100, Michael Meeks wrote:
> Hi there,
> On Fri, 2012-10-12 at 09:40 +0800, huqitu du wrote:
> > I want to change the %version Variable, and whare to find the
> > defination? 
> 	%version is an unusual mangling; I think we only use this for
> generating RPMs - so git grep is really your friend in this regard:
> $ git grep %version
> solenv/bin/modules/installer/epmfile.pm:    # %version 2.0
> solenv/bin/modules/installer/epmfile.pm:    # This release version has to be listed in the line %version : %version versionnumber releasenumber
> solenv/bin/modules/installer/epmfile.pm:    $line = "%version" . " " . $installer::globals::packageversion . "\n";
> sysui/desktop/freedesktop/freedesktop-menus.spec:Version: %version
> sysui/desktop/mandriva/mandriva-menus.spec:Version: %version
> sysui/desktop/mandriva/mandriva-menus.spec:%define menuversion %(echo %version|cut -d'.' -f 1-2)
> sysui/desktop/suse/suse-menus.spec:Version: %version
> 	So it clearly comes from $installer::globals somehow. Of course, the
> other way to hunt this down is probably to go top-down instead of bottom
> up. All variables from configure are propagated to the code via
> config_host.mk (which is generated from the .in by running configure /
> autogen.sh).
> 	There we have things like:
> export PRODUCTNAME=LibreOffice
> 	Which seems to suggest this is all configureable via configure.

I am afraid that the configure version is not propagated to the rpm spec
file Version tag :-(

I think that the perl installer
(solenv/bin/modules/installer/epmfile.pm) takes the values from

The destop integration packages are another story. They are built
separately in the sysui module. You might want to look at
sysui/desktop/productversion.mk and solenv/inc/productversion.mk.

Note that touching these variables might have strange side effects
because they are used on different locations during build, installation
and runtime.

Any volunteer who would like to clean up the mess is welcome.

Best Regards,

More information about the LibreOffice mailing list