aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* gnu: cross-base: Move phases to (gnu build cross-toolchain).Ludovic Courtès2016-12-07
| | | | | | | | | | * gnu/packages/cross-base.scm (cross-gcc-arguments) <#:phases>: Use 'cross-gcc-build-phases', and move body cross-toolchain.scm. (cross-gcc): Add #:imported-modules. Add (gnu build cross-toolchain) to #:modules. * gnu/build/cross-toolchain.scm: New file, with code from 'cross-gcc-arguments'. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu: Allow nfs file systems to be automatically mounted.John Darrington2016-11-29
| | | | | * gnu/build/file-systems.scm (mount-file-system): Append target addr= when mounting nfs filesystems.
* vm: Avoid needless file copy in 'load-in-linux-vm'.Ludovic Courtès2016-11-28
| | | | | | | Reported by Chris Webber. * gnu/build/vm.scm (load-in-linux-vm)[image-file]: Remove. Directly refer to OUTPUT instead.
* install: Enable "cryptodisk" handling in GRUB.Ludovic Courtès2016-11-23
| | | | | | | | | | | | | | | | | | This allows 'grub-install' to do the right thing when / or /boot is a LUKS-encrypted partition. Fixes <http://bugs.gnu.org/21843>. * gnu/build/install.scm (install-grub): Add 'setenv' to set 'GRUB_ENABLE_CRYPTODISK'. (wait-for-screen-text): New test. * gnu/tests/base.scm (run-basic-test): Add #:initialization parameter and honor it. * gnu/tests/install.scm (%encrypted-root-os)[kernel-arguments]: Remove. (%encrypted-root-installation-script): Pass '--uuid' to 'cryptsetup luksFormat'. Remove 'sed' invocation. (enter-luks-passphrase): New procedure. (%test-encrypted-os)[value]: Pass #:initialization to 'run-basic-test'.
* marionette: Add 'marionette-screen-text' using OCR.Ludovic Courtès2016-11-23
| | | | | * gnu/build/marionette.scm (marionette-screen-text): New procedure. * gnu/tests/base.scm (run-basic-test)["screen text"]: New test.
* marionette: Delay synchronization with the host's REPL.Ludovic Courtès2016-11-23
| | | | | | | | | * gnu/build/marionette.scm (<marionette>)[marionette-repl]: Rename to... [%marionette-repl]: ... this. (marionette-repl): New macro. (make-marionette): Wrap last 'read' call into 'delay', making the last argument to 'marionette' a promise of a port. (marionette-eval): Use 'force' in 'match' clause.
* marionette: Avoid use of SIGALRM for timeouts.Ludovic Courtès2016-11-22
| | | | | * gnu/build/marionette.scm (make-marionette)[accept*]: New procedures. Remove calls to 'sigaction'. Use 'accept*' instead of 'accept'.
* container: Pass a list of <file-system> objects as things to mount.Ludovic Courtès2016-11-10
| | | | | | | | | | | | | | | * gnu/build/linux-container.scm (mount-file-systems): 'mounts' is now a list of <file-system> objects instead of a list of lists ("specs"). Add call to 'file-system->spec' as the argument to 'mount-file-system'. (run-container, call-with-container): Adjust docstring accordingly. * gnu/system/file-systems.scm (spec->file-system): New procedure. * gnu/system/linux-container.scm (container-script)[script]: Call 'spec->file-system' inside gexp. * guix/scripts/environment.scm (launch-environment/container): Remove call to 'file-system->spec'. * tests/containers.scm ("call-with-container, mnt namespace") ("call-with-container, mnt namespace, wrong bind mount"): Pass a list of <file-system> objects.
* install: Extract procedure: install-grub-config.Chris Marusich2016-11-06
| | | | | | | * gnu/build/install.scm (install-grub-config): New procedure. (install-grub): Use it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu: build: file-system: Change url of LUKS specification.ng02016-11-06
| | | | | | * gnu/build/file-system.scm: Change url of LUKS specification. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* file-systems: 'disk-partitions' detected partitions from mapped devices.Ludovic Courtès2016-10-27
| | | | | | | | | | Previously, partitions of mdadm- or cryptsetup-produced block devices would not be returned by 'disk-partitions'. * gnu/build/file-systems.scm (disk-partitions)[last-character]: New procedure. [partition?]: Add 'name' parameter and rewrite. Adjust caller. * gnu/build/file-systems.scm (ENOENT-safe): Silently ignore ENOMEDIUM.
* svg: Autoload Guile-RSVG and Guile-Cairo.Ludovic Courtès2016-10-25
| | | | | | | Fixes compilation by 'guix pull' where Guile-{RSVG,Cairo} are missing. Reported by Efraim Flashner. * gnu/build/svg.scm: Use 'module-autoload!' rather than 'module-use!'.
* system: grub: Use Guile-{RSVG,Cairo} instead of Inkscape + ImageMagick.Ludovic Courtès2016-10-25
| | | | | | | | | | | | Based on a suggestion by Andy Wingo at <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00753.html>. * gnu/build/svg.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/system/grub.scm (svg->png): Add #:width and #:height. Rewrite to use (gnu build svg). (resize-image): Remove. (grub-background-image): Adjust accordingly.
* container: Allow 'container-excursion' to the same namespaces.Ludovic Courtès2016-10-19
| | | | | | | | | | | Before that, 'container-excursion' would call 'setns' even when the target namespace is the one the caller is already in, which would fail. * gnu/build/linux-container.scm (container-excursion): Introduce 'source' and 'target'. Compare the result of 'readlink' on these instead of comparing file descriptors to decide whether to call 'setns'. * tests/containers.scm ("container-excursion, same namespace"): New test.
* activation: Don't fail if /var/lib exists.Leo Famulari2016-09-06
| | | | | | | This is a followup to commit 6526d43ea4fb0cd151a0d5e9a072c651c1c963d1. * gnu/build/activation.scm (activate-user+groups): Use mkdir-p to create /var/lib.
* activation: Allow home directories to be created under /var/lib.David Craven2016-09-06
| | | | | * gnu/build/activation.scm (activate-user+groups): Make sure /var/lib exists.
* file-systems: Always use (guix build syscalls).Ludovic Courtès2016-09-05
| | | | | | | | | | * gnu/build/file-systems.scm: Use (guix build syscalls) unconditionally. Override the 'mount' and 'umount' bindings when (guile) provides them. (MS_RDONLY, MS_NOSUID, MS_NODEV, MS_NOEXEC, MS_REMOUNT) (MS_BIND, MS_MOVE): Remove. * guix/build/syscalls.scm (%libc-errno-pointer): Add 'false-if-exception' around 'dynamic-func'.
* tests: Make sure /var/guix/gcroots/profiles is a valid symlink.Ludovic Courtès2016-08-29
| | | | | | | | | | Reported by csanchezdll@gmail.com (Carlos Sánchez de La Lama) at <https://lists.gnu.org/archive/html/guix-devel/2016-08/msg01641.html>. * gnu/build/install.scm (directives): Add /var/guix/gcroots/profiles symlink. * gnu/tests/base.scm (run-basic-test)["/var/guix/gcroots/profiles is a valid symlink"]: New test.
* system: Add 'create-home-directory?' field to <user-account>.Ludovic Courtès2016-08-28
| | | | | | | | | | | | * gnu/system/shadow.scm (<user-account>)[create-home-directory?]: New field. (user-account->gexp): Serialize it. * gnu/build/activation.scm (activate-users+groups)[activate-user]: Update 'match-lambda' pattern accordingly. Pass #:create-home? to 'ensure-user'. (add-user, modify-user, ensure-user): Add #:create-home? parameter and honor it. * doc/guix.texi (User Accounts): Document it.
* vm: 'qemu-command' honors its argument.Ludovic Courtès2016-06-20
| | | | | * gnu/build/vm.scm (qemu-command): Refer to SYSTEM rather than %HOST-TYPE in the body.
* container: Gracefully report mount errors in the child process.Ludovic Courtès2016-05-31
| | | | | | | | | | | | | Fixes <http://bugs.gnu.org/23306>. * gnu/build/linux-container.scm (run-container): Use 'socketpair' instead of 'pipe'. Rename 'in' to 'child' and 'out' to 'parent'. Send a 'ready message or an exception argument list from the child to the parent; adjust the parent accordingly. * tests/containers.scm ("call-with-container, mnt namespace, wrong bind mount"): New test. * tests/guix-environment-container.sh: Add test with --expose=/does-not-exist.
* container: Gracefully handle failure to set up user namespaces.Ludovic Courtès2016-05-31
| | | | | * gnu/build/linux-container.scm (run-container): Exit when the parent process doesn't say 'ready.
* Add (gnu tests) and (gnu build marionette).Ludovic Courtès2016-05-04
| | | | | | * gnu/build/marionette.scm, gnu/tests.scm: New files. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. * gnu/system/vm.scm (common-qemu-options): Remove '-serial stdio'.
* file-systems: Add 'find-partition-by-luks-uuid'.Ludovic Courtès2016-04-17
| | | | | | | | | | | | | | * gnu/build/file-systems.scm (%luks-endianness, %luks-header-size): New macros. (%luks-magic): New variable. (sub-bytevector, read-luks-header, luks-header-uuid): New procedures. (partition-predicate): Add 'read' parameter; wrap it with 'ENOENT-safe'. Use it instead of 'read-ext2-superblock*'. (read-ext2-superblock*): Remove. (partition-label-predicate, partition-uuid-predicate): Pass 'read-ext2-superblock' as the first argument. (partition-luks-uuid-predicate): New variable. (find-partition-by-luks-uuid): New procedure.
* file-systems: Separate ENOENT catching from ext2 superblock reads.Ludovic Courtès2016-04-17
| | | | | * gnu/build/file-systems.scm (ENOENT-safe): New procedure. (read-ext2-superblock*): Rewrite in terms of it.
* activation: Copy account skeletons silently.Ludovic Courtès2016-03-24
| | | | | * gnu/build/activation.scm (copy-account-skeletons): Pass #:log to 'copy-recursively'.
* system: Allow account skeletons to be directories.Ludovic Courtès2016-03-20
| | | | | | * gnu/system/shadow.scm (skeleton-directory): Use 'copy-recursively' instead of 'copy-file'. * gnu/build/activation.scm (copy-account-skeletons): Likewise.
* build: reset-timestamps: Include directories.Ricardo Wurmus2016-03-14
| | | | | * guix/build/install.scm (reset-timestamps): Reset timestamps of directories as well.
* vm: Only pass "-enable-kvm" to qemu if /dev/kvm is present.Christopher Allan Webber2016-02-22
| | | | | | | | 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.
* linux-modules: Use normalized module names for 'modprobe.blacklist'.Ludovic Courtès2016-02-21
| | | | | | * gnu/build/linux-modules.scm (normalize-module-name): New procedure. (file-name->module-name): Use it. (module-black-list): Expound docstring.
* file-systems: Spawn a Bournish REPL upon fsck failure.Ludovic Courtès2016-02-08
| | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22588>. Reported by Mark H Weaver <mhw@netris.org>. * gnu/build/file-systems.scm (check-file-system): Pass %BOURNISH-LANGUAGE as the argument to 'start-repl'. * gnu/services.scm (activation-script): Add (guix build bournish). * gnu/services/base.scm (file-system-shepherd-service)[imported-modules]: Likewise. * gnu/system/linux-container.scm (container-script): Likewise. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Likewise.
* Rename 'dmd' to 'shepherd' in comments and strings.Alex Kost2016-01-29
| | | | | | | * build-aux/hydra/demo-os.scm (operating-system)[issue]: Point to shepherd instead of dmd. * ROADMAP: Likewise. * gnu/build/install.scm (directives): Adjust comment.
* Rename '/root/etc/dmd' directory and 'do-not-kill' file.Alex Kost2016-01-29
| | | | | | | * gnu/services/base.scm (%do-not-kill-file): Rename to "/etc/shepherd/do-not-kill". * gnu/build/linux-boot.scm (mount-root-file-system): Rename "/root/etc/dmd" to "/root/etc/shepherd".
* build: container: Make 'unprivileged-user-namespace-supported?' more robust.Mark H Weaver2016-01-23
| | | | | | * gnu/build/linux-container.scm (unprivileged-user-namespace-supported?): Only read and check the first character, to cope with a possible newline in the (pseudo-)file.
* linux-modules: Support 'modprobe.blacklist' on the command line.Ludovic Courtès2016-01-16
| | | | | | | | | * gnu/build/linux-modules.scm (file-name->module-name) (module-black-list): New procedure. * gnu/build/linux-modules.scm (load-linux-module*): Add #:black-list parameter. [black-listed?, load-dependencies]: New procedures. Use them.
* linux-boot: Remove verbose output for module loads.Ludovic Courtès2016-01-05
| | | | | | | * gnu/build/linux-boot.scm (boot-system): Leave 'current-module-debugging-port' unchanged. * gnu/build/linux-modules.scm (load-linux-module*): Update comment about 'mmap'.
* system: Allow the root file system to be named by UUID.Ludovic Courtès2016-01-01
| | | | | | | | * gnu/build/file-systems.scm (canonicalize-device-spec)[canonical-title]: Use 'string->uuid' to check whether SPEC is a UUID. When SPEC is a string and CANONICAL-TITLE is 'uuid, call 'string->uuid'. * gnu/system.scm (operating-system-grub.cfg): Add 'root-device' variable and use it for the "--root=" argument.
* file-systems: Move 'string->uuid' to the build side.Ludovic Courtès2016-01-01
| | | | | | * gnu/system/file-systems.scm (%uuid-rx, string->uuid): Move to... * gnu/build/file-systems.scm (%uuid-rx, string->uuid): ... here. New variables.
* build: container: Add feature test predicates.David Thompson2015-11-03
| | | | | | | | * gnu/build/linux-container.scm (user-namespace-supported?, unprivileged-user-namespace-supported?, setgroups-supported?): New procedures. * tests/container.scm: Use predicates. * tests/syscalls.scm: Likewise.
* container: Remove unnecessary CLONE_CHILD_* flags.Ludovic Courtès2015-10-28
| | | | | | * gnu/build/linux-container.scm (namespaces->bit-mask): Remove CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID, which are unneeded. Discussed at <http://bugs.gnu.org/21694>.
* file-systems: Do not truncate mount points that already exist.Ludovic Courtès2015-10-17
| | | | | | | | | | Reported by David Thompson <dthompson2@worcester.edu> at <https://lists.gnu.org/archive/html/guix-devel/2015-10/msg00284.html>. * gnu/build/file-systems.scm (mount-file-system): When SOURCE matches 'regular-file?', do not create MOUNT-POINT if it already exists. This fixes a bug whereby we would be truncating MOUNT-POINT if it already existed.
* build: container: Fix call-with-clean-exit.David Thompson2015-10-10
| | | | | | | | Before, call-with-clean-exit would *always* return an exit code of 1. * gnu/build/linux-container.scm (call-with-clean-exit): Exit with status code of 0 if thunk does not throw an exception. * tests/containers.scm: Add test.
* linux-boot: Mount /dev as a devtmpfs from the start.Ludovic Courtès2015-09-20
| | | | | | | | | | | | | | | | | | Suggested by Petter <petter@mykolab.ch> and Mark H Weaver <mhw@netris.org>. Reported by Duncan Keall <duncan@duncankeall.com>. Partly fixes <http://bugs.gnu.org/19190> by populating /dev/mapper early enough. * gnu/build/linux-boot.scm (mount-essential-file-systems): Mount /dev as a devtmpfs. (move-essential-file-systems): Add /dev. (mount-root-file-system): Mount /rw-root/dev as a devtmpfs instead of calling 'make-essential-device-nodes'. (boot-system): Remove call to 'make-essential-device-nodes'. * gnu/system/file-systems.scm (%devtmpfs-file-system): Remove. * doc/guix.texi (File Systems): Adjust accordingly.
* linux-initrd: Compress cpio archives deterministically.Ludovic Courtès2015-09-09
| | | | * gnu/build/linux-initrd.scm (write-cpio-archive): Use '--no-name'.
* build: container: Use the same clone flags as fork(3).David Thompson2015-09-07
| | | | | | | | | | | | The intent is to make 'clone' behave a lot more like 'primitive-fork', which calls clone(2) with SIGCHLD, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID flags. Notably, running 'clone' at the REPL without these flags would break the REPL beyond repair. * guix/build/syscalls.scm (CLONE_CHILD_CLEARTID, CLONE_CHILD_SETTID): New variables. * gnu/build/linux-container.scm (namespaces->bit-mask): Add CLONE_CHILD_CLEARTID and CLONE_CHILD_SETTID to bit mask.
* build: container: Setup /dev/console.David Thompson2015-09-07
| | | | | * gnu/build/linux-container.scm (mount-file-systems): Bind mount the controlling terminal as /dev/console.
* build: container: Add #:host-uids argument to call-with-container.David Thompson2015-08-08
| | | | | | | | | | | | It's not always possible to map 65536 uids when creating a container as the root user within another user namespace. This is true when building Guix within the build daemon's container. By using a uid range of 1 by default, even as the root user, the tests now pass. * gnu/build/linux-container.scm (initialize-user-namespace, run-container): Add 'host-uids' argument. (call-with-container): Add #:host-uids keyword argument. * tests/containers.scm ("container-excursion"): Update 'run-container' call.
* build: file-systems: Allow for bind mounting regular files.David Thompson2015-08-08
| | | | | | * gnu/build/file-systems.scm (regular-file?): New procedure. (mount-file-system): Create a regular file instead of a directory when bind mounting a regular file.
* vm: Make the list of partitions to build a parameter.Ludovic Courtès2015-07-26
| | | | | | | | | | | | | | | | | * 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.
* vm: Use the 'umount' procedure instead of util-linux's 'umount' command.Ludovic Courtès2015-07-24
| | | | | | * 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.