BUG/MINOR: init: set HAPROXY_STARTUP_VERSION from the variable, not the macro
authorWilly Tarreau <w@1wt.eu>
Mon, 20 Jan 2025 16:21:19 +0000 (17:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Jan 2025 10:33:06 +0000 (11:33 +0100)
commit765f3beffcc88fcb4b342b8acd80bce05e96f9ea
treefeaf270c510a4af862204592cd128b7ecee5abe0
parent1479f21317101d8498d95d0b23b54afdb24b39e4
BUG/MINOR: init: set HAPROXY_STARTUP_VERSION from the variable, not the macro

This environment variable was added by commit d4c0be6b20 ("MINOR: startup:
HAPROXY_STARTUP_VERSION contains the version used to start"). However, it's
set from the macro that is passed during the build process instead of being
set from the variable that's kept up to date in version.c. The difference
is visible only during debugging/bisecting because only changed files and
version.o are rebuilt, but not necessarily haproxy.o, which is where the
environment variable is set. This means that the version exposed in the
environment is not necessarily the same as the one presented in
"haproxy -v" during such debugging sessions.

This should be backported to 2.8. It has no impact at all on regularly
built binaries.

(cherry picked from commit 9e61cf67909936036e8c22be5ea340b9d717cd88)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 46086b1a51850dbd10223188a96c5fbb21c27086)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/haproxy.c