Feature #334
Version in librados
0%
Description
When writing a application which uses librados it could be usefull if you could get the version number out of it somewhere, for example when a small API change is done between versions.
History
#1 Updated by Wido den Hollander over 13 years ago
A ''librados-config'' binary might be usefull here. This is also used by libcurl, libxml2 and PHP.
For example:
wido@wido-laptop:~$ curl-config --features SSL IPv6 libz IDN NTLM wido@wido-laptop:~$ curl-config --version libcurl 7.19.7 wido@wido-laptop:~$ curl-config --vernum 071307 wido@wido-laptop:~$ curl-config --libs -lcurl wido@wido-laptop:~$
wido@wido-laptop:~$ php-config --libs -lcrypt -lz -lcrypt -lssl -ldb -lbz2 -lz -lpcre -lssl -lrt -lm -ldl -lnsl -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lxml2 -lxml2 -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lxml2 -lcrypt wido@wido-laptop:~$ php-config --vernum 50302 wido@wido-laptop:~$ php-config --version 5.3.2-1ubuntu4.2 wido@wido-laptop:~$
Librados could implement (where i think version and vernum are semi-mandatory):
wido@wido-laptop:~$ librados-config --version 0.22-rc1 wido@wido-laptop:~$ librados-config --vernum 02201 wido@wido-laptop:~$ librados-config --features LARGE_FILE IPV6 AIO wido@wido-laptop:~$
This is a common used method to get information from libraries during configure time. During the configure process you can invoke librados-config and check wether it has the right version, right features, etc, etc.
#2 Updated by Sage Weil over 13 years ago
- Target version set to v0.23
#3 Updated by Sage Weil over 13 years ago
- Target version changed from v0.23 to 12
#4 Updated by Sage Weil over 13 years ago
- Estimated time set to 1.00 h
- Source set to 1
#5 Updated by Yehuda Sadeh about 13 years ago
- Status changed from New to Resolved
Fixed in commit:42c240d389cd2811f61d0f85aa5422d5473bb7dd. Will be useful for qemu rbd.
#6 Updated by Wido den Hollander about 13 years ago
Thanks, but this has only been done in the librados C library, not in the C++. Has this been done un purpose (just to facilitate Qemu RBD?).
I'd like to use this too for phprados, but that one is build against the C++ librados.
#7 Updated by Yehuda Sadeh about 13 years ago
rados->version() implemented in baae4bc7c5390681d4549bdfb9ec4204aa515eb1.
#8 Updated by Sage Weil about 13 years ago
- Status changed from Resolved to In Progress
- Target version changed from 12 to v0.25
#9 Updated by Sage Weil about 13 years ago
- Status changed from In Progress to Resolved