version.cpp currently applies one of three version suffixes
- -BUILD_SUFFIX, when building from an untagged commit
- -gtag-dirty, when building from an archive
- -unk, when building from a currently tagged commit/release
It seems rather strange that the 'ideal' build, a new tagged release cross compiled in gitian, would result in a suffix of 'unknown' using BUILD_DESC_FROM_UNKNOWN.
Perhaps BUILD_DESC_FROM_UNKNOWN would be better suited to builds where the source is unknown, with no suffix applied to tag matching release builds.
Does that make sense?
Details
If you tag a for a release, then build it, the output of share/genbuild.sh will be something like:
#define BUILD_DESC "v0.9.2.2"
#define BUILD_DATE "2014-08-21 05:44:34 +0100"
Then if you follow the logic in src/version.cpp you will find
#ifndef BUILD_DESC
# ifdef BUILD_SUFFIX
# define BUILD_DESC BUILD_DESC_WITH_SUFFIX(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, BUILD_SUFFIX)
# elif defined(GIT_COMMIT_ID)
# define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID)
# else
# define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD)
# endif
#endif
In english: If there's a tagged clean release, with no dirty suffix, and not a downloaded archive, then say it is from an unknown source.