From: Guus Sliepen Date: Sat, 12 Jul 2014 20:51:37 +0000 (+0200) Subject: Revert "Use git description as the tinc version." X-Git-Tag: release-1.1pre11~59 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=afb175873e6aa10d2d4dca3572edf054968c538d;p=oweals%2Ftinc.git Revert "Use git description as the tinc version." This reverts commit e024b7a2c50e23311834e6d180e5acc72783b339. Automatic version number generation needs a little bit more work to get it working correctly in all cases. --- diff --git a/configure.ac b/configure.ac index ee07bd6..1b89280 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([tinc], [GIT]) +AC_INIT([tinc], [1.1pre10]) AC_CONFIG_SRCDIR([src/tincd.c]) AC_GNU_SOURCE AM_INIT_AUTOMAKE([check-news std-options subdir-objects -Wall]) diff --git a/src/Makefile.am b/src/Makefile.am index 08e56ff..c48e3fd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,11 +2,8 @@ sbin_PROGRAMS = tincd tinc sptps_test sptps_keypair -## Make sure version.c is always rebuilt with the latest git information -.PHONY: version.c version_git.h -version_git.h: - echo "#define GIT_DESCRIPTION \"`cd $(@D) && git describe || echo UNKNOWN`\"" >$@ -version.c: version_git.h +## Make sure version.c is always rebuilt +.PHONY: version.c if LINUX sbin_PROGRAMS += sptps_speed @@ -94,7 +91,7 @@ tincd_SOURCES = \ tincd.c \ utils.c utils.h \ xalloc.h \ - version.c version.h version_git.h \ + version.c version.h \ $(ed25519_SOURCES) \ $(chacha_poly1305_SOURCES) @@ -113,7 +110,7 @@ tinc_SOURCES = \ tincctl.c tincctl.h \ top.c top.h \ utils.c utils.h \ - version.c version.h version_git.h \ + version.c version.h \ $(ed25519_SOURCES) \ $(chacha_poly1305_SOURCES) diff --git a/src/process.c b/src/process.c index 6135efb..2243bf9 100644 --- a/src/process.c +++ b/src/process.c @@ -213,7 +213,7 @@ bool detach(void) { openlogger(identname, use_logfile?LOGMODE_FILE:(do_detach?LOGMODE_SYSLOG:LOGMODE_STDERR)); logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d", - BUILD_VERSION, BUILD_DATE, BUILD_TIME, debug_level); + VERSION, BUILD_DATE, BUILD_TIME, debug_level); return true; } diff --git a/src/tincctl.c b/src/tincctl.c index f4379b7..799da0a 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -86,7 +86,7 @@ static struct option const long_options[] = { static void version(void) { printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE, - BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); + VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); printf("Copyright (C) 1998-2012 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" diff --git a/src/tincd.c b/src/tincd.c index 748fe13..15cddb1 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -332,7 +332,7 @@ int main(int argc, char **argv) { if(show_version) { printf("%s version %s (built %s %s, protocol %d.%d)\n", PACKAGE, - BUILD_VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); + VERSION, BUILD_DATE, BUILD_TIME, PROT_MAJOR, PROT_MINOR); printf("Copyright (C) 1998-2014 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" diff --git a/src/version.c b/src/version.c index 67a5e2c..fc62c8a 100644 --- a/src/version.c +++ b/src/version.c @@ -18,9 +18,7 @@ */ #include "version.h" -#include "version_git.h" /* This file is always rebuilt (even if there are no changes) so that the following is updated */ const char* const BUILD_DATE = __DATE__; const char* const BUILD_TIME = __TIME__; -const char* const BUILD_VERSION = GIT_DESCRIPTION; diff --git a/src/version.h b/src/version.h index 9cbecb6..d3e4a1f 100644 --- a/src/version.h +++ b/src/version.h @@ -22,6 +22,5 @@ extern const char* const BUILD_DATE; extern const char* const BUILD_TIME; -extern const char* const BUILD_VERSION; #endif /* __TINC_VERSION_H__ */