[PATCH 0/2] More packaging tweaks
Two patches will follow, one to disable the "Compile Date" in syslog-ng --version's output, and another to force the tar format used for make dist to ustar. The latter is due to the included libmongo-client library having some long filenames, which hit the 99 char limit when distributed with syslog-ng. Increasing the limit to 255 bytes makes the problem disappear.
Add a new configure flag (--without-compile-date) that will remove the compile date from the --version output, and not include it in the binary at all. Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- configure.in | 9 +++++++++ syslog-ng/main.c | 2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index 13ff6bf..daa2b4d 100644 --- a/configure.in +++ b/configure.in @@ -185,6 +185,14 @@ AC_ARG_ENABLE(systemd, [ --enable-systemd Enable systemd support (default: auto)] ,,enable_systemd="auto") +AC_ARG_WITH(compile-date, + [ --without-compile-date Do not include the compile date in the binary] + ,, wcmp_date="1") +if test "x$wcmp_date" != "xno"; then + wcmp_date="1" +else + wcmp_date="0" +fi patheval() { @@ -1033,6 +1041,7 @@ fi AC_DEFINE_UNQUOTED(MODULE_PATH, "$module_path", [module search path]) AC_DEFINE_UNQUOTED(DEFAULT_MODULES, "$default_modules", [The default set of modules loaded if an old config version is used or autoload-compiled-modules is 1]) +AC_DEFINE_UNQUOTED(WITH_COMPILE_DATE, $wcmp_date, [Include the compile date in the binary]) AC_DEFINE_UNQUOTED(ENABLE_DEBUG, `enable_value $enable_debug`, [Enable debugging]) AC_DEFINE_UNQUOTED(ENABLE_SSL, `enable_value $enable_ssl`, [Enable SSL support]) AC_DEFINE_UNQUOTED(ENABLE_GPROF, `enable_value $enable_gprof`, [Enable gcc profiling]) diff --git a/syslog-ng/main.c b/syslog-ng/main.c index 4ee63ce..a03c253 100644 --- a/syslog-ng/main.c +++ b/syslog-ng/main.c @@ -128,7 +128,9 @@ version(void) printf(PACKAGE " " VERSION "\n" "Installer-Version: %s\n" "Revision: " SOURCE_REVISION "\n" +#if WITH_COMPILE_DATE "Compile-Date: " __DATE__ " " __TIME__ "\n" +#endif "Default-Modules: %s\n" "Available-Modules: ", installer_version, -- 1.7.5.4
Hello, Just tested on this mornings git, and this option does not seem to work. I run configure with --without-compile-date, but the resulting syslog-ng binary still shows the date. Tested on openSUSE Factory and FreeBSD 8.1. Bye, CzP On 08/30/2011 07:52 PM, Gergely Nagy wrote:
Add a new configure flag (--without-compile-date) that will remove the compile date from the --version output, and not include it in the binary at all.
Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- configure.in | 9 +++++++++ syslog-ng/main.c | 2 ++ 2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in index 13ff6bf..daa2b4d 100644 --- a/configure.in +++ b/configure.in @@ -185,6 +185,14 @@ AC_ARG_ENABLE(systemd, [ --enable-systemd Enable systemd support (default: auto)] ,,enable_systemd="auto")
+AC_ARG_WITH(compile-date, + [ --without-compile-date Do not include the compile date in the binary] + ,, wcmp_date="1") +if test "x$wcmp_date" != "xno"; then + wcmp_date="1" +else + wcmp_date="0" +fi
patheval() { @@ -1033,6 +1041,7 @@ fi AC_DEFINE_UNQUOTED(MODULE_PATH, "$module_path", [module search path]) AC_DEFINE_UNQUOTED(DEFAULT_MODULES, "$default_modules", [The default set of modules loaded if an old config version is used or autoload-compiled-modules is 1])
+AC_DEFINE_UNQUOTED(WITH_COMPILE_DATE, $wcmp_date, [Include the compile date in the binary]) AC_DEFINE_UNQUOTED(ENABLE_DEBUG, `enable_value $enable_debug`, [Enable debugging]) AC_DEFINE_UNQUOTED(ENABLE_SSL, `enable_value $enable_ssl`, [Enable SSL support]) AC_DEFINE_UNQUOTED(ENABLE_GPROF, `enable_value $enable_gprof`, [Enable gcc profiling]) diff --git a/syslog-ng/main.c b/syslog-ng/main.c index 4ee63ce..a03c253 100644 --- a/syslog-ng/main.c +++ b/syslog-ng/main.c @@ -128,7 +128,9 @@ version(void) printf(PACKAGE " " VERSION "\n" "Installer-Version: %s\n" "Revision: " SOURCE_REVISION "\n" +#if WITH_COMPILE_DATE "Compile-Date: " __DATE__ " " __TIME__ "\n" +#endif "Default-Modules: %s\n" "Available-Modules: ", installer_version,
-- Peter Czanik (CzP) <czanik@balabit.hu> BalaBit IT Security / syslog-ng upstream http://czanik.blogs.balabit.com/
In order to avoid the 99 char filename limit, force the ustar format, so we extend the limit to 255 bytes instead. Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index daa2b4d..2685568 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,7 @@ else fi AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) +_AM_PROG_TAR([ustar]) if test -n "$SNAPSHOT_VERSION"; then VERSION=$VERSION+$SNAPSHOT_VERSION fi -- 1.7.5.4
Balazs Scheidler <bazsi@balabit.hu> writes:
On Tue, 2011-08-30 at 19:52 +0200, Gergely Nagy wrote:
Two patches will follow, one to disable the "Compile Date" in syslog-ng --version's output, and another to force the tar format used for make dist to ustar.
The latter is due to the included libmongo-client library having some long filenames, which hit the 99 char limit when distributed with syslog-ng. Increasing the limit to 255 bytes makes the problem disappear.
applied both to 3.3
The latter does not seem to be applied to the latest git head, quoting it below for reference:
configure: Use ustar tar format for the make dist tarball.
In order to avoid the 99 char filename limit, force the ustar format, so we extend the limit to 255 bytes instead.
Signed-off-by: Gergely Nagy <algernon@balabit.hu> --- configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in index daa2b4d..2685568 100644 --- a/configure.in +++ b/configure.in @@ -53,6 +53,7 @@ else fi
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) +_AM_PROG_TAR([ustar]) if test -n "$SNAPSHOT_VERSION"; then VERSION=$VERSION+$SNAPSHOT_VERSION fi
-- |8]
On Tue, 2011-08-30 at 19:52 +0200, Gergely Nagy wrote:
Two patches will follow, one to disable the "Compile Date" in syslog-ng --version's output, and another to force the tar format used for make dist to ustar.
The latter is due to the included libmongo-client library having some long filenames, which hit the 99 char limit when distributed with syslog-ng. Increasing the limit to 255 bytes makes the problem disappear.
applied both to 3.3 Thanks Gergely. -- Bazsi
participants (4)
-
Balazs Scheidler
-
Gergely Nagy
-
Gergely Nagy
-
Peter Czanik