summaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
Commit message (Collapse)AuthorAge
* Merge branch 'master' into core-updates-frozenLudovic Courtès2021-09-07
|\
| * Update copyright/name notices for Christine Lemmer-Webber.Christopher Lemmer Webber2021-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/guix-cookbook.texi: Update copyright/name for Christine Lemmer-Webber. * gnu/build/image.scm: Likewise. * gnu/build/vm.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/assembly.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/check.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/emacs-xyz.scm: Likewise. * gnu/packages/finance.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/guile-xyz.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/haskell-xyz.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/python-web.scm: Likewise. * gnu/packages/python-xyz.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/sphinx.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/system/vm.scm: Likewise.
* | Merge branch 'staging' into 'core-updates'.Maxim Cournoyer2021-01-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/gl.scm gnu/packages/glib.scm gnu/packages/guile.scm gnu/packages/node.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/python-xyz.scm gnu/packages/python.scm gnu/packages/tls.scm gnu/packages/vpn.scm gnu/packages/xorg.scm
| * database: Remove #:deduplicate? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | It is now up to the caller to deduplicate store contents. * guix/store/database.scm (register-items): Remove #:deduplicate? parameter and call to 'deduplicate'. (register-path): Call 'deduplicate' when #:deduplicate? is true. * gnu/build/image.scm (register-closure): Adjust call accordingly. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Likewise. * guix/scripts/pack.scm (store-database): Likewise.
| * image: 'register-closure' leaves it up to the caller to deduplicate.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | * gnu/build/image.scm (register-closure): Remove #:deduplicate? parameter and pass #:deduplicate? #f to 'register-items'. (initialize-root-partition): Adjust accordingly. * gnu/build/vm.scm (register-closure, root-partition-initializer): Likewise.
| * store-copy: 'populate-store' can optionally deduplicate files.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now deduplication was performed as an additional pass after copying files, which involve re-traversing all the files that had just been copied. * guix/store/deduplication.scm (copy-file/deduplicate): New procedure. * tests/store-deduplication.scm ("copy-file/deduplicate"): New test. * guix/build/store-copy.scm (populate-store): Add #:deduplicate? parameter and honor it. * tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate? to 'populate-store'. Pass #:deduplicate? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise. * gnu/build/install.scm (populate-single-profile-directory): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/linux-initrd.scm (build-initrd): Likewise. * guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New procedure. [build]: Pass it as an argument to 'source-module-closure'. * guix/scripts/pack.scm (squashfs-image)[build]: Wrap in 'with-extensions'. * gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New procedure. [builder]: Pass it to 'source-module-closure'. * gnu/system/install.scm (cow-store-service-type)[import-module?]: New procedure. Pass it to 'source-module-closure'.
| * database: Remove #:reset-timestamps? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The assumption now is that the caller took care of resetting timestamps and permissions. * guix/store/database.scm (register-items): Remove #:reset-timestamps? parameter and the call to 'reset-timestamps'. (register-path): Adjust accordingly and add call to 'reset-timestamps'. * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter to 'register-items'. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Adjust accordingly. * guix/scripts/pack.scm (store-database)[build]: Likewise.
| * image: 'register-closure' assumes already-reset timestamps.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter. Pass #:reset-timestamps? #f to 'register-items'. (initialize-root-partition): Adjust accordingly. * gnu/build/vm.scm (register-closure, root-partition-initializer): Likewise.
| * store-copy: 'populate-store' resets timestamps.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, 'populate-store' would reset permissions but not timestamps, so callers would resort to going through an extra directory traversal to reset timestamps. * guix/build/store-copy.scm (reset-permissions): Remove. (copy-recursively): New procedure. (populate-store): Pass #:keep-permissions? to 'copy-recursively'. Remove call to 'reset-permissions'. * tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check whether 'populate-store' canonicalizes permissions and timestamps. * gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise.
* | Remove the last vestiges of GuixSD.Tobias Geerinckx-Rice2020-10-16
|/ | | | | | | | | | * gnu/build/vm.scm (load-in-linux-vm): Rename the RNG. * gnu/system/vm.scm (common-qemu-options): Likewise. (system-docker-image): Rename the ROOT-DIRECTORY. * gnu/packages/crypto.scm (eschalot)[arguments]: Use a different arbitrary string. * gnu/packages/wicd.scm (wicd)[arguments]: Remove unused configure flag. * gnu/packages/xorg.scm (xorg-server): Set a more accurate OS vendor.
* database: 'register-items' takes an open database.Ludovic Courtès2020-06-18
| | | | | | | | | | | | * guix/store/database.scm (store-database-directory) (store-database-file): New procedures. (call-with-database): Add call to 'mkdir-p'. (register-items): Add 'db' parameter and remove #:state-directory and #:schema. (register-path): Use 'store-database-file' and 'with-database', and parameterize SQL-SCHEMA. * gnu/build/image.scm (register-closure): Likewise. * gnu/build/vm.scm (register-closure): Likewise. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* vm: 'expression->derivation-in-linux-vm' always returns a native build.Ludovic Courtès2020-06-06
| | | | | | | | | | * gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove #:target. [builder]: Use #+. Don't pass #:target-arm32? and #:target-aarch64? to 'load-in-linux-vm'. Pass #:target #f to 'gexp->derivation'. (qemu-image): Adjust accordingly. * gnu/build/vm.scm (load-in-linux-vm): Remove #:target-aarch64? and #:target-arm32?. Define them as local variables.
* Merge branch 'master' into core-updatesMarius Bakke2020-05-05
|\
| * vm: Remove obsolete procedures.Mathieu Othacehe2020-05-05
| | | | | | | | | | | | | | | | * gnu/build/vm.scm (install-efi, make-iso9660-image): Remove those procedures that are now implemented in (gnu build image) module, (initialize-hard-disk): remove efi support. * gnu/system/vm.scm (iso9660-image): Remove it, (qemu-image): adapt it to remove ISO9660 support.
| * build: bootloader: Add install-efi procedure.Mathieu Othacehe2020-05-05
| | | | | | | | | | | | * gnu/build/bootloader.scm (install-efi): New procedure copied from (gnu build vm). (install-efi-loader): New exported procedure, wrapping install-efi. * gnu/build/vm.scm (initialize-hard-disk): Adapt to use install-efi-loader.
* | vm: Make the device node procedure a parameter.Ludovic Courtès2020-04-11
| | | | | | | | | | | | | | * gnu/build/vm.scm (root-partition-initializer): Add #:make-device-nodes parameter and use it. * gnu/system/vm.scm (qemu-image): Add #:device-node parameter. Pass #:make-device-nodes to 'root-partition-initializer'.
* | linux-boot: 'make-essential-device-nodes' root parameter is optional.Ludovic Courtès2020-04-11
| | | | | | | | | | | | * gnu/build/linux-boot.scm (make-essential-device-nodes): Change 'root' to an optional parameter. * gnu/build/vm.scm (root-partition-initializer): Adjust accordingly.
* | vm: Preserve file permissions on /dev.Ludovic Courtès2020-04-11
| | | | | | | | | | | | | | | | Previously, when REGISTER-CLOSURES? was false, we'd set all the files under /dev to #o644, including /dev/null, /dev/zero, etc. * gnu/build/vm.scm (root-partition-initializer): Call 'reset-timestamps' separately for /dev, with #:preserve-permissions? #t.
* | vm: 'qemu-image' can pass options to the 'mkfs' command.Ludovic Courtès2020-04-11
| | | | | | | | | | | | | | | | | | * gnu/build/vm.scm (<partition>)[file-system-options]: New field. (create-ext-file-system, create-fat-file-system) (format-partition): Add #:options and honor it. (initialize-partition): Pass #:options to 'format-partition'. * gnu/system/vm.scm (qemu-image): Add #:file-system-options and use it for the root partition.
* | vm: 'qemu-image' accepts a list of extra populate directives.Ludovic Courtès2020-04-11
|/ | | | | | | * gnu/build/vm.scm (root-partition-initializer): Add #:extra-directives parameter and pass it to 'populate-root-file-system'. * gnu/system/vm.scm (qemu-image): Add #:extra-directives parameter and pass it to 'root-partition-initializer'.
* vm: Transparently compress iso9660 images.Tobias Geerinckx-Rice2020-04-10
| | | | | * gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso filter at the highest compression settings for supported directories.
* vm: Distinguish between success and failure of the guest code.Ludovic Courtès2020-03-26
| | | | | | | | | | Fixes <https://bugs.gnu.org/34276>. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Produce '/xchg/.exit-status' file upon success. * gnu/build/vm.scm (load-in-linux-vm): Check for 'xchg/.exit-status' once QEMU has completed and respond accordingly.
* gnu: Remove uses of deprecated Qemu network configuration.Marius Bakke2019-12-18
| | | | | | | | | | * gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from ARCH-SPECIFIC-FLAGS to the Qemu command line. Use the "-nic" option of Qemu instead of "-device" and "-net". * gnu/system/vm.scm (common-qemu-options): Do not add a '-net' command. (virtual-machine-compiler): Use "-nic user,..." instead of "-net". * doc/guix.texi (Installing Guix in a VM, Invoking guix system, Running Guix in a VM): Do the same for examples.
* build: vm: Fix qemu-command procedure.Mathieu Othacehe2019-12-01
| | | | | * gnu/build/vm.scm (qemu-command): When system is "armhf-linux", use "arm" as qemu cpu prefix.
* system: vm: Add arm64 support.Mathieu Othacehe2019-11-22
| | | | | | | | * gnu/build/vm.scm (load-in-linux-vm): Add target-arm64? argument and use it to pass correct arguments to qemu. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass the new target-arm64? argument added above. Do not add ESP partition on all ARM targets. Do not pass grub-efi package to initialize-hard-disk on ARM targets.
* build: vm: Fix arm32 support.Mathieu Othacehe2019-11-22
| | | | | * gnu/build/vm.scm (load-in-linux-vm): Disable qemu highmem support on ARM32 systems.
* vm: Create installation media with MBR and HFS only, no GPT.Danny Milosavljevic2019-05-18
| | | | | | | | | | | | | | | * gnu/build/vm.scm (make-iso9660-image): Accept XORRISO, GRUB-MKRESCUE-ENVIRONMENT. * gnu/system/vm.scm (iso9660-image): Pass XORRISO; accept GRUB-MKRESCUE-ENVIRONMENT. (system-disk-image): Pass GRUB-MKRESCUE-ENVIRONMENT. * gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch: New file. * gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/cdrom.scm (xorriso)[source]: Add patches. [arguments]<#:phases>[install-frontends]: Add phase.
* vm: Pass -smp to QEMU to allow use of multiple cores.Christopher Baines2019-04-29
| | | | | * gnu/build/vm.scm (load-in-linux-vm): Pass (parallel-job-count) to QEMU with -smp to allow using multiple cores.
* vm: Adjust FAT serial number code to 32-bit Guile.Ludovic Courtès2019-04-25
| | | | | | | On 32-bit systems, 'string-hash' would raise an out-of-range exception when the second argument was 2^32. * gnu/build/vm.scm (make-iso9660-image): Pass 2^32 - 1 to 'string-hash'.
* vm: Use a fixed FAT serial number for 'efi.img' in ISO images.Ludovic Courtès2019-04-21
| | | | | | | Partly fixes <https://bugs.gnu.org/35283>. * gnu/build/vm.scm (make-iso9660-image): Set the 'GRUB_FAT_SERIAL_NUMBER' environment variable.
* vm: Reset file timestamps of the EFI image in ISO images.Ludovic Courtès2019-04-21
| | | | | | | Partly fixes <https://bugs.gnu.org/35283>. * gnu/build/vm.scm (make-iso9660-image): Set the 'SOURCE_DATE_EPOCH' environment variable.
* vm: Reset file timestamps in ISO images.Ludovic Courtès2019-04-21
| | | | | | | | Partly fixes <https://bugs.gnu.org/35283>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * gnu/build/vm.scm (make-iso9660-image): Pass "-volume_date all_file_dates =1".
* vm: Remove Xorriso "-padding" option.Ludovic Courtès2019-04-14
| | | | | | | | This is a followup to 66ec389580d4f1e4b81e1c72afe2749a547a0e7c. This reverts 178be030c0e4fdeac5e1c968b5c99d84bb4691db, which is no longer needed. * gnu/build/vm.scm (make-iso9660-image): Remove "-padding" option.
* Remove traces of "GuixSD".Ludovic Courtès2019-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove mentions of "GuixSD". * gnu/bootloader/grub.scm (install-grub-efi): Likewise. * gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to "Guix_image". (initialize-hard-disk): Search for the "Guix_image" label. * gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD". * gnu/installer/newt/welcome.scm (run-welcome-page): Likewise. * gnu/packages/audio.scm (supercollider)[description]: Likewise. * gnu/packages/curl.scm (curl): Likewise. * gnu/packages/emacs.scm (emacs): Likewise. * gnu/packages/gnome.scm (network-manager): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/linux.scm (alsa-plugins): Likewise. (powertop, wireless-regdb): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/polkit.scm (polkit): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/services/base.scm (file-systems->fstab): Likewise. * gnu/services/cups.scm (%cups-activation): Likewise. * gnu/services/mail.scm (%dovecot-activation): Likewise. * gnu/services/messaging.scm (prosody-configuration)[log]: Likewise. * gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise. * gnu/system/install.scm (installation-os)[file-systems]: Change root file system label to "Guix_image". * gnu/system/mapped-devices.scm (check-device-initrd-modules): Remove "GuixSD". * gnu/system/vm.scm (system-docker-image): Likewise. (system-disk-image)[root-label]: Change to "Guix_image". * gnu/tests/install.scm (run-install): Remove "GuixSD". * guix/modules.scm (guix-module-name?): Likewise. * nix/libstore/optimise-store.cc: Likewise.
* vm: Re-enable KVM on i386.Ludovic Courtès2018-12-19
| | | | | | | | The workaround is apparently no longer needed with Linux-libre 4.19.2 in the host. * gnu/build/vm.scm (load-in-linux-vm): Remove special case for "qemu-system-i386", thereby re-enabling KVM.
* vm: Add padding in the ISO image.Ludovic Courtès2018-12-06
| | | | | | | | Fixes <https://bugs.gnu.org/33639>. Thanks to Ricardo Wurmus and Thomas Schmitt for their suggestions! * gnu/build/vm.scm (make-iso9660-image): Pass "-padding 10m" to xorriso.
* pack: Import (guix store database) only when '--localstatedir' is passed.Ludovic Courtès2018-11-06
| | | | | | | | | | | | | This is another way to address <https://bugs.gnu.org/32184>, which was previously addressed in commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * gnu/build/install.scm (register-closure): Move to... * gnu/build/vm.scm (register-closure): ... here. New procedure. * guix/scripts/pack.scm (self-contained-tarball)[build]: Remove now unneeded 'with-extensions' form and custom (guix config) module. * tests/guix-pack.sh: Revert the strategy from commit 19c924af4f3726688ca155a905ebf1cb9acdfca2. * tests/pack.scm ("self-contained-tarball"): Likewise.
* vm: Disable KVM on i386.Ludovic Courtès2018-07-04
| | | | * gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386.
* vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.Ludovic Courtès2018-06-26
| | | | | * gnu/build/vm.scm (make-iso9660-image): Add call to 'register-bootcfg-root'.
* vm: 'make-iso9660-image' no longer includes unreferenced store items.Ludovic Courtès2018-06-26
| | | | | | | Fixes <https://bugs.gnu.org/31757>. * gnu/build/vm.scm (make-iso9660-image): Invoke 'grub-mkrescue' in 'open-pipe*'. Use '-path-list -' instead of passing "gnu/store=…".
* vm: Don't try to modify the bind-mounted store.Ludovic Courtès2018-06-26
| | | | | | | | | Previously 'guix system disk-image --file-system-type=iso9660' would fail because 'register-closure' would try to reset timestamps/ownership on the bind-mounted store, which fails with EPERM. * gnu/build/vm.scm (make-iso9660-image): Pass #:reset-timestamps? to 'register-closure'.
* Remove 'guix-register' and its traces.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | * Makefile.am (SH_TESTS): Remove tests/guix-register.sh. * build-aux/pre-inst-env.in (GUIX_REGISTER): Remove. * gnu/build/install.scm (directives): Remove outdated comment. * gnu/build/vm.scm (root-partition-initializer): Update comment. * gnu/packages/package-management.scm (guix-register): Remove. * guix/config.scm.in (%sbindir, %guix-register-program): Remove. * guix/scripts/system.scm (install): Adjust docstring. * guix/self.scm (make-config.scm): Remove #:guix. Do not generate %sbindir and %guix-register-program. (specification->package): Remove "guix". * nix/guix-register/guix-register.cc: Remove. * nix/libstore/store-api.cc (decodeValidPathInfo): Remove. * nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration. * nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES) (guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove. * tests/guix-register.sh: Remove.
* install: Use 'reset-timestamps' from (guix store database).Ludovic Courtès2018-06-14
| | | | | * gnu/build/install.scm (reset-timestamps): Remove. * gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
* install: Use (guix store database) instead of 'guix-register'.Ludovic Courtès2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/build/install.scm (register-closure): Add #:reset-timestamps? and and #:schema; honor them. Rewrite in terms of 'register-path'. (populate-single-profile-directory): Add #:schema and honor it. Make /var/guix/profiles and /var/guix/gcroots. * gnu/build/vm.scm (root-partition-initializer): Pass #:reset-timestamps? to 'register-closure'. * gnu/system/vm.scm (not-config?): New procedure. (guile-sqlite3&co): New variable. (expression->derivation-in-linux-vm)[config]: New variable. [builder]: Use 'with-extensions'. (iso9660-image)[schema, config]: New variables. Wrap build expression in 'with-extensions'; add 'sql-schema' call. Remove GUIX from INPUTS. (qemu-image)[schema, config]: New variables. Wrap body in 'with-extensions'. (system-docker-image)[not-config?]: Remove. [config]: Use 'make-config.scm'. [schema]: New variable. [build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX from INPUTS. * gnu/system/file-systems.scm (%store-prefix): Check whether '%store-prefix' is defined. * guix/scripts/pack.scm (self-contained-tarball)[not-config?] [libgcrypt, schema]: New variables. [build]: Wrap in 'with-extensions'. Adjust imported module list to use 'make-config.scm' for (guix config).
* vm: Pass "panic=1" to Linux.Ludovic Courtès2018-05-25
| | | | * gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'.
* vm: Print the label and UUID of partitions.Ludovic Courtès2018-05-23
| | | | * gnu/build/vm.scm (create-ext-file-system): Print the label and UUID.
* gnu: When building in a VM, share a temporary directory.Chris Marusich2018-03-24
| | | | | | * gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory available in the VM. * gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
* vm: Allow control of deduplication in root-partition-initializer.Chris Marusich2018-03-24
| | | | | * gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate? keyword argument.
* vm: Pass "-append ..." only once.Danny Milosavljevic2018-03-16
| | | | * gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once.
* vm: Use 'invoke' instead of 'system*'.Ludovic Courtès2018-03-15
| | | | | | | * gnu/build/vm.scm (load-in-linux-vm, initialize-partition-table) (create-ext-file-system, create-fat-file-system) (install-efi, make-iso9660-image): Use 'invoke' instead of (unless (zero? (system* ...)) (error ...)).