From: Alan T. DeKok Date: Wed, 10 May 2017 15:36:43 +0000 (-0400) Subject: more fixes for generated certificate files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be1f3a25cb92ecf263ce0218f4f42ff10c2ac1cd;p=thirdparty%2Ffreeradius-server.git more fixes for generated certificate files --- diff --git a/Makefile b/Makefile index 6f5dfc71a8d..61fd69b0422 100644 --- 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 diff --git a/raddb/all.mk b/raddb/all.mk index e103faac6f1..420c5d99b76 100644 --- a/raddb/all.mk +++ b/raddb/all.mk @@ -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 #