From a9216f1097b01e3e28044d80519ae4bcd9cf3337 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Mon, 1 Nov 2021 09:10:14 +0000 Subject: [PATCH] Remove GIT_RELEASE variable and use the semantically identical N2N_VERSION instead --- CMakeLists.txt | 2 +- configure.seed | 5 ----- scripts/hack_fakeautoconf.sh | 1 - src/n2n.c | 2 +- src/sn_utils.c | 2 +- win32/winconfig.h | 4 ---- 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c105f1c..afa7e76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ MESSAGE(STATUS "Build from git rev: ${N2N_VERSION}") endif (GIT_ERROR_CODE EQUAL 0) add_definitions(-DCMAKE_BUILD) -add_definitions(-DGIT_RELEASE="${N2N_VERSION}" -DPACKAGE_VERSION="${N2N_VERSION}" -DPACKAGE_OSNAME="${N2N_OSNAME}") +add_definitions(-DPACKAGE_VERSION="${N2N_VERSION}" -DPACKAGE_OSNAME="${N2N_OSNAME}") add_definitions(-DN2N_VERSION="${N2N_VERSION}" -DN2N_OSNAME="${N2N_OSNAME}") diff --git a/configure.seed b/configure.seed index 0226d3d..f4558cc 100644 --- a/configure.seed +++ b/configure.seed @@ -8,9 +8,6 @@ if test -d ".git"; then # NOTE: keep in sync with the definitions for configure.in files under the packages folder GIT_COMMITS=`git rev-list --count HEAD` GIT_REVISION=`git rev-parse --short HEAD` -GIT_RELEASE="${N2N_VERSION_SHORT}.r${GIT_COMMITS}.${GIT_REVISION}" -else -GIT_RELEASE=${N2N_VERSION_SHORT} fi if test "${CC+set}" != set; then @@ -108,7 +105,6 @@ dnl> wget -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=bl OSNAME=`./config.guess` fi AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name]) -AC_DEFINE_UNQUOTED(GIT_RELEASE, "${GIT_RELEASE}", [GIT release]) if test $MACHINE = "x86_64"; then EXTN="amd64" @@ -127,7 +123,6 @@ AC_SUBST(LDFLAGS) AC_SUBST(N2N_VERSION_SHORT) AC_SUBST(GIT_COMMITS) AC_SUBST(GIT_REVISION) -AC_SUBST(GIT_RELEASE) AC_SUBST(N2N_DEFINES) AC_SUBST(N2N_LIBS) AC_SUBST(ADDITIONAL_TOOLS) diff --git a/scripts/hack_fakeautoconf.sh b/scripts/hack_fakeautoconf.sh index 8ec8c82..321c9e1 100755 --- a/scripts/hack_fakeautoconf.sh +++ b/scripts/hack_fakeautoconf.sh @@ -20,5 +20,4 @@ sed \ cat <include/config.h #define PACKAGE_VERSION "FIXME" #define PACKAGE_OSNAME "FIXME" -#define GIT_RELEASE "FIXME" EOF diff --git a/src/n2n.c b/src/n2n.c index a3fa959..902b218 100644 --- a/src/n2n.c +++ b/src/n2n.c @@ -590,7 +590,7 @@ void print_n2n_version () { printf("Welcome to n2n v.%s for %s\n" "Built on %s\n" "Copyright 2007-2021 - ntop.org and contributors\n\n", - GIT_RELEASE, PACKAGE_OSNAME, PACKAGE_BUILDDATE); + N2N_VERSION, PACKAGE_OSNAME, PACKAGE_BUILDDATE); } /* *********************************************** */ diff --git a/src/sn_utils.c b/src/sn_utils.c index 40d6746..6148b48 100644 --- a/src/sn_utils.c +++ b/src/sn_utils.c @@ -741,7 +741,7 @@ int sn_init_defaults (n2n_sn_t *sss) { memset(sss, 0, sizeof(n2n_sn_t)); - strncpy(sss->version, GIT_RELEASE, sizeof(n2n_version_t)); + strncpy(sss->version, N2N_VERSION, sizeof(n2n_version_t)); sss->version[sizeof(n2n_version_t) - 1] = '\0'; sss->daemon = 1; /* By defult run as a daemon. */ sss->lport = N2N_SN_LPORT_DEFAULT; diff --git a/win32/winconfig.h b/win32/winconfig.h index c206f13..8bfcb49 100644 --- a/win32/winconfig.h +++ b/win32/winconfig.h @@ -9,7 +9,3 @@ #ifndef PACKAGE_VERSION #define PACKAGE_VERSION N2N_VERSION #endif -#ifndef GIT_RELEASE -#define GIT_RELEASE N2N_VERSION -#endif -