aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* 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.
* file-systems: Implement partition lookup by UUID.Ludovic Courtès2015-07-14
| | | | | | | | | | | | * gnu/build/file-systems.scm (read-ext2-superblock*, partition-predicate): New procedures. (partition-label-predicate): Rewrite in terms of 'partition-predicate'. (partition-uuid-predicate, find-partition-by-uuid, uuid->string): New procedures. (%network-byte-order): New macro. (canonicalize-device-spec)[canonical-title]: Check whether SPEC is a string. [resolve]: New procedure. Add 'uuid' case and use it.
* file-systems: Use (guix build syscalls) at build time if needed.Ludovic Courtès2015-07-14
| | | | * gnu/build/file-systems.scm: Wrap 'module-use!' statement in 'eval-when'.
* gnu: build: Add Linux container module.David Thompson2015-07-09
| | | | | | | | | * gnu/build/linux-container.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * .dir-locals.el: Add Scheme indent rules for 'call-with-container', and 'container-excursion'. * tests/containers.scm: New file. * Makefile.am (SCM_TESTS): Add it.
* build: file-systems: Import (guix build syscalls) for non-static Guiles.David Thompson2015-07-09
| | | | | | | * gnu/build/file-systems.scm: Import (guix build syscalls) when 'mount' is not defined. * gnu/system.scm (operating-system-activation-script): Include (guix build syscalls) module in derivation.
* linux-initrd: Produce cpio archives with zeroed timestamps, etc.Ludovic Courtès2015-06-24
| | | | | | * guix/cpio.scm (file->cpio-header*): New procedure. * gnu/build/linux-initrd.scm (write-cpio-archive): Add #:file->header argument to 'cpio:write-cpio-archive'.
* linux-initrd: Populate cpio archives in a deterministic order.Ludovic Courtès2015-06-24
| | | | | * gnu/build/linux-initrd.scm (write-cpio-archive)[files]: Use 'sort' instead of 'reverse'.
* linux-initrd: Use (guix cpio) instead of GNU cpio.Ludovic Courtès2015-06-24
| | | | | | | | | * gnu/build/linux-initrd.scm (write-cpio-archive): Remove 'open-pipe*' and related calls. Compute list of files in 'files' variable. Use 'cpio:write-cpio-archive'. Remove #:cpio parameter. (build-initrd): Remove #:cpio parameter. * gnu/system/linux-initrd.scm (expression->initrd): Likewise, and adjust BUILDER accordingly. Add (guix cpio) to #:modules.
* gnu: Make 'mount' interface in static Guile consistent with Guix API.David Thompson2015-06-19
| | | | | | | | | | Rather than expecting a pointer, the version of 'mount' in guile-static-stripped now takes a string for the 'options' argument, just like the 'mount' procedure in (guix build syscalls). * gnu/packages/patches/guile-linux-syscalls.patch (mount): Expect a string or #f for 'options' argument. * gnu/build/file-systems.scm (mount-file-system): Use new 'mount' interface.
* install: Turn off deduplication for the binary tarball.Ludovic Courtès2015-06-18
| | | | | | | | * gnu/build/install.scm (register-closure): Add #:deduplicate? parameter and honor it. (populate-single-profile-directory): Likewise. * gnu/system/install.scm (self-contained-tarball): Pass #:deduplicate? #f. Invoke tar with --check-links.
* install: Really overwrite TARGET/var/guix/profiles/system-1-link.Ludovic Courtès2015-06-10
| | | | | | * gnu/build/install.scm (populate-root-file-system): Delete system-1-link under TARGET, not under /. Use 'catch' and check for EEXIST instead of (false-if-exception (delete-file ...)).
* gnu: linux-boot: Remove outdated and misleading comment.Ludovic Courtès2015-05-24
| | | | * gnu/build/linux-boot.scm (boot-system): Remove outdated comment.
* system: activate-ptrace-attach: Handle kernels without YAMA support.Mark H Weaver2015-05-09
| | | | | * gnu/build/activation.scm (activate-ptrace-attach): Check for the existence of /proc/sys/kernel/yama/ptrace_scope before trying to write to it.
* activation: Make user copies of the skeletons writable.Ludovic Courtès2015-05-05
| | | | | | | * gnu/build/activation.scm (make-file-writable, make-skeletons-writable): New procedures. (copy-account-skeletons): Call 'make-file-writable' after 'copy-file'. (add-user): Add call to 'make-skeletons-writable'.
* install: Make /var/lock.Ludovic Courtès2015-04-29
| | | | | | Reported by 宋文武 <iyzsong@gmail.com>. * gnu/build/install.scm (directives): Add /var/lock.
* file-systems: Use a second 'mount' call for read-only bind mounts.Ludovic Courtès2015-04-20
| | | | | | | * gnu/build/file-systems.scm (MS_REMOUNT): New constant. (mount-file-system): Add 'flags' local variable. When FLAGS has MS_BIND & MS_RDONLY, call 'mount' with MS_REMOUNT. * gnu/services/base.scm (file-system-service) <start>: Likewise.
* install: Add a procedure to build a self-contained binary tarball.Ludovic Courtès2015-04-14
| | | | | | | | | Suggested by Pjotr Prins <pjotr.public12@thebird.nl> at <http://lists.gnu.org/archive/html/guix-devel/2015-04/msg00229.html>. * gnu/build/install.scm (populate-single-profile-directory): New procedure. * gnu/system/install.scm (self-contained-tarball): New procedure. * Makefile.am (guix-binary.%.tar.xz): New target.
* system: Allow users to PTRACE_ATTACH to their own processes.Ludovic Courtès2015-04-12
| | | | | * gnu/build/activation.scm (activate-ptrace-attach): New procedure. * gnu/system.scm (operating-system-activation-script): Use it.
* activation: Remove undeclared user accounts and groups.Ludovic Courtès2015-04-08
| | | | | | | | | | | | Fixes <http://bugs.gnu.org/19795>. Reported by David Thompson <dthompson2@worcester.edu>. * gnu/build/activation.scm (enumerate, current-users, current-groups, delete-user, delete-group): New procedures. (activate-users+groups): Add calls to 'delete-user' and 'delete-group'. * doc/guix.texi (User Accounts): Add a paragraph about statelessness. Explain that passwords are preserved.
* install: Create /var/tmp.Ludovic Courtès2015-03-31
| | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * gnu/build/install.scm (directives): Add /var/tmp.
* system: Add /etc/ssl symlink; set needed variables in /etc/profile.Mark H Weaver2015-03-03
| | | | | | | | * gnu/build/activation.scm (activate-etc): Create /etc/ssl symlink. * gnu/system.scm (etc-directory): Set SSL_CERT_DIR, SSL_CERT_FILE, and GIT_SSL_CAINFO in /etc/profile. Co-Authored-By: Ludovic Courtès <ludo@gnu.org>
* linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.Ludovic Courtès2015-01-28
| | | | | | | | | Reported Joshua Grant. Patch suggested by Mark H Weaver. * gnu/build/linux-boot.scm (mount-root-file-system): Use 'false-if-exception' instead of 'when (file-exists? ...)' to account for dangling symlinks.
* linux-boot: Make /etc/mtab a symlink to /proc/self/mounts.宋文武2015-01-05
| | | | | | | | | | Fixes <http://bugs.gnu.org/19491>. * gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab a symlink to /proc/self/mounts. * gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab. * guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to #f.
* activation: Copy the account skeletons when creating the 'root' account.Ludovic Courtès2014-12-13
| | | | | | | * gnu/build/activation.scm (%skeleton-directory): New variable. (dot-or-dot-dot?, copy-account-skeletons): New procedure. (add-user): Use 'copy-account-skeletons'. (activate-etc): Use 'dot-or-dot-dot?'.