]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
more fixes for generated certificate files
authorAlan T. DeKok <aland@freeradius.org>
Wed, 10 May 2017 15:36:43 +0000 (11:36 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 10 May 2017 15:36:43 +0000 (11:36 -0400)
Makefile
raddb/all.mk

index 6f5dfc71a8d5d515698eee144690ea22608ac685..61fd69b04228734bc50c0dd826e0207a533469c3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ raddb/test.conf:
 #
 # Only redirect STDOUT, which should contain details of why the test failed.
 # Don't molest STDERR as this may be used to receive output from a debugger.
-$(BUILD_DIR)/tests/radiusd-c: raddb/test.conf ${BUILD_DIR}/bin/radiusd $(GENERATED_CERTIFICATE_FILES) | build.raddb
+$(BUILD_DIR)/tests/radiusd-c: raddb/test.conf ${BUILD_DIR}/bin/radiusd $(GENERATED_CERT_FILES) | build.raddb
        @printf "radiusd -C... "
        @if ! FR_LIBRARY_PATH=./build/lib/local/.libs/ ./build/make/jlibtool --mode=execute ./build/bin/local/radiusd -XCMd ./raddb -n debug -D ./share -n test > $(BUILD_DIR)/tests/radiusd.config.log; then \
                rm -f raddb/test.conf; \
@@ -63,7 +63,7 @@ $(BUILD_DIR)/tests/radiusd-c: raddb/test.conf ${BUILD_DIR}/bin/radiusd $(GENERAT
        @echo "ok"
        @touch $@
 
-test: ${BUILD_DIR}/bin/radiusd ${BUILD_DIR}/bin/radclient tests.unit tests.xlat tests.keywords tests.auth tests.modules $(BUILD_DIR)/tests/radiusd-c tests.eap $(GENERATED_CERTIFICATE_FILES) | build.raddb
+test: ${BUILD_DIR}/bin/radiusd ${BUILD_DIR}/bin/radclient tests.unit tests.xlat tests.keywords tests.auth tests.modules $(BUILD_DIR)/tests/radiusd-c tests.eap | build.raddb
        @$(MAKE) -C src/tests tests
 
 #  Tests specifically for Travis.  We do a LOT more than just
index e103faac6f180848cf068de32808a046fee71307..420c5d99b76fedb4992fa29f8f1da80f6f168ac7 100644 (file)
@@ -18,7 +18,7 @@ LOCAL_MODULES :=      $(addprefix raddb/mods-enabled/,$(DEFAULT_MODULES))
 INSTALL_CERT_FILES :=  Makefile README xpextensions \
                        ca.cnf server.cnf ocsp.cnf client.cnf bootstrap
 
-LOCAL_CERT_FILES :=    ca.key ca.pem client.key client.pem ocsp.key ocsp.pem \
+LOCAL_CERT_FILES :=    ca.key ca.pem client.key client.pem dh ocsp.key ocsp.pem \
                        server.key server.pem
 
 GENERATED_CERT_FILES := $(addprefix ${top_srcdir}/raddb/certs/,$(LOCAL_CERT_FILES))
@@ -117,20 +117,12 @@ $(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize
        ${Q}[ -e $@ ] || ln -s $(patsubst $(R)$(raddbdir)/%,./%,$<) $@
 
 ifeq ("$(PACKAGE)","")
-ifeq ("$(TEST_CERTS)","")
-#
-#  Generate local certificate products when doing a normal developer
-#  build.  This takes a LONG time!
-#
-$(INSTALL_CERT_PRODUCTS):
-       ${Q}echo BOOTSTRAP raddb/certs/
-       ${Q}$(MAKE) -C $(R)$(raddbdir)/certs/
-else
+ifeq ("$(TEST_CERTS)","yes")
 #
 #  Using test certs: just copy them over.
 #  See src/tests/certs/README.md for further information.
 #
-build.raddb: $(addprefix ${top_srcdir}/raddb/certs/,$(LOCAL_CERT_FILES))
+build.raddb: $(GENERATED_CERT_FILES)
 
 define CP_FILE
 ${top_srcdir}/raddb/certs/${1}: ${top_srcdir}/src/tests/certs/${1}
@@ -139,13 +131,19 @@ ${top_srcdir}/raddb/certs/${1}: ${top_srcdir}/src/tests/certs/${1}
 endef
 
 $(foreach x,$(LOCAL_CERT_FILES),$(eval $(call CP_FILE,${x})))
-endif
 else
 #
-#  We're not packaging, but we do need to create the test certificates
+#  Generate local certificate products when doing a non-package
+#  (i.e. developer) build.  This takes a LONG time!
+#
+$(GENERATED_CERT_FILES):
+       ${Q}echo BOOTSTRAP raddb/certs/
+       ${Q}$(MAKE) -C ${top_srcdir}/raddb/certs/
+endif
+#
+#  If we are packaging, don't generate any certs,
+#  and don't copy the testing certs over.
 #
-$(GENERATED_CERTIFICATE_FILES):
-       @$(MAKE) -C raddb/certs
 endif
 
 #