From d104473f3345bd3cf8edeaf0c6c96b1886f7292e Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Tue, 22 Mar 2016 10:19:12 +0200 Subject: [PATCH] build: actually apply autoconf configuration firehol cannot work properly if autoconf is not applied, not sure why there is a complex mechanism to operate without it. this logic tend to break as nobody actually test the process in which actual users use this package. I suggest to remove all these hacks, so developers will run make after every change in scripts, or alternately generate a configuration file that is sourced within the scripts instead of substituting. in the mean time, this fixes firehol script to apply the AUTOCONF_RUN correctly within script, please notice that this method of having .in.in file can also remove the commands.sed usage as this exactly what autoconf is doing when processing templates. the same method should probably apply to other scripts. Signed-off-by: Alon Bar-Lev --- .gitignore | 1 + configure.ac | 4 ++-- sbin/{firehol.in => firehol.in.in} | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) rename sbin/{firehol.in => firehol.in.in} (99%) diff --git a/.gitignore b/.gitignore index 888eec1..0ea6937 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ doc/service-links doc/tools/pandoc-post sbin/commands.sed sbin/firehol +sbin/firehol.in sbin/fireqos sbin/link-balancer sbin/vnetbuild diff --git a/configure.ac b/configure.ac index d44f038..defdf2c 100644 --- a/configure.ac +++ b/configure.ac @@ -343,13 +343,13 @@ AX_CHECK_MINVER([IPRANGE_VERSION], MIN_IPRANGE_VERSION, [$IPRANGE], [], [AC_MSG_ERROR(could not find required version of iprange - check http://firehol.org/download/iprange/)]) fi -AUTOCONF_RUN=Y -AC_SUBST(AUTOCONF_RUN) +AC_SUBST([AUTOCONF_RUN], [Y]) AC_CONFIG_FILES([ Makefile sbin/Makefile sbin/commands.sed + sbin/firehol.in m4/Makefile doc/Makefile doc/firehol/Makefile diff --git a/sbin/firehol.in b/sbin/firehol.in.in similarity index 99% rename from sbin/firehol.in rename to sbin/firehol.in.in index b058b32..b10fbce 100755 --- a/sbin/firehol.in +++ b/sbin/firehol.in.in @@ -236,7 +236,6 @@ if [ "@AUTOCONF_RUN@" = "Y" ] then FIREHOL_AUTOSAVE="@FIREHOL_AUTOSAVE@" FIREHOL_AUTOSAVE6="@FIREHOL_AUTOSAVE6@" - FIREHOL_CONFIG_DIR="@FIREHOL_CONFIG_DIR@" ENABLE_IPV4="@IPV4_ENABLED@" ENABLE_IPV6="@IPV6_ENABLED@" else