]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2962] Don't run b10-certgen in parallel (which results in corruption of PEM output...
authorMukund Sivaraman <muks@isc.org>
Thu, 1 Aug 2013 07:08:20 +0000 (12:38 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 1 Aug 2013 07:08:20 +0000 (12:38 +0530)
src/bin/cmdctl/Makefile.am

index 72a400abdc4e086b79d075eaf50bee37aab11e38..25717d6936e64a07524b449f4a4f185133076a15 100644 (file)
@@ -57,12 +57,19 @@ b10_certgen_CXXFLAGS = $(BOTAN_INCLUDES)
 b10_certgen_LDFLAGS = $(BOTAN_LIBS)
 
 # Generate the initial certificates immediately
-cmdctl-certfile.pem: b10-certgen
-       ./b10-certgen -q -w
-
 cmdctl-keyfile.pem: b10-certgen
        ./b10-certgen -q -w
 
+# Do nothing. This is a hack, as b10-certgen creates both
+# cmdctl-keyfile.pem and cmdctl-certfile.pem, and in a parallel make,
+# making these targets simultaneously may result in corrupted
+# files. With GNU make, there is a non-portable way of working around
+# this with pattern rules, but we adopt this hack instead. The downside
+# is that cmdctl-certfile.pem will not be generated if
+# cmdctl-keyfile.pem exists. See Trac ticket #2962.
+cmdctl-certfile.pem: cmdctl-keyfile.pem
+       noop
+
 if INSTALL_CONFIGURATIONS
 
 # Below we intentionally use ${INSTALL} -m 640 instead of $(INSTALL_DATA)