aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
Commit message (Expand)AuthorAge
* pack: Import (guix store database) only when '--localstatedir' is passed.•••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. Ludovic Courtès2018-11-06
* vm: Disable KVM on i386.•••* gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386. Ludovic Courtès2018-07-04
* vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.•••* gnu/build/vm.scm (make-iso9660-image): Add call to 'register-bootcfg-root'. Ludovic Courtès2018-06-26
* vm: 'make-iso9660-image' no longer includes unreferenced store items.•••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=…". Ludovic Courtès2018-06-26
* vm: Don't try to modify the bind-mounted store.•••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'. Ludovic Courtès2018-06-26
* Remove 'guix-register' and its traces.•••* 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. Ludovic Courtès2018-06-14
* install: Use 'reset-timestamps' from (guix store database).•••* gnu/build/install.scm (reset-timestamps): Remove. * gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database). Ludovic Courtès2018-06-14
* install: Use (guix store database) instead of 'guix-register'.•••* 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). Ludovic Courtès2018-06-14
* vm: Pass "panic=1" to Linux.•••* gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'. Ludovic Courtès2018-05-25
* vm: Print the label and UUID of partitions.•••* gnu/build/vm.scm (create-ext-file-system): Print the label and UUID. Ludovic Courtès2018-05-23
* gnu: When building in a VM, share a temporary directory.•••* 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. Chris Marusich2018-03-24
* vm: Allow control of deduplication in root-partition-initializer.•••* gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate? keyword argument. Chris Marusich2018-03-24
* vm: Pass "-append ..." only once.•••* gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once. Danny Milosavljevic2018-03-16
* vm: Use 'invoke' instead of 'system*'.•••* 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 ...)). Ludovic Courtès2018-03-15
* gnu: Consistently Write ‘file system(s)’.•••It is the GNU way. * doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’. * gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): Likewise. * gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise. * gnu/packages/check.scm (python-testpath)[description]: Likewise. * gnu/packages/disk.scm (pydf)[description]: Likewise. * gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise. (glusterfs)[description]: Likewise. * gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap) (ghc-system-fileio)[synopsis]: Likewise. (ghc-fsnotify)[description]: Likewise. * gnu/packages/linux.scm (proot)[description]: Likewise. (jmtpfs)[synopsis, description]: Likewise. * gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise. * gnu/packages/storage.scm (ceph)[description]: Likewise. * gnu/packages/sync.scm (lsyncd)[description]: Likewise. * gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise. (go-github-com-zillode-notify)[description]: Likewise. * gnu/services/nfs.scm (pipefs-service-type): Likewise. * guix/scripts/system.scm (perform-action): Likewise. Tobias Geerinckx-Rice2018-01-19
* vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.•••* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci. * gnu/system/vm.scm (common-qemu-options): Likewise. Leo Famulari2017-12-18
* vm: Adapt qemu command to ARM.•••* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32. Use it to adapt command for qemu-system-arm. This implies to choose a machine ("virt"), use the correct console port "ttyAMA0", disable KVM use that is buggy on some ARM boards (Odroid XU4 for example) and use user mode network stack instead of NIC. Gather all those options in a new variable "arch-specific-flags". * gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass to load-in-linux-vm "#:target-arm32?" argument. Mathieu Othacehe2017-12-15
* vm: Use qemu drive device parameter.•••* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive device. Mathieu Othacehe2017-12-13
* vm: ISO9660 images include /etc and other standard files.•••* gnu/build/vm.scm (make-iso9660-image): Call 'populate-root-file-system' instead of a series of 'mkdir-p' calls. Add /etc to the arguments of xorriso. Ludovic Courtès2017-11-29
* build: Do not store two copies of the ISO-9660 superblock anymore.•••* gnu/build/vm.scm (make-iso9660-image): Do not store two copies of the ISO-9660 superblock anymore. Danny Milosavljevic2017-09-22
* file-systems: Introduce (gnu system uuid).•••* gnu/build/file-systems.scm (sub-bytevector) (latin1->string, %fat32-endianness, fat32-uuid->string) (%iso9660-uuid-rx, string->iso9660-uuid) (iso9660-uuid->string, %network-byte-order) (dce-uuid->string, %uuid-rx, string->dce-uuid) (string->ext2-uuid, string->ext3-uuid, string->ext4-uuid) (vhashq, %uuid-parsers, %uuid-printers, string->uuid) (uuid->string): Move to... * gnu/system/uuid.scm: ... here. New file. * gnu/system/file-systems.scm (uuid): Move to the above file. * gnu/system/vm.scm: Adjust accordingly. * gnu/local.mk (GNU_SYSTEM_MODULES): Add uuid.scm. Ludovic Courtès2017-09-11
* vm: Allow partitions to be initialized with a given UUID.•••* gnu/build/vm.scm (<partition>)[uuid]: New field. (create-ext-file-system): Add #:uuid and honor it. (create-fat-file-system): Add #:uuid. (format-partition): Add #:uuid and honor it. (initialize-partition): Honor the 'uuid' field of PARTITION. Ludovic Courtès2017-09-11
* vm: Add comment about deduplication in make-iso9660-image.•••* gnu/build/vm.scm (make-iso9660-image): Add comment about the use of #:deduplicate #f when calling register-closure. Christopher Baines2017-09-10
* vm: Create /mnt in the generated ISO image in make-iso9660-image.•••This is used in the installation process, as the mountpoint for the target filesystem. * gnu/build/vm.scm (make-iso9660-image): Create /mnt within the generated ISO image. Christopher Baines2017-09-06
* vm: Add support for registering closures to make-iso9660-image.•••This mimics the functionality in the root-partition-initializer used in creating the QEMU image. This helps when trying to run guix system init from the generated ISO image. * gnu/build/vm.scm (make-iso9660-image): Add support for registering closures. Christopher Baines2017-09-06
* vm: 'iso9660-image' produces a single-file output.•••* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add #:single-file-output? and pass it to 'load-in-linux-vm'. (iso9660-image): Pass #:single-file-output? to 'expression->derivation-in-linux-vm'. * gnu/build/vm.scm (load-in-linux-vm): Add #:single-file-output? and honor it. Ludovic Courtès2017-07-18
* vm: Increase disk size overhead estimate.•••* gnu/build/vm.scm (estimated-partition-size): Add 25% to the graph size. Tobias Geerinckx-Rice2017-07-18
* build, vm: Use a less common label.•••* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD_image" as label. * gnu/system/install.scm (installation-os): Likewise. * gnu/system/vm.scm (system-disk-image): Likewise. Tobias Geerinckx-Rice2017-07-17
* build: Make ISO-9660 image bootable from USB flash drive.•••* gnu/build/vm.scm (make-iso9660-image): Make image bootable from USB flash drive. Danny Milosavljevic2017-07-12
* build, vm: Use "GuixSD" or "GUIXSD" as volume label.•••* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD" as label. * gnu/system/install.scm (installation-os): Use "GuixSD" as label. * gnu/system/vm.scm (system-disk-image): Use "GuixSD" or "GUIXSD" as volume label. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Danny Milosavljevic2017-07-10
* build: Add (gnu build file-systems) import.•••* gnu/build/vm.scm: Add (gnu build file-systems) import. Danny Milosavljevic2017-07-03
* build: Clarify error message when make-iso9660-image fails.•••* gnu/build/vm.scm (make-iso9660-image): Clarify error message. Danny Milosavljevic2017-07-03
* build: Allow specifying volume-uuid with make-iso9660-image.•••* gnu/build/file-systems.scm (iso9660-uuid->string): Export. * gnu/build/vm.scm (make-iso9660-image): Add volume-uuid. Danny Milosavljevic2017-07-03
* build: Add iso9660 system image generator.•••* build-aux/hydra/gnu-system.scm (qemu-jobs): Add 'iso9660-image . * gnu/build/vm.scm (make-iso9660-image): New variable. Export it. * gnu/system/vm.scm (iso9660-image): New variable. Use make-iso9660-image. (system-disk-image): Use iso9660-image. Danny Milosavljevic2017-07-03
* vm: Use 'fold2' from (guix combinators).•••* gnu/build/vm.scm: Use (guix combinators). (fold2): Remove. Ludovic Courtès2017-06-30
* vm: Estimate the disk size by default.•••* gnu/build/vm.scm (estimated-partition-size): New procedure. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:disk-image-size default to 'guess. [builder]: When DISK-IMAGE-SIZE is 'guess, use 'estimated-partition-size' and compute and estimate of the image size. (qemu-image): Likewise. * guix/build/store-copy.scm (file-size, closure-size): New procedures. * guix/scripts/system.scm (%default-options): Change 'image-size' to 'guess. * doc/guix.texi (Building the Installation Image): Remove '--image-size' flag from example. (Invoking guix system): Document the image size estimate. Ludovic Courtès2017-06-30
* vm: Display the disk and partition sizes.•••* gnu/build/vm.scm (load-in-linux-vm): Add 'format' call when MAKE-DISK-IMAGE? is true. (initialize-partition-table): Show the size of the partitions being created. Ludovic Courtès2017-06-30
* vm: Fix 'load-in-linux-vm' docstring.•••* gnu/build/vm.scm (load-in-linux-vm): Change default value of #:disk-image-size. Update docstring to note that DISK-IMAGE-SIZE is in bytes. Ludovic Courtès2017-06-30
* vm: Add UEFI loader to disk images.•••* gnu/build/vm.scm (install-efi): New procedure. (initialize-hard-disk): Generate EFI blob when ESP is present. * gnu/system/vm.scm (qemu-image): Append 40MiB EFI System Partition. Marius Bakke2017-05-19
* vm: Support creating FAT partitions.•••* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system): New procedures. (format-partition): Use them. Error for unknown file systems. * gnu/system/vm.scm (qemu-image): Include DOSFSTOOLS. * gnu/system/linux-initrd.scm (base-initrd): Always add nls_is8859-1.ko. Marius Bakke2017-05-19
* vm: Support arbitrary partition flags.•••* gnu/build/vm.scm (<partition>): Change BOOTABLE? to FLAGS. (initialize-partition-table): Pass each flag to parted. (initialize-hard-disk): Locate boot partition. * gnu/system/vm.scm (qemu-image): Adjust partition flags. Marius Bakke2017-05-19
* bootloader: Adapt vm to new bootloader API.•••* gnu/build/install.scm (install-boot-config): New procedure. (install-grub): Move to (gnu bootloader grub). * gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and adjust accordingly. (initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-location and bootloader-installer procedure. Adjust accordingly. * gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk. (system-disk-image, system-qemu-image, system-qemu-image/shared-store): Adjust to qemu-image. Mathieu Othacehe2017-05-16
* vm: Reword grub.cfg to bootcfg.•••* gnu/build/vm.scm (register-grub.cfg-root): Reword grub.cfg to bootcfg, (initialize-hard-disk): ditto, * gnu/system/vm.scm (system-disk-image): ditto, (system-qemu-image): ditto, (system-qemu-image/shared-store): ditto. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Mathieu Othacehe2017-04-15
* vm: Add missing module.•••* gnu/build/vm.scm (define-module): Use module (guix build syscalls). It fixes the following warnings during guix build : gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount' gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount' gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount' gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount' gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount' gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount' This was not possible until the previous commit because we had to be sure that Guile core implementation of 'mount' and 'umount' was used in initrd context. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mathieu Othacehe2017-04-07
* vm: Avoid needless file copy in 'load-in-linux-vm'.•••Reported by Chris Webber. * gnu/build/vm.scm (load-in-linux-vm)[image-file]: Remove. Directly refer to OUTPUT instead. Ludovic Courtès2016-11-28
* vm: 'qemu-command' honors its argument.•••* gnu/build/vm.scm (qemu-command): Refer to SYSTEM rather than %HOST-TYPE in the body. Ludovic Courtès2016-06-20
* vm: Only pass "-enable-kvm" to qemu if /dev/kvm is present.•••Fixes <http://bugs.gnu.org/22633>. * gnu/build/vm.scm (load-in-linux-vm): Only pass "-enable-kvm" flag to qemu if "/dev/kvm" is present. * gnu/system/vm.scm (common-kvm-options): Same as above. Christopher Allan Webber2016-02-22
* vm: Make the list of partitions to build a parameter.•••* gnu/build/vm.scm (<partition>): New record type. (fold2): New procedure. (initialize-partition-table): Remove #:bootable? and 'partition-size' parameters. Add 'partitions' parameter. Invoke 'parted' with '--script'. (initialize-root-partition): Remove. (initialize-partition, root-partition-initializer): New procedures. (initialize-hard-disk): Remove #:system-directory, #:disk-image-size, #:file-system-type, #:file-system-label, #:closures, #:copy-closures?, #:bootable?, and #:register-closures? parameters. Add #:partitions. Rewrite to use 'initialize-partition' for each item of PARTITIONS. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Add (guix records) to #:modules default value. (qemu-image): Adjust accordingly. Ludovic Courtès2015-07-26
* vm: Use the 'umount' procedure instead of util-linux's 'umount' command.•••* gnu/build/vm.scm (initialize-root-partition, initialize-hard-disk): Use the 'umount' procedure instead of invoking the 'umount' command. * gnu/system/vm.scm (qemu-image): Remove UTIL-LINUX from INPUTS. Ludovic Courtès2015-07-24
* system: Don't make /boot/grub/grub.cfg a symlink to the store.•••This would not work when /boot is a separate partition, as reported by Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>. This fixes a regression introduced in 39d1f82. * gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of symlinking it, as was the case before 39d1f82. * gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter. Make it a permanent GC root instead of an indirect GC root. (initialize-hard-disk): Adjust accordingly. * guix/scripts/system.scm (install-grub*): Replace use of 'add-indirect-root' by the addition of a permanent GC root in %GC-ROOTS-DIRECTORY. Ludovic Courtès2014-12-09