aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2022-03-23 00:18:32 +0000
committerDanilo G. Baio <dbaio@FreeBSD.org>2022-03-23 23:13:38 +0000
commitac411586cb2ed824242fcbb258d94330e617d103 (patch)
treed2939046e86d798d2831c18d342c194d8602fe9a
parentdf8ebf45f1897355e353ac8d851b1bd4c50e554d (diff)
downloaddoc-ac411586cb2ed824242fcbb258d94330e617d103.tar.gz
doc-ac411586cb2ed824242fcbb258d94330e617d103.zip
website: Fix build when public dir is already populated
All CGI scripts are set with 555 permission mode in the post-build target, and this makes the following builds hang if not cleaned the public (temp) directory before or changed CGI permissions to 755. Error: Error building site: process: readAndProcessContent: open /doc/website/public/cgi/mailindex.cgi: permission denied PR: 256352 Reviewed by: lwhsu wosch Differential Revision: https://reviews.freebsd.org/D34641
-rw-r--r--website/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/website/Makefile b/website/Makefile
index c10ec92408..bda2590cde 100644
--- a/website/Makefile
+++ b/website/Makefile
@@ -63,8 +63,8 @@ SKIP_LANGS+= ${a}
.ORDER: build post-build
.ORDER: post-build end-message
-all: starting-message generate-releases build post-build end-message
-run: starting-message generate-releases run-local
+all: starting-message generate-releases cgi-pre-permissions build post-build end-message
+run: starting-message generate-releases cgi-pre-permissions run-local
clean: hugo-clean releases-clean
starting-message: .PHONY
@@ -93,6 +93,11 @@ build: .PHONY
post-build: cgi-permissions
+cgi-pre-permissions:
+.if exists(./public/cgi)
+ @chmod 755 ./public/cgi/*.cgi
+.endif
+
cgi-permissions:
@chmod 555 ./public/cgi/*.cgi