From a6c1fe824002d022ff3ba7c8b93987965db29641 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 12 Jul 2017 15:41:49 +0200 Subject: size: Add '--sort=KEY'. * guix/scripts/size.scm (profile-closure Date: Sun, 11 Jun 2017 12:58:38 +0200 Subject: bootloader: Add u-boot. * gnu/bootloader/u-boot.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi: Document it. --- doc/guix.texi | 8 ++++---- gnu/bootloader/u-boot.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 gnu/bootloader/u-boot.scm (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index dc764cc292..ecf9617725 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15931,10 +15931,10 @@ The type of a bootloader configuration declaration. @cindex UEFI, bootloader @cindex BIOS, bootloader The bootloader to use, as a @code{bootloader} object. For now -@code{grub-bootloader}, @code{grub-efi-bootloader} and -@code{extlinux-bootloader} are supported. @code{grub-efi-bootloader}, -allows to boot on modern systems using the @dfn{Unified Extensible -Firmware Interface} (UEFI). +@code{grub-bootloader}, @code{grub-efi-bootloader}, +@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported. +@code{grub-efi-bootloader} allows to boot on modern systems using the +@dfn{Unified Extensible Firmware Interface} (UEFI). Available bootloaders are described in @code{(gnu bootloader @dots{})} modules. diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm new file mode 100644 index 0000000000..963b0d7597 --- /dev/null +++ b/gnu/bootloader/u-boot.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu bootloader u-boot) + #:use-module (gnu bootloader extlinux) + #:use-module (gnu bootloader) + #:use-module (gnu system) + #:use-module (gnu packages bootloaders) + #:use-module (guix gexp) + #:use-module (guix monads) + #:use-module (guix records) + #:use-module (guix utils) + #:export (u-boot-bootloader)) + +(define install-u-boot + #~(lambda (bootloader device mount-point) + (if bootloader + (error "Failed to install U-Boot")))) + + + +;;; +;;; Bootloader definitions. +;;; + +(define u-boot-bootloader + (bootloader + (inherit extlinux-bootloader) + (name 'u-boot) + (package #f) + (installer install-u-boot))) diff --git a/gnu/local.mk b/gnu/local.mk index 1ced658911..b79bc1992c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -40,6 +40,7 @@ GNU_SYSTEM_MODULES = \ %D%/bootloader.scm \ %D%/bootloader/grub.scm \ %D%/bootloader/extlinux.scm \ + %D%/bootloader/u-boot.scm \ %D%/packages.scm \ %D%/packages/abduco.scm \ %D%/packages/abiword.scm \ -- cgit v1.2.3 From 457103b90bba42d4eaf508031044548c3ba95723 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 20 Jul 2017 15:18:06 +0200 Subject: doc: Discuss when to run a GC. * doc/guix.texi (Invoking guix gc): Add a paragraph on when to run a GC. --- doc/guix.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index ecf9617725..dbdd9b5ff5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2315,6 +2315,22 @@ package builds referenced by those generations can be reclaimed. This is achieved by running @code{guix package --delete-generations} (@pxref{Invoking guix package}). +Our recommendation is to run a garbage collection periodically, or when +you are short on disk space. For instance, to guarantee that at least +5@tie{}GB are available on your disk, simply run: + +@example +guix gc -F 5G +@end example + +It is perfectly safe to run as a non-interactive periodic job +(@pxref{Scheduled Job Execution}, for how to set up such a job on +GuixSD). Running @command{guix gc} with no arguments will collect as +much garbage as it can, but that is often inconvenient: you may find +yourself having to rebuild or re-download software that is ``dead'' from +the GC viewpoint but that is necessary to build other pieces of +software---e.g., the compiler tool chain. + The @command{guix gc} command has three modes of operation: it can be used to garbage-collect any dead files (the default), to delete specific files (the @code{--delete} option), to print garbage-collector -- cgit v1.2.3 From dbfcadfc304bf2dab73f4e88377e7fe902e1ca72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 20 Jul 2017 17:05:07 +0200 Subject: doc: Show the "git clone" command. Suggested by Joshua Branson . * doc/contributing.texi (Building from Git): Add "git clone" command. --- doc/contributing.texi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index 0073f24518..00edd47710 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -31,7 +31,13 @@ choice. @section Building from Git If you want to hack Guix itself, it is recommended to use the latest -version from the Git repository. When building Guix from a checkout, +version from the Git repository: + +@example +git clone https://git.savannah.gnu.org/git/guix.git +@end example + +When building Guix from a checkout, the following packages are required in addition to those mentioned in the installation instructions (@pxref{Requirements}). -- cgit v1.2.3 From c95644f0172ba87822ee7ecee3d2743ebd2c84bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 21 Jul 2017 17:02:19 +0200 Subject: publish: Make the cache eviction policy less aggressive. Suggested by Mark H Weaver . * guix/scripts/publish.scm (nar-expiration-time): New procedure. (render-narinfo/cached): Use it as the #:entry-expiration passed to 'maybe-remove-expired-cache-entries'. --- doc/guix.texi | 3 ++- guix/scripts/publish.scm | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index dbdd9b5ff5..875c1ffa26 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6960,7 +6960,8 @@ guarantee that the store items it provides will indeed remain available for as long as @var{ttl}. Additionally, when @option{--cache} is used, cached entries that have -not been accessed for @var{ttl} may be deleted. +not been accessed for @var{ttl} and that no longer have a corresponding +item in the store, may be deleted. @item --nar-path=@var{path} Use @var{path} as the prefix for the URLs of ``nar'' files diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index cd57b13dc3..ade3c49a54 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -385,6 +385,24 @@ at a time." (string-suffix? ".narinfo" file))) '())) +(define (nar-expiration-time ttl) + "Return the narinfo expiration time (in seconds since the Epoch). The +expiration time is +inf.0 when passed an item that is still in the store; in +other cases, it is the last-access time of the item plus TTL. + +This policy allows us to keep cached nars that correspond to valid store +items. Failing that, we could eventually have to recompute them and return +404 in the meantime." + (let ((expiration-time (file-expiration-time ttl))) + (lambda (file) + (let ((item (string-append (%store-prefix) "/" + (basename file ".narinfo")))) + ;; Note: We don't need to use 'valid-path?' here because FILE would + ;; not exist if ITEM were not valid in the first place. + (if (file-exists? item) + +inf.0 + (expiration-time file)))))) + (define* (render-narinfo/cached store request hash #:key ttl (compression %no-compression) (nar-path "nar") @@ -436,7 +454,7 @@ requested using POOL." (maybe-remove-expired-cache-entries cache narinfo-files #:entry-expiration - (file-expiration-time ttl) + (nar-expiration-time ttl) #:delete-entry delete-entry #:cleanup-period ttl)))) (not-found request -- cgit v1.2.3 From c800fd564b9dc37f1fb95fa5f49230b4865f0541 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 13 Jul 2017 11:34:26 +0200 Subject: services: cuirass: Add fallback parameter. * gnu/services/cuirass.scm ()[fallback?]: New field. (cuirass-shepherd-service): Take it into account. * doc/guix.texi (Continuous Integration): Document it. --- doc/guix.texi | 4 ++++ gnu/services/cuirass.scm | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 875c1ffa26..dfa1e22fcc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -14773,6 +14773,10 @@ from source. @item @code{one-shot?} (default: @code{#f}) Only evaluate specifications and build derivations once. +@item @code{fallback?} (default: @code{#f}) +When substituting a pre-built binary fails, fall back to building +packages locally. + @item @code{load-path} (default: @code{'()}) This allows users to define their own packages and make them visible to cuirass as in @command{guix build} command. diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 88a9a86111..d27a2bbc44 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -66,6 +66,8 @@ (default #f)) (one-shot? cuirass-configuration-one-shot? ;boolean (default #f)) + (fallback? cuirass-configuration-fallback? ;boolean + (default #f)) (load-path cuirass-configuration-load-path (default '()))) @@ -84,6 +86,7 @@ (specs (cuirass-configuration-specifications config)) (use-substitutes? (cuirass-configuration-use-substitutes? config)) (one-shot? (cuirass-configuration-one-shot? config)) + (fallback? (cuirass-configuration-fallback? config)) (load-path (cuirass-configuration-load-path config))) (list (shepherd-service (documentation "Run Cuirass.") @@ -99,6 +102,7 @@ "--interval" #$(number->string interval) #$@(if use-substitutes? '("--use-substitutes") '()) #$@(if one-shot? '("--one-shot") '()) + #$@(if fallback? '("--fallback") '()) #$@(if (null? load-path) '() `("--load-path" ,(string-join load-path ":")))) #:user #$user -- cgit v1.2.3