summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-08-09 11:48:52 +0200
committerLudovic Courtès <ludo@gnu.org>2022-08-09 15:16:06 +0200
commitfdafd404325413da4d5fdd717c84e57a51c60fe2 (patch)
tree03572ed019e0b6acd0b15fcd2ab17d86dd2f5031
parent95a03aa5c507d48e2cde19ea007b8f90a4e0108a (diff)
maint: Use a pretty version string in ISO and VM images.
* gnu/system/examples/vm-image.tmpl: Use the 'GUIX_DISPLAYED_VERSION' environment variable in 'label'. * gnu/system/install.scm (%installation-os): Likewise. * Makefile.am (release): Set 'GUIX_DISPLAYED_VERSION'.
-rw-r--r--Makefile.am6
-rw-r--r--gnu/system/examples/vm-image.tmpl4
-rw-r--r--gnu/system/install.scm3
3 files changed, 9 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index ac6df11c850..8df8222573e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -984,13 +984,14 @@ release: dist-with-updated-version all
984 -v1 --no-grafts --fallback 984 -v1 --no-grafts --fallback
985# Generate the ISO installation images. 985# Generate the ISO installation images.
986 for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \ 986 for system in $(GUIX_SYSTEM_SUPPORTED_SYSTEMS) ; do \
987 GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//v'`" ; \
987 image=`$(top_builddir)/pre-inst-env \ 988 image=`$(top_builddir)/pre-inst-env \
988 guix system image -t iso9660 \ 989 guix system image -t iso9660 \
989 --label="GUIX_$${system}_$(VERSION)" \ 990 --label="GUIX_$${system}_$(VERSION)" \
990 --system=$$system --fallback \ 991 --system=$$system --fallback \
991 gnu/system/install.scm` ; \ 992 gnu/system/install.scm` ; \
992 if [ ! -f "$$image" ] ; then \ 993 if [ ! -f "$$image" ] ; then \
993 echo "failed to produce Guix installation image for $$system" >&2 ; \ 994 echo "failed to produce Guix installation image for $$system" >&2 ; \
994 exit 1 ; \ 995 exit 1 ; \
995 fi ; \ 996 fi ; \
996 cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \ 997 cp "$$image" "$(releasedir)/$(GUIX_SYSTEM_IMAGE_BASE).$$system.iso.tmp" ; \
@@ -999,6 +1000,7 @@ release: dist-with-updated-version all
999 done 1000 done
1000# Generate the VM images. 1001# Generate the VM images.
1001 for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \ 1002 for system in $(GUIX_SYSTEM_VM_SYSTEMS) ; do \
1003 GUIX_DISPLAYED_VERSION="`git describe --match=v* | sed -'es/^v//v'`" ; \
1002 image=`$(top_builddir)/pre-inst-env \ 1004 image=`$(top_builddir)/pre-inst-env \
1003 guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \ 1005 guix system image -t qcow2 $(GUIX_SYSTEM_VM_IMAGE_FLAGS) \
1004 --save-provenance \ 1006 --save-provenance \
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl
index c8449c6e95d..d46a27978c4 100644
--- a/gnu/system/examples/vm-image.tmpl
+++ b/gnu/system/examples/vm-image.tmpl
@@ -43,7 +43,9 @@ accounts.\x1b[0m
43 (keyboard-layout (keyboard-layout "us" "altgr-intl")) 43 (keyboard-layout (keyboard-layout "us" "altgr-intl"))
44 44
45 ;; Label for the GRUB boot menu. 45 ;; Label for the GRUB boot menu.
46 (label (string-append "GNU Guix " (package-version guix))) 46 (label (string-append "GNU Guix "
47 (or (getenv "GUIX_DISPLAYED_VERSION")
48 (package-version guix))))
47 49
48 (firmware '()) 50 (firmware '())
49 51
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 32b9f52e04d..a7b7c246bf9 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -469,7 +469,8 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
469 (bootloader grub-bootloader) 469 (bootloader grub-bootloader)
470 (targets '("/dev/sda")))) 470 (targets '("/dev/sda"))))
471 (label (string-append "GNU Guix installation " 471 (label (string-append "GNU Guix installation "
472 (package-version guix))) 472 (or (getenv "GUIX_DISPLAYED_VERSION")
473 (package-version guix))))
473 474
474 ;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon 475 ;; XXX: The AMD Radeon driver is reportedly broken, which makes kmscon
475 ;; non-functional: 476 ;; non-functional: