Browse Source

Remove GIT_RELEASE variable and use the semantically identical N2N_VERSION instead

pull/889/head
Hamish Coleman 3 years ago
parent
commit
a9216f1097
  1. 2
      CMakeLists.txt
  2. 5
      configure.seed
  3. 1
      scripts/hack_fakeautoconf.sh
  4. 2
      src/n2n.c
  5. 2
      src/sn_utils.c
  6. 4
      win32/winconfig.h

2
CMakeLists.txt

@ -37,7 +37,7 @@ MESSAGE(STATUS "Build from git rev: ${N2N_VERSION}")
endif (GIT_ERROR_CODE EQUAL 0) endif (GIT_ERROR_CODE EQUAL 0)
add_definitions(-DCMAKE_BUILD) 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}") add_definitions(-DN2N_VERSION="${N2N_VERSION}" -DN2N_OSNAME="${N2N_OSNAME}")

5
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 # NOTE: keep in sync with the definitions for configure.in files under the packages folder
GIT_COMMITS=`git rev-list --count HEAD` GIT_COMMITS=`git rev-list --count HEAD`
GIT_REVISION=`git rev-parse --short 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 fi
if test "${CC+set}" != set; then 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` OSNAME=`./config.guess`
fi fi
AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name]) AC_DEFINE_UNQUOTED(PACKAGE_OSNAME, "${OSNAME}", [OS name])
AC_DEFINE_UNQUOTED(GIT_RELEASE, "${GIT_RELEASE}", [GIT release])
if test $MACHINE = "x86_64"; then if test $MACHINE = "x86_64"; then
EXTN="amd64" EXTN="amd64"
@ -127,7 +123,6 @@ AC_SUBST(LDFLAGS)
AC_SUBST(N2N_VERSION_SHORT) AC_SUBST(N2N_VERSION_SHORT)
AC_SUBST(GIT_COMMITS) AC_SUBST(GIT_COMMITS)
AC_SUBST(GIT_REVISION) AC_SUBST(GIT_REVISION)
AC_SUBST(GIT_RELEASE)
AC_SUBST(N2N_DEFINES) AC_SUBST(N2N_DEFINES)
AC_SUBST(N2N_LIBS) AC_SUBST(N2N_LIBS)
AC_SUBST(ADDITIONAL_TOOLS) AC_SUBST(ADDITIONAL_TOOLS)

1
scripts/hack_fakeautoconf.sh

@ -20,5 +20,4 @@ sed \
cat <<EOF >include/config.h cat <<EOF >include/config.h
#define PACKAGE_VERSION "FIXME" #define PACKAGE_VERSION "FIXME"
#define PACKAGE_OSNAME "FIXME" #define PACKAGE_OSNAME "FIXME"
#define GIT_RELEASE "FIXME"
EOF EOF

2
src/n2n.c

@ -590,7 +590,7 @@ void print_n2n_version () {
printf("Welcome to n2n v.%s for %s\n" printf("Welcome to n2n v.%s for %s\n"
"Built on %s\n" "Built on %s\n"
"Copyright 2007-2021 - ntop.org and contributors\n\n", "Copyright 2007-2021 - ntop.org and contributors\n\n",
GIT_RELEASE, PACKAGE_OSNAME, PACKAGE_BUILDDATE); N2N_VERSION, PACKAGE_OSNAME, PACKAGE_BUILDDATE);
} }
/* *********************************************** */ /* *********************************************** */

2
src/sn_utils.c

@ -741,7 +741,7 @@ int sn_init_defaults (n2n_sn_t *sss) {
memset(sss, 0, sizeof(n2n_sn_t)); 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->version[sizeof(n2n_version_t) - 1] = '\0';
sss->daemon = 1; /* By defult run as a daemon. */ sss->daemon = 1; /* By defult run as a daemon. */
sss->lport = N2N_SN_LPORT_DEFAULT; sss->lport = N2N_SN_LPORT_DEFAULT;

4
win32/winconfig.h

@ -9,7 +9,3 @@
#ifndef PACKAGE_VERSION #ifndef PACKAGE_VERSION
#define PACKAGE_VERSION N2N_VERSION #define PACKAGE_VERSION N2N_VERSION
#endif #endif
#ifndef GIT_RELEASE
#define GIT_RELEASE N2N_VERSION
#endif

Loading…
Cancel
Save