diff --git a/configure.ac b/configure.ac index 75f9525..a627feb 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,26 @@ AC_CONFIG_FILES([ AC_SUBST([GUIX_BUILD_MAX_CORES], []) +# When the Guix revision changes, the output changes, so we need to +# rebuild it. By not having the revision configurable through +# configure arguments, we make things easier because when the +# Makefiles are updated, things should be rebuilt anyway. +# +# In addition we currently use a released Guix revision and backport +# the changes we need from more recent Guix versions for several +# reasons: +# +# - Guix hosts the documentation of its latest release on its website, +# so by using the latest Guix release, we also enable GNU Boot +# contributors to have access to the corresponding Guix +# documentation without having to build and/or host it. +# +# - On most distributions, users don't need to run guix pull anymore +# to start downloading Guix 1.4.0 packages. So that can make things +# a lot faster. + +AC_SUBST([GUIX_REVISION], [v1.4.0]) + # --with-guix-build-max-cores AC_ARG_WITH([guix-build-max-cores], [AS_HELP_STRING([--with-guix-build-max-cores=N], @@ -36,6 +56,13 @@ AS_IF([test x"$FOUND_GUIX" = x""], [AC_MSG_ERROR( [guix was not found in PATH ($PATH)])]) +# Generate a config.sh file to enable script shell to retrieve some +# settings by sourcing it. +printf '#!/usr/bin/env bash\n' > config.sh +printf '# This file is generated by configure.ac\n' >> config.sh +printf 'GUIX_REVISION=%s\n' "$GUIX_REVISION" >> config.sh +chmod +x config.sh + AC_OUTPUT AS_ECHO(["Configuration options:"]) diff --git a/resources/packages/i945-thinkpads-install-utilities/Makefile.am b/resources/packages/i945-thinkpads-install-utilities/Makefile.am index 050c907..a566a6e 100644 --- a/resources/packages/i945-thinkpads-install-utilities/Makefile.am +++ b/resources/packages/i945-thinkpads-install-utilities/Makefile.am @@ -30,13 +30,13 @@ RELEASE_DIR = $(DESTDIR)/i945-thinkpads-install # We enable caching by not making this configurable and so when the # Makefile isn't updated, the Guix revision doesn't change, so we # don't need to rebuild anything. -GUIX_REVISION = v1.4.0 GUIX_PACK_COMMAND = \ + source $(TOPDIR)/config.sh && \ source resources/scripts/misc/guix.sh && \ source_guix_profile && \ guix time-machine \ - --commit=$(GUIX_REVISION) -- \ + --commit="$${GUIX_REVISION}" -- \ pack \ -L $(TOPDIR)/resources/guix/ \ -L $(TOPDIR)/resources/guix/gnuboot/patches/ \ @@ -67,9 +67,10 @@ $(RELEASE_DIR)/gnuboot_src.tar: Makefile $(RELEASE_DIR)/packages_src.tar: Makefile install -d $(RELEASE_DIR) tar cf $@ \ - `source resources/scripts/misc/guix.sh && \ + `source $(TOPDIR)/config.sh && \ + source resources/scripts/misc/guix.sh && \ source_guix_profile && \ - guix time-machine --commit=$(GUIX_REVISION) -- \ + guix time-machine --commit="$${GUIX_REVISION}" -- \ build \ -c $(GUIX_BUILD_MAX_CORES) \ -L $(TOPDIR)/resources/guix/ \