join
donate
Network Time Foundation:
NTP
•
Ntimed
•
PTPd
•
Linux PTP
•
RADclock
•
GTSAPI
•
More
---+ Embedded Version String Content While fixing %BUG{683}% it was noted that the version string in the code takes the form: <verbatim> Version @ CSet [ build-flags ] date buildnumber </verbatim> where: $ =Version=: the version string, eg =4.2.3p29= $ =@=: the =@= sign $ =CSet=: A number indicating the latest changeset in the repository =build-flags=: $ =-o=: for !OpenSSL support $ =date=: the date and time of program linkage $ =buildnumber=: =(n)=, where =n= counts the number of times the program has been linked in this directory The intent of this value is to make it easy to identify the state of the codebase when each program was built. The CSet value is mostly useful to developers, who may build and run several different versions of the programs during testing, and need a way to easily identify which changes are in each executable. The problem with using CSet is that its value can change as the repository is updated. If we: * release 4.2.8 and tag it as NTP_4_2_8 when it is at CSet 1.2900, * add more changesets, releasing 4.2.8p1 and 4.2.8p2, * take this newer repo and check out NTP_4_2_8 and build it, this built version of 4.2.8 may not be at CSet 1.2900. This is even more confusing to people. We need a better understanding of what we're trying to accomplish with the data in the version string content, including the "use cases". Anyway... Note that previous versions of NTP used different values for =build-flags= and the file =scripts/mkver= describes them. * As of =4.2.7p272=, 12 April 2012, the =mkver= script uses =VER_SUFFIX=, and the value =-o= means we have !OpenSSL. * As of 6 Aug 2004, 4.2.1, a suffix of =-o= means we have =-lcrypto= and =-?= means some other crypto library is available. * As of 4 May 2000, the suffix =-a= meant Autokey was supported, in additon to =-r= for RSA. * As of 25 Feb 2000, the suffix was changed to =-r=. * As of 24 Feb 2000, the suffix was changed to =-RSAREF=. * 4.0.99: In July of 1999, the suffix =RSAREF= meant that the RSA libraries were available. It has been suggested that some users are confused by the information after the =@=. While the remaining information is important and useful, it is not part of the software version. The following suggestions have been made in this regard: * Leave it alone * Get rid of the information after the =@= * Harlan says not without finding somewhere else for the info * Change the =@= to something else: * 4.2.3p29; 1.123-o * 4.2.3p29, build 1.123-o ---++ Changeset Number The changeset number we have been using comes from =bk changes -v -r+= and while the number is short, it can change. It's better to use a changeset key, as that value does not change. As mentioned above, we build a version string that looks like: <verbatim> ntpd 4.2.8p10@1.3732-o Sun Feb 11 07:53:58 UTC 2018 (32) </verbatim> We get the changeset number from: <verbatim> bk -R prs -hr+ -nd:I: ChangeSet </verbatim> and this is what a changeset key looks like: <verbatim> harlan@mb6> bk changes -kr+ | cat harlan@mb6.tal1.ntfo.org|ChangeSet|20180211102002|15587 harlan@mb6> bk changes -kr+ | wc -c 56 harlan@mb6> </verbatim> We could store the full changeset key, and only use the final two pieces, resulting in something like: <verbatim> ntpd 4.2.8p10@20180211102002|15587-o Sun Feb 11 07:53:58 UTC 2018 (32) </verbatim> which is 71 characters long. Looking at the discussion above, how about: <verbatim> ntpd 4.2.8p10-o, build 20180211102002|15587 Sun Feb 11 07:53:58 UTC 2018 (32) </verbatim> which is 78 characters long. It would be easy enough to change 'Sun Feb 11 07:53:58 UTC 2018' to '20180211.07:53:58' and save 11 characters: <verbatim> ntpd 4.2.8p10-o, build 20180211102002|15587 20180211.07:53:58 (32) </verbatim>
This topic: Dev
>
WebHome
>
DevelopmentIssues
>
EmbeddedVersionStringContent
Topic revision: r7 - 2018-02-14 - 09:46:59 -
HarlanStenn
Copyright &© 1999-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site?
Send feedback