diff --git a/configure.ac b/configure.ac index 7c37c15938..8200be342f 100644 --- a/configure.ac +++ b/configure.ac @@ -2468,6 +2468,8 @@ fi if test "$HAVE_GIT_CMD" != "no"; then if [ test -d .git ]; then REVISION=`git rev-parse --short HEAD` + DATE=`git log -1 --date=short --pretty=format:%cd` + REVISION="$REVISION $DATE" AC_DEFINE_UNQUOTED([REVISION],[${REVISION}],[Git revision]) fi fi diff --git a/src/suricata.c b/src/suricata.c index dc4843b1fa..0195254ae6 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -581,7 +581,7 @@ static void SetBpfStringFromFile(char *filename) static void PrintUsage(const char *progname) { #ifdef REVISION - printf("%s %s (rev %s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); + printf("%s %s (%s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); #else printf("%s %s\n", PROG_NAME, PROG_VER); #endif @@ -684,7 +684,7 @@ static void PrintBuildInfo(void) const char *tls = "pthread key"; #ifdef REVISION - printf("This is %s version %s (rev %s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); + printf("This is %s version %s (%s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); #elif defined RELEASE printf("This is %s version %s RELEASE\n", PROG_NAME, PROG_VER); #else @@ -1054,7 +1054,7 @@ static void SCInstanceInit(SCInstance *suri, const char *progname) static TmEcode PrintVersion(void) { #ifdef REVISION - printf("This is %s version %s (rev %s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); + printf("This is %s version %s (%s)\n", PROG_NAME, PROG_VER, xstr(REVISION)); #elif defined RELEASE printf("This is %s version %s RELEASE\n", PROG_NAME, PROG_VER); #else @@ -1067,7 +1067,7 @@ static TmEcode LogVersion(SCInstance *suri) { const char *mode = suri->system ? "SYSTEM" : "USER"; #ifdef REVISION - SCLogNotice("This is %s version %s (rev %s) running in %s mode", + SCLogNotice("This is %s version %s (%s) running in %s mode", PROG_NAME, PROG_VER, xstr(REVISION), mode); #elif defined RELEASE SCLogNotice("This is %s version %s RELEASE running in %s mode",