diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-08-09 10:46:07 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-08-09 15:16:06 +0200 |
| commit | 95a03aa5c507d48e2cde19ea007b8f90a4e0108a (patch) | |
| tree | fa93b5e9f4cca5eee91f00ee30538e96705dedd2 | |
| parent | 57f1892d366ea28083391577f90c4aa06b90aaf1 (diff) | |
system: install: Always use 'current-guix'.
Fixes <https://issues.guix.gnu.org/53210>.
Reported by Mathieu Othacehe <othacehe@gnu.org>.
* gnu/system/install.scm (%installation-services): Set 'guix' to
use (current-guix) in 'guix-configuration'.
* gnu/system/examples/vm-image.tmpl: Likewise.
* gnu/tests/install.scm (operating-system-with-current-guix): Remove.
(run-install, installation-os-for-gui-tests): Remove its uses.
* Makefile.am (release): Remove intermediate use of
'update-guix-package.scm' and subsequent 'git commit' invocation.
| -rw-r--r-- | Makefile.am | 11 | ||||
| -rw-r--r-- | gnu/system/examples/vm-image.tmpl | 9 | ||||
| -rw-r--r-- | gnu/system/install.scm | 14 | ||||
| -rw-r--r-- | gnu/tests/install.scm | 15 |
4 files changed, 23 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am index f707b930b2e..ac6df11c850 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -977,14 +977,9 @@ release: dist-with-updated-version all | |||
| 977 | mv "guix-binary.$$system.tar.xz" \ | 977 | mv "guix-binary.$$system.tar.xz" \ |
| 978 | "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \ | 978 | "$(releasedir)/guix-binary-$(PACKAGE_VERSION).$$system.tar.xz" ; \ |
| 979 | done | 979 | done |
| 980 | # Bump the Guix package version and build it (again). | 980 | # Build 'current-guix' to speed things up for the next step. |
| 981 | GUIX_ALLOW_ME_TO_USE_PRIVATE_COMMIT=yes \ | 981 | $(top_builddir)/pre-inst-env guix build \ |
| 982 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | 982 | -e '((@ (gnu packages package-management) current-guix))' \ |
| 983 | $(top_srcdir)/build-aux/update-guix-package.scm \ | ||
| 984 | "`git rev-parse HEAD`" | ||
| 985 | git add $(top_srcdir)/gnu/packages/package-management.scm | ||
| 986 | git commit -m "gnu: guix: Update to `git rev-parse HEAD | cut -c1-7`." | ||
| 987 | $(top_builddir)/pre-inst-env guix build guix \ | ||
| 988 | $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \ | 983 | $(call system_flags,$(GUIX_SYSTEM_SUPPORTED_SYSTEMS)) \ |
| 989 | -v1 --no-grafts --fallback | 984 | -v1 --no-grafts --fallback |
| 990 | # Generate the ISO installation images. | 985 | # Generate the ISO installation images. |
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl index ccb0b045dba..c8449c6e95d 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl | |||
| @@ -123,7 +123,14 @@ root ALL=(ALL) ALL | |||
| 123 | (login-service-type config => | 123 | (login-service-type config => |
| 124 | (login-configuration | 124 | (login-configuration |
| 125 | (inherit config) | 125 | (inherit config) |
| 126 | (motd vm-image-motd))))))) | 126 | (motd vm-image-motd))) |
| 127 | |||
| 128 | ;; Install and run the current Guix rather than an older | ||
| 129 | ;; snapshot. | ||
| 130 | (guix-service-type config => | ||
| 131 | (guix-configuration | ||
| 132 | (inherit config) | ||
| 133 | (guix (current-guix)))))))) | ||
| 127 | 134 | ||
| 128 | ;; Allow resolution of '.local' host names with mDNS. | 135 | ;; Allow resolution of '.local' host names with mDNS. |
| 129 | (name-service-switch %mdns-host-lookup-nss)) | 136 | (name-service-switch %mdns-host-lookup-nss)) |
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index a3646b1d548..32b9f52e04d 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -357,11 +357,17 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m | |||
| 357 | ;; network. It can be faster than fetching from remote servers. | 357 | ;; network. It can be faster than fetching from remote servers. |
| 358 | (service avahi-service-type) | 358 | (service avahi-service-type) |
| 359 | 359 | ||
| 360 | ;; The build daemon. Register the default substitute server key(s) | 360 | ;; The build daemon. |
| 361 | ;; as trusted to allow the installation process to use substitutes by | ||
| 362 | ;; default. | ||
| 363 | (service guix-service-type | 361 | (service guix-service-type |
| 364 | (guix-configuration (authorize-key? #t))) | 362 | (guix-configuration |
| 363 | ;; Register the default substitute server key(s) as | ||
| 364 | ;; trusted to allow the installation process to use | ||
| 365 | ;; substitutes by default. | ||
| 366 | (authorize-key? #t) | ||
| 367 | |||
| 368 | ;; Install and run the current Guix rather than an older | ||
| 369 | ;; snapshot. | ||
| 370 | (guix (current-guix)))) | ||
| 365 | 371 | ||
| 366 | ;; Start udev so that useful device nodes are available. | 372 | ;; Start udev so that useful device nodes are available. |
| 367 | ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for | 373 | ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for |
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 3754966140e..fbb97d451c8 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm | |||
| @@ -152,15 +152,6 @@ | |||
| 152 | (guix combinators))))) | 152 | (guix combinators))))) |
| 153 | %base-services)))) | 153 | %base-services)))) |
| 154 | 154 | ||
| 155 | (define (operating-system-with-current-guix os) | ||
| 156 | "Return a variant of OS that uses the current Guix." | ||
| 157 | (operating-system | ||
| 158 | (inherit os) | ||
| 159 | (services (modify-services (operating-system-user-services os) | ||
| 160 | (guix-service-type config => | ||
| 161 | (guix-configuration | ||
| 162 | (inherit config) | ||
| 163 | (guix (current-guix)))))))) | ||
| 164 | 155 | ||
| 165 | 156 | ||
| 166 | (define MiB (expt 2 20)) | 157 | (define MiB (expt 2 20)) |
| @@ -232,8 +223,7 @@ reboot\n") | |||
| 232 | ;; Since the image has no network access, use the | 223 | ;; Since the image has no network access, use the |
| 233 | ;; current Guix so the store items we need are in | 224 | ;; current Guix so the store items we need are in |
| 234 | ;; the image and add packages provided. | 225 | ;; the image and add packages provided. |
| 235 | (inherit (operating-system-with-current-guix | 226 | (inherit installation-os) |
| 236 | installation-os)) | ||
| 237 | (kernel-arguments '("console=ttyS0"))) | 227 | (kernel-arguments '("console=ttyS0"))) |
| 238 | #:imported-modules '((gnu services herd) | 228 | #:imported-modules '((gnu services herd) |
| 239 | (gnu installer tests) | 229 | (gnu installer tests) |
| @@ -1865,8 +1855,7 @@ build (current-guix) and then store a couple of full system images.") | |||
| 1865 | (operating-system | 1855 | (operating-system |
| 1866 | (inherit (operating-system-with-console-syslog | 1856 | (inherit (operating-system-with-console-syslog |
| 1867 | (operating-system-add-packages | 1857 | (operating-system-add-packages |
| 1868 | (operating-system-with-current-guix | 1858 | installation-os |
| 1869 | installation-os) | ||
| 1870 | %extra-packages))) | 1859 | %extra-packages))) |
| 1871 | (kernel-arguments '("console=ttyS0"))) | 1860 | (kernel-arguments '("console=ttyS0"))) |
| 1872 | #:imported-modules '((gnu services herd) | 1861 | #:imported-modules '((gnu services herd) |
