]> git.puffer.fish Git - mirror/frr.git/commitdiff
build: fix reproducibility re. -fdebug-prefix-map 3452/head
authorDavid Lamparter <equinox@diac24.net>
Tue, 30 Oct 2018 01:02:00 +0000 (02:02 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 7 Dec 2018 18:35:26 +0000 (19:35 +0100)
If CFLAGS contains something like `-fdebug-prefix-map=/build/path=.`, we
need to remove it from CONFIG_ARGS so it doesn't get baked into `show
version`.  Otherwise, build becomes non-reproducible if the build path
changes.  To avoid other things creeping in, let's just remove *FLAGS in
their entirety.  (Not really reliable information anyway.)

With this commit, FRR build should be 100% reproducible.

Signed-off-by: David Lamparter <equinox@diac24.net>
configure.ac

index 09d57ab0f294fdcd6a19b406e4eb21f89bc87166..1de3081522b5b2ae440fa10c11717c28fa6a3104 100755 (executable)
@@ -13,7 +13,7 @@ AC_SUBST([PACKAGE_URL])
 PACKAGE_FULLNAME="FRRouting"
 AC_SUBST([PACKAGE_FULLNAME])
 
-CONFIG_ARGS="$ac_configure_args"
+CONFIG_ARGS="`echo $ac_configure_args | sed -e \"s% '[[A-Z]]*FLAGS=[[^']]\+'%%g\"`"
 AC_SUBST([CONFIG_ARGS])
 
 AC_CONFIG_SRCDIR([lib/zebra.h])