From 9f5b6c21a24c22c9bd7650fd83808ad144874e5d Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sun, 15 Oct 2023 16:38:44 +0200 Subject: [PATCH] website-build: Switch to GNU Boot. Beside the name, domain name and URL changes, the way to deploy the website also changed. The website and documentation originally comes from Libreboot and Libreboot didn't have separate website and documentation. And we need to reuse it because without it, GNU Boot would be almost useless as without documentation most users would not be able to install it. The website is about 900 files and consist in about 27 MiB of pictures. Given that the website is not ready yet and that we are looking for contributions to help us fixing it, we will end up having to update it often, and ideally in a timely manner as well not to discourage contributions. So we needed some way to deployment the website with very few commands. GNU typically use CVS for deploying the website, but it is harder to use than rsync for automatizing the deployment of a website. To do that someone would have to write or adapt code to do the deployment automatically, but that can potentially be time consuming to do, especially if it needs to be done efficiently (for instance by only adding files that changed since the last time) not to load too much the CVS server. So in the meantime an rsync access was setup for us. Signed-off-by: Denis 'GNUtoo' Carikli --- website-build/Makefile.am | 8 +++----- website-build/configure.ac | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/website-build/Makefile.am b/website-build/Makefile.am index 313a7de..50426f3 100644 --- a/website-build/Makefile.am +++ b/website-build/Makefile.am @@ -109,12 +109,8 @@ test: endif endif -# The rsync options are hardcoded here because some options are known -# not to work. For instance --delete results in rsync hanging. Also -# note that it's possible to rsync some files to gnu.org but not from -# gnu.org. RSYNC_OPTIONS := -av --progress -deploy: website.tar.gz +deploy: build rm -rf deploy mkdir -p deploy tar xf website.tar.gz -C deploy @@ -122,10 +118,12 @@ deploy: website.tar.gz deploy/ \ $(RSYNC_DESTINATION)/ +# See https://reproducible-builds.org/docs/archives/ for more details website.tar.gz: build tar \ --exclude-vcs \ --format=gnu \ + --mtime='1970-01-01 00:00Z' \ --owner=0 --group=0 --numeric-owner \ --sort=name \ -czf \ diff --git a/website-build/configure.ac b/website-build/configure.ac index 2200277..d6d1476 100644 --- a/website-build/configure.ac +++ b/website-build/configure.ac @@ -19,6 +19,8 @@ AC_CONFIG_FILES([Makefile]) AC_SUBST([LBWWW_PATH], []) AC_SUBST([LBWWW_GIT_FOUND], []) +AC_SUBST([LBWWW_IMG_PATH], []) +AC_SUBST([LBWWW_IMG_GIT_FOUND], []) AC_SUBST([RSYNC_DESTINATION], []) AC_SUBST([UNTITLED_PATH], []) AC_SUBST([UNTITLED_GIT_FOUND], []) @@ -41,6 +43,17 @@ AC_ARG_WITH([lbwww-path], AM_CONDITIONAL( [WANT_LBWWW_PATH], [test x"$LBWWW_PATH" != x""]) +# --with-lbwww-img-path +AC_ARG_WITH([lbwww-img-path], + [AS_HELP_STRING([--with-lbwww-img-path=PATH], + [Use a local lbwww-img directory from PATH instead of downloading + the latest version from + https://git.savannah.gnu.org/git/gnuboot.git])], + [LBWWW_IMG_PATH=$withval], + []) + +AM_CONDITIONAL( [WANT_LBWWW_IMG_PATH], [test x"$LBWWW_IMG_PATH" != x""]) + # --enable-lighttpd AC_ARG_ENABLE(lighttpd, [AS_HELP_STRING([--enable-lighttpd], @@ -73,6 +86,7 @@ AC_ARG_WITH([untitled-path], AM_CONDITIONAL( [WANT_UNTITLED_PATH], [test x"$UNTITLED_PATH" != x""]) # Check dependencies +AC_CHECK_PROG([CURL], [curl], [curl]) AC_CHECK_PROG([REALPATH], [realpath], [realpath]) AC_CHECK_PROG([TAR], [tar], [tar]) @@ -173,7 +187,11 @@ AS_ECHO(["Configuration options:"]) AS_IF([test x"$LBWWW_PATH" != x""], [AS_ECHO([" LBWWW_PATH: $LBWWW_PATH"])]) +AS_IF([test x"$LBWWW_IMG_PATH" != x""], + [AS_ECHO([" LBWWW_IMG_PATH: $LBWWW_IMG_PATH"])]) + AS_ECHO([" RSYNC_DESTINATION: $RSYNC_DESTINATION"]) + AS_IF([test x"$UNTITLED_PATH" != x""], [AS_ECHO([" UNTITLED_PATH: $UNTITLED_PATH"])])