daniviga / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
0 stars 0 forks source link

Providing the relevant commit hash (SHA) of the QGIS source repo in the version string reported by QGIS (Fedora) #3

Open florisvdh opened 1 year ago

florisvdh commented 1 year ago

Feature description

qgis_process --version, after installing QGIS from the default Fedora software repositories or from dani/qgis, currently reports being an 'exported' version rather than explicitly reporting the commit hash, e.g.: QGIS 3.28.2-Firenze 'Firenze' (exported). The part 'exported' is not there in the distributed builds for Ubuntu, macOS and Windows (at least), but replaced with the commit hash (SHA) of the specific QGIS version.

It appears that 'exported' is used when the QGIS source code exists outside a git repo. I think that is triggered in a line in cmake/CreateQgsVersion.cmake.

IMHO it would be preferable to build QGIS in a git repo context (if needed with a shallow clone with --depth 1 in order to limit size), in order to have the SHA included in the version string reported by QGIS. Not only would this enhance the consistency with the other OSes, in itself it has the advantage of unequivocally defining the version.

Additional context

I'm not a Fedora user myself, but helping a Fedora user who uses the R package qgisprocess that calls the qgis_process executable from within R. This package checks QGIS version changes at startup, and it is aware of the commit hash in particular with regard to development versions of QGIS.