aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
Commit message (Collapse)AuthorAge
* linux-initrd: Remove unnecessary timestamp reset phase.Ludovic Courtès2020-11-21
| | | | | | * gnu/build/linux-initrd.scm (write-cpio-archive): Mention timestamps in docstring. (build-initrd): Remove unnecessary timestamp reset phase.
* Add (gnu build chromium-extension).Marius Bakke2020-11-08
| | | | | * gnu/build/chromium-extension.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Adjust accordingly.
* linux-boot: Resume from hibernation.Tobias Geerinckx-Rice2020-11-07
| | | | | * gnu/build/linux-boot.scm (resume-if-hibernated): New procedure. (boot-system): Call it.
* file-systems: Add support for bcachefs.Tobias Geerinckx-Rice2020-11-07
| | | | | | | | | * gnu/build/file-systems.scm (%bcachefs-endianness): New syntax. (bcachefs-superblock?, read-bcachefs-superblock) (bcachefs-superblock-external-uuid, bcachefs-superblock-volume-name) (check-bcachefs-file-system): New procedures. (%partition-label-readers, %partition-uuid-readers, check-file-system): Register them.
* shepherd: Remove dependency on (guix utils).Ludovic Courtès2020-11-05
| | | | | | | | | | | Since commit 8ce6f4dc2879919c12bc76a2f4b01200af97e019, importing this module in a gexp would pull in (guix config) from the host, thereby leading to non-reproducible derivations. Users in (gnu services ...) do not expect that so simply remove the (guix utils) dependency for now. * gnu/build/shepherd.scm (fork+exec-command/container)[strip-pid]: New procedure. Use it instead of 'strip-keyword-arguments'.
* image: Error out when passed an unsupported partition type.Ludovic Courtès2020-11-05
| | | | | | * gnu/build/image.scm (make-partition-image): Use 'raise' instead of 'format' when TYPE is not supported. (convert-disk-image): Remove unneeded 'begin'.
* system: reconfigure: Use the disk-installer if provided.Mathieu Othacehe2020-11-03
| | | | | | | | | | | Fixes: <https://issues.guix.gnu.org/44101>. * gnu/build/bootloader.scm (write-file-on-device): Pass 'no-fail flag instead of 'no-create. Use a latin-1 transcoder. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Add a "disk-installer" argument and use it as a fallback. (install-bootloader): Adapt accordingly. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Ditto.
* file-systems: Allow swap space lookup by UUID/label.Ludovic Courtès2020-10-30
| | | | | | | | | * gnu/build/file-systems.scm (%linux-swap-magic, %page-size): New variables. (linux-swap-superblock?, read-linux-swap-superblock) (linux-swap-superblock-uuid, linux-swap-superblock-volume-name): New procedures. (%partition-label-readers, %partition-uuid-readers): Add them.
* hurd-boot: Set /hurd/magic on /dev/fd.Ludovic Courtès2020-10-14
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add "/dev/fd".
* hurd-boot: Create /servers/crash.Ludovic Courtès2020-10-08
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators): Create /servers/crash.
* bootloader: Fix u-boot installation.Mathieu Othacehe2020-10-05
| | | | | | | | | | | | | This is a follow-up of f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa. The bootloader installation must be done on the final disk-image, hence using "disk-image-installer" instead of "installer" callback. * gnu/bootloader/u-boot.scm: Turn all installer callbacks into disk-image-installer callbacks. * gnu/build/bootloader.scm (write-file-on-device): Open the output file with 'no-truncate and 'no-create options. * gnu/system/image.scm (with-imported-modules*): Add (gnu build bootloader) module.
* linux-container: Reset jailed root permissions.Jelle Licht2020-10-01
| | | | | | * gnu/build/linux-container.scm (mount-file-systems): Add 'chmod' call. * tests/containers.scm ("call-with-container, mnt namespace, root permissions"): New test.
* secret-service: Add proper logging procedure and log to syslog.Ludovic Courtès2020-09-29
| | | | | | * gnu/build/secret-service.scm (log): New macro. (secret-service-send-secrets, secret-service-receive-secrets): Use it instead of raw 'format' calls.
* services: secret-service: Add initial client/server handshake.Ludovic Courtès2020-09-29
| | | | | | | | | | | | | | | This allows the client running on the host to know when it's actually connect to the server running in the guest. Failing that, the client would connect right away to QEMU and send secrets even though the server is not running yet in the guest, which is unreliable. * gnu/build/secret-service.scm (secret-service-send-secrets): Add #:handshake-timeout. Read from SOCK an initial message from the server. Return #f on error. (secret-service-receive-secrets): Send 'secret-service-server' message to the client. Close SOCK upon timeout. * gnu/services/virtualization.scm (hurd-vm-shepherd-service): 'start' method returns #f when 'secret-service-send-secrets' returns #f.
* secret-service: Fix file port leak in 'secret-service-send-secrets'.Ludovic Courtès2020-09-29
| | | | | * gnu/build/secret-service.scm (secret-service-send-secrets): Use 'call-with-input-file' instead of 'open-input-file'.
* secret-service: Add a timeout when waiting for a client.Ludovic Courtès2020-09-29
| | | | | | | | * gnu/build/secret-service.scm (secret-service-receive-secrets) [wait-for-client]: Call 'select' with a 60s timeout before 'accept'. Return #f upon timeout. [read-secrets]: Return FILES on success. Adjust caller of 'wait-for-client' to handle #f.
* secret-service: Clarify the origin of messages.Ludovic Courtès2020-09-29
| | | | | * gnu/build/secret-service.scm (secret-service-send-secrets) (secret-service-receive-secrets): Prefix messages by "secret service".
* image: Add support for compressed-qcow2 format.Mathieu Othacehe2020-09-29
| | | | | | | | | * gnu/build/image.scm (convert-disk-image): New procedure. (genimage): Remove target argument. * gnu/system/image.scm (system-disk-image): Add support for 'compressed-qcow2 image format. Call "convert-disk-image" to apply image conversions on the final image. Add "qemu-minimal" to the build inputs. (system-image): Also add support for 'compressed-qcow2.
* build: shepherd: Check for container support.Mathieu Othacehe2020-09-21
| | | | | | | Fixes: <https://issues.guix.gnu.org/43533>. * gnu/build/shepherd.scm (fork+exec-command/container): Check if containers are supported before joining PID namespaces.
* build: linux-container: Fix run-container.Mathieu Othacehe2020-09-10
| | | | | | | | | This is a follow-up of 5316dfc0f125b658e4a2acf7f00f49501663d943. Some users of run-container may expect that the container is jailed, even if there are no mounts. This is the case for some Guix tests. * gnu/build/linux-container.scm (run-container): Do not jail the container when the requested root is "/".
* linux-boot: Handle nfs-root device strings.Stefan2020-09-07
| | | | | | | | | | | | | * gnu/build/linux-boot.scm (device-string->file-system-device): Support nfs-root "device" strings. * gnu/build/file-systems.scm (canonicalize-device-spec): Support nfs-root "device" strings. * gnu/machine/ssh.scm (machine-check-file-system-availability): Avoid checking of NFS file systems. * gnu/system.scm (read-boot-parameters, device-sexp->device): Support nfs-root "device" strings. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
* installer: Run the installation inside a container.Mathieu Othacehe2020-09-02
| | | | | | | | | | | | | | | | | | | When the store overlay is mounted, other processes such as kmscon, udev and guix-daemon may open files from the store, preventing the underlying install support from being umounted. See: https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00161.html. To avoid this situation, mount the store overlay inside a container, and run the installation from within that container. * gnu/build/shepherd.scm (fork+exec-command/container): New procedure. * gnu/services/base.scm (guix-shepherd-service): Support an optional PID argument passed to the "start" method. If that argument is passed, ensure that guix-daemon enters the given PID MNT namespace by using fork+exec-command/container procedure. * gnu/installer/final.scm (umount-cow-store): Remove it, (install-system): run the installation from within a container. * gnu/installer/newt/final.scm (run-install-shell): Remove the display hack.
* linux-container: Do not jail the container unconditionally.Mathieu Othacehe2020-09-02
| | | | | | | | | We may want to run a container inside the MNT namespace, without jailing the container. If RUN-CONTAINER is passed a null MOUNTS list, do not jail the container. * gnu/build/linux-container.scm (run-container): Do not call MOUNT-FILE-SYSTEMS if MOUNTS list is empty.
* install: Factorize cow-store procedure.Mathieu Othacehe2020-09-02
| | | | | | | | | | Move the cow-store procedure from the service declaration in (gnu system install) to (gnu build install), so that it can be called from within a different context than Shepherd. * gnu/build/install.scm (mount-cow-store, unmount-cow-store): New procedures. * gnu/system/install.scm (make-cow-store): Remove it, (cow-store-service-type): adapt it accordingly.
* services: Add secret-service-type.Jan (janneke) Nieuwenhuizen2020-09-01
| | | | | | | | | | | | This adds a "secret-service" that can be added to a Childhurd VM to receive out-of-band secrets (keys) sent from the host. Co-authored-by: Ludovic Courtès <ludo@gnu.org> * gnu/services/virtualization.scm (secret-service-activation): New procedure. (secret-service-type): New variable. * gnu/build/secret-service.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* linux-libre: Support module compression.Mathieu Othacehe2020-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for GZIP compression for linux-libre kernel modules. The initrd modules are kept uncompressed as the initrd is already compressed as a whole. The linux-libre kernel also supports XZ compression, but as Guix does not have any available bindings for now, and the compression time is far more significant, GZIP seems to be a better option. * gnu/build/linux-modules.scm (modinfo-section-contents): Use 'call-with-gzip-input-port' to read from a module file using '.gz' extension, (strip-extension): new procedure, (dot-ko): adapt to support compression, (ensure-dot-ko): ditto, (file-name->module-name): ditto, (find-module-file): ditto, (load-linux-module*): ditto, (module-name->file-name/guess): ditto, (module-name-lookup): ditto, (write-module-name-database): ditto, (write-module-alias-database): ditto, (write-module-device-database): ditto. * gnu/installer.scm (installer-program): Add "guile-zlib" to the extensions. * gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto. * gnu/services.scm (activation-script): Ditto. * gnu/services/base.scm (default-serial-port): Ditto, (agetty-shepherd-service): ditto, (udev-service-type): ditto. * gnu/system/image.scm (gcrypt-sqlite3&co): Ditto. * gnu/system/linux-initrd.scm (flat-linux-module-directory): Add "guile-zlib" to the extensions and make sure that the initrd only contains uncompressed module files. * gnu/system/shadow.scm (account-shepherd-service): Add "guile-zlib" to the extensions. * guix/profiles.scm (linux-module-database): Ditto.
* file-system: Add mount-may-fail? option.Mathieu Othacehe2020-07-31
| | | | | | | | | | * gnu/system/file-systems.scm (<file-system>): Add a mount-may-fail? field. (file-system->spec): adapt accordingly, (spec->file-system): ditto. * gnu/build/file-systems.scm (mount-file-system): If 'system-error is raised and mount-may-fail? is true, ignore it. Otherwise, re-raise the exception. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* file-systems: Add NTFS support.Mathieu Othacehe2020-07-26
| | | | | | | | | | | | | | * gnu/system/uuid.scm (%ntfs-endianness): New macro, (ntfs-uuid->string): new procedure, (%ntfs-endianness): new variable, (string->ntfs-uuid): new exported procedure, (%uuid-parsers): add NTFS support, (%uuid-printers): add NTFS support. * gnu/build/file-systems.scm (%ntfs-endianness): New macro, (ntfs-superblock?, read-ntfs-superblock, ntfs-superblock-uuid, check-ntfs-file-system): new procedure, (%partition-uuid-readers): add NTFS support, (check-file-system): add NTFS support.
* image: Do not set journal_model=WAL for the Hurd.Jan (janneke) Nieuwenhuizen2020-07-11
| | | | | | | | | | | | | | This fixes <https://bugs.gnu.org/42151>. * gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f in call to ... * gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode? parameter, pass it to ... (register-closure): ... this, add #:wal-mode? parameter, pass it to ... * guix/store/database.scm (with-database): ... this, add #:wal-mode? parameter, pass it to ... (call-with-database): ... this, add #:wal-mode? parameter; when set to #f, do not set journal_model=WAL.
* hurd-boot: Mount /proc, add /etc/mtab.Jan (janneke) Nieuwenhuizen2020-06-27
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators): Mount /proc. Add symlink to /etc/mtab into /proc/mounts.
* hurd-boot: Remove duplicate calls to 'scope'.Jan (janneke) Nieuwenhuizen2020-06-27
| | | | | * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove duplicate calls to 'scope'.
* system: image: Remove "image-root" when building raw disk-images.Mathieu Othacehe2020-06-22
| | | | | | | | | | | | | | | | | The "image-root" derivation output is used as a temporary directory that is passed to mke2fs and mkdosfs later on. By merging the creation of this directory and the production of partition images, we can get rid of the derivation. As mke2fs and mkdosfs are not able to override file permissions, call those commands with fakeroot. This way, all the image files will be owned by root, even if image generation is done in an unprivilegded context. * gnu/system/image.scm (system-disk-image): Merge "image-root" and "iso9660-image" derivations so that we spare an extra derivation. Also add "fakeroot" and its runtime dependencies to the inputs. * gnu/build/image.scm (make-ext-image, make-vfat-image): Make sure that mke2fs and mkdosfs are respectively called by fakeroot.
* hurd-boot: Use 'setxattr' instead of invoking settrans.Jan (janneke) Nieuwenhuizen2020-06-19
| | | | | | | | | | Note: Using `getxattr' on the Hurd instead of running showtrans does not work (yet?). * gnu/build/hurd-boot.scm (setup-translator): Use 'setxattr' instead of invoking settrans. * gnu/system.scm (hurd-multiboot-modules): Add --x-xattr-translator-records to enable xattr-embedding of translators.
* hurd-boot: Create individual translators instead of running MAKEDEV.Jan (janneke) Nieuwenhuizen2020-06-19
| | | | | | | | | * gnu/build/hurd-boot.scm (make-hurd-device-nodes): Do not create dev/{null,zero,full,random,urandom} mount points. (passive-translator-xattr?, passive-translator-installed?, translated?, set-translator, set-hurd-device-translators): New procedures. (false-if-EEXIST): New macro. (boot-hurd-system): Use them instead of running MAKEDEV.
* 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.
* shepherd: 'read-pid-file/container' terminates the whole process group.Ludovic Courtès2020-06-12
| | | | | | | | This mirrors a change made in the Shepherd 0.8.0. Previously, upon startup failure, we could have left processes behind. * gnu/build/shepherd.scm (read-pid-file/container): Kill (- PID) instead of PID.
* shepherd: Unblock signals in the child process.Ludovic Courtès2020-06-12
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/41791>. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. This change mirrors changes made in the Shepherd 0.8.1, where signals are blocked in the shepherd process in support of 'signalfd'. The regression was introduced with the switch to 0.8.1 in 3f9c62d1a8b345909adaeb22f454ad22554c55a1: child processes would not receive SIGTERM upon 'herd stop SERVICE'. * gnu/build/shepherd.scm <top level>: Autoload (shepherd system). (make-forkexec-constructor/container): Call call to 'sigaction' and 'unblock-signals'.
* activation: Fix function call for system activationRoyce Strange2020-06-09
| | | | | | | * gnu/build/activation.scm (boot-time-system): Evaluate the linux-command-line thunk for linux systems to boot Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build: image: Do not call make-essential-device-nodes by default.Mathieu Othacehe2020-06-09
| | | | | | | | Calling "mknod" without root permissions fails. Plus those device nodes do not appear to be needed to boot. * gnu/build/image.scm (initialize-root-partition): Do not use make-essential-device-nodes as default make-device-nodes procedure.
* gnu: services: Add %hurd-startup-service.Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | | | | | | | | | | This decouples startup of the Hurd from the "hurd" package, moving the RC script into SYSTEM. * gnu/packages/hurd.scm (hurd)[inputs]: Remove hurd-rc-script. [arguments]: Do not substitute it. Update "runsystem.sh" to parse kernel arguments and exec into --system=SYSTEM/rc. (hurd-rc-script): Move to... * gnu/services.scm (%hurd-rc-file): ...this new variable. (hurd-rc-entry): New procedure. (%hurd-startup-service): Use it in new variable. * gnu/system.scm (hurd-default-essential-services): Use it.
* hurd-boot: Further cleanup of "rc".Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | | | * gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ... * gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file. * gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* system: Support activation service for the Hurd.Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | | | * gnu/build/activation.scm (boot-time-system): Use "command-line" for the Hurd. * gnu/system.scm (hurd-default-essential-services): Add %boot-service and %activation-service.
* image: Add Hurd support.Mathieu Othacehe2020-06-08
| | | | | | | * gnu/system/image.scm (hurd-disk-image): New exported variable, (root-offset, root-label): new variables, (esp-partition, root-partition): adapt accordingly, (find-image): add Hurd support.
* linux-boot: Update 'make-hurd-device-nodes'.Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | * gnu/build/linux-boot.scm (make-hurd-device-nodes): Avoid de-duplication of device mount points; also create mount points for /servers/.
* 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.
* build: image: Fix initialize-efi-partition docstring.Mathieu Othacehe2020-05-29
| | | | | * gnu/build/image.scm (initialize-efi-partition): Turn BOOTLOADER-PACKAGE into GRUB-EFI.
* image: Use grub-efi to install the EFI bootloader.Mathieu Othacehe2020-05-29
| | | | | | | * gnu/build/image.scm (initialize-efi-partition): Rename bootloader-package argument to grub-efi. * gnu/system/image.scm (system-disk-image): Adapt accordingly to pass grub-efi package.
* image: Add bootloader installation support.Mathieu Othacehe2020-05-29
| | | | | | | * gnu/build/image.scm (initialize-root-partition): Add bootloader-package and bootloader-installer arguments. Run the bootloader-installer if defined. * gnu/system/image.scm (system-disk-image): Adapt the partition initializer call accordingly.
* image: Add partition file-system options support.Mathieu Othacehe2020-05-26
| | | | | | | | * gnu/image.scm (<partition>)[file-system-options]: New field, (partition-file-system-options): new exported procedure. * gnu/system/image.scm (partition->gexp): Adapt accordingly. * gnu/build/image.scm (sexp->partition): Also adapt accordingly, (make-ext-image): and pass file-system options to mke2fs.
* build: image: Add support for EXT2 and EXT3 file-systems.Mathieu Othacehe2020-05-26
| | | | | | | * gnu/build/image.scm (make-ext4-image): Rename to ... (make-ext-image): ... it, and pass the file-system type to mke2fs, (make-partition-image): Adapt to call "make-ext-image" if the partition file-system is prefixed by "ext".