From ad911c832178216b0121c6ecb8349d1a9d68526f Mon Sep 17 00:00:00 2001 From: Rovanion Luckey Date: Tue, 15 Dec 2020 12:33:12 +0100 Subject: doc: Running Guix Before It Is Installed: mention ./bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/contributing.texi (Running Guix Before It Is Installed): Instruct user to run ./bootstrap before ./configure. Signed-off-by: Jakub Kądziołka --- doc/contributing.texi | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'doc') diff --git a/doc/contributing.texi b/doc/contributing.texi index 4195cb4105..d0ab08336a 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -166,14 +166,15 @@ actually installing them. So that you can distinguish between your ``end-user'' hat and your ``motley'' costume. To that end, all the command-line tools can be used even if you have not -run @code{make install}. To do that, you first need to have an environment -with all the dependencies available (@pxref{Building from Git}), and then -simply prefix each command with -@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the -top build tree of Guix; it is generated by @command{./configure}). -As an example, here is how you would build the @code{hello} package as -defined in your working tree (this assumes @command{guix-daemon} is -already running on your system; it's OK if it's a different version): +run @code{make install}. To do that, you first need to have an +environment with all the dependencies available (@pxref{Building from +Git}), and then simply prefix each command with @command{./pre-inst-env} +(the @file{pre-inst-env} script lives in the top build tree of Guix; it +is generated by running @command{./bootstrap} followed by +@command{./configure}). As an example, here is how you would build the +@code{hello} package as defined in your working tree (this assumes +@command{guix-daemon} is already running on your system; it's OK if it's +a different version): @example $ ./pre-inst-env guix build hello -- cgit v1.2.3 From 6c3690fc572bf3231ae60743671b357ffd243017 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 Jan 2021 16:43:20 +0100 Subject: guix system: Add '--graph-backend'. * guix/scripts/system.scm (lookup-backend): New procedure. (export-extension-graph, export-shepherd-graph): Add #:backend parameter and honor it. (show-help, %options): Add "--graph-backend". (%default-options): Add 'graph-backend'. (process-action): Pass #:backend to 'export-extension-graph' and 'export-shepherd-graph'. * doc/guix.texi (Invoking guix system): Document '--graph-backend'. --- doc/guix.texi | 13 +++++++++---- guix/scripts/system.scm | 43 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 13 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 1081ed26a3..0f6e95a65a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21,7 +21,7 @@ @set SUBSTITUTE-URL https://@value{SUBSTITUTE-SERVER} @copying -Copyright @copyright{} 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès@* +Copyright @copyright{} 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès@* Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@* Copyright @copyright{} 2013 Nikita Karetnikov@* Copyright @copyright{} 2014, 2015, 2016 Alex Kost@* @@ -31548,10 +31548,12 @@ each other: @table @code @item extension-graph -Emit in Dot/Graphviz format to standard output the @dfn{service +Emit to standard output the @dfn{service extension graph} of the operating system defined in @var{file} (@pxref{Service Composition}, for more information on service -extensions). +extensions). By default the output is in Dot/Graphviz format, but you +can choose a different format with @option{--graph-backend}, as with +@command{guix graph} (@pxref{Invoking guix graph, @option{--backend}}): The command: @@ -31563,11 +31565,14 @@ shows the extension relations among services. @anchor{system-shepherd-graph} @item shepherd-graph -Emit in Dot/Graphviz format to standard output the @dfn{dependency +Emit to standard output the @dfn{dependency graph} of shepherd services of the operating system defined in @var{file}. @xref{Shepherd Services}, for more information and for an example graph. +Again, the default output format is Dot/Graphviz, but you can pass +@option{--graph-backend} to select a different one. + @end table @node Invoking guix deploy diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 0dcf2b3afe..51c8cf2f76 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016, 2017, 2018 Chris Marusich ;;; Copyright © 2017, 2019 Mathieu Othacehe @@ -48,7 +48,8 @@ #:autoload (guix scripts package) (delete-generations delete-matching-generations) #:autoload (guix scripts pull) (channel-commit-hyperlink) - #:use-module (guix graph) + #:autoload (guix graph) (export-graph node-type + graph-backend-name %graph-backends) #:use-module (guix scripts graph) #:use-module (guix scripts system reconfigure) #:use-module (guix build utils) @@ -887,18 +888,28 @@ Run 'herd status' to view the list of services on your system.\n")))))) (register-root* (list output) gc-root)) (return output))))))))) -(define (export-extension-graph os port) - "Export the service extension graph of OS to PORT." +(define (lookup-backend name) ;TODO: factorize + "Return the graph backend called NAME. Raise an error if it is not found." + (or (find (lambda (backend) + (string=? (graph-backend-name backend) name)) + %graph-backends) + (leave (G_ "~a: unknown backend~%") name))) + +(define* (export-extension-graph os port + #:key (backend (lookup-backend "graphviz"))) + "Export the service extension graph of OS to PORT using BACKEND." (let* ((services (operating-system-services os)) (system (find (lambda (service) (eq? (service-kind service) system-service-type)) services))) (export-graph (list system) (current-output-port) + #:backend backend #:node-type (service-node-type services) #:reverse-edges? #t))) -(define (export-shepherd-graph os port) - "Export the graph of shepherd services of OS to PORT." +(define* (export-shepherd-graph os port + #:key (backend (lookup-backend "graphviz"))) + "Export the graph of shepherd services of OS to PORT using BACKEND." (let* ((services (operating-system-services os)) (pid1 (fold-services services #:target-type shepherd-root-service-type)) @@ -907,6 +918,7 @@ Run 'herd status' to view the list of services on your system.\n")))))) (null? (shepherd-service-requirement service))) shepherds))) (export-graph sinks (current-output-port) + #:backend backend #:node-type (shepherd-service-node-type shepherds) #:reverse-edges? #t))) @@ -1014,6 +1026,10 @@ Some ACTIONS support additional ARGS.\n")) (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) (newline) + (display (G_ " + --graph-backend=BACKEND + use BACKEND for 'extension-graphs' and 'shepherd-graph'")) + (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " @@ -1109,6 +1125,9 @@ Some ACTIONS support additional ARGS.\n")) (option '(#\r "root") #t #f (lambda (opt name arg result) (alist-cons 'gc-root arg result))) + (option '("graph-backend") #t #f + (lambda (opt name arg result) + (alist-cons 'graph-backend arg result))) %standard-build-options)) (define %default-options @@ -1128,7 +1147,8 @@ Some ACTIONS support additional ARGS.\n")) (image-size . guess) (install-bootloader? . #t) (label . #f) - (volatile-root? . #f))) + (volatile-root? . #f) + (graph-backend . "graphviz"))) (define (verbosity-level opts) "Return the verbosity level based on OPTS, the alist of parsed options." @@ -1191,6 +1211,9 @@ resulting from command-line parsing." (bootloader-configuration-target (operating-system-bootloader os))))) + (define (graph-backend) + (lookup-backend (assoc-ref opts 'graph-backend))) + (with-store store (set-build-options-from-command-line store opts) @@ -1205,9 +1228,11 @@ resulting from command-line parsing." (set-guile-for-build (default-guile)) (case action ((extension-graph) - (export-extension-graph os (current-output-port))) + (export-extension-graph os (current-output-port) + #:backend (graph-backend))) ((shepherd-graph) - (export-shepherd-graph os (current-output-port))) + (export-shepherd-graph os (current-output-port) + #:backend (graph-backend))) (else (unless (memq action '(build init)) (warn-about-old-distro #:suggested-command -- cgit v1.2.3 From 8480c65bb7e5e73345d5ca355d0a137796efa078 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Mon, 4 Jan 2021 15:21:55 -0500 Subject: doc: Link to "Keyboard Layout" in "operating-system Reference" * doc/guix.texi (operating-system Reference): Link to the "Keyboard Layout" node. Signed-off-by: Mathieu Othacehe --- doc/guix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 0f6e95a65a..884224fce6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13359,7 +13359,8 @@ The default label includes the kernel name and version. @item @code{keyboard-layout} (default: @code{#f}) This field specifies the keyboard layout to use in the console. It can be either @code{#f}, in which case the default keyboard layout is used (usually -US English), or a @code{} record. +US English), or a @code{} record. @xref{Keyboard Layout}, +for more information. This keyboard layout is in effect as soon as the kernel has booted. For instance, it is the keyboard layout in effect when you type a passphrase if -- cgit v1.2.3