diff --git a/website/Makefile.am b/website/Makefile.am index 20e2b60..31da77b 100644 --- a/website/Makefile.am +++ b/website/Makefile.am @@ -33,6 +33,7 @@ GUIX_SHELL_CONTAINER = guix time-machine \ shell \ --system=i686-linux \ --container \ + `guix repl force-bordeaux-substitute.scm force` \ $(SENTINEL) if WANT_GUIX diff --git a/website/README b/website/README index 0dd0424..5e45d44 100644 --- a/website/README +++ b/website/README @@ -35,12 +35,42 @@ dependencies instead: * make * tar -And you can use the following commands instead: +For making sure that the build doesn't take days, you will also need +to make sure that bordeaux.guix.gnu.org is in the list of substitutes +(binary packages servers). + +This is needed because some older Guix packages (like the ones on +Trisquel 11 or PureOS) don't have bordeaux enabled while installation +through the guix-install.sh instead have it enabled if you enable +substitutes (binary packages), and without it Guix will start to build +haskell (which is a dependency of pandoc) and this takes a few days to +complete on a ThinkPad X200. + +If your Guix installation is recent enough it should already have it +and the following command should print 'bordeaux.guix.gnu.org is +enabled': +$ guix repl force-bordeaux-substitute.scm check + +If instead you need to add it, it will print 'bordeaux.guix.gnu.org is +disabled'. + +You can add bordeaux.guix.gnu.org with the following command: +$ guix pull +$ sudo guix archive --authorize < ~/.config/guix/current/share/guix/bordeaux.guix.gnu.org.pub + +You will also need to make it possible for the build system to check +if it is enabled as some people might want to bulid everything +themselves for security reasons, so we don't use bordeaux if it is not +already authorized: +$ sudo chmod +r /etc/guix/acl + +Once bordeaux is enabled you can use the following commands to build +the website: $ ./autogen.sh $ ./configure $ make serve -== Local deployments == +== Testing the website == Here's how to deploy the website in a local webserver: $ ./autogen.sh @@ -53,7 +83,6 @@ Then you can point a browser to http://localhost:8086/software/gnuboot/web/ or to http://localhost:PORT/software/gnuboot/web/ if you changed the port through ./configure options. - The GNU Boot website build system takes care of some of the dependencies for you (for instance the static website generator that is not packaged in any distributions) so you have less work to do to diff --git a/website/configure.ac b/website/configure.ac index 9749051..88e4612 100644 --- a/website/configure.ac +++ b/website/configure.ac @@ -17,6 +17,9 @@ AC_INIT([gnuboot],[0.1],[gnuboot@gnu.org]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_FILES([Makefile]) +# Use the same revision than ../configure.ac +AC_SUBST([GUIX_REVISION], [8e2f32cee982d42a79e53fc1e9aa7b8ff0514714]) + AC_SUBST([LIGHTTPD_PORT], []) AC_SUBST([RSYNC_DESTINATION], []) AC_SUBST([UNTITLED_PATH], []) diff --git a/website/force-bordeaux-substitute.scm b/website/force-bordeaux-substitute.scm new file mode 100644 index 0000000..bd82da1 --- /dev/null +++ b/website/force-bordeaux-substitute.scm @@ -0,0 +1,53 @@ +;;; Copyright © 2024 Denis 'GNUtoo' Carikli +;;; Copyright © 2024 Adrien 'neox' Bourmault +;;; +;;; This file is part of GNU Boot. +;;; +;;; This file is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; This file is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(use-modules (gcrypt pk-crypto)) +(use-modules (guix pki)) + +(define bordeaux.guix.gnu.org + "(public-key + (ecc + (curve Ed25519) + (q #7D602902D3A2DBB83F8A0FB98602A754C5493B0B778C8D1DD4E0F41DE14DE34F#)))") + + +(cond ((and + (eq? (length (program-arguments)) 2) + (string=? (list-ref (program-arguments) 1) "force")) + (if (authorized-key? (string->canonical-sexp bordeaux.guix.gnu.org)) + (display "--substitute-urls=https://bordeaux.guix.gnu.org"))) + + ((and + (eq? (length (program-arguments)) 2) + (string=? (list-ref (program-arguments) 1) "check")) + (if (authorized-key? (string->canonical-sexp bordeaux.guix.gnu.org)) + (display "bordeaux.guix.gnu.org is enabled\n") + (display "bordeaux.guix.gnu.org is disabled\n"))) + + (#t ((lambda _ + (display + (string-append + "Usage: " + "guix repl force-bordeaux-substitute.scm check # " + "check if bordeaux.guix.gnu.org is enabled or not.\n")) + (display + (string-append + "Usage: " + "guix repl force-bordeaux-substitute.scm force # " + "print '--substitute-urls=https://bordeaux.guix.gnu.org' " + "if bordeaux.guix.gnu.org is enabled.\n"))))))