1From d242b011a8f0d84781bbf7667a44a12646903ca4 Mon Sep 17 00:00:00 2001
2From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
3Date: Sun, 1 Aug 2021 23:21:35 +0200
4Subject: [PATCH] configure.ac: drop usage of git at configure time
5
6The usage of git is only to print some messages at configure time,
7which is not very useful, and causes a significant number of warning
8when regenerating the configure script.
9
10Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
11Signed-off-by: Frank Vanbever <frank.vanbever@mind.be>
12---
13 configure.ac | 23 -----------------------
14 1 file changed, 23 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index 66d6f4f2..746b1fb4 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -3,7 +3,6 @@
21
22 # Get the hash of the last commit, to be used if it is not an
23 # official release.
24-AC_DEFUN([MSC_GIT_HASH], m4_esyscmd_s(git log -1 --format="%h" --abbrev-commit))
25 AC_DEFUN([MSC_MAJOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MAJOR " | awk {'print $3'} | sed 's/\"//g'))
26 AC_DEFUN([MSC_MINOR], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_MINOR " | awk {'print $3'} | sed 's/\"//g'))
27 AC_DEFUN([MSC_PATCHLEVEL], m4_esyscmd_s(cat headers/modsecurity/modsecurity.h | grep "define MODSECURITY_PATCHLEVEL " | awk {'print $3'} | sed 's/\"//g'))
28@@ -25,9 +24,6 @@ m4_define([msc_version],
29 m4_define([msc_version_with_patchlevel],
30     [msc_version_major.msc_version_minor.msc_version_patchlevel])
31
32-m4_define([msc_version_git],
33-    [m4_esyscmd_s(git describe)])
34-
35 m4_define([msc_version_info],
36     [msc_version_c_plus_a:msc_version_patchlevel:msc_version_minor])
37
38@@ -73,11 +69,6 @@ AC_MSG_ERROR([\
39
40    ])
41 fi
42-# Libinjection version
43-AC_DEFUN([LIBINJECTION_VERSION], m4_esyscmd_s(cd "others/libinjection" && git describe && cd ../..))
44-
45-# SecLang test version
46-AC_DEFUN([SECLANG_TEST_VERSION], m4_esyscmd_s(cd "test/test-cases/secrules-language-tests" && git log -1 --format="%h" --abbrev-commit && cd ../../..))
47
48
49 # Check for yajl
50@@ -224,10 +215,6 @@ AC_SUBST([MSC_VERSION_WITH_PATCHLEVEL])
51 MSC_VERSION=msc_version
52 AC_SUBST([MSC_VERSION])
53
54-MSC_GIT_VERSION=msc_version_git
55-AC_SUBST([MSC_GIT_VERSION])
56-
57-
58 AC_ARG_ENABLE(debug-logs,
59     [AS_HELP_STRING([--disable-debug-logs],[Turn off the SecDebugLog feature])],
60
61@@ -419,16 +406,6 @@ AC_OUTPUT
62
63
64 # Print a fancy summary
65-echo " "
66-echo " "
67-echo "ModSecurity - ${MSC_GIT_VERSION} for $PLATFORM"
68-echo " "
69-echo " Mandatory dependencies"
70-AS_ECHO_N("   + libInjection                                  ....")
71-echo LIBINJECTION_VERSION
72-AS_ECHO_N("   + SecLang tests                                 ....")
73-echo SECLANG_TEST_VERSION
74-
75 echo " "
76 echo " Optional dependencies"
77
78--
792.39.2
80
81