FS#61888 - [mongo-c-driver] Wrong CMake Version

Attached to Project: Community Packages
Opened by Li Jiahao (rikakomoe) - Friday, 01 March 2019, 01:06 GMT
Last edited by Felix Yan (felixonmars) - Friday, 14 June 2019, 08:37 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

In the latest version, 1.14.1-1, the version in the cmake files, eg. `/usr/lib/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake`, is all zero,
```
set (MONGOC_MAJOR_VERSION 0)
set (MONGOC_MINOR_VERSION 0)
set (MONGOC_MICRO_VERSION 0)
set (MONGOC_VERSION 0.0.0)
```

In the previous version, 1.13.1-1, it wasn't:
```
set (MONGOC_MAJOR_VERSION 1)
set (MONGOC_MINOR_VERSION 13)
set (MONGOC_MICRO_VERSION 1)
set (MONGOC_VERSION 1.13.1)
```

And I built the package manually from source (https://github.com/mongodb/mongo-c-driver/releases/download/1.14.0/mongo-c-driver-1.14.0.tar.gz) this morning,
it seems ok, so I suppose something might get wrong with the archlinux package
```
set (MONGOC_MAJOR_VERSION 1)
set (MONGOC_MINOR_VERSION 14)
set (MONGOC_MICRO_VERSION 0)
set (MONGOC_VERSION 1.14.0)
```

Due to the issue, my project that depends on libmongoc failed to configure after upgrading this package.
This task depends upon

Closed by  Felix Yan (felixonmars)
Friday, 14 June 2019, 08:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.14.0-3
Comment by loqs (loqs) - Friday, 01 March 2019, 08:31 GMT
CMake Warning at CMakeLists.txt:10 (_message):
BUILD_VERSION not specified and could not be calculated (Python was not
found on the system); setting library version to 0.0.0
Call Stack (most recent call first):
CMakeLists.txt:106 (message)


storing BUILD_VERSION 0.0.0 in file VERSION_CURRENT for later use

https://github.com/mongodb/mongo-c-driver/blob/71d7eaef31db31483cbb952d24d836c9e0d20b86/CMakeLists.txt#L86
Comment by László Várady (MrAnno) - Friday, 22 March 2019, 19:12 GMT
The upstream (https://jira.mongodb.org/browse/CDRIVER-3022) suggested to use the uploaded release tarball, not the one that is generated by GitHub:
https://github.com/mongodb/mongo-c-driver/releases/download/1.14.0/mongo-c-driver-1.14.0.tar.gz

This tarball contains the VERSION_CURRENT file with the correct version.
In that case, Python and GitPython do not have to be installed.
Comment by László Várady (MrAnno) - Sunday, 24 March 2019, 18:41 GMT
I've attached the proposed fixed.
Comment by Felix Yan (felixonmars) - Friday, 14 June 2019, 08:37 GMT
Patch applied. Thanks!

Loading...