1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-07-10 12:24:08 +02:00

Compare commits

...

15 Commits

Author SHA1 Message Date
Ludovic Courtès d62c9b2671 Update NEWS. 2020-04-15 00:02:23 +02:00
Ludovic Courtès 8aa752ba22 services: shepherd: Increase the PID file timeout to 30s.
When running the installation image off a DVD, early I/O operations are
extremely slow, to the point that something like dbus-daemon would need
~20s to start.  This change works around the issue.

Fixes <https://bugs.gnu.org/40572>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/services/shepherd.scm (shepherd-configuration-file): Set
%pid-file-timeout to 30.
2020-04-15 00:02:23 +02:00
Ludovic Courtès bd4c345ef7 doc: Improve anchor collection.
This allows us to catch "operating_002dsystem-1", for instance.

* doc/build.scm (syntax-highlighted-html)[build](anchor-id->key): Drop
"-1" & co. from ID.
2020-04-14 16:01:53 +02:00
Ludovic Courtès 4487e42cba doc: Avoid invalid 'match' pattern in 'syntax-highlighted-html'.
This is a followup to da9deba13d.

Last-minute modification of the 'match' pattern would lead to an error:

  "multiple ellipsis patterns not allowed at same level"

* doc/build.scm (syntax-highlighted-html)[build](collect-anchors):
Add 'worthy-entry?' procedure and use it instead of the unsupported
pattern for ('dt ...).
2020-04-14 16:01:45 +02:00
Ludovic Courtès f37789a523 doc: Emit hyperlinks in HTML output for @lisp snippets.
This makes it easier to jump to the definition of a procedure or
variable when looking at a code snippet.  There can be false-positive
because scoping rules are ignored, for example, but it should be a good
approximation.

* doc/build.scm (syntax-highlighted-html)[build](highlights->sxml*): Add
'anchors' parameter.  Add clause for ('symbol text).
(syntax-highlight): Add 'anchors' parameter.  Wrap body in named let and
use it in recursive calls.  Pass ANCHORS to 'highlights->sxml*'.
(underscore-decode, anchor-id->key, collect-anchors, html?): New procedures.
(process-file): Add 'anchors' parameter. and honor it.
Rewrite mono-node and multi-node HTML files separately.
2020-04-14 16:01:39 +02:00
Ludovic Courtès 1ae7a9251b weather: Delete duplicate entries coming from '--manifest'.
* guix/scripts/weather.scm (load-manifest): Call 'delete-duplicates'.
2020-04-14 16:01:05 +02:00
Ludovic Courtès bab1f340b3 maint: Ensure substitutes are available for '%default-xorg-modules'.
* etc/release-manifest.scm (%system-packages): Append
%DEFAULT-XORG-MODULES.
2020-04-14 16:01:05 +02:00
Ludovic Courtès 8e8d984fd6 maint: Actually check for the availablility of system packages.
* etc/release-manifest.scm (%system-manifest): New variable.
<top level>: Add it in 'concatenate-manifests' call.
2020-04-14 16:01:05 +02:00
Florian Pelz 0ad60b2a89 installer: Only load uvesafb kernel module when needed.
This is a follow-up to commit 557e6820a7.

* gnu/system/install.scm (uvesafb-shepherd-service): Check
that /dev/fb0 is not already present.
2020-04-14 13:05:57 +00:00
Ludovic Courtès 2b29219370 nls: Update. 2020-04-14 13:01:58 +02:00
Ludovic Courtès 893651af3e installer: Open manual in the selected language on tty2.
Fixes <https://bugs.gnu.org/40624>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

Regression introduced in b5c2d93d7a.

* gnu/installer.scm (apply-locale): Remove 'lambda' around
'stop-service' and 'start-service' calls.
2020-04-14 13:01:58 +02:00
Florian Pelz 8e4d1493f1 services: kernel-module-loader: Clean up.
Suggested by Efraim Flashner <efraim@flashner.co.il>.
See <https://lists.gnu.org/archive/html/bug-guix/2020-04/msg00237.html>.

* gnu/services/linux.scm (kernel-module-loader-shepherd-service):
Remove unneeded 'respawn?' field.
2020-04-12 18:24:27 +00:00
Ludovic Courtès 6945c43754 Update NEWS. 2020-04-12 17:05:21 +02:00
Ludovic Courtès 2033cf19e6 gnu: guix: Update to 9d0d27f. 2020-04-12 03:33:13 +02:00
Ludovic Courtès 9d0d27fd88 gnu: guix: Update to 1.1.0rc2. 2020-04-12 00:38:43 +02:00
11 changed files with 9295 additions and 4568 deletions
+42 -3
View File
@@ -39,22 +39,51 @@ Please send Guix bug reports to bug-guix@gnu.org.
*** guix archive has a new -t option to list archive contents
*** guix describe and similar commands emit terminal hyperlinks
*** guix build now attempts to substitute missing .drv files
*** guix package etc. now lock the profile they operate on
*** guix pull honors /etc/guix/channels.scm when it exists
*** New guix show command, synonymous with guix package --show
*** The --manifest option can be repeated to combine manifests
*** Some commands previously lacking --load-path now support it
** Distribution
*** The set of pre-built bootstrap “binary seeds” has been halved
*** Graphical installer has better support for non-Latin keyboard layouts
*** Graphical installer allows users to choose an HTTP/HTTPS proxy
*** Graphical installer allows users to edit the system configuration
*** New kernel-loadable-modules field in operating-system
*** rottlog service is now part of %base-services
*** %base-services now includes /usr/bin/env as a “special file”
*** herd set-http-proxy guix-daemon URL can be used to set a proxy
*** New services: provenance, XXX
*** XXX new packages
*** XXX package updates
*** qemu-binfmt service now supports riscv32 and riscv64
*** File system UUIDs and labels are now supported for JFS
*** New services
auditd, fontconfig-file-system, getmail, gnome-keyring, kernel-module-loader,
knot-resolver, mumi, nfs, nftables, nix, pagekite, pam-mount, patchwork,
polkit-wheel, provenance, pulseaudio, sane, singularity, usb-modeswitch
*** 3514 new packages
*** 3368 package updates
Noteworthy updates:
bash 5.0.7, binutils 2.32, cups 2.3.1, emacs 26.3, enlightenment 0.23.1,
gcc-toolchain 9.3.0, gdb 9.1, ghc 8.6.5, gimp 2.10.18, glibc 2.29,
gnome 3.32.2, gnupg 2.2.20, go 1.13.9, guile 2.2.7,
icecat 68.7.0-guix0-preview1, icedtea 3.7.0, julia 1.3.1,
libreoffice 6.4.2.2, linux-libre 5.4.31, mate 1.24.0, ocaml 4.09.0,
octave 5.2.0, openjdk 12.33, perl 5.30.0, python2 2.7.16, python 3.7.4,
racket 7.6, rust 1.39.0, r 3.6.3, sbcl 2.0.3, shepherd 0.7.0, xfce 4.14.0,
xorg-server 1.20.7
** Programming interfaces
*** New build systems
copy-build-system, julia-build-system, node-build-system, qt-build-system
*** New with-build-handler and map/accumulate-builds in (guix store)
*** (guix gexp) has a new with-parameters form
*** New (guix remote) module for remote evaluation of gexps
*** New eval/container procedure in (gnu system linux-container)
*** (guix inferior) now reifies exceptions as &inferior-exception
*** (guix cve) uses the new NIST-provided JSON files instead of XML
*** New (guix json) module to map JSON objects to Scheme records
@@ -115,6 +144,16 @@ Please send Guix bug reports to bug-guix@gnu.org.
*** Files produced by syslogd are no longer world-readable
(<https://issues.guix.gnu.org/issue/40405>)
** Native language support
*** Updated translations of the manual
The manual is fully translated into Spanish, more than 85% complete in French
and German, and has preliminary translations into Russian and Chinese.
*** Updated translations of messages
This version of Guix is fully translated in Brazilian Portuguese, French,
German, and Spanish, and partially translated in 10 other languages.
* Changes in 1.0.1 (since 1.0.0)
** Package management
+144 -32
View File
@@ -220,8 +220,11 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(syntax-highlight scheme)
(syntax-highlight lexers)
(guix build utils)
(srfi srfi-1)
(srfi srfi-26)
(ice-9 match)
(ice-9 threads))
(ice-9 threads)
(ice-9 vlist))
(define (pair-open/close lst)
;; Pair 'open' and 'close' tags produced by 'highlights' and
@@ -255,10 +258,11 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
level (reverse result)))
(values (reverse result) "" '())))))
(define (highlights->sxml* highlights)
(define (highlights->sxml* highlights anchors)
;; Like 'highlights->sxml', but handle nested 'paren tags. This
;; allows for paren matching highlights via appropriate CSS
;; "hover" properties.
;; "hover" properties. When a symbol is encountered, look it up
;; in ANCHORS, a vhash, and emit the corresponding href, if any.
(define (tag->class tag)
(string-append "syntax-" (symbol->string tag)))
@@ -269,8 +273,16 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(number->string level))))
,open
(span (@ (class "syntax-symbol"))
,@(highlights->sxml* body))
,@(highlights->sxml* body anchors))
,close))
(('symbol text)
;; Check whether we can emit a hyperlink for TEXT.
(match (vhash-assoc text anchors)
(#f
`(span (@ (class ,(tag->class 'symbol))) ,text))
((_ . target)
`(a (@ (class ,(tag->class 'symbol)) (href ,target))
,text))))
((tag text)
`(span (@ (class ,(tag->class tag))) ,text)))
highlights))
@@ -301,35 +313,109 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(pk 'unsupported-code-snippet something)
(primitive-exit 1)))))
(define (syntax-highlight sxml)
(define (syntax-highlight sxml anchors)
;; Recurse over SXML and syntax-highlight code snippets.
(match sxml
(('*TOP* decl body ...)
`(*TOP* ,decl ,@(map syntax-highlight body)))
(('head things ...)
`(head ,@things
(link (@ (rel "stylesheet")
(type "text/css")
(href #$syntax-css-url)))))
(('pre ('@ ('class "lisp")) code-snippet ...)
`(pre (@ (class "lisp"))
,@(highlights->sxml*
(pair-open/close
(highlight lex-scheme
(concatenate-snippets code-snippet))))))
((tag ('@ attributes ...) body ...)
`(,tag (@ ,@attributes) ,@(map syntax-highlight body)))
((tag body ...)
`(,tag ,@(map syntax-highlight body)))
((? string? str)
str)))
(let loop ((sxml sxml))
(match sxml
(('*TOP* decl body ...)
`(*TOP* ,decl ,@(map loop body)))
(('head things ...)
`(head ,@things
(link (@ (rel "stylesheet")
(type "text/css")
(href #$syntax-css-url)))))
(('pre ('@ ('class "lisp")) code-snippet ...)
`(pre (@ (class "lisp"))
,@(highlights->sxml*
(pair-open/close
(highlight lex-scheme
(concatenate-snippets code-snippet)))
anchors)))
((tag ('@ attributes ...) body ...)
`(,tag (@ ,@attributes) ,@(map loop body)))
((tag body ...)
`(,tag ,@(map loop body)))
((? string? str)
str))))
(define (process-html file)
(define (underscore-decode str)
;; Decode STR, an "underscore-encoded" string as produced by
;; makeinfo for indexes, such as "_0025base_002dservices" for
;; "%base-services".
(let loop ((str str)
(result '()))
(match (string-index str #\_)
(#f
(string-concatenate-reverse (cons str result)))
(index
(let ((char (string->number
(substring str (+ index 1) (+ index 5))
16)))
(loop (string-drop str (+ index 5))
(append (list (string (integer->char char))
(string-take str index))
result)))))))
(define (anchor-id->key id)
;; Convert ID, an anchor ID such as
;; "index-pam_002dlimits_002dservice" to the corresponding key,
;; "pam-limits-service" in this example. Drop the suffix of
;; duplicate anchor IDs like "operating_002dsystem-1".
(let ((id (if (any (cut string-suffix? <> id)
'("-1" "-2" "-3" "-4" "-5"))
(string-drop-right id 2)
id)))
(underscore-decode
(string-drop id (string-length "index-")))))
(define* (collect-anchors file #:optional (vhash vlist-null))
;; Collect the anchors that appear in FILE, a makeinfo-generated
;; file. Grab those from <dt> tags, which corresponds to
;; Texinfo @deftp, @defvr, etc. Return VHASH augmented with
;; more name/reference pairs.
(define string-or-entity?
(match-lambda
((? string?) #t)
(('*ENTITY* _ ...) #t)
(_ #f)))
(define (worthy-entry? lst)
;; Attempt to match:
;; Scheme Variable: <strong>x</strong>
;; but not:
;; <code>cups-configuration</code> parameter: …
(let loop ((lst lst))
(match lst
(((? string-or-entity?) rest ...)
(loop rest))
((('strong _ ...) _ ...)
#t)
(_ #f))))
(let ((shtml (call-with-input-file file html->shtml)))
(let loop ((shtml shtml)
(vhash vhash))
(match shtml
(('dt ('@ ('id id)) rest ...)
(if (and (string-prefix? "index-" id)
(worthy-entry? rest))
(vhash-cons (anchor-id->key id)
(string-append (basename file)
"#" id)
vhash)
vhash))
((tag ('@ _ ...) body ...)
(fold loop vhash body))
((tag body ...)
(fold loop vhash body))
(_ vhash)))))
(define (process-html file anchors)
;; Parse FILE and perform syntax highlighting for its Scheme
;; snippets. Install the result to #$output.
(format (current-error-port) "processing ~a...~%" file)
(let* ((shtml (call-with-input-file file html->shtml))
(highlighted (syntax-highlight shtml))
(highlighted (syntax-highlight shtml anchors))
(base (string-drop file (string-length #$input)))
(target (string-append #$output base)))
(mkdir-p (dirname target))
@@ -352,17 +438,43 @@ its <pre class=\"lisp\"> blocks (as produced by 'makeinfo --html')."
(pk 'error-link file target (strerror errno))
(primitive-exit 3))))))
(define (html? file stat)
(string-suffix? ".html" file))
;; Install a UTF-8 locale so we can process UTF-8 files.
(setenv "GUIX_LOCPATH"
#+(file-append glibc-utf8-locales "/lib/locale"))
(setlocale LC_ALL "en_US.utf8")
;; First process the mono-node 'guix.html' files.
(n-par-for-each (parallel-job-count)
(lambda (file)
(if (string-suffix? ".html" file)
(process-html file)
(copy-as-is file)))
(find-files #$input))))))
(lambda (mono)
(let ((anchors (collect-anchors mono)))
(process-html mono anchors)))
(find-files #$input "^guix(\\.[a-zA-Z_-]+)?\\.html$"))
;; Next process the multi-node HTML files in two phases: (1)
;; collect the list of anchors, and (2) perform
;; syntax-highlighting.
(let* ((multi (find-files #$input "^html_node$"
#:directories? #t))
(anchors (n-par-map (parallel-job-count)
(lambda (multi)
(cons multi
(fold collect-anchors vlist-null
(find-files multi html?))))
multi)))
(n-par-for-each (parallel-job-count)
(lambda (file)
(let ((anchors (assoc-ref anchors (dirname file))))
(process-html file anchors)))
(append-map (lambda (multi)
(find-files multi html?))
multi)))
;; Last, copy non-HTML files as is.
(for-each copy-as-is
(find-files #$input (negate html?)))))))
(computed-file name build))
+20 -10
View File
@@ -23,6 +23,7 @@
(guix packages)
(guix profiles)
((gnu ci) #:select (%cross-targets))
((gnu services xorg) #:select (%default-xorg-modules))
(guix utils)
(srfi srfi-1)
(srfi srfi-26))
@@ -49,16 +50,17 @@ TARGET."
(define %system-packages
;; Key packages proposed by the Guix System installer.
(map specification->package
'("xorg-server" "xfce" "gnome" "mate" "enlightenment"
"openbox" "awesome" "i3-wm" "ratpoison"
"xlockmore" "slock" "libreoffice"
"connman" "network-manager" "network-manager-applet"
"openssh" "ntp" "tor"
"linux-libre" "grub-hybrid"
;; FIXME: Add IceCat when Rust is available on i686.
;;"icecat"
)))
(append (map specification->package
'("xorg-server" "xfce" "gnome" "mate" "enlightenment"
"openbox" "awesome" "i3-wm" "ratpoison"
"xlockmore" "slock" "libreoffice"
"connman" "network-manager" "network-manager-applet"
"openssh" "ntp" "tor"
"linux-libre" "grub-hybrid"
;; FIXME: Add IceCat when Rust is available on i686.
;;"icecat"
))
%default-xorg-modules))
(define %packages-to-cross-build
;; Packages that must be cross-buildable from x86_64-linux.
@@ -93,6 +95,13 @@ TARGET."
%base-packages))
%hydra-supported-systems)))
(define %system-manifest
(manifest
(append-map (lambda (system)
(map (cut package->manifest-entry* <> system)
%system-packages))
'("x86_64-linux" "i686-linux")))) ;Guix System
(define %cross-manifest
(manifest
(append-map (lambda (target)
@@ -115,5 +124,6 @@ TARGET."
;; Return the union of all three manifests.
(concatenate-manifests (list %base-manifest
%system-manifest
%cross-manifest
%cross-bootstrap-manifest))
+2 -3
View File
@@ -118,9 +118,8 @@ version of this file."
;; printed on the console.
(parameterize ((shepherd-message-port
(%make-void-port "w")))
(lambda ()
(stop-service 'term-tty2)
(start-service 'term-tty2 (list locale)))))))
(stop-service 'term-tty2)
(start-service 'term-tty2 (list locale))))))
(define* (compute-locale-step #:key
locales-name
+4 -4
View File
@@ -109,9 +109,9 @@
;; Latest version of Guix, which may or may not correspond to a release.
;; Note: the 'update-guix-package.scm' script expects this definition to
;; start precisely like this.
(let ((version "1.0.1")
(commit "09844816c77caaa60f4149f99a34733966724627")
(revision 15))
(let ((version "1.1.0rc2")
(commit "9d0d27fd8841a923bb6109d3758d925fbd737b65")
(revision 1))
(package
(name "guix")
@@ -127,7 +127,7 @@
(commit commit)))
(sha256
(base32
"1fciffls6cw9zz13vig5x37r73qxc0irzyh0caimciddlksvabf7"))
"0m1mgha9ia22961pr29kvwalza734yhnaibah3d0k42mw826v7h1"))
(file-name (string-append "guix-" version "-checkout"))))
(build-system gnu-build-system)
(arguments
-1
View File
@@ -142,7 +142,6 @@ representation."
(documentation "Load kernel modules.")
(provision '(kernel-module-loader))
(requirement '(file-systems))
(respawn? #f)
(one-shot? #t)
(modules `((srfi srfi-1)
(srfi srfi-34)
+7
View File
@@ -291,6 +291,13 @@ and return the resulting '.go' file."
(default-environment-variables
'("PATH=/run/current-system/profile/bin"))
;; Booting off a DVD, especially on a slow machine, can make
;; everything slow. Thus, increase the timeout compared to the
;; default 5s in the Shepherd 0.7.0. See
;; <https://bugs.gnu.org/40572>.
;; XXX: Use something better when the next Shepherd is out.
(set! (@@ (shepherd service) %pid-file-timeout) 30)
;; Arrange to spawn a REPL if something goes wrong. This is better
;; than a kernel panic.
(call-with-error-handling
+1
View File
@@ -304,6 +304,7 @@ the user's target storage device rather than on the RAM disk."
(or (not (and (string-suffix? "linux-gnu" %host-type)
(or (string-prefix? "x86_64" %host-type)
(string-prefix? "i686" %host-type))))
(file-exists? "/dev/fb0")
(invoke #+(file-append kmod "/bin/modprobe")
"uvesafb"
(string-append "v86d=" #$v86d "/sbin/v86d")
+3 -2
View File
@@ -339,8 +339,9 @@ Report the availability of substitutes.\n"))
"Load the manifest from FILE and return the list of packages it refers to."
(let* ((user-module (make-user-module '((guix profiles) (gnu))))
(manifest (load* file user-module)))
(map manifest-entry-item
(manifest-transitive-entries manifest))))
(delete-duplicates (map manifest-entry-item
(manifest-transitive-entries manifest))
eq?)))
;;;
+670 -592
View File
File diff suppressed because it is too large Load Diff
+8402 -3921
View File
File diff suppressed because it is too large Load Diff