summaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* 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.
* image: Add a new API.Mathieu Othacehe2020-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This is quite fragile, very slow, and almost unusable without KVM. For all these reasons, add support for host image generation. This implies the use new image generation mechanisms. - Raw disk images: images of partitions are created using tools such as mke2fs and mkdosfs depending on the partition file-system type. The partition images are then assembled into a final image using genimage. - ISO9660 images: the ISO root directory is populated within the store. GNU xorriso is then called on that directory, in the exact same way as this is done in (gnu build vm) module. Those mechanisms are built upon the new (gnu image) module. * gnu/image.scm: New file. * gnu/system/image.scm: New file. * gnu/build/image: New file. * gnu/local.mk: Add them. * gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm. * gnu/ci.scm (qemu-jobs): Adapt to new API. * gnu/tests/install.scm (run-install): Ditto. * guix/scripts/system.scm (system-derivation-for-action): Ditto.
* 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.
* build: install: Do not set store GID.Mathieu Othacehe2020-05-05
| | | | | | | | | | There's no need to set the store GID as is will be done by the guix-daemon, with the following snippet: if (chown(chrootStoreDir.c_str(), 0, buildUser.getGID()) == -1) throw SysError(format("cannot change ownership of ‘%1%’") % chrootStoreDir); * gnu/build/install.scm (directives): Do not set store GID.
* build: install: Ignore chown exceptions.Mathieu Othacehe2020-05-05
| | | | | | | | Changing ownership may require root permissions. As image can now be generated without root permissions (no VM involved), ignore those exceptions. * gnu/build/install.scm (evaluate-populate-directive): Ignore chown exceptions.
* file-systems: Fix UTF-16 handling in initrd.Danny Milosavljevic2020-05-03
| | | | | | | Follow-up to f73f4b3a2d7a313a6cb1667bd69205ea4b09f57c. * gnu/build/file-systems.scm (bytevector->u16-list): New procedure. (utf16->string): New procedure.
* file-systems: Fix F2FS volume name accessor.Danny Milosavljevic2020-05-03
| | | | | | | | Follow-up to 23b37c3d40d497cc6f07437ab26ab10e60fb6e09. * gnu/build/file-systems.scm (bytevector-utf16-length): New procedure. (null-terminated-utf16->string): New procedure. (f2fs-superblock-volume-name): Use it.
* linux-boot: Allow the root file system to be mounted via NFS.Stefan2020-05-02
| | | | | | | * gnu/build/linux-boot.scm (boot-system) Treat a root option with ":/" as an nfs source and avoid to call 'canonicalize-device-spec' for it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Add support for F2FS.raingloom2020-05-02
| | | | | | | | | * gnu/build/file-systems.scm (%f2fs-endianness): New syntax. (f2fs-superblock?, read-f2fs-superblock, f2fs-superblock-uuid) (f2fs-superblock-volume-name, check-f2fs-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers, check-file-system): Register them. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* 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.
* system: Add kernel-loadable-modules to operating-system.Danny Milosavljevic2020-03-22
| | | | | | | | | | | | | | | * gnu/system.scm (<operating-system>): Add kernel-loadable-modules. (operating-system-directory-base-entries): Use it. * doc/guix.texi (operating-system Reference): Document KERNEL-LOADABLE-MODULES. * gnu/build/linux-modules.scm (depmod): New procedure. (make-linux-module-directory): New procedure. Export it. * guix/profiles.scm (linux-module-database): New procedure. Export it. * gnu/tests/linux-modules.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/linux.scm (make-linux-libre*)[arguments]<#:phases>[install]: Disable depmod. Remove "build" and "source" symlinks. [native-inputs]: Remove kmod.
* build: file-systems: Do not warn about file system check for NFS.Maxim Cournoyer2020-03-02
| | | | | * gnu/build/file-systems.scm (check-file-system): Define a dummy checker procedure for NFS that always passes to prevent a warning from being emitted.
* linux-boot: Ensure volatile root is mounted read-only.Maxim Cournoyer2020-03-02
| | | | | * gnu/build/linux-boot.scm (mount-root-file-system): Ensure MS_RDONLY is present among the root file system flags when VOLATILE-ROOT? is #t.
* marionette: Provide portable US-layout keystrokes for "<" and ">".Ludovic Courtès2020-02-22
| | | | | | * gnu/build/marionette.scm (%qwerty-us-keystrokes): Use shit-comma and shift-dot for #\< and #\> because the "less" key doesn't work the same in "US intl." layouts.
* marionette: 'wait-for' procedures no longer leak a port.Ludovic Courtès2020-02-22
| | | | | | * gnu/build/marionette.scm (wait-for-tcp-port): Close SOCK upon success. (wait-for-unix-socket): Likewise.
* activation: Check whether /proc/sys/kernel/modprobe exists.kanichos@yandex.ru2020-01-06
| | | | | | | * gnu/build/activation.scm (activate-modprobe): Check whether /proc/sys/kernel/modprobe exists before writing to it. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Handle LUKS2 header.David Trudgian2020-01-05
| | | | | | * gnu/build/file-systems.scm (luks-superblock?): Handle LUKS2 header. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* file-systems: Add support for JFS.Tobias Geerinckx-Rice2020-01-03
| | | | | | | | * gnu/build/file-systems.scm (%jfs-endianness): New syntax. (jfs-superblock?, read-jfs-superblock, jfs-superblock-uuid) (jfs-superblock-volume-name, check-jfs-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers, check-file-system): Register them.
* activation: Keep going when failing to create one of the setuid programs.Ludovic Courtès2020-01-02
| | | | | | | | Fixes <https://bugs.gnu.org/38800>. Reported by Jakub Kądziołka <kuba@kadziolka.net>. * gnu/build/activation.scm (activate-setuid-programs): Catch 'system-error' around 'make-setuid-program' calls.
* 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.
* linux-boot: Don't ignore flags when mounting root file system.Guillaume Le Vaillant2019-12-12
| | | | | | | | * gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword argument and use it when mounting the root file system. (boot-system): Pass the root file system flags to 'mount-root-file-system'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* file-systems: Add support for 'strict-atime' and 'lazy-time' flags.Guillaume Le Vaillant2019-12-07
| | | | | | | | | | * guix/build/syscalls.scm (MS_LAZYTIME): New variable. * gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for 'strict-atime' and 'lazy-time'. * doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list of supported flags. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* 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.
* linux-boot: Don't ignore options when mounting root file system.Guillaume Le Vaillant2019-11-18
| | | | | | | | | | | Fixes <https://bugs.gnu.org/37977>. * gnu/build/linux-boot.scm (mount-root-file-system): Add the 'options' keyword argument and use it when mounting the root file system. (boot-system): Pass the root file system options to 'mount-root-file-system'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* linux-boot: Fix indentation.Maxim Cournoyer2019-11-18
| | | | * gnu/build/linux-boot.scm (boot-system): Re-indent.
* file-systems: Fix docstring.Maxim Cournoyer2019-11-18
| | | | | | * gnu/build/file-systems.scm (mount-file-system): Clean the documentation from the no longer existing parameters (these are now encapsulated within a <file-system> record).
* Merge branch 'master' into core-updatesMarius Bakke2019-09-27
|\
| * shepherd: Ensure the log file has correct ownership.Ludovic Courtès2019-09-26
| | | | | | | | | | * gnu/build/shepherd.scm (make-forkexec-constructor/container): Ensure LOG-FILE has correct ownership.
| * shepherd: 'make-forkexec-constructor/container' keeps the log file.Ludovic Courtès2019-09-26
| | | | | | | | | | | | * gnu/build/shepherd.scm (make-forkexec-constructor/container): Don't call 'clean-up' on LOG-FILE. This mirrors Shepherd commit 6892f638c78a14fedd075f664432757bc015c140.
| * linux-boot: Fix typo.Maxim Cournoyer2019-09-25
| | | | | | | | * gnu/build/linux-boot.scm (mount-root-file-system): Fix typo.
| * build: initrd: Fix "write-cpio-archive" return value.Maxim Cournoyer2019-09-25
| | | | | | | | | | * gnu/build/linux-initrd.scm (write-cpio-archive): Really return OUTPUT on success, even when compression is disabled.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-09-17
|\|
| * linux-container: "run-container" scripts shows the container's PID.Ludovic Courtès2019-09-12
| | | | | | | | | | | | | | * gnu/build/linux-container.scm (call-with-container): Add #:process-spawned-hook and honor it. * gnu/system/linux-container.scm (container-script)[script]: Define 'explain' and pass it as #:process-spawned-hook'.
| * file-systems: Add /var/run/nscd to '%network-file-mappings'.Ludovic Courtès2019-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows containers created by "guix environment -CN" or by "guix system container -N" to talk to the host nscd. * gnu/system/file-systems.scm (%network-file-mappings): Add "/var/run/nscd". * gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove. * gnu/system/linux-container.scm (container-script)[nscd-run-directory] [nscd-mapping, nscd-os, nscd-specs]: Remove. [script]: Filter out from SPECS bind-mounts where the device does not exist. * guix/scripts/environment.scm (launch-environment/container) [optional-mapping->fs]: New procedure. [mappings]: Remove %NETWORK-FILE-MAPPINGS. [file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through 'optional-mapping->fs'.
* | Merge branch 'master' into core-updatesMark H Weaver2019-08-29
|\|
| * gnu: mingw-w64: Update to 6.0.0.David Thompson2019-08-28
| | | | | | | | | | | | | | | | | | * gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0. * gnu/packages/patches/mingw-w64-6.0.0-gcc.patch: New file. * gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch: Delete it. * gnu/local.mk (dist_patch_DATA): Add new patch. Delete old patch. * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional autoconf-like substitutions.
| * accounts: Delete duplicate entries.Ludovic Courtès2019-08-28
| | | | | | | | | | | | | | | | | | | | When adding multiple instances of a service requiring some user account/group, we could end up with multiple entries for that account or group in /etc/passwd or /etc/group. * gnu/build/accounts.scm (database-writer)[write-entries]: Add call to 'delete-duplicates'. * tests/accounts.scm ("write-passwd with duplicate entry"): New test.
* | Merge branch 'master' into core-updatesMark H Weaver2019-08-22
|\|
| * linux-modules: Define and use a module name database.Ludovic Courtès2019-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/34902>. Reported by Julien Lepiller <julien@lepiller.eu>. * gnu/build/linux-modules.scm (module-formal-name): New procedure. (load-linux-modules-from-directory)[lookup-module]: Remove. [module-name->file-name]: New variable. Use it. (module-name->file-name/guess, module-name-lookup) (write-module-name-database): New procedures. * gnu/system/linux-initrd.scm (flat-linux-module-directory): Call 'write-module-name-database'.
| * linux-modules: Add 'load-linux-modules-from-directory'.Ludovic Courtès2019-08-16
| | | | | | | | | | | | | | * gnu/build/linux-modules.scm (load-linux-modules-from-directory): New procedure. * gnu/build/linux-boot.scm (boot-system)[lookup-module]: Remove. Use 'load-linux-modules-from-directory' instead.
| * linux-modules: Add "modules.devname" writer.Ludovic Courtès2019-08-16
| | | | | | | | | | | | | | | | * gnu/build/linux-modules.scm (aliases->device-tuple) (write-module-device-database): New procedures. (%not-dash): New variable. Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>.
| * linux-modules: Add "modules.alias" writer.Danny Milosavljevic2019-08-16
| | | | | | | | | | | | | | * gnu/build/linux-modules.scm (write-module-alias-database): New procedure. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| * gnu: mingw: Add x86_64 support.Carl Dong2019-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch parameterizes previously hard-coded instances of i686-w64-mingw32, adding support for x86_64-w64-mingw32. * gnu/packages/mingw.scm (make-mingw-w64): New procedure. (mingw-w64-i686, mingw-w64-x86_64): New variables. (%mingw-triplet): Remove. (mingw-w64): Update to point to 'mingw-w64-i686'. * gnu/packages/cross-base.scm (cross-gcc): Use 'libc' keyword argument if specified, instead of treating it as a boolean. (native-libc): Return the correct mingw-w64 depending on machine specified in target. * gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add "x86_64-mingw". * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Replace hardcoded 'i686-w64-mingw32' instances with 'target' keyword argument. (cross-gcc-build-phases): Update accordingly; use 'target-mingw?' implementation of target checking and add commentary. * gnu/ci.scm (%cross-targets): Add "x86_64-w64-mingw32".
* | Merge branch 'master' into core-updatesMarius Bakke2019-07-12
|\| | | | | | | | | | | | | | | | | Conflicts: gnu/local.mk gnu/packages/python-xyz.scm gnu/packages/xml.scm guix/gexp.scm po/guix/POTFILES.in
| * linux-container: Mount a new /dev/pts instance in the container.Ludovic Courtès2019-07-06
| | | | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/36463>. Reported by Steffen Rytter Postas <nc@scalehost.eu>. * gnu/build/linux-container.scm (mount-file-systems): When /dev/ptmx exists on the host, explicitly mount a new instance of devpts and make /dev/ptmx a symlink to /dev/pts/ptmx.
* | Merge branch 'master' into core-updatesLudovic Courtès2019-06-27
|\|
| * accounts: Use 'fsync' instead of 'fdatasync'.Ludovic Courtès2019-06-27
| | | | | | | | | | * gnu/build/accounts.scm (catch-ENOSYS): Remove. (database-writer): Use 'fsync' instead of 'fdatasync'.