aboutsummaryrefslogtreecommitdiff
path: root/tests/nar.scm
blob: 4f4b304b1dd46591e1173b627324726fb849907d (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (test-nar)
  #:use-module (guix tests)
  #:use-module (guix nar)
  #:use-module (guix serialization)
  #:use-module (guix store)
  #:use-module ((guix hash)
                #:select (open-sha256-port open-sha256-input-port))
  #:use-module ((guix packages)
                #:select (base32))
  #:use-module (rnrs bytevectors)
  #:use-module (rnrs io ports)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-11)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-34)
  #:use-module (srfi srfi-35)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 ftw)
  #:use-module (ice-9 regex)
  #:use-module (ice-9 match))

;; Test the (guix nar) module.


;;;
;;; File system testing tools, initially contributed to Guile, then libchop.
;;;

(define (random-file-size)
  (define %average (* 1024 512))                  ; 512 KiB
  (define %stddev  (* 1024 64))                   ; 64 KiB
  (inexact->exact
   (max 0 (round (+ %average (* %stddev (random:normal)))))))

(define (make-file-tree dir tree)
  "Make file system TREE at DIR."
  (let loop ((dir  dir)
             (tree tree))
    (define (scope file)
      (string-append dir "/" file))

    (match tree
      (('directory name (body ...))
       (mkdir (scope name))
       (for-each (cute loop (scope name) <>) body))
      (('directory name (? integer? mode) (body ...))
       (mkdir (scope name))
       (for-each (cute loop (scope name) <>) body)
       (chmod (scope name) mode))
      ((file)
       (populate-file (scope file) (random-file-size)))
      ((file (? integer? mode))
       (populate-file (scope file) (random-file-size))
       (chmod (scope file) mode))
      ((from '-> to)
       (symlink to (scope from))))))

(define (delete-file-tree dir tree)
  "Delete file TREE from DIR."
  (let loop ((dir  dir)
             (tree tree))
    (define (scope file)
      (string-append dir "/" file))

    (match tree
      (('directory name (body ...))
       (for-each (cute loop (scope name) <>) body)
       (rmdir (scope name)))
      (('directory name (? integer? mode) (body ...))
       (chmod (scope name) #o755)          ; make sure it can be entered
       (for-each (cute loop (scope name) <>) body)
       (rmdir (scope name)))
      ((from '-> _)
       (delete-file (scope from)))
      ((file _ ...)
       (delete-file (scope file))))))

(define-syntax-rule (with-file-tree dir tree body ...)
  (dynamic-wind
    (lambda ()
      (make-file-tree dir 'tree))
    (lambda ()
      body ...)
    (lambda ()
      (delete-file-tree dir 'tree))))

(define (file-tree-equal? input output)
  "Return #t if the file trees at INPUT and OUTPUT are equal."
  (define strip
    (cute string-drop <> (string-length input)))
  (define sibling
    (compose (cut string-append output <>) strip))

  (file-system-fold (const #t)
                    (lambda (name stat result)    ; leaf
                      (and result
                           (file=? name (sibling name))))
                    (lambda (name stat result)    ; down
                      result)
                    (lambda (name stat result)    ; up
                      result)
                    (const #f)                    ; skip
                    (lambda (name stat errno result)
                      (pk 'error name stat errno)
                      #f)
                    #t                            ; result
                    input
                    lstat))

(define (populate-file file size)
  (call-with-output-file file
    (lambda (p)
      (put-bytevector p (random-bytevector size)))))

(define (rm-rf dir)
  (file-system-fold (const #t)                    ; enter?
                    (lambda (file stat result)    ; leaf
                      (delete-file file))
                    (const #t)                    ; down
                    (lambda (dir stat result)     ; up
                      (rmdir dir))
                    (const #t)                    ; skip
                    (const #t)                    ; error
                    #t
                    dir
                    lstat))

(define %test-dir
  ;; An output directory under $top_builddir.
  (string-append (dirname (search-path %load-path "pre-inst-env"))
                 "/test-nar-" (number->string (getpid))))

(define-syntax-rule (let/ec k exp...)
  ;; This one appeared in Guile 2.0.9, so provide a copy here.
  (let ((tag (make-prompt-tag)))
    (call-with-prompt tag
      (lambda ()
        (let ((k (lambda args
                   (apply abort-to-prompt tag args))))
          exp...))
      (lambda (_ . args)
        (apply values args)))))


(test-begin "nar")

(test-assert "write-file supports non-file output ports"
  (let ((input  (string-append (dirname (search-path %load-path "guix.scm"))
                               "/guix"))
        (output (%make-void-port "w")))
    (write-file input output)
    #t))

(test-equal "write-file puts file in C locale collation order"
  (base32 "0sfn5r63k88w9ls4hivnvscg82bqg8a0w7955l6xlk4g96jnb2z3")
  (let ((input (string-append %test-dir ".input")))
    (dynamic-wind
      (lambda ()
        (define (touch file)
          (call-with-output-file (string-append input "/" file)
            (const #t)))

        (mkdir input)
        (touch "B")
        (touch "Z")
        (touch "a")
        (symlink "B" (string-append input "/z")))
      (lambda ()
        (let-values (((port get-hash) (open-sha256-port)))
          (write-file input port)
          (get-hash)))
      (lambda ()
        (rm-rf input)))))

(test-equal "restore-file with incomplete input"
  (string-append %test-dir "/foo")
  (let ((port (open-bytevector-input-port #vu8(1 2 3))))
    (guard (c ((nar-error? c)
               (and (eq? port (nar-error-port c))
                    (nar-error-file c))))
      (restore-file port (string-append %test-dir "/foo"))
      #f)))

(test-assert "write-file + restore-file"
  (let* ((input  (string-append (dirname (search-path %load-path "guix.scm"))
                                "/guix"))
         (output %test-dir)
         (nar    (string-append output ".nar")))
    (dynamic-wind
      (lambda () #t)
      (lambda ()
        (call-with-output-file nar
          (cut write-file input <>))
        (call-with-input-file nar
          (cut restore-file <> output))
        (file-tree-equal? input output))
      (lambda ()
        (false-if-exception (delete-file nar))
        (false-if-exception (rm-rf output))))))

(test-assert "write-file + restore-file with symlinks"
  (let ((input (string-append %test-dir ".input")))
    (mkdir input)
    (dynamic-wind
      (const #t)
      (lambda ()
        (with-file-tree input
            (directory "root"
                       (("reg") ("exe" #o777) ("sym" -> "reg")))
          (let* ((output %test-dir)
                 (nar    (string-append output ".nar")))
            (dynamic-wind
              (lambda () #t)
              (lambda ()
                (call-with-output-file nar
                  (cut write-file input <>))
                (call-with-input-file nar
                  (cut restore-file <> output))
                (file-tree-equal? input output))
              (lambda ()
                (false-if-exception (delete-file nar))
                (false-if-exception (rm-rf output)))))))
      (lambda ()
        (rmdir input)))))

(test-assert "write-file #:select? + restore-file"
  (let ((input (string-append %test-dir ".input")))
    (mkdir input)
    (dynamic-wind
      (const #t)
      (lambda ()
        (with-file-tree input
            (directory "root"
                       ((directory "a" (("x") ("y") ("z")))
                        ("b") ("c") ("d" -> "b")))
          (let* ((output %test-dir)
                 (nar    (string-append output ".nar")))
            (dynamic-wind
              (lambda () #t)
              (lambda ()
                (call-with-output-file nar
                  (lambda (port)
                    (write-file input port
                                #:select?
                                (lambda (file stat)
                                  (and (not (string=? (basename file)
                                                      "a"))
                                       (not (eq? (stat:type stat)
                                                 'symlink)))))))
                (call-with-input-file nar
                  (cut restore-file <> output))

                ;; Make sure "a" and "d" have been filtered out.
                (and (not (file-exists? (string-append output "/root/a")))
                     (file=? (string-append output "/root/b")
                             (string-append input "/root/b"))
                     (file=? (string-append output "/root/c")
                             (string-append input "/root/c"))
                     (not (file-exists? (string-append output "/root/d")))))
              (lambda ()
                (false-if-exception (delete-file nar))
                (false-if-exception (rm-rf output)))))))
      (lambda ()
        (rmdir input)))))

;; 'restore-file-set' depends on 'open-sha256-input-port', which in turn
;; relies on a Guile 2.0.10+ feature.
(test-skip (if (false-if-exception
                (open-sha256-input-port (%make-void-port "r")))
               0
               3))

(test-assert "restore-file-set (signed, valid)"
  (with-store store
    (let* ((texts (unfold (cut >= <> 10)
                          (lambda _ (random-text))
                          1+
                          0))
           (files (map (cut add-text-to-store store "text" <>) texts))
           (dump  (call-with-bytevector-output-port
                   (cut export-paths store files <>))))
      (delete-paths store files)
      (and (every (negate file-exists?) files)
           (let* ((source   (open-bytevector-input-port dump))
                  (imported (restore-file-set source)))
             (and (equal? imported files)
                  (every (lambda (file)
                           (and (file-exists? file)
                                (valid-path? store file)))
                         files)
                  (equal? texts
                          (map (lambda (file)
                                 (call-with-input-file file
                                   get-string-all))
                               files))))))))

(test-assert "restore-file-set (missing signature)"
  (let/ec return
    (with-store store
      (let* ((file  (add-text-to-store store "foo" (random-text)))
             (dump  (call-with-bytevector-output-port
                     (cute export-paths store (list file) <>
                           #:sign? #f))))
        (delete-paths store (list file))
        (and (not (file-exists? file))
             (let ((source (open-bytevector-input-port dump)))
               (guard (c ((nar-signature-error? c)
                          (let ((message (condition-message c))
                                (port    (nar-error-port c)))
                            (return
                             (and (string-match "lacks.*signature" message)
                                  (string=? file (nar-error-file c))
                                  (eq? source port))))))
                 (restore-file-set source))
               #f))))))

(test-assert "restore-file-set (corrupt)"
  (let/ec return
    (with-store store
      (let* ((file  (add-text-to-store store "foo"
                                       (random-text)))
             (dump  (call-with-bytevector-output-port
                     (cute export-paths store (list file) <>))))
        (delete-paths store (list file))

        ;; Flip a byte in the file contents.
        (let* ((index 120)
               (byte  (bytevector-u8-ref dump index)))
          (bytevector-u8-set! dump index (logxor #xff byte)))

        (and (not (file-exists? file))
             (let ((source (open-bytevector-input-port dump)))
               (guard (c ((nar-invalid-hash-error? c)
                          (let ((message (condition-message c))
                                (port    (nar-error-port c)))
                            (return
                             (and (string-contains message "hash")
                                  (string=? file (nar-error-file c))
                                  (eq? source port))))))
                 (restore-file-set source))
               #f))))))

(test-end "nar")

;;; Local Variables:
;;; eval: (put 'with-file-tree 'scheme-indent-function 2)
;;; End:
00%'> -rw-r--r--gnu/packages/gstreamer.scm2
-rw-r--r--gnu/packages/gtk.scm14
-rw-r--r--gnu/packages/hardware.scm23
-rw-r--r--gnu/packages/jami.scm2
-rw-r--r--gnu/packages/libreoffice.scm22
-rw-r--r--gnu/packages/linux.scm171
-rw-r--r--gnu/packages/lisp-xyz.scm75
-rw-r--r--gnu/packages/lisp.scm7
-rw-r--r--gnu/packages/loko.scm75
-rw-r--r--gnu/packages/mail.scm17
-rw-r--r--gnu/packages/music.scm62
-rw-r--r--gnu/packages/networking.scm34
-rw-r--r--gnu/packages/patches/jami-sip-contacts.patch38
-rw-r--r--gnu/packages/patches/jami-sipaccount-segfault.patch30
-rw-r--r--gnu/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch565
-rw-r--r--gnu/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch27
-rw-r--r--gnu/packages/patches/sssd-optional-systemd.patch45
-rw-r--r--gnu/packages/protobuf.scm13
-rw-r--r--gnu/packages/python-check.scm29
-rw-r--r--gnu/packages/python-science.scm4
-rw-r--r--gnu/packages/python-xyz.scm115
-rw-r--r--gnu/packages/qt.scm285
-rw-r--r--gnu/packages/raspberry-pi.scm136
-rw-r--r--gnu/packages/rust-apps.scm303
-rw-r--r--gnu/packages/rust.scm17
-rw-r--r--gnu/packages/sssd.scm9
-rw-r--r--gnu/packages/statistics.scm844
-rw-r--r--gnu/packages/telephony.scm104
-rw-r--r--gnu/packages/texinfo.scm6
-rw-r--r--gnu/packages/text-editors.scm6
-rw-r--r--gnu/packages/video.scm33
-rw-r--r--gnu/packages/web.scm63
-rw-r--r--gnu/packages/wm.scm82
-rw-r--r--gnu/packages/wxwidgets.scm232
-rw-r--r--gnu/services/base.scm922
-rw-r--r--gnu/services/cuirass.scm4
-rw-r--r--gnu/services/getmail.scm22
-rw-r--r--gnu/services/networking.scm684
-rw-r--r--gnu/system/examples/raspberry-pi-64-nfs-root.tmpl70
-rw-r--r--gnu/system/examples/raspberry-pi-64.tmpl74
-rw-r--r--gnu/system/hurd.scm44
-rw-r--r--gnu/system/linux-container.scm28
-rw-r--r--gnu/tests/gdm.scm127
-rw-r--r--guix/build-system/linux-module.scm4
-rw-r--r--guix/build/kconfig.scm183
-rw-r--r--guix/import/cran.scm1
-rw-r--r--guix/records.scm87
-rwxr-xr-xguix/scripts/substitute.scm2
-rw-r--r--tests/guix-system.sh4
-rw-r--r--tests/records.scm33
104 files changed, 8170 insertions, 4244 deletions
diff --git a/Makefile.am b/Makefile.am
index 28546be18c..b54288c0fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -237,6 +237,7 @@ MODULES = \
guix/build/waf-build-system.scm \
guix/build/haskell-build-system.scm \
guix/build/julia-build-system.scm \
+ guix/build/kconfig.scm \
guix/build/linux-module-build-system.scm \
guix/build/store-copy.scm \
guix/build/json.scm \
@@ -440,6 +441,8 @@ EXAMPLES = \
gnu/system/examples/desktop.tmpl \
gnu/system/examples/lightweight-desktop.tmpl \
gnu/system/examples/docker-image.tmpl \
+ gnu/system/examples/raspberry-pi-64.tmpl \
+ gnu/system/examples/raspberry-pi-64-nfs-root.tmpl \
gnu/system/examples/vm-image.tmpl
GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go $(dist_noinst_DATA:%.scm=%.go)
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 40ae33ecac..6a8ffd6524 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -1089,11 +1089,16 @@ and then to browse them ``by hand'' using @code{car}, @code{cdr},
notably the fact that it is hard to read, error-prone, and a hindrance
to proper type error reports.
+@findex define-record-type*
+@findex match-record
+@cindex pattern matching
Guix code should define appropriate data types (for instance, using
@code{define-record-type*}) rather than abuse lists. In addition, it
should use pattern matching, via Guile’s @code{(ice-9 match)} module,
especially when matching lists (@pxref{Pattern Matching,,, guile, GNU
-Guile Reference Manual}).
+Guile Reference Manual}); pattern matching for records is better done
+using @code{match-record} from @code{(guix records)}, which, unlike
+@code{match}, verifies field names at macro-expansion time.
@node Formatting Code
@subsection Formatting Code
diff --git a/doc/guix.texi b/doc/guix.texi
index e547d469f4..a79b777826 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18409,9 +18409,6 @@ udev rules can be provided as a list of files through the @var{rules}
variable. The procedures @code{udev-rule}, @code{udev-rules-service}
and @code{file->udev-rule} from @code{(gnu services base)} simplify the
creation of such rule files.
-
-The @command{herd rules udev} command, as root, returns the name of the
-directory containing all the active udev rules.
@end deffn
@deffn {Scheme Procedure} udev-rule [@var{file-name} @var{contents}]
@@ -18940,9 +18937,8 @@ gexps to introduce job definitions that are passed to mcron
;; job's action as a Scheme procedure.
#~(job '(next-hour '(3))
(lambda ()
- (execl (string-append #$findutils "/bin/updatedb")
- "updatedb"
- "--prunepaths=/tmp /var/tmp /gnu/store"))
+ (system* (string-append #$findutils "/bin/updatedb")
+ "--prunepaths=/tmp /var/tmp /gnu/store"))
"updatedb"))
(define garbage-collector-job
@@ -18980,6 +18976,12 @@ the job would appear as ``Lambda function'' in the output of
@command{herd schedule mcron}, which is not nearly descriptive enough!
@end quotation
+@quotation Tip
+Avoid calling the Guile procedures @code{execl}, @code{execle} or
+@code{execlp} inside a job specification, else mcron won't be able to
+output the completion status of the job.
+@end quotation
+
For more complex jobs defined in Scheme where you need control over the top
level, for instance to introduce a @code{use-modules} form, you can move your
code to a separate program using the @code{program-file} procedure of the
@@ -19581,6 +19583,10 @@ This is the list of available plugins for virtual private networks
(VPNs). An example of this is the @code{network-manager-openvpn}
package, which allows NetworkManager to manage VPNs @i{via} OpenVPN.
+@item @code{iwd?} (default: @code{#f})
+NetworkManager will use iwd as a backend for wireless networking if this
+option is set to @code{#t}, otherwise it will use wpa-supplicant.
+
@end table
@end deftp
@@ -37991,8 +37997,9 @@ The type of a bootloader configuration declaration.
@cindex BIOS, bootloader
The bootloader to use, as a @code{bootloader} object. For now
@code{grub-bootloader}, @code{grub-efi-bootloader},
-@code{grub-efi-netboot-bootloader}, @code{grub-efi-removable-bootloader},
-@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported.
+@code{grub-efi-removable-bootloader}, @code{grub-efi-netboot-bootloader},
+@code{grub-efi-netboot-removable-bootloader}, @code{extlinux-bootloader}
+and @code{u-boot-bootloader} are supported.
@cindex ARM, bootloaders
@cindex AArch64, bootloaders
@@ -38001,15 +38008,29 @@ modules. In particular, @code{(gnu bootloader u-boot)} contains definitions
of bootloaders for a wide range of ARM and AArch64 systems, using the
@uref{https://www.denx.de/wiki/U-Boot/, U-Boot bootloader}.
+@vindex grub-bootloader
+@code{grub-bootloader} allows you to boot in particular Intel-based machines
+in ``legacy'' BIOS mode.
+
@vindex grub-efi-bootloader
@code{grub-efi-bootloader} allows to boot on modern systems using the
@dfn{Unified Extensible Firmware Interface} (UEFI). This is what you should
use if the installation image contains a @file{/sys/firmware/efi} directory
when you boot it on your system.
-@vindex grub-bootloader
-@code{grub-bootloader} allows you to boot in particular Intel-based machines
-in ``legacy'' BIOS mode.
+@vindex grub-efi-removable-bootloader
+@code{grub-efi-removable-bootloader} allows you to boot your system from
+removable media by writing the GRUB file to the UEFI-specification location of
+@file{/EFI/BOOT/BOOTX64.efi} of the boot directory, usually @file{/boot/efi}.
+This is also useful for some UEFI firmwares that ``forget'' their configuration
+from their non-volatile storage. Like @code{grub-efi-bootloader}, this can only
+be used if the @file{/sys/firmware/efi} directory is available.
+
+@quotation Note
+This @emph{will} overwrite the GRUB file from any other operating systems that
+also place their GRUB file in the UEFI-specification location; making them
+unbootable.
+@end quotation
@vindex grub-efi-netboot-bootloader
@code{grub-efi-netboot-bootloader} allows you to boot your system over network
@@ -38018,9 +38039,10 @@ build a diskless Guix system.
The installation of the @code{grub-efi-netboot-bootloader} generates the
content of the TFTP root directory at @code{targets} (@pxref{Bootloader
-Configuration, @code{targets}}), to be served by a TFTP server. You may
-want to mount your TFTP server directories onto the @code{targets} to
-move the required files to the TFTP server automatically.
+Configuration, @code{targets}}) below the sub-directory @file{efi/Guix}, to be
+served by a TFTP server. You may want to mount your TFTP server directories
+onto the @code{targets} to move the required files to the TFTP server
+automatically during installation.
If you plan to use an NFS root file system as well (actually if you mount the
store from an NFS share), then the TFTP server needs to serve the file
@@ -38049,25 +38071,34 @@ this constellation the symlinks will work.
For other constellations you will have to program your own bootloader
installer, which then takes care to make necessary files from the store
accessible through TFTP, for example by copying them into the TFTP root
-directory to your @code{targets}.
+directory for your @code{targets}.
It is important to note that symlinks pointing outside the TFTP root directory
may need to be allowed in the configuration of your TFTP server. Further the
store link exposes the whole store through TFTP@. Both points need to be
-considered carefully for security aspects.
+considered carefully for security aspects. It is advised to disable any TFTP
+write access!
+
+Please note, that this bootloader will not modify the ‘UEFI Boot Manager’ of
+the system.
Beside the @code{grub-efi-netboot-bootloader}, the already mentioned TFTP and
NFS servers, you also need a properly configured DHCP server to make the booting
over netboot possible. For all this we can currently only recommend you to look
for instructions about @acronym{PXE, Preboot eXecution Environment}.
-@vindex grub-efi-removable-bootloader
-@code{grub-efi-removable-bootloader} allows you to boot your system from
-removable media by writing the GRUB file to the UEFI-specification location of
-@file{/EFI/BOOT/BOOTX64.efi} of the boot directory, usually @file{/boot/efi}.
-This is also useful for some UEFI firmwares that ``forget'' their configuration
-from their non-volatile storage. Like @code{grub-efi-bootloader}, this can only
-be used if the @file{/sys/firmware/efi} directory is available.
+If a local EFI System Partition (ESP) or a similar partition with a FAT
+file system is mounted in @code{targets}, then symlinks cannot be
+created. In this case everything will be prepared for booting from
+local storage, matching the behavior of @code{grub-efi-bootloader}, with
+the difference that all GRUB binaries are copied to @code{targets},
+necessary for booting over the network.
+
+@vindex grub-efi-netboot-removable-bootloader
+@code{grub-efi-netboot-removable-bootloader} is identical to
+@code{grub-efi-netboot-bootloader} with the exception that the
+sub-directory @file{efi/boot} will be used instead of @file{efi/Guix} to
+comply with the UEFI specification for removable media.
@quotation Note
This @emph{will} overwrite the GRUB file from any other operating systems that
diff --git a/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-add-package b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-add-package
new file mode 100644
index 0000000000..cc2dddb1e0
--- /dev/null
+++ b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-add-package
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: guix-vc-commit-message-add-package
+# key: add
+# --
+gnu: Add ${1:`(when (string-match "\\+(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}.
+
+* `(car (log-edit-files))` ($1): New variable.
+`(mapconcat (lambda (file) (concat "* " file)) (cdr (log-edit-files)) "\n")`
diff --git a/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-remove-package b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-remove-package
new file mode 100644
index 0000000000..9ab4ce6156
--- /dev/null
+++ b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-remove-package
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: guix-vc-commit-message-remove-package
+# key: remove
+# --
+gnu: Remove ${1:`(when (string-match "\\-(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}.
+
+* `(car (log-edit-files))` ($1): Delete variable.
+`(mapconcat (lambda (file) (concat "* " file)) (cdr (log-edit-files)) "\n")`
diff --git a/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-rename-package b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-rename-package
new file mode 100644
index 0000000000..89c85f8016
--- /dev/null
+++ b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-rename-package
@@ -0,0 +1,14 @@
+# -*- mode: snippet -*-
+# name: guix-vc-commit-message-rename-package
+# key: rename
+# --
+gnu: ${1:`(when (string-match "\\-(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))
+ `}: Rename package to ${2:`
+ (when (string-match "\\+(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}.
+
+* `(car (log-edit-files))` ($1): Define in terms of
+'deprecated-package'.
+($2): New variable, formerly known as "$1".
+`(mapconcat (lambda (file) (concat "* " file)) (cdr (log-edit-files)) "\n")`
diff --git a/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-update-package b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-update-package
new file mode 100644
index 0000000000..b5e41709f5
--- /dev/null
+++ b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-update-package
@@ -0,0 +1,12 @@
+# -*- mode: snippet -*-
+# name: guix-vc-commit-message-update-package
+# key: update
+# --
+
+gnu: ${1:`(when (string-match "^[ ]*(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}: Update to ${2:`
+ (when (string-match "^\\+[ ]*(version \"\\(.*\\)\"" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}.
+
+* `(car (log-edit-files))` ($1): Update to $2.$0
+`(mapconcat (lambda (file) (concat "* " file)) (cdr (log-edit-files)) "\n")`
diff --git a/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-use-https-home-page b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-use-https-home-page
new file mode 100644
index 0000000000..e0f170b015
--- /dev/null
+++ b/etc/snippets/yas/log-edit-mode/guix-vc-commit-message-use-https-home-page
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: guix-vc-commit-message-use-https-home-page
+# key: https
+# --
+gnu: ${1:`(when (string-match "^[ ]*(define-public \\(\\S-+\\)" vc-patch-string)
+ (match-string-no-properties 1 vc-patch-string))`}: Use HTTPS home page URI.
+
+* `(car (log-edit-files))` ($1)[home-page]: Use HTTPS URI.
+`(mapconcat (lambda (file) (concat "* " file)) (cdr (log-edit-files)) "\n")`
diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index c458b14e3b..f744204017 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -393,7 +393,8 @@ and Thunderbird."
"The Racket language and Racket-based languages, Racket packages,
Racket's variant of Chez Scheme, and development of a Racket build system and
importer."
- #:scope (list "gnu/packages/racket.scm")))
+ #:scope (list "gnu/packages/chez.scm"
+ "gnu/packages/racket.scm")))
(define-member (person "Thiago Jung Bauermann"
diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm
index da65b9d5d5..2c36d8c6cf 100644
--- a/gnu/bootloader.scm
+++ b/gnu/bootloader.scm
@@ -322,26 +322,22 @@ instead~%")))
(force %bootloaders))
(leave (G_ "~a: no such bootloader~%") name)))
-(define (efi-bootloader-profile files bootloader-package hooks)
- "Creates a profile with BOOTLOADER-PACKAGE and a directory collection/ with
-links to additional FILES from the store. This collection is meant to be used
-by the bootloader installer.
+(define (efi-bootloader-profile packages files hooks)
+ "Creates a profile from the lists of PACKAGES and FILES from the store.
+This profile is meant to be used by the bootloader-installer.
FILES is a list of file or directory names from the store, which will be
-symlinked into the collection/ directory. If a directory name ends with '/',
-then the directory content instead of the directory itself will be symlinked
-into the collection/ directory.
+symlinked into the profile. If a directory name ends with '/', then the
+directory content instead of the directory itself will be symlinked into the
+profile.
-FILES may contain file like objects produced by functions like plain-file,
+FILES may contain file like objects produced by procedures like plain-file,
local-file, etc., or package contents produced with file-append.
HOOKS lists additional hook functions to modify the profile."
- (define (bootloader-collection manifest)
+ (define (efi-bootloader-profile-hook manifest)
(define build
- (with-imported-modules '((guix build utils)
- (ice-9 ftw)
- (srfi srfi-1)
- (srfi srfi-26))
+ (with-imported-modules '((guix build utils))
#~(begin
(use-modules ((guix build utils)
#:select (mkdir-p strip-store-file-name))
@@ -365,8 +361,7 @@ HOOKS lists additional hook functions to modify the profile."
(define (name-is-store-entry? name)
"Return #t if NAME is a direct store entry and nothing inside."
(not (string-index (strip-store-file-name name) #\/)))
- (let* ((collection (string-append #$output "/collection"))
- (files '#$files)
+ (let* ((files '#$files)
(directories (filter name-ends-with-/? files))
(names-from-directories
(append-map (lambda (directory)
@@ -374,11 +369,11 @@ HOOKS lists additional hook functions to modify the profile."
directories))
(names (append names-from-directories
(remove name-ends-with-/? files))))
- (mkdir-p collection)
+ (mkdir-p #$output)
(if (every file-exists? names)
(begin
(for-each (lambda (name)
- (symlink-to name collection
+ (symlink-to name #$output
(if (name-is-store-entry? name)
strip-store-file-name
basename)))
@@ -386,57 +381,63 @@ HOOKS lists additional hook functions to modify the profile."
#t)
#f)))))
- (gexp->derivation "bootloader-collection"
+ (gexp->derivation "efi-bootloader-profile"
build
#:local-build? #t
#:substitutable? #f
#:properties
`((type . profile-hook)
- (hook . bootloader-collection))))
+ (hook . efi-bootloader-profile-hook))))
- (profile (content (packages->manifest (list bootloader-package)))
- (name "bootloader-profile")
- (hooks (append (list bootloader-collection) hooks))
+ (profile (content (packages->manifest packages))
+ (name "efi-bootloader-profile")
+ (hooks (cons efi-bootloader-profile-hook hooks))
(locales? #f)
(allow-collisions? #f)
(relative-symlinks? #f)))
-(define* (efi-bootloader-chain files
- final-bootloader
+(define* (efi-bootloader-chain final-bootloader
#:key
+ (packages '())
+ (files '())
(hooks '())
- installer)
- "Define a bootloader chain with FINAL-BOOTLOADER as the final bootloader and
-certain directories and files from the store given in the list of FILES.
+ installer
+ disk-image-installer)
+ "Define a chain of bootloaders with the FINAL-BOOTLOADER, optional PACKAGES,
+and optional directories and files from the store given in the list of FILES.
-FILES may contain file like objects produced by functions like plain-file,
-local-file, etc., or package contents produced with file-append. They will be
-collected inside a directory collection/ inside a generated bootloader profile,
-which will be passed to the INSTALLER.
+The package of the FINAL-BOOTLOADER and all PACKAGES and FILES will be placed
+in an efi-bootloader-profile, which will be passed to the INSTALLER.
+
+FILES may contain file-like objects produced by procedures like plain-file,
+local-file, etc., or package contents produced with file-append.
If a directory name in FILES ends with '/', then the directory content instead
-of the directory itself will be symlinked into the collection/ directory.
+of the directory itself will be symlinked into the efi-bootloader-profile.
The procedures in the HOOKS list can be used to further modify the bootloader
profile. It is possible to pass a single function instead of a list.
-If the INSTALLER argument is used, then this function will be called to install
-the bootloader. Otherwise the installer of the FINAL-BOOTLOADER will be called."
- (let* ((final-installer (or installer
- (bootloader-installer final-bootloader)))
- (profile (efi-bootloader-profile files
- (bootloader-package final-bootloader)
- (if (list? hooks)
- hooks
- (list hooks)))))
- (bootloader
- (inherit final-bootloader)
- (package profile)
- (installer
- #~(lambda (bootloader target mount-point)
- (#$final-installer bootloader target mount-point)
- (copy-recursively
- (string-append bootloader "/collection")
- (string-append mount-point target)
- #:follow-symlinks? #t
- #:log (%make-void-port "w")))))))
+If the INSTALLER argument is used, then this gexp procedure will be called to
+install the efi-bootloader-profile. Otherwise the installer of the
+FINAL-BOOTLOADER will be called.
+
+If the DISK-IMAGE-INSTALLER is used, then this gexp procedure will be called
+to install the efi-bootloader-profile into a disk image. Otherwise the
+disk-image-installer of the FINAL-BOOTLOADER will be called."
+ (bootloader
+ (inherit final-bootloader)
+ (name "efi-bootloader-chain")
+ (package
+ (efi-bootloader-profile (cons (bootloader-package final-bootloader)
+ packages)
+ files
+ (if (list? hooks)
+ hooks
+ (list hooks))))
+ (installer
+ (or installer
+ (bootloader-installer final-bootloader)))
+ (disk-image-installer
+ (or disk-image-installer
+ (bootloader-disk-image-installer final-bootloader)))))
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 7283257354..aab766fd6c 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -53,13 +53,14 @@
grub-theme-gfxmode
install-grub-efi-removable
- install-grub-efi-netboot
+ make-grub-efi-netboot-installer
grub-bootloader
grub-efi-bootloader
grub-efi-removable-bootloader
grub-efi32-bootloader
grub-efi-netboot-bootloader
+ grub-efi-netboot-removable-bootloader
grub-mkrescue-bootloader
grub-minimal-bootloader
@@ -353,7 +354,7 @@ code."
((or #f (? string?))
#~(format #f "search --file --set ~a" #$file)))))
-(define* (grub-configuration-file config entries
+(define* (make-grub-configuration grub config entries
#:key
(locale #f)
(system (%current-system))
@@ -453,9 +454,7 @@ menuentry ~s {
(define locale-config
(let* ((entry (first all-entries))
(device (menu-entry-device entry))
- (mount-point (menu-entry-device-mount-point entry))
- (bootloader (bootloader-configuration-bootloader config))
- (grub (bootloader-package bootloader)))
+ (mount-point (menu-entry-device-mount-point entry)))
#~(let ((locale #$(and locale
(locale-definition-source
(locale-name->definition locale))))
@@ -481,8 +480,6 @@ set lang=~a~%"
(define keyboard-layout-config
(let* ((layout (bootloader-configuration-keyboard-layout config))
- (grub (bootloader-package
- (bootloader-configuration-bootloader config)))
(keymap* (and layout
(keyboard-layout-file layout #:grub grub)))
(entry (first all-entries))
@@ -533,6 +530,16 @@ fi~%"))))
#:options '(#:local-build? #t
#:substitutable? #f)))
+(define (grub-configuration-file config . args)
+ (let* ((bootloader (bootloader-configuration-bootloader config))
+ (grub (bootloader-package bootloader)))
+ (apply make-grub-configuration grub config args)))
+
+(define (grub-efi-configuration-file . args)
+ (apply make-grub-configuration grub-efi args))
+
+(define grub-cfg "/boot/grub/grub.cfg")
+
;;;
@@ -674,42 +681,31 @@ fi~%"))))
((target-arm?) "--target=arm-efi"))
"--efi-directory" target-esp)))))
-(define (install-grub-efi-netboot subdir)
- "Define a grub-efi-netboot bootloader installer for installation in SUBDIR,
-which is usually efi/Guix or efi/boot."
- (let* ((system (string-split (nix-system->gnu-triplet
- (or (%current-target-system)
- (%current-system)))
- #\-))
- (arch (first system))
- (boot-efi-link (match system
- ;; These are the supportend systems and the names
- ;; defined by the UEFI standard for removable media.
- (("i686" _ ...) "/bootia32.efi")
- (("x86_64" _ ...) "/bootx64.efi")
- (("arm" _ ...) "/bootarm.efi")
- (("aarch64" _ ...) "/bootaa64.efi")
- (("riscv" _ ...) "/bootriscv32.efi")
- (("riscv64" _ ...) "/bootriscv64.efi")
- ;; Other systems are not supported, although defined.
- ;; (("riscv128" _ ...) "/bootriscv128.efi")
- ;; (("ia64" _ ...) "/bootia64.efi")
- ((_ ...) #f)))
- (core-efi (string-append
- ;; This is the arch dependent file name of GRUB, e.g.
- ;; i368-efi/core.efi or arm64-efi/core.efi.
- (match arch
- ("i686" "i386")
- ("aarch64" "arm64")
- ("riscv" "riscv32")
- (_ arch))
- "-efi/core.efi")))
- (with-imported-modules
- '((guix build union))
- #~(lambda (bootloader target mount-point)
- "Install the BOOTLOADER, which must be the package grub, as e.g.
-bootx64.efi or bootaa64.efi into SUBDIR, which is usually efi/Guix or efi/boot,
-below the directory TARGET for the system whose root is mounted at MOUNT-POINT.
+(define* (make-grub-efi-netboot-installer grub-efi grub-cfg subdir)
+ "Make a bootloader-installer for a grub-efi-netboot bootloader, which expects
+its files in SUBDIR and its configuration file in GRUB-CFG.
+
+As a grub-efi-netboot package is already pre-installed by 'grub-mknetdir', the
+installer basically copies all files from the bootloader-package (or profile)
+into the bootloader-target directory.
+
+Additionally for network booting over TFTP, two relative symlinks to the store
+and to the GRUB-CFG file are necessary. Due to this a TFTP root directory must
+not be located on a FAT file-system.
+
+If the bootloader-target does not support symlinks, then it is assumed to be a
+kind of EFI System Partition (ESP). In this case an intermediate configuration
+file is created with the help of GRUB-EFI to load the GRUB-CFG.
+
+The installer is usable for any efi-bootloader-chain, which prepares the
+bootloader-profile in a way ready for copying.
+
+The installer does not manipulate the system's 'UEFI Boot Manager'.
+
+The returned installer accepts the BOOTLOADER, TARGET and MOUNT-POINT
+arguments. Its job is to copy the BOOTLOADER, which must be a pre-installed
+grub-efi-netboot package with a SUBDIR like efi/boot or efi/Guix, below the
+directory TARGET for the system whose root is mounted at MOUNT-POINT.
MOUNT-POINT is the last argument in 'guix system init /etc/config.scm mnt/point'
or '/' for other 'guix system' commands.
@@ -719,17 +715,19 @@ bootloader-configuration in:
(operating-system
(bootloader (bootloader-configuration
- (targets '(\"/boot\"))
+ (targets '(\"/boot/efi\"))
…))
…)
TARGET is required to be an absolute directory name, usually mounted via NFS,
-and finally needs to be provided by a TFTP server as the TFTP root directory.
+and finally needs to be provided by a TFTP server as
+the TFTP root directory.
+Usually the installer will be used to prepare network booting over TFTP. Then
GRUB will load tftp://server/SUBDIR/grub.cfg and this file will instruct it to
load more files from the store like tftp://server/gnu/store/…-linux…/Image.
-To make this possible two symlinks will be created. The first symlink points
+To make this possible two symlinks are created. The first symlink points
relatively form MOUNT-POINT/TARGET/SUBDIR/grub.cfg to
MOUNT-POINT/boot/grub/grub.cfg, and the second symlink points relatively from
MOUNT-POINT/TARGET/%store-prefix to MOUNT-POINT/%store-prefix.
@@ -739,34 +737,80 @@ paths on the TFTP server side are unknown.
It is also important to note that both symlinks will point outside the TFTP root
directory and that the TARGET/%store-prefix symlink makes the whole store
-accessible via TFTP. Possibly the TFTP server must be configured
-to allow accesses outside its TFTP root directory. This may need to be
-considered for security aspects."
- (use-modules ((guix build union) #:select (symlink-relative)))
- (let* ((net-dir (string-append mount-point target "/"))
- (sub-dir (string-append net-dir #$subdir "/"))
- (store (string-append mount-point (%store-prefix)))
- (store-link (string-append net-dir (%store-prefix)))
- (grub-cfg (string-append mount-point "/boot/grub/grub.cfg"))
- (grub-cfg-link (string-append sub-dir (basename grub-cfg)))
- (boot-efi-link (string-append sub-dir #$boot-efi-link)))
- ;; Prepare the symlink to the store.
- (mkdir-p (dirname store-link))
- (false-if-exception (delete-file store-link))
- (symlink-relative store store-link)
- ;; Prepare the symlink to the grub.cfg, which points into the store.
- (mkdir-p (dirname grub-cfg-link))
- (false-if-exception (delete-file grub-cfg-link))
- (symlink-relative grub-cfg grub-cfg-link)
- ;; Install GRUB, which refers to the grub.cfg, with support for
- ;; encrypted partitions,
- (setenv "GRUB_ENABLE_CRYPTODISK" "y")
- (invoke/quiet (string-append bootloader "/bin/grub-mknetdir")
- (string-append "--net-directory=" net-dir)
- (string-append "--subdir=" #$subdir))
- ;; Prepare the bootloader symlink, which points to core.efi of GRUB.
- (false-if-exception (delete-file boot-efi-link))
- (symlink #$core-efi boot-efi-link))))))
+accessible via TFTP. Possibly the TFTP server must be configured to allow
+accesses outside its TFTP root directory. This all may need to be considered
+for security aspects. It is advised to disable any TFTP write access!
+
+The installer can also be used to prepare booting from local storage, if the
+underlying file-system, like FAT on an EFI System Partition (ESP), does not
+support symlinks. In this case the MOUNT-POINT/TARGET/SUBDIR/grub.cfg will be
+created with the help of GRUB-EFI to load the /boot/grub/grub.cfg file. A
+symlink to the store is not needed in this case."
+ (with-imported-modules '((guix build union))
+ #~(lambda (bootloader target mount-point)
+ ;; In context of a disk image creation TARGET will be #f and an
+ ;; installer is expected to do necessary installations on MOUNT-POINT,
+ ;; which will become the root file system. If TARGET is #f, this
+ ;; installer has nothing to do, as it only cares about the EFI System
+ ;; Partition (ESP).
+ (when target
+ (use-modules ((guix build union) #:select (symlink-relative))
+ (ice-9 popen)
+ (ice-9 rdelim))
+ (let* ((mount-point/target (string-append mount-point target "/"))
+ ;; When installing Guix, it is common to mount TARGET below
+ ;; MOUNT-POINT rather than the root directory.
+ (bootloader-target (if (file-exists? mount-point/target)
+ mount-point/target
+ target))
+ (store (string-append mount-point (%store-prefix)))
+ (store-link (string-append bootloader-target (%store-prefix)))
+ (grub-cfg (string-append mount-point #$grub-cfg))
+ (grub-cfg-link (string-append bootloader-target
+ #$subdir "/"
+ (basename grub-cfg))))
+ ;; Copy the bootloader into the bootloader-target directory.
+ ;; Should we beforehand recursively delete any existing file?
+ (copy-recursively bootloader bootloader-target
+ #:follow-symlinks? #t
+ #:log (%make-void-port "w"))
+ ;; For TFTP we need to install additional relative symlinks.
+ ;; If we install on an EFI System Partition (ESP) or some other FAT
+ ;; file-system, then symlinks cannot be created and are not needed.
+ ;; Therefore we ignore exceptions when trying.
+ ;; Prepare the symlink to the grub.cfg.
+ (mkdir-p (dirname grub-cfg-link))
+ (false-if-exception (delete-file grub-cfg-link))
+ (if (unspecified?
+ (false-if-exception (symlink-relative grub-cfg grub-cfg-link)))
+ ;; Symlinks are supported.
+ (begin
+ ;; Prepare the symlink to the store.
+ (mkdir-p (dirname store-link))
+ (false-if-exception (delete-file store-link))
+ (symlink-relative store store-link))
+ ;; Creating symlinks does not seem to be supported. Probably
+ ;; an ESP is used. Add a script to search and load the actual
+ ;; grub.cfg.
+ (let* ((probe #$(file-append grub-efi "/sbin/grub-probe"))
+ (port (open-pipe* OPEN_READ probe "--target=fs_uuid"
+ grub-cfg))
+ (search-root
+ (match (read-line port)
+ ((? eof-object?)
+ ;; There is no UUID available. As a fallback search
+ ;; everywhere for the grub.cfg.
+ (string-append "search --file --set " #$grub-cfg))
+ (fs-uuid
+ ;; The UUID to load the grub.cfg from is known.
+ (string-append "search --fs-uuid --set " fs-uuid))))
+ (load-grub-cfg (string-append "configfile " #$grub-cfg)))
+ (close-pipe port)
+ (with-output-to-file grub-cfg-link
+ (lambda ()
+ (display (string-join (list search-root
+ load-grub-cfg)
+ "\n")))))))))))
@@ -784,7 +828,7 @@ considered for security aspects."
(package grub)
(installer install-grub)
(disk-image-installer install-grub-disk-image)
- (configuration-file "/boot/grub/grub.cfg")
+ (configuration-file grub-cfg)
(configuration-file-generator grub-configuration-file)))
(define grub-minimal-bootloader
@@ -794,11 +838,12 @@ considered for security aspects."
(define grub-efi-bootloader
(bootloader
- (inherit grub-bootloader)
+ (name 'grub-efi)
+ (package grub-efi)
(installer install-grub-efi)
(disk-image-installer #f)
- (name 'grub-efi)
- (package grub-efi)))
+ (configuration-file grub-cfg)
+ (configuration-file-generator grub-configuration-file)))
(define grub-efi-removable-bootloader
(bootloader
@@ -813,11 +858,22 @@ considered for security aspects."
(name 'grub-efi32)
(package grub-efi32)))
-(define grub-efi-netboot-bootloader
+(define (make-grub-efi-netboot-bootloader name subdir)
(bootloader
- (inherit grub-efi-bootloader)
- (name 'grub-efi-netboot-bootloader)
- (installer (install-grub-efi-netboot "efi/Guix"))))
+ (name name)
+ (package (make-grub-efi-netboot (symbol->string name) subdir))
+ (installer (make-grub-efi-netboot-installer grub-efi grub-cfg subdir))
+ (disk-image-installer #f)
+ (configuration-file grub-cfg)
+ (configuration-file-generator grub-efi-configuration-file)))
+
+(define grub-efi-netboot-bootloader
+ (make-grub-efi-netboot-bootloader 'grub-efi-netboot-bootloader
+ "efi/Guix"))
+
+(define grub-efi-netboot-removable-bootloader
+ (make-grub-efi-netboot-bootloader 'grub-efi-netboot-removable-bootloader
+ "efi/boot"))
(define grub-mkrescue-bootloader
(bootloader
diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index ad3c50d61e..e068ffc202 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -127,6 +127,9 @@ set."
(define (translated? file-name)
"Return true if a translator is installed on FILE-NAME."
+ ;; On GNU/Hurd, 'getxattr' in glibc opens the file without O_NOTRANS, and
+ ;; then, for "gnu.translator", it calls 'file_get_translator', resulting in
+ ;; EOPNOTSUPP (conversely, 'showtrans' opens the file with O_NOTRANS).
(if (string-contains %host-type "linux-gnu")
(passive-translator-xattr? file-name)
(passive-translator-installed? file-name)))
@@ -210,31 +213,34 @@ set."
;; 'fd_to_filename' in libc expects it.
("dev/fd" ("/hurd/magic" "--directory" "fd") #o555)
- ("dev/tty1" ("/hurd/term" "/dev/tty1" "hurdio" "/dev/vcs/1/console")
- #o666)
- ("dev/tty2" ("/hurd/term" "/dev/tty2" "hurdio" "/dev/vcs/2/console")
- #o666)
- ("dev/tty3" ("/hurd/term" "/dev/tty3" "hurdio" "/dev/vcs/3/console")
- #o666)
-
- ("dev/ptyp0" ("/hurd/term" "/dev/ptyp0" "pty-master" "/dev/ttyp0")
- #o666)
- ("dev/ptyp1" ("/hurd/term" "/dev/ptyp1" "pty-master" "/dev/ttyp1")
- #o666)
- ("dev/ptyp2" ("/hurd/term" "/dev/ptyp2" "pty-master" "/dev/ttyp2")
- #o666)
-
- ("dev/ttyp0" ("/hurd/term" "/dev/ttyp0" "pty-slave" "/dev/ptyp0")
- #o666)
- ("dev/ttyp1" ("/hurd/term" "/dev/ttyp1" "pty-slave" "/dev/ptyp1")
- #o666)
- ("dev/ttyp2" ("/hurd/term" "/dev/ttyp2" "pty-slave" "/dev/ptyp2")
- #o666)))
+ ;; Create a number of ttys; syslogd writes to tty12 by default.
+ ;; FIXME: Creating /dev/tty12 leads the console client to switch to
+ ;; tty12 when syslogd starts, which is confusing for users. Thus, do
+ ;; not create tty12.
+ ,@(map (lambda (n)
+ (let ((n (number->string n)))
+ `(,(string-append "dev/tty" n)
+ ("/hurd/term" ,(string-append "/dev/tty" n)
+ "hurdio" ,(string-append "/dev/vcs/" n "/console"))
+ #o666)))
+ (iota 11 1))
+
+ ,@(append-map (lambda (n)
+ (let ((n (number->string n)))
+ `((,(string-append "dev/ptyp" n)
+ ("/hurd/term" ,(string-append "/dev/ptyp" n)
+ "pty-master" ,(string-append "/dev/ttyp" n))
+ #o666)
+
+ (,(string-append "dev/ttyp" n)
+ ("/hurd/term" ,(string-append "/dev/ttyp" n)
+ "pty-slave" ,(string-append "/dev/ptyp" n))
+ #o666))))
+ (iota 10 0))))
(for-each scope-set-translator servers)
(mkdir* "dev/vcs/1")
(mkdir* "dev/vcs/2")
- (mkdir* "dev/vcs/2")
(rename-file (scope "dev/console") (scope "dev/console-"))
(for-each scope-set-translator devices)
diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm
index 1d294a997c..5f35bfe054 100644
--- a/gnu/home/services/mcron.scm
+++ b/gnu/home/services/mcron.scm
@@ -77,35 +77,35 @@ Each message is also prefixed by a timestamp by GNU Shepherd."))
(define shepherd-schedule-action
(@@ (gnu services mcron) shepherd-schedule-action))
-(define home-mcron-shepherd-services
- (match-lambda
- (($ <home-mcron-configuration> mcron '()) ; no jobs to run
- '())
- (($ <home-mcron-configuration> mcron jobs log? log-format)
- (let ((files (job-files mcron jobs)))
- (list (shepherd-service
- (documentation "User cron jobs.")
- (provision '(mcron))
- (modules `((srfi srfi-1)
- (srfi srfi-26)
- (ice-9 popen) ; for the 'schedule' action
- (ice-9 rdelim)
- (ice-9 match)
- ,@%default-modules))
- (start #~(make-forkexec-constructor
- (list (string-append #$mcron "/bin/mcron")
- #$@(if log?
- #~("--log" "--log-format" #$log-format)
- #~())
- #$@files)
- #:log-file (string-append
- (or (getenv "XDG_LOG_HOME")
- (format #f "~a/.local/var/log"
- (getenv "HOME")))
- "/mcron.log")))
- (stop #~(make-kill-destructor))
- (actions
- (list (shepherd-schedule-action mcron files)))))))))
+(define (home-mcron-shepherd-services config)
+ (match-record config <home-mcron-configuration>
+ (mcron jobs log? log-format)
+ (if (null? jobs)
+ '() ;no jobs to run
+ (let ((files (job-files mcron jobs)))
+ (list (shepherd-service
+ (documentation "User cron jobs.")
+ (provision '(mcron))
+ (modules `((srfi srfi-1)
+ (srfi srfi-26)
+ (ice-9 popen) ;for the 'schedule' action
+ (ice-9 rdelim)
+ (ice-9 match)
+ ,@%default-modules))
+ (start #~(make-forkexec-constructor
+ (list (string-append #$mcron "/bin/mcron")
+ #$@(if log?
+ #~("--log" "--log-format" #$log-format)
+ #~())
+ #$@files)
+ #:log-file (string-append
+ (or (getenv "XDG_LOG_HOME")
+ (format #f "~a/.local/var/log"
+ (getenv "HOME")))
+ "/mcron.log")))
+ (stop #~(make-kill-destructor))
+ (actions
+ (list (shepherd-schedule-action mcron files)))))))))
(define home-mcron-profile (compose list home-mcron-configuration-mcron))
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 3e346c3813..b529c8e798 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -25,6 +25,7 @@
#:use-module (gnu packages bash)
#:use-module (guix gexp)
#:use-module (guix packages)
+ #:use-module (guix records)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
@@ -479,31 +480,30 @@ with text blocks from other extensions and the base service.")
with text blocks from other extensions and the base service."))
(define (home-bash-extensions original-config extension-configs)
- (match original-config
- (($ <home-bash-configuration> _ _ environment-variables aliases
- bash-profile bashrc bash-logout)
- (home-bash-configuration
- (inherit original-config)
- (environment-variables
- (append environment-variables
- (append-map
- home-bash-extension-environment-variables extension-configs)))
- (aliases
- (append aliases
- (append-map
- home-bash-extension-aliases extension-configs)))
- (bash-profile
- (append bash-profile
- (append-map
- home-bash-extension-bash-profile extension-configs)))
- (bashrc
- (append bashrc
- (append-map
- home-bash-extension-bashrc extension-configs)))
- (bash-logout
- (append bash-logout
- (append-map
- home-bash-extension-bash-logout extension-configs)))))))
+ (match-record original-config <home-bash-configuration>
+ (environment-variables aliases bash-profile bashrc bash-logout)
+ (home-bash-configuration
+ (inherit original-config)
+ (environment-variables
+ (append environment-variables
+ (append-map
+ home-bash-extension-environment-variables extension-configs)))
+ (aliases
+ (append aliases
+ (append-map
+ home-bash-extension-aliases extension-configs)))
+ (bash-profile
+ (append bash-profile
+ (append-map
+ home-bash-extension-bash-profile extension-configs)))
+ (bashrc
+ (append bashrc
+ (append-map
+ home-bash-extension-bashrc extension-configs)))
+ (bash-logout
+ (append bash-logout
+ (append-map
+ home-bash-extension-bash-logout extension-configs))))))
(define home-bash-service-type
(service-type (name 'home-bash)
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm
index 63c6041cd4..865f8b81d7 100644
--- a/gnu/home/services/xdg.scm
+++ b/gnu/home/services/xdg.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
+;;; Copyright © 2021, 2022 Andrew Tropin <andrew@trop.in>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;;
;;; This file is part of GNU Guix.
@@ -35,10 +35,24 @@
#:export (home-xdg-base-directories-service-type
home-xdg-base-directories-configuration
home-xdg-base-directories-configuration?
+ home-xdg-base-directories-configuration-cache-home
+ home-xdg-base-directories-configuration-config-home
+ home-xdg-base-directories-configuration-data-home
+ home-xdg-base-directories-configuration-state-home
+ home-xdg-base-directories-configuration-log-home
+ home-xdg-base-directories-configuration-runtime-dir
home-xdg-user-directories-service-type
home-xdg-user-directories-configuration
home-xdg-user-directories-configuration?
+ home-xdg-user-directories-configuration-desktop
+ home-xdg-user-directories-configuration-documents
+ home-xdg-user-directories-configuration-download
+ home-xdg-user-directories-configuration-music
+ home-xdg-user-directories-configuration-pictures
+ home-xdg-user-directories-configuration-publicshare
+ home-xdg-user-directories-configuration-templates
+ home-xdg-user-directories-configuration-videos
xdg-desktop-action
xdg-desktop-entry
@@ -383,25 +397,25 @@ configuration."
(define (serialize-alist config)
(generic-serialize-alist append format-config config))
- (define (serialize-xdg-desktop-action action)
- (match action
- (($ <xdg-desktop-action> action name config)
- `(,(format #f "[Desktop Action ~a]\n"
- (string-capitalize (maybe-object->string action)))
- ,(format #f "Name=~a\n" name)
- ,@(serialize-alist config)))))
-
- (match entry
- (($ <xdg-desktop-entry> file name type config actions)
- (list (if (string-suffix? file ".desktop")
- file
- (string-append file ".desktop"))
- `("[Desktop Entry]\n"
- ,(format #f "Name=~a\n" name)
- ,(format #f "Type=~a\n"
- (string-capitalize (symbol->string type)))
- ,@(serialize-alist config)
- ,@(append-map serialize-xdg-desktop-action actions))))))
+ (define (serialize-xdg-desktop-action desktop-action)
+ (match-record desktop-action <xdg-desktop-action>
+ (action name config)
+ `(,(format #f "[Desktop Action ~a]\n"
+ (string-capitalize (maybe-object->string action)))
+ ,(format #f "Name=~a\n" name)
+ ,@(serialize-alist config))))
+
+ (match-record entry <xdg-desktop-entry>
+ (file name type config actions)
+ (list (if (string-suffix? file ".desktop")
+ file
+ (string-append file ".desktop"))
+ `("[Desktop Entry]\n"
+ ,(format #f "Name=~a\n" name)
+ ,(format #f "Type=~a\n"
+ (string-capitalize (symbol->string type)))
+ ,@(serialize-alist config)
+ ,@(append-map serialize-xdg-desktop-action actions)))))
(define-configuration home-xdg-mime-applications-configuration
(added
diff --git a/gnu/local.mk b/gnu/local.mk
index 7278c50e4f..3329801fa6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -116,6 +116,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/anthy.scm \
%D%/packages/antivirus.scm \
%D%/packages/apl.scm \
+ %D%/packages/apparmor.scm \
%D%/packages/apr.scm \
%D%/packages/arcan.scm \
%D%/packages/aspell.scm \
@@ -759,6 +760,7 @@ GNU_SYSTEM_MODULES = \
%D%/tests/docker.scm \
%D%/tests/file-sharing.scm \
%D%/tests/ganeti.scm \
+ %D%/tests/gdm.scm \
%D%/tests/guix.scm \
%D%/tests/monitoring.scm \
%D%/tests/nfs.scm \
@@ -1345,6 +1347,8 @@ dist_patch_DATA = \
%D%/packages/patches/jami-fix-unit-tests-build.patch \
%D%/packages/patches/jami-libjami-headers-search.patch \
%D%/packages/patches/jami-no-webengine.patch \
+ %D%/packages/patches/jami-sipaccount-segfault.patch \
+ %D%/packages/patches/jami-sip-contacts.patch \
%D%/packages/patches/jami-sip-unregister.patch \
%D%/packages/patches/jami-xcb-link.patch \
%D%/packages/patches/jamvm-1.5.1-aarch64-support.patch \
@@ -1823,6 +1827,7 @@ dist_patch_DATA = \
%D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \
%D%/packages/patches/ruby-sanitize-system-libxml.patch \
%D%/packages/patches/rustc-1.54.0-src.patch \
+ %D%/packages/patches/rust-1.64-fix-riscv64-bootstrap.patch \
%D%/packages/patches/rust-adblock-ignore-live-tests.patch \
%D%/packages/patches/i3status-rust-enable-unstable-features.patch \
%D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \
@@ -1837,7 +1842,6 @@ dist_patch_DATA = \
%D%/packages/patches/sbcl-aserve-fix-rfe12668.patch \
%D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \
%D%/packages/patches/sbcl-clml-fix-types.patch \
- %D%/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch \
%D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \
%D%/packages/patches/scalapack-gcc-10-compilation.patch \
%D%/packages/patches/scheme48-tests.patch \
@@ -1868,7 +1872,6 @@ dist_patch_DATA = \
%D%/packages/patches/spectre-meltdown-checker-find-kernel.patch \
%D%/packages/patches/sphinxbase-fix-doxygen.patch \
%D%/packages/patches/spice-vdagent-glib-2.68.patch \
- %D%/packages/patches/sssd-optional-systemd.patch \
%D%/packages/patches/sssd-system-directories.patch \
%D%/packages/patches/steghide-fixes.patch \
%D%/packages/patches/suitesparse-mongoose-cmake.patch \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 99231a710e..b1f928014e 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1175,7 +1175,7 @@ would need and has several interesting built-in capabilities.")
(define-public netcat-openbsd
(package
(name "netcat-openbsd")
- (version "1.218-5")
+ (version "1.219-1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1184,7 +1184,7 @@ would need and has several interesting built-in capabilities.")
(file-name (git-file-name name version))
(sha256
(base32
- "0hpbmz9m2q22a6qgbn9590z2x96xgffim8g0m1v47mariz3pqhlc"))))
+ "1fhrmnbdl6bgsjk02vi78zy9i486mmniymbbbhdkzl8zfjbjkpxc"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no test suite
diff --git a/gnu/packages/apparmor.scm b/gnu/packages/apparmor.scm
new file mode 100644
index 0000000000..ddbd9eb7a9
--- /dev/null
+++ b/gnu/packages/apparmor.scm
@@ -0,0 +1,202 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages apparmor)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages dejagnu)
+ #:use-module (gnu packages flex)
+ #:use-module (gnu packages gawk)
+ #:use-module (gnu packages gettext)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu packages perl)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages ruby)
+ #:use-module (gnu packages swig)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
+
+(define-public libapparmor
+ (package
+ (name "libapparmor")
+ (version "3.1.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/apparmor/apparmor")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1h77a7ww0rxfv5nsi1iy4fffklxdr2vq6r7kdsqm15yysglhbjyi"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
+ "--with-perl" "--with-python" "--with-ruby")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each patch-shebang
+ '("common/list_af_names.sh"
+ "common/list_capabilities.sh"))
+ (for-each (lambda (file)
+ (substitute* file
+ (("/usr") "")
+ (("/bin/\\<(pod2man|pod2html|podchecker|prove)\\>" path)
+ (search-input-file inputs path))
+ (("/include/linux/capability.h" path)
+ (search-input-file inputs path))))
+ '("common/Make-po.rules"
+ "common/Make.rules"
+ "binutils/Makefile"
+ "parser/Makefile"
+ "parser/tst/Makefile"
+ "profiles/Makefile"
+ "utils/Makefile"
+ "utils/python-tools-setup.py"
+ "utils/vim/Makefile"))))
+ (add-after 'fix-paths 'change-directory
+ (lambda _
+ (chdir "libraries/libapparmor"))))))
+ (native-inputs
+ (list autoconf
+ automake
+ bison
+ dejagnu
+ flex
+ libtool
+ perl
+ python-minimal
+ ruby
+ swig
+ which))
+ (home-page "https://apparmor.net")
+ (synopsis "Linux kernel security module")
+ (description
+ "AppArmor is an effective and easy-to-use Linux application security
+system.
+
+AppArmor proactively protects the operating system and applications from
+external or internal threats, even zero-day attacks, by enforcing good
+behavior and preventing both known and unknown application flaws from being
+exploited.
+
+AppArmor supplements the traditional Unix discretionary access control (DAC)
+model by providing mandatory access control (MAC). It has been included in
+the mainline Linux kernel since version 2.6.36 and its development has been
+supported by Canonical since 2009.")
+ (license license:lgpl2.1)
+ (supported-systems (filter (lambda (system)
+ (string-suffix? "-linux" system))
+ %supported-systems))))
+
+(define-public apparmor
+ (let ((base libapparmor))
+ (package
+ (inherit base)
+ (name "apparmor")
+ (arguments
+ (append
+ (list #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "DESTDIR=" #$output)
+ "USE_SYSTEM=1"
+ ;; No need to run the linter
+ "PYFLAKES=true"))
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (delete 'configure)
+ ;; apparmor-binutils
+ (replace 'change-directory
+ (lambda _
+ (chdir "binutils")))
+
+ ;; apparmor-parser
+ (add-after 'install 'chdir-parser
+ (lambda _
+ (chdir "../parser")))
+ (add-after 'chdir-parser 'patch-source-shebangs-parser
+ (assoc-ref %standard-phases 'patch-source-shebangs))
+ (add-after 'patch-source-shebangs-parser 'build-parser
+ (assoc-ref %standard-phases 'build))
+ (add-after 'build-parser 'check-parser
+ (assoc-ref %standard-phases 'check))
+ (add-after 'check-parser 'install-parser
+ (assoc-ref %standard-phases 'install))
+
+ ;; apparmor-utils
+ ;; FIXME: Tests required Python library from this package
+ ;; (itself).
+ (add-after 'install-parser 'chdir-utils
+ (lambda _
+ (chdir "../utils")
+ ;; Fix paths to installed policygroups and templates for
+ ;; easyprof.
+ (substitute* "easyprof/easyprof.conf"
+ (("/usr") #$output))))
+ (add-after 'chdir-utils 'build-utils
+ (assoc-ref %standard-phases 'build))
+ (add-after 'build-utils 'install-utils
+ (assoc-ref %standard-phases 'install))
+
+ ;; apparmor-profiles
+ ;; FIXME: Tests need an AppArmor-enabled system.
+ (add-after 'install-utils 'chdir-profiles
+ (lambda _
+ (chdir "../profiles")))
+ (add-after 'chdir-profiles 'build-profiles
+ (assoc-ref %standard-phases 'build))
+ (add-after 'check-build 'install-profiles
+ (assoc-ref %standard-phases 'install)))))))
+ (propagated-inputs
+ (list libapparmor))
+ ;; Python module `readline' needed
+ (native-inputs
+ (list bison flex gettext-minimal perl python which))
+ (license license:gpl2))))
+
+(define-public pam-apparmor
+ (let ((base apparmor))
+ (package
+ (inherit base)
+ (name "pam-apparmor")
+ (arguments
+ (append
+ (list #:tests? #f) ;no tests
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (delete 'chdir-parser)
+ (delete 'chdir-utils)
+ (delete 'chdir-profiles)
+ (replace 'change-directory
+ (lambda _
+ (chdir "changehat/pam_apparmor"))))))))
+ (native-inputs (list pkg-config perl which))
+ (inputs (list libapparmor linux-pam))
+ (license license:bsd-3))))
diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 8a899f0020..7e36bbcc71 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -144,8 +144,10 @@ debugging information in STABS, DWARF 2, and CodeView 8 formats.")
(build-system gnu-build-system)
(native-inputs (list zlib))
(arguments
- ;; Some tests fail when run in parallel.
- `(#:parallel-tests? #f))
+ `(#:configure-flags
+ (list "--disable-static")
+ ;; Some tests fail when run in parallel.
+ #:parallel-tests? #f))
(synopsis "Library for generating assembly code at runtime")
(description
"GNU Lightning is a library that generates assembly language code at
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 439fdf72a8..759ccbec9e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -89,6 +89,58 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
+(define-public alfa
+ (package
+ (name "alfa")
+ (version "2.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rwesson/ALFA")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0aqxqar36822mh373awsl79j7zn8vik4yddyydsxv0c76gn4i2k3"))
+ (file-name (git-file-name name version))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:parallel-build? #f
+ #:make-flags #~(list (string-append "PREFIX="
+ #$output)
+ (string-append "VERSION="
+ #$version))
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'check)
+ (add-after 'install 'post-install-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "fittest")))))))
+ (inputs (list cfitsio gfortran))
+ (home-page "https://nebulousresearch.org/codes/alfa/")
+ (synopsis "Automated line fitting algorithm")
+ (description
+ "This package provides @acronym{ALFA, Automatic line fitting algorithm},
+which can identify and fit hundreds of lines in emission line spectra in just a
+few seconds with following features:
+@itemize
+
+@item A population of synthetic spectra is generated using a reference line
+catalogue.
+
+@item The goodness of fit for each synthetic spectrum is calculated. The best
+sets of parameters are retained and the rest discarded.
+
+@item A new population of synthetic spectra is obtained by averaging pairs of
+the best performers.
+
+@item A small fraction of the parameters of the lines in the new generation are
+randomly altered.
+
+@item The process repeats until a good fit is obtained.
+@end itemize")
+ (license license:gpl3)))
+
(define-public aocommon
(let ((commit "7329a075271edab8f6264db649e81e62b2b6ae5e")
(revision "1"))
@@ -1873,7 +1925,7 @@ It can be used to calculate the trajectory of satellites.")
(native-inputs
(list boost pkg-config))
(inputs
- (list cfitsio freeimage glew wxwidgets))
+ (list cfitsio freeimage glew wxwidgets-3.0))
(home-page "https://github.com/GreatAttractor/imppg")
(synopsis "Astronomical Image Post-Proccessor (ImPPG)")
(description
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index ead5ce5963..2f9cb9526e 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -892,7 +892,7 @@ engineers, musicians, soundtrack editors and composers.")
#t))))
(build-system cmake-build-system)
(inputs
- (list wxwidgets-3.1
+ (list wxwidgets
gtk+
alsa-lib
jack-1
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 67708138a6..00d95e7b3d 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1088,14 +1088,14 @@ interactive mode.")
(define-public btrbk
(package
(name "btrbk")
- (version "0.32.4")
+ (version "0.32.5")
(source (origin
(method url-fetch)
(uri (string-append "https://digint.ch/download/btrbk/releases/"
"btrbk-" version ".tar.xz"))
(sha256
(base32
- "1nl6cbzqkc2srwi1428vijq69rp5cdx7484zcx61ph0rnhg9srfc"))))
+ "1d4zqf5klad55gdzzldipsjrhpprixzjmn03g66df5h2d28l1zpi"))))
(build-system gnu-build-system)
(arguments
(list
diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index bb319a13e5..c62c5970b8 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -2454,13 +2454,13 @@ plants. The method has been specifically designed to:
(define-public r-alpine
(package
(name "r-alpine")
- (version "1.22.0")
+ (version "1.24.0")
(source (origin
(method url-fetch)
(uri (bioconductor-uri "alpine" version))
(sha256
(base32
- "1nl1hxwakh5m9rqm3ksn2jzknsj9xnwl51bmc30knknm4q35wdv9"))))
+ "0rjnwljh4c2f7ml0m14pllns4pvyjwwf23qsn6zjygm5x04bapf0"))))
(properties `((upstream-name . "alpine")))
(build-system r-build-system)
(propagated-inputs
@@ -4216,18 +4216,19 @@ mapping.")
(define-public r-nmf
(package
(name "r-nmf")
- (version "0.24.0")
+ (version "0.25")
(source
(origin
(method url-fetch)
(uri (cran-uri "NMF" version))
(sha256
(base32
- "14yxra6in5c1md5nr75y8cdmh9pg0lxqabqflvlhgg1vbg9i2628"))))
+ "0kdl7yz4v7pms6y2lff4x5w7pwkx54488qx0v539qmvcbxv1if98"))))
(properties `((upstream-name . "NMF")))
(build-system r-build-system)
(propagated-inputs
(list r-cluster
+ r-codetools
r-biobase
r-biocmanager
r-bigmemory ; suggested
@@ -4238,7 +4239,6 @@ mapping.")
r-foreach
r-ggplot2
r-gridbase
- r-pkgmaker
r-rcolorbrewer
r-registry
r-reshape2
@@ -4787,13 +4787,13 @@ only one command.")
(define-public r-biocparallel
(package
(name "r-biocparallel")
- (version "1.32.1")
+ (version "1.32.3")
(source (origin
(method url-fetch)
(uri (bioconductor-uri "BiocParallel" version))
(sha256
(base32
- "1fkfbs0n0sdssli7ibrswkfag080kgv8n1zf6ssxx729g1fz3m3h"))))
+ "0z2g3p6ip4g865na9bmqaa7w2s52769pmjr3hpiv6x8bhifh3nm5"))))
(properties
`((upstream-name . "BiocParallel")))
(build-system r-build-system)
@@ -6010,6 +6010,42 @@ reduction (between group analysis) and joint dimension reduction of two
datasets (coinertia analysis).")
(license license:artistic2.0)))
+(define-public r-metaneighbor
+ (package
+ (name "r-metaneighbor")
+ (version "1.18.0")
+ (source (origin
+ (method url-fetch)
+ (uri (bioconductor-uri "MetaNeighbor" version))
+ (sha256
+ (base32
+ "1gjjp5qlmv26sd3fvrd8cgv3invckxr8ldjpizpqm4mxjzifxwpm"))))
+ (properties `((upstream-name . "MetaNeighbor")))
+ (build-system r-build-system)
+ (propagated-inputs
+ (list r-beanplot
+ r-dplyr
+ r-ggplot2
+ r-gplots
+ r-igraph
+ r-matrix
+ r-matrixstats
+ r-rcolorbrewer
+ r-singlecellexperiment
+ r-summarizedexperiment
+ r-tibble
+ r-tidyr))
+ (native-inputs (list r-knitr))
+ (home-page "https://bioconductor.org/packages/MetaNeighbor")
+ (synopsis "Single cell replicability analysis")
+ (description
+ "This package implements a method to rapidly assess cell type identity using
+both functional and random gene sets and it allows users to quantify cell type
+replicability across datasets using neighbor voting. @code{MetaNeighbor} works
+on the basis that cells of the same type should have more similar gene expression
+profiles than cells of different types.")
+ (license license:expat)))
+
(define-public r-methylkit
(package
(name "r-methylkit")
@@ -8765,6 +8801,41 @@ representations of analysis results in order to provide additional
information.")
(license license:lgpl3)))
+(define-public r-glmgampoi
+ (package
+ (name "r-glmgampoi")
+ (version "1.10.0")
+ (source (origin
+ (method url-fetch)
+ (uri (bioconductor-uri "glmGamPoi" version))
+ (sha256
+ (base32
+ "12jbqigg4k2ngrk2anbrrxrwkp57bbzdz492lg8lc6w1gygp5yip"))))
+ (properties `((upstream-name . "glmGamPoi")))
+ (build-system r-build-system)
+ (propagated-inputs
+ (list r-beachmat
+ r-biocgenerics
+ r-delayedarray
+ r-delayedmatrixstats
+ r-hdf5array
+ r-matrixgenerics
+ r-matrixstats
+ r-rcpp
+ r-rcpparmadillo
+ r-rlang
+ r-singlecellexperiment
+ r-summarizedexperiment))
+ (native-inputs (list r-knitr))
+ (home-page "https://github.com/const-ae/glmGamPoi")
+ (synopsis "Fit a Gamma-Poisson Generalized Linear Model")
+ (description
+ "Fit linear models to overdispersed count data. The package can estimate
+the overdispersion and fit repeated models for matrix input. It is designed
+to handle large input datasets as they typically occur in single cell RNA-seq
+experiments.")
+ (license license:gpl3)))
+
(define-public r-rots
(package
(name "r-rots")
@@ -17820,14 +17891,14 @@ the Bioconductor project.")
(define-public r-biodb
(package
(name "r-biodb")
- (version "1.6.0")
+ (version "1.6.1")
(source
(origin
(method url-fetch)
(uri (bioconductor-uri "biodb" version))
(sha256
(base32
- "08ahz3v2xbhwfh89dbnhhcdm0x5qv4hibi8wknlqf5x8gqm5j5w6"))))
+ "0mbqsias2ajw29d1wgl10y2cjqv3slrsgifccz0kh9l5r6bk28vz"))))
(properties `((upstream-name . "biodb")))
(build-system r-build-system)
(propagated-inputs
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 6c6ff3e25a..3a7dc1a1b7 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -57,6 +57,7 @@
#:use-module (guix build-system meson)
#:use-module (guix build-system ocaml)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (guix build-system r)
@@ -846,7 +847,7 @@ intended to behave exactly the same as the original BWK awk.")
(define-public python-cellbender
(package
(name "python-cellbender")
- (version "0.2.1")
+ (version "0.2.2")
(source
(origin
(method git-fetch)
@@ -856,8 +857,8 @@ intended to behave exactly the same as the original BWK awk.")
(file-name (git-file-name name version))
(sha256
(base32
- "1zav2q8nnss80i25y06fccagkvrqsy7lpylsl4dxv4qkj8p4fnv3"))))
- (build-system python-build-system)
+ "12q22va7rbc3sx9ygc6p6hh6xw9wbqjmhba5h5gb836p5xplj5fa"))))
+ (build-system pyproject-build-system)
(arguments
(list #:tests? #false)) ;there are none
(propagated-inputs
@@ -884,14 +885,14 @@ from high-throughput single-cell RNA sequencing (scRNA-seq) data.")
(define-public python-htsget
(package
(name "python-htsget")
- (version "0.2.5")
+ (version "0.2.6")
(source (origin
(method url-fetch)
(uri (pypi-uri "htsget" version))
(sha256
(base32
- "0ic07q85vhw9djf23k57b21my7i5xp400m8gfqgr5gcryqvdr0yk"))))
- (build-system python-build-system)
+ "111q4pzkav26aa3hkgh948wqlyrq7dq6sjml9z63n3blw8s6b0c4"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-setuptools-scm))
(propagated-inputs
@@ -913,11 +914,12 @@ servers supporting the protocol.")
(sha256
(base32
"18rhzk08d3rpxhi5xh6pqg64x6v5q3daw6y3v54k85v4swncjrwj"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
`(#:modules ((srfi srfi-26)
(guix build utils)
- (guix build python-build-system))
+ (guix build python-build-system)
+ (guix build pyproject-build-system))
;; See https://github.com/daler/pybedtools/issues/192
#:phases
(modify-phases %standard-phases
@@ -977,7 +979,7 @@ which are widely used for genomic interval manipulation or \"genome algebra\".
pybedtools extends BEDTools by offering feature-level manipulations from with
Python.")
;; pypi lists GPLv2 in the PKG-INFO and website, but was relicensed in
- ;; version 0.9.0 and the LICENSE.txt is consistant with the source code.
+ ;; version 0.9.0 and the LICENSE.txt is consistent with the source code.
;;
;; pybedtools/include/gzstream.cpp and pybedtools/include/gzstream.h are
;; licensed lgpl2.1+
@@ -1031,7 +1033,7 @@ use-case, we encourage users to compose functions to achieve their goals.")
(define-public python-biom-format
(package
(name "python-biom-format")
- (version "2.1.10")
+ (version "2.1.12")
(source
(origin
(method git-fetch)
@@ -1043,25 +1045,22 @@ use-case, we encourage users to compose functions to achieve their goals.")
(file-name (git-file-name name version))
(sha256
(base32
- "0i62j6ksmp78ap2dnl969gq6vprc3q87zc8ksj9if8g2603iq6i8"))
+ "06x2d8fv80jp86kd66fm3ragmxrpa2j0lzsbm337ziqjnpsdwc0f"))
(modules '((guix build utils)))
;; Delete generated C files.
(snippet
'(for-each delete-file (find-files "." "\\.c")))))
(build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
+ (list
+ #:phases
+ '(modify-phases %standard-phases
(add-after 'unpack 'use-cython
(lambda _ (setenv "USE_CYTHON" "1")))
- (add-after 'unpack 'relax
- (lambda _
- (substitute* "setup.py"
- (("pytest < 5.3.4") "pytest"))))
(add-after 'unpack 'disable-broken-tests
(lambda _
- (substitute* "biom/tests/test_cli/test_validate_table.py"
- (("^(.+)def test_invalid_hdf5" m indent)
+ (substitute* "biom/tests/test_util.py"
+ (("^(.+)def test_biom_open_hdf5_no_h5py" m indent)
(string-append indent
"@npt.dec.skipif(True, msg='Guix')\n"
m)))
@@ -1072,13 +1071,14 @@ use-case, we encourage users to compose functions to achieve their goals.")
m))))))))
(propagated-inputs
(list python-anndata
- python-numpy
- python-scipy
+ python-click
python-flake8
python-future
- python-click
python-h5py
- python-pandas))
+ python-numpy
+ python-pandas
+ python-scikit-bio
+ python-scipy))
(native-inputs
(list python-cython python-pytest python-pytest-cov python-nose))
(home-page "http://www.biom-format.org")
@@ -1093,42 +1093,45 @@ e.g. microbiome samples, genomes, metagenomes.")
(define-public python-pairtools
(package
(name "python-pairtools")
- (version "0.3.0")
+ (version "1.0.2")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/mirnylab/pairtools")
+ (url "https://github.com/open2c/pairtools")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
- "0gr8y13q7sd6yai6df4aavl2470n1f9s3cib6r473z4hr8hcbwmc"))))
+ "0xn4cg4jq3rfn42h8rfwg0k6xkvihjrv32gwldb9y0jp05lzw9cs"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-references
(lambda _
- (substitute* '("pairtools/pairtools_merge.py"
- "pairtools/pairtools_sort.py")
- (("/bin/bash") (which "bash")))
- #t))
+ (substitute* '("pairtools/cli/header.py"
+ "pairtools/cli/merge.py"
+ "pairtools/cli/sort.py")
+ (("/bin/bash") (which "bash")))))
(replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (with-directory-excursion "/tmp"
- (invoke "pytest" "-v")))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "/tmp"
+ (invoke "pytest" "-v"))))))))
(native-inputs
- (list python-cython python-nose python-pytest))
- (inputs
- `(("python" ,python-wrapper)))
+ (list python-cython python-pytest))
(propagated-inputs
(list htslib ; for bgzip, looked up in PATH
samtools ; looked up in PATH
lz4 ; for lz4c
+ python-bioframe
python-click
- python-numpy))
- (home-page "https://github.com/mirnylab/pairtools")
+ python-numpy
+ python-pandas
+ python-pysam
+ python-pyyaml
+ python-scipy))
+ (home-page "https://github.com/open2c/pairtools")
(synopsis "Process mapped Hi-C data")
(description "Pairtools is a simple and fast command-line framework to
process sequencing data from a Hi-C experiment. Process pair-end sequence
@@ -2973,6 +2976,71 @@ generation, and transformation to RDF. Salad provides a bridge between document
and record oriented data modeling and the Semantic Web.")
(license license:asl2.0)))
+(define-public python-scikit-bio
+ (package
+ (name "python-scikit-bio")
+ (version "0.5.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "scikit-bio" version))
+ (sha256
+ (base32
+ "1a8xbp3vrw8wfpm3pa2nb4rcar0643iqnb043ifwqbqyc86clhv3"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ ;; See https://github.com/biocore/scikit-bio/pull/1826
+ (add-after 'unpack 'compatibility
+ (lambda _
+ (substitute* "skbio/sequence/tests/test_sequence.py"
+ (("def test_concat_strict_many")
+ "def _do_not_test_concat_strict_many"))
+ (substitute* "skbio/stats/distance/_mantel.py"
+ (("from scipy.stats import PearsonRConstantInputWarning")
+ "from scipy.stats import ConstantInputWarning")
+ (("from scipy.stats import PearsonRNearConstantInputWarning")
+ "from scipy.stats import NearConstantInputWarning")
+ (("from scipy.stats import SpearmanRConstantInputWarning") "")
+ (("warnings.warn\\(PearsonRConstantInputWarning\\(\\)\\)")
+ "warnings.warn(ConstantInputWarning())")
+ (("warnings.warn\\(PearsonRNearConstantInputWarning\\(\\)\\)")
+ "warnings.warn(NearConstantInputWarning())")
+ (("warnings.warn\\(SpearmanRConstantInputWarning\\(\\)\\)")
+ "warnings.warn(ConstantInputWarning())"))
+ (substitute* "skbio/diversity/alpha/tests/test_base.py"
+ (("self.assertEqual\\(pielou_e")
+ "self.assertAlmostEqual(pielou_e"))))
+ (add-before 'check 'build-extensions
+ (lambda _
+ ;; Cython extensions have to be built before running the tests.
+ (invoke "python3" "setup.py" "build_ext" "--inplace")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests? (invoke "python3" "-m" "skbio.test")))))))
+ (propagated-inputs
+ (list python-cachecontrol
+ python-decorator
+ python-h5py
+ python-hdmedians
+ python-ipython
+ python-lockfile
+ python-matplotlib
+ python-natsort
+ python-numpy
+ python-pandas
+ python-scikit-learn
+ python-scipy))
+ (native-inputs
+ (list python-coverage python-pytest))
+ (home-page "https://scikit-bio.org")
+ (synopsis "Data structures, algorithms and educational resources for bioinformatics")
+ (description
+ "This package provides data structures, algorithms and educational
+resources for bioinformatics.")
+ (license license:bsd-3)))
+
(define-public cwltool
(package
(name "cwltool")
@@ -10601,6 +10669,102 @@ traditional read alignments) and massively-parallel stochastic collapsed
variational inference.")
(license license:gpl3+)))
+(define-public python-fanc
+ (package
+ (name "python-fanc")
+ (version "0.9.25")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vaquerizaslab/fanc")
+ ;; There are no tags. This commit corresponds to
+ ;; version 0.9.25.
+ (commit "e2205346c13ea5349681dff21adeb271d4ea5261")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rxq24p852iiayi0083fyigvc30as695rha71q6xd4s2ij1k9mqi"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv"
+ "-k"
+ ;; XXX: These all fail because they fail to read
+ ;; the included test_{cooler,juicer}.hic files.
+ (string-append "not test_edges_iter"
+ " and not test_get_edges_uncorrected"
+ " and not test_get_edges"))))))))
+ (propagated-inputs
+ (list python-biopython
+ python-cooler
+ python-deprecated
+ python-future
+ python-genomic-regions
+ python-gridmap
+ python-h5py
+ python-intervaltree
+ python-matplotlib
+ python-msgpack
+ python-msgpack-numpy
+ python-numpy
+ python-pandas
+ python-pillow
+ python-progressbar2
+ python-pybedtools
+ python-pybigwig
+ python-pysam
+ python-pytest
+ python-pyyaml
+ python-scikit-image
+ python-scikit-learn
+ python-scipy
+ python-seaborn
+ python-tables))
+ (native-inputs
+ (list python-cython))
+ (home-page "https://github.com/vaquerizaslab/fanc")
+ (synopsis "Framework for the analysis of C-data")
+ (description
+ "FAN-C provides a pipeline for analysing Hi-C data starting at
+mapped paired-end sequencing reads.")
+ (license license:gpl3+)))
+
+(define-public python-genomic-regions
+ (package
+ (name "python-genomic-regions")
+ (version "0.0.10")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "genomic_regions" version))
+ (sha256
+ (base32
+ "0hz811iyd1prml1r90qyzimmwyjwycwkjqw4vnl12bxy61rfzjz5"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs
+ (list python-future
+ python-intervaltree
+ python-numpy
+ python-pandas
+ python-pybedtools
+ python-pybigwig
+ python-pytest
+ python-msgpack-numpy
+ python-cython
+ python-msgpack
+ python-pysam))
+ (home-page "https://pypi.org/project/genomic-regions/")
+ (synopsis "Consistently handle genomic regions")
+ (description "This package aims to simplify working with genomic region /
+interval data by providing a common interface that lets you access a wide
+selection of file types and formats for handling genomic region data---all
+using the same syntax.")
+ (license license:expat)))
+
(define-public python-loompy
(package
(name "python-loompy")
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 210bc30536..8888c51736 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -67,13 +68,17 @@
#:use-module (gnu packages virtualization)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system trivial)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (ice-9 optargs)
+ #:use-module (ice-9 match)
#:use-module (ice-9 regex))
(define unifont
@@ -92,22 +97,22 @@
(name "grub")
(version "2.06")
(source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
- (sha256
- (base32
- "1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp"))
- (patches (search-patches
- "grub-efi-fat-serial-number.patch"
- "grub-setup-root.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Adjust QEMU invocation to not use a deprecated device
- ;; name that was removed in QEMU 6.0. Remove for >2.06.
- (substitute* "tests/ahci_test.in"
- (("ide-drive")
- "ide-hd"))))))
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/grub/grub-" version ".tar.xz"))
+ (sha256
+ (base32
+ "1qbycnxkx07arj9f2nlsi9kp0dyldspbv07ysdyd34qvz55a97mp"))
+ (patches (search-patches
+ "grub-efi-fat-serial-number.patch"
+ "grub-setup-root.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Adjust QEMU invocation to not use a deprecated device
+ ;; name that was removed in QEMU 6.0. Remove for >2.06.
+ (substitute* "tests/ahci_test.in"
+ (("ide-drive")
+ "ide-hd"))))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -117,65 +122,62 @@
(list "PYTHON=true")
;; Grub fails to load modules stripped with --strip-unneeded.
#:strip-flags '("--strip-debug" "--enable-deterministic-archives")
- #:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-stuff
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (substitute* "grub-core/Makefile.in"
- (("/bin/sh") (which "sh")))
-
- ;; Give the absolute file name of 'mdadm', used to
- ;; determine the root file system when it's a RAID
- ;; device. Failing to do that, 'grub-probe' silently
- ;; fails if 'mdadm' is not in $PATH.
- (when (assoc-ref inputs "mdadm")
- (substitute* "grub-core/osdep/linux/getroot.c"
- (("argv\\[0\\] = \"mdadm\"")
- (string-append "argv[0] = \""
- (assoc-ref inputs "mdadm")
- "/sbin/mdadm\""))))
-
- ;; Make the font visible.
- (copy-file (assoc-ref (or native-inputs inputs)
- "unifont")
- "unifont.bdf.gz")
- (system* "gunzip" "unifont.bdf.gz")
-
- ;; Give the absolute file name of 'ckbcomp'.
- (substitute* "util/grub-kbdcomp.in"
- (("^ckbcomp ")
- (string-append
- (search-input-file inputs "/bin/ckbcomp")
- " ")))))
- (add-after 'unpack 'set-freetype-variables
- ;; These variables need to be set to the native versions
- ;; of the dependencies because they are used to build
- ;; programs which are executed during build time.
- (lambda* (#:key native-inputs #:allow-other-keys)
- (when (assoc-ref native-inputs "freetype")
- (let ((freetype (assoc-ref native-inputs "freetype")))
- (setenv "BUILD_FREETYPE_LIBS"
- (string-append "-L" freetype
- "/lib -lfreetype"))
- (setenv "BUILD_FREETYPE_CFLAGS"
- (string-append "-I" freetype
- "/include/freetype2"))))
- #t))
- (add-before 'check 'disable-flaky-test
- (lambda _
- ;; This test is unreliable. For more information, see:
- ;; <https://bugs.gnu.org/26936>.
- (substitute* "Makefile.in"
- (("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
- "grub_cmd_date grub_cmd_sleep"))
- #t))
- (add-before 'check 'disable-pixel-perfect-test
- (lambda _
- ;; This test compares many screenshots rendered with an
- ;; older Unifont (9.0.06) than that packaged in Guix.
- (substitute* "Makefile.in"
- (("test_unset grub_func_test")
- "test_unset"))
- #t)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-stuff
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (substitute* "grub-core/Makefile.in"
+ (("/bin/sh") (which "sh")))
+
+ ;; Give the absolute file name of 'mdadm', used to determine the
+ ;; root file system when it's a RAID device. Failing to do that,
+ ;; 'grub-probe' silently fails if 'mdadm' is not in $PATH.
+ (when (assoc-ref inputs "mdadm")
+ (substitute* "grub-core/osdep/linux/getroot.c"
+ (("argv\\[0\\] = \"mdadm\"")
+ (string-append "argv[0] = \""
+ (assoc-ref inputs "mdadm")
+ "/sbin/mdadm\""))))
+
+ ;; Make the font visible.
+ (copy-file (assoc-ref (or native-inputs inputs)
+ "unifont")
+ "unifont.bdf.gz")
+ (system* "gunzip" "unifont.bdf.gz")
+
+ ;; Give the absolute file name of 'ckbcomp'.
+ (substitute* "util/grub-kbdcomp.in"
+ (("^ckbcomp ")
+ (string-append
+ (search-input-file inputs "/bin/ckbcomp")
+ " ")))))
+ (add-after 'unpack 'set-freetype-variables
+ ;; These variables need to be set to the native versions of the
+ ;; dependencies because they are used to build programs which are
+ ;; executed during build time.
+ (lambda* (#:key native-inputs #:allow-other-keys)
+ (when (assoc-ref native-inputs "freetype")
+ (let ((freetype (assoc-ref native-inputs "freetype")))
+ (setenv "BUILD_FREETYPE_LIBS"
+ (string-append "-L" freetype
+ "/lib -lfreetype"))
+ (setenv "BUILD_FREETYPE_CFLAGS"
+ (string-append "-I" freetype
+ "/include/freetype2"))))))
+ (add-before 'check 'disable-flaky-test
+ (lambda _
+ ;; This test is unreliable. For more information, see:
+ ;; <https://bugs.gnu.org/26936>.
+ (substitute* "Makefile.in"
+ (("grub_cmd_date grub_cmd_set_date grub_cmd_sleep")
+ "grub_cmd_date grub_cmd_sleep"))))
+ (add-before 'check 'disable-pixel-perfect-test
+ (lambda _
+ ;; This test compares many screenshots rendered with an older
+ ;; Unifont (9.0.06) than that packaged in Guix.
+ (substitute* "Makefile.in"
+ (("test_unset grub_func_test")
+ "test_unset")))))
;; Disable tests on ARM and AARCH64 platforms or when cross-compiling.
#:tests? ,(not (or (any (cute string-prefix? <> (or (%current-target-system)
(%current-system)))
@@ -222,19 +224,19 @@
("flex" ,flex)
("texinfo" ,texinfo)
("help2man" ,help2man)
- ("freetype" ,freetype) ; native version needed for build-grub-mkfont
+ ("freetype" ,freetype) ;native version needed for build-grub-mkfont
;; XXX: When building GRUB 2.02 on 32-bit x86, we need a binutils
;; capable of assembling 64-bit instructions. However, our default
;; binutils on 32-bit x86 is not 64-bit capable.
,@(if (string-match "^i[3456]86-" (%current-system))
(let ((binutils (package/inherit
- binutils
- (name "binutils-i386")
- (arguments
- (substitute-keyword-arguments (package-arguments binutils)
- ((#:configure-flags flags ''())
- `(cons "--enable-64-bit-bfd" ,flags)))))))
+ binutils
+ (name "binutils-i386")
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:configure-flags flags ''())
+ `(cons "--enable-64-bit-bfd" ,flags)))))))
`(("ld-wrapper" ,(make-ld-wrapper "ld-wrapper-i386"
#:binutils binutils))
("binutils" ,binutils)))
@@ -342,21 +344,21 @@ menu to select one of the installed operating systems.")
`(,@(substitute-keyword-arguments (package-arguments grub-efi)
((#:configure-flags flags ''())
`(cons*
- ,@(cond ((target-x86?) '("--target=i386"))
- ((target-aarch64?)
- (list "--target=arm"
- (string-append "TARGET_CC="
- (cc-for-target "arm-linux-gnueabihf"))))
- ((target-arm?) '("--target=arm"))
- (else '()))
- ,flags)))))
+ ,@(cond ((target-x86?) '("--target=i386"))
+ ((target-aarch64?)
+ (list "--target=arm"
+ (string-append "TARGET_CC="
+ (cc-for-target "arm-linux-gnueabihf"))))
+ ((target-arm?) '("--target=arm"))
+ (else '()))
+ ,flags)))))
(native-inputs
(if (target-aarch64?)
- (modify-inputs (package-native-inputs grub-efi)
- (prepend
- (cross-gcc "arm-linux-gnueabihf")
- (cross-binutils "arm-linux-gnueabihf")))
- (package-native-inputs grub-efi)))))
+ (modify-inputs (package-native-inputs grub-efi)
+ (prepend
+ (cross-gcc "arm-linux-gnueabihf")
+ (cross-binutils "arm-linux-gnueabihf")))
+ (package-native-inputs grub-efi)))))
;; Because grub searches hardcoded paths it's easiest to just build grub
;; again to make it find both grub-pc and grub-efi. There is a command
@@ -392,6 +394,92 @@ menu to select one of the installed operating systems.")
(scandir input-dir))
#t)))))))))
+(define-public (make-grub-efi-netboot name subdir)
+ "Make a grub-efi-netboot package named NAME, which will be able to boot over
+network via TFTP by accessing its files in the SUBDIR of a TFTP root directory.
+This package is also able to boot from local storage devices.
+
+A bootloader-installer basically needs to copy the package content into the
+bootloader-target directory, which will usually be the TFTP root, as
+'grub-mknetdir' will be invoked already during the package creation.
+
+Alternatively the bootloader-target directory can be a mounted EFI System
+Partition (ESP), or a similar partition with a FAT file system, for booting
+from local storage devices.
+
+The name of the GRUB EFI binary will conform to the UEFI specification for
+removable media. Depending on the system it will be e.g. bootx64.efi or
+bootaa64.efi below SUBDIR.
+
+The SUBDIR argument needs to be set to \"efi/boot\" to create a package which
+conforms to the UEFI specification for removable media.
+
+The SUBDIR argument defaults to \"efi/Guix\", as it is also the case for
+'grub-efi-bootloader'."
+ (package
+ (name name)
+ (version (package-version grub-efi))
+ ;; Source is not needed, but it cannot be omitted.
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (let* ((system (string-split (nix-system->gnu-triplet
+ (or (%current-target-system)
+ (%current-system)))
+ #\-))
+ (arch (first system))
+ (boot-efi
+ (match system
+ ;; These are the supportend systems and the names defined by
+ ;; the UEFI standard for removable media.
+ (("i686" _ ...) "/bootia32.efi")
+ (("x86_64" _ ...) "/bootx64.efi")
+ (("arm" _ ...) "/bootarm.efi")
+ (("aarch64" _ ...) "/bootaa64.efi")
+ (("riscv" _ ...) "/bootriscv32.efi")
+ (("riscv64" _ ...) "/bootriscv64.efi")
+ ;; Other systems are not supported, although defined.
+ ;; (("riscv128" _ ...) "/bootriscv128.efi")
+ ;; (("ia64" _ ...) "/bootia64.efi")
+ ((_ ...) #f)))
+ (core-efi (string-append
+ ;; This is the arch dependent file name of GRUB, e.g.
+ ;; i368-efi/core.efi or arm64-efi/core.efi.
+ (match arch
+ ("i686" "i386")
+ ("aarch64" "arm64")
+ ("riscv" "riscv32")
+ (_ arch))
+ "-efi/core.efi")))
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((bootloader #$(this-package-input "grub-efi"))
+ (net-dir #$output)
+ (sub-dir (string-append net-dir "/" #$subdir "/"))
+ (boot-efi (string-append sub-dir #$boot-efi))
+ (core-efi (string-append sub-dir #$core-efi)))
+ ;; Install GRUB, which refers to the grub.cfg, with support for
+ ;; encrypted partitions,
+ (setenv "GRUB_ENABLE_CRYPTODISK" "y")
+ (invoke/quiet (string-append bootloader "/bin/grub-mknetdir")
+ (string-append "--net-directory=" net-dir)
+ (string-append "--subdir=" #$subdir)
+ ;; These modules must be pre-loaded to allow booting
+ ;; from an ESP or a similar partition with a FAT
+ ;; file system.
+ (string-append "--modules=part_msdos part_gpt fat"))
+ ;; Move GRUB's core.efi to the removable media name.
+ (false-if-exception (delete-file boot-efi))
+ (rename-file core-efi boot-efi))))))
+ (inputs (list grub-efi))
+ (synopsis (package-synopsis grub-efi))
+ (description (package-description grub-efi))
+ (home-page (package-home-page grub-efi))
+ (license (package-license grub-efi))))
+
(define-public syslinux
(let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c"))
(package
@@ -481,14 +569,14 @@ menu to select one of the installed operating systems.")
(build-system gnu-build-system)
(native-inputs
(append
- (list bison
- flex
- libyaml
- pkg-config
- swig)
- (if (member (%current-system) (package-supported-systems valgrind))
- (list valgrind)
- '())))
+ (list bison
+ flex
+ libyaml
+ pkg-config
+ swig)
+ (if (member (%current-system) (package-supported-systems valgrind))
+ (list valgrind)
+ '())))
(inputs
(list python))
(arguments
@@ -545,7 +633,7 @@ tree binary files. These are board description files used by Linux and BSD.")
(name "u-boot")
(version "2022.04")
(source (origin
- (patches
+ (patches
(list %u-boot-rockchip-inno-usb-patch
%u-boot-allow-disabling-openssl-patch
%u-boot-sifive-prevent-relocating-initrd-fdt
@@ -594,12 +682,12 @@ also initializes the boards (RAM etc).")
(add-after 'unpack 'patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "Makefile"
- (("/bin/pwd") (which "pwd"))
- (("/bin/false") (which "false")))
+ (("/bin/pwd") (which "pwd"))
+ (("/bin/false") (which "false")))
(substitute* "tools/dtoc/fdt_util.py"
- (("'cc'") "'gcc'"))
+ (("'cc'") "'gcc'"))
(substitute* "tools/patman/test_util.py"
- ;; python3-coverage is simply called coverage in guix.
+ ;; python3-coverage is simply called coverage in guix.
(("python3-coverage") "coverage")
;; Don't require 100% coverage since it's brittle and can
@@ -607,40 +695,40 @@ also initializes the boards (RAM etc).")
(("raise ValueError\\('Test coverage failure'\\)")
"print('Continuing anyway since Guix does not care :O')"))
(substitute* "test/run"
- ;; Make it easier to find test failures.
- (("#!/bin/bash") "#!/bin/bash -x")
- ;; This test would require git.
- (("\\./tools/patman/patman") (which "true"))
- ;; FIXME: test fails, needs further investiation
- (("run_test \"binman\"") "# run_test \"binman\"")
- ;; FIXME: test_spl fails, needs further investiation
- (("test_ofplatdata or test_handoff or test_spl")
+ ;; Make it easier to find test failures.
+ (("#!/bin/bash") "#!/bin/bash -x")
+ ;; This test would require git.
+ (("\\./tools/patman/patman") (which "true"))
+ ;; FIXME: test fails, needs further investiation
+ (("run_test \"binman\"") "# run_test \"binman\"")
+ ;; FIXME: test_spl fails, needs further investiation
+ (("test_ofplatdata or test_handoff or test_spl")
"test_ofplatdata or test_handoff")
- ;; FIXME: code coverage not working
- (("run_test \"binman code coverage\"")
- "# run_test \"binman code coverage\"")
- ;; This test would require internet access.
- (("\\./tools/buildman/buildman") (which "true")))
+ ;; FIXME: code coverage not working
+ (("run_test \"binman code coverage\"")
+ "# run_test \"binman code coverage\"")
+ ;; This test would require internet access.
+ (("\\./tools/buildman/buildman") (which "true")))
(substitute* "test/py/tests/test_sandbox_exit.py"
- (("def test_ctrl_c")
- "@pytest.mark.skip(reason='Guix has problems with SIGINT')
+ (("def test_ctrl_c")
+ "@pytest.mark.skip(reason='Guix has problems with SIGINT')
def test_ctrl_c"))
;; Test against the tools being installed rather than tools built
;; for "sandbox" target.
(substitute* "test/image/test-imagetools.sh"
(("BASEDIR=sandbox") "BASEDIR=."))
(for-each (lambda (file)
- (substitute* file
- ;; Disable features that require OpenSSL due
- ;; to GPL/Openssl license incompatibilities.
- ;; See https://bugs.gnu.org/34717 for
- ;; details.
- (("CONFIG_FIT_SIGNATURE=y")
- "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
- ;; This test requires a sound system, which is un-used
- ;; in u-boot-tools.
- (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
- (find-files "configs" "sandbox_.*defconfig$|tools-only_defconfig"))
+ (substitute* file
+ ;; Disable features that require OpenSSL due
+ ;; to GPL/Openssl license incompatibilities.
+ ;; See https://bugs.gnu.org/34717 for
+ ;; details.
+ (("CONFIG_FIT_SIGNATURE=y")
+ "CONFIG_FIT_SIGNATURE=n\nCONFIG_UT_LIB_ASN1=n\nCONFIG_TOOLS_LIBCRYPTO=n")
+ ;; This test requires a sound system, which is un-used
+ ;; in u-boot-tools.
+ (("CONFIG_SOUND=y") "CONFIG_SOUND=n")))
+ (find-files "configs" "sandbox_.*defconfig$|tools-only_defconfig"))
#t))
(replace 'configure
(lambda* (#:key make-flags #:allow-other-keys)
@@ -668,28 +756,37 @@ def test_ctrl_c"))
"tools/env/fw_printenv"
"tools/sunxi-spl-image-builder"))
#t)))
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key make-flags test-target #:allow-other-keys)
- (invoke "test/image/test-imagetools.sh")))
- ;; Only run full test suite on x86_64 systems, as many tests
- ;; assume x86_64.
- ,@(if (string-match "^x86_64-linux"
- (or (%current-target-system)
- (%current-system)))
- '((add-after 'check 'check-x86
- (lambda* (#:key make-flags test-target #:allow-other-keys)
- (apply invoke "make" "mrproper" make-flags)
- (setenv "SDL_VIDEODRIVER" "dummy")
- (setenv "PAGER" "cat")
- (apply invoke "make" test-target make-flags))))
- '()))))
- (description "U-Boot is a bootloader used mostly for ARM boards. It
-also initializes the boards (RAM etc). This package provides its
-board-independent tools.")))
-
-(define-public (make-u-boot-package board triplet)
- "Returns a u-boot package for BOARD cross-compiled for TRIPLET."
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key make-flags test-target #:allow-other-keys)
+ (invoke "test/image/test-imagetools.sh")))
+ ;; Only run full test suite on x86_64 systems, as many tests
+ ;; assume x86_64.
+ ,@(if (string-match "^x86_64-linux"
+ (or (%current-target-system)
+ (%current-system)))
+ '((add-after 'check 'check-x86
+ (lambda* (#:key make-flags test-target #:allow-other-keys)
+ (apply invoke "make" "mrproper" make-flags)
+ (setenv "SDL_VIDEODRIVER" "dummy")
+ (setenv "PAGER" "cat")
+ (apply invoke "make" test-target make-flags))))
+ '()))))
+ (description (string-append
+ (package-description u-boot)
+ " This package provides board-independent tools "
+ "of U-Boot."))))
+
+(define*-public (make-u-boot-package board triplet
+ #:key
+ defconfig
+ configs
+ name-suffix
+ append-description)
+ "Return a U-Boot package for BOARD cross-compiled for TRIPLET with the
+optional DEFCONFIG file and optional configuration changes from CONFIGS.
+NAME-SUFFIX is appended to the package name, while APPEND-DESCRIPTION is
+appended to the package description."
(let ((same-arch? (lambda ()
(string=? (%current-system)
(gnu-triplet->nix-system triplet)))))
@@ -697,33 +794,51 @@ board-independent tools.")))
(inherit u-boot)
(name (string-append "u-boot-"
(string-replace-substring (string-downcase board)
- "_" "-")))
+ "_" "-")
+ (or name-suffix "")))
+ (description (if append-description
+ (string-append (package-description u-boot)
+ "\n\n" append-description)
+ (package-description u-boot)))
(native-inputs
`(,@(if (not (same-arch?))
- `(("cross-gcc" ,(cross-gcc triplet))
- ("cross-binutils" ,(cross-binutils triplet)))
- `())
+ `(("cross-gcc" ,(cross-gcc triplet))
+ ("cross-binutils" ,(cross-binutils triplet)))
+ `())
,@(package-native-inputs u-boot)))
(arguments
`(#:modules ((ice-9 ftw)
(srfi srfi-1)
- (guix build utils)
- (guix build gnu-build-system))
+ (guix build gnu-build-system)
+ (guix build kconfig)
+ (guix build utils))
+ #:imported-modules (,@%gnu-build-system-modules
+ (guix build kconfig))
#:test-target "test"
#:make-flags
(list "HOSTCC=gcc"
,@(if (not (same-arch?))
- `((string-append "CROSS_COMPILE=" ,triplet "-"))
- '()))
+ `((string-append "CROSS_COMPILE=" ,triplet "-"))
+ '()))
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs make-flags #:allow-other-keys)
- (let ((config-name (string-append ,board "_defconfig")))
- (if (file-exists? (string-append "configs/" config-name))
- (apply invoke "make" `(,@make-flags ,config-name))
+ (let* ((config-name (string-append ,board "_defconfig"))
+ (config-file (string-append "configs/" config-name))
+ (defconfig ,defconfig)
+ (configs ',configs))
+ (when defconfig
+ ;; Replace the board-specific defconfig with the given one.
+ (copy-file defconfig config-file))
+ (if (file-exists? config-file)
+ (begin
+ (when configs
+ (modify-defconfig config-file configs))
+ (apply invoke "make" `(,@make-flags ,config-name))
+ (verify-config ".config" config-file))
(begin
- (display "Invalid board name. Valid board names are:"
+ (display "invalid board name; valid board names are:"
(current-error-port))
(let ((suffix-len (string-length "_defconfig"))
(entries (scandir "configs")))
@@ -734,7 +849,7 @@ board-independent tools.")))
(string-drop-right file-name
suffix-len))))
(sort entries string-ci<)))
- (error "Invalid boardname ~s." ,board))))))
+ (error "invalid boardname ~s" ,board))))))
(add-after 'configure 'disable-tools-libcrypto
;; Disable libcrypto due to GPL and OpenSSL license
;; incompatibilities
@@ -775,52 +890,37 @@ board-independent tools.")))
(make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
(define-public u-boot-am335x-boneblack
- (let ((base (make-u-boot-package "am335x_evm" "arm-linux-gnueabihf")))
- (package
- (inherit base)
- (name "u-boot-am335x-boneblack")
- (description "U-Boot is a bootloader used mostly for ARM boards. It
-also initializes the boards (RAM etc).
-
-This U-Boot is built for the BeagleBone Black, which was removed upstream,
-adjusted from the am335x_evm build with several device trees removed so that
-it fits within common partitioning schemes.")
- (arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'patch-defconfig
- ;; Patch out other devicetrees to build image small enough to
- ;; fit within typical partitioning schemes where the first
- ;; partition begins at sector 2048.
- (lambda _
- (substitute* "configs/am335x_evm_defconfig"
- (("CONFIG_OF_LIST=.*$") "CONFIG_OF_LIST=\"am335x-evm am335x-boneblack\"\n"))
- #t)))))))))
+ (make-u-boot-package
+ "am335x_evm" "arm-linux-gnueabihf"
+ ;; Patch out other device trees to build an image small enough to fit
+ ;; within typical partitioning schemes where the first partition begins at
+ ;; sector 2048.
+ #:configs '("CONFIG_OF_LIST=\"am335x-evm am335x-boneblack\"")
+ #:name-suffix "-boneblack"
+ #:append-description "This U-Boot is built for the BeagleBone Black, which
+was removed upstream, adjusted from the am335x_evm build with several device
+trees removed so that it fits within common partitioning schemes."))
(define-public u-boot-am335x-evm
(make-u-boot-package "am335x_evm" "arm-linux-gnueabihf"))
-(define-public (make-u-boot-sunxi64-package board triplet)
- (let ((base (make-u-boot-package board triplet)))
+(define*-public (make-u-boot-sunxi64-package board triplet
+ #:key defconfig configs)
+ (let ((base (make-u-boot-package
+ board triplet #:defconfig defconfig #:configs configs)))
(package
(inherit base)
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'set-environment
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (let ((bl31
- (string-append
- (assoc-ref (or native-inputs inputs) "firmware")
- "/bl31.bin")))
- (setenv "BL31" bl31)
- ;; This is necessary when we're using the bundled dtc.
- ;(setenv "PATH" (string-append (getenv "PATH") ":"
- ; "scripts/dtc"))
- )
- #t))))))
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (let ((bl31
+ (string-append
+ (assoc-ref (or native-inputs inputs) "firmware")
+ "/bl31.bin")))
+ (setenv "BL31" bl31))))))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-sun50i-a64)
,@(package-native-inputs base))))))
@@ -832,20 +932,11 @@ it fits within common partitioning schemes.")
(make-u-boot-sunxi64-package "pine64-lts" "aarch64-linux-gnu"))
(define-public u-boot-pinebook
- (let ((base (make-u-boot-sunxi64-package "pinebook" "aarch64-linux-gnu")))
- (package
- (inherit base)
- (arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'patch-pinebook-config
- ;; Fix regression with LCD video output introduced in 2020.01
- ;; https://patchwork.ozlabs.org/patch/1225130/
- (lambda _
- (substitute* "configs/pinebook_defconfig"
- (("CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y") "CONFIG_VIDEO_BRIDGE_ANALOGIX_ANX6345=y\nCONFIG_VIDEO_BPP32=y"))
- #t)))))))))
+ (make-u-boot-sunxi64-package
+ "pinebook" "aarch64-linux-gnu"
+ ;; Fix regression with LCD video output introduced in 2020.01
+ ;; https://patchwork.ozlabs.org/patch/1225130/
+ #:configs '("CONFIG_VIDEO_BPP32=y")))
(define-public u-boot-bananapi-m2-ultra
(make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf"))
@@ -861,7 +952,14 @@ it fits within common partitioning schemes.")
(define-public u-boot-nintendo-nes-classic-edition
(let ((base (make-u-boot-package "Nintendo_NES_Classic_Edition"
- "arm-linux-gnueabihf")))
+ "arm-linux-gnueabihf"
+ #:append-description "This version is for
+the Nintendo NES Classic Edition. It is assumed that you have added a serial
+port to pins PB0 and PB1 as described on
+@url{https://linux-sunxi.org/Nintendo_NES_Classic_Edition}.
+
+In order to use FEL mode on the device, hold the Reset button on the
+device while it's being turned on (and a while longer).")))
(package
(inherit base)
;; Starting with 2019.01, FEL doesn't work anymore on A33.
@@ -875,16 +973,7 @@ it fits within common partitioning schemes.")
(base32
"0znkwljfwwn4y7j20pzz4ilqw8znphrfxns0x1lwdzh3xbr96z3k"))
(patches (search-patches
- "u-boot-nintendo-nes-serial.patch"))))
- (description "U-Boot is a bootloader used mostly for ARM boards. It
-also initializes the boards (RAM etc).
-
-This version is for the Nintendo NES Classic Edition. It is assumed that
-you have added a serial port to pins PB0 and PB1 as described on
-@url{https://linux-sunxi.org/Nintendo_NES_Classic_Edition}.
-
-In order to use FEL mode on the device, hold the Reset button on the
-device while it's being turned on (and a while longer).")
+ "u-boot-nintendo-nes-serial.patch"))))
(native-inputs
`(("python" ,python-2)
,@(package-native-inputs base))))))
@@ -896,25 +985,14 @@ device while it's being turned on (and a while longer).")
(make-u-boot-package "mx6cuboxi" "arm-linux-gnueabihf"))
(define-public u-boot-novena
- (let ((base (make-u-boot-package "novena" "arm-linux-gnueabihf")))
- (package
- (inherit base)
- (description "U-Boot is a bootloader used mostly for ARM boards. It
-also initializes the boards (RAM etc).
-
-This U-Boot is built for Novena. Be advised that this version, contrary
-to Novena upstream, does not load u-boot.img from the first partition.")
- (arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'patch-novena-defconfig
- ;; Patch configuration to disable loading u-boot.img from FAT partition,
- ;; allowing it to be installed at a device offset.
- (lambda _
- (substitute* "configs/novena_defconfig"
- (("CONFIG_SPL_FS_FAT=y") "# CONFIG_SPL_FS_FAT is not set"))
- #t)))))))))
+ (make-u-boot-package
+ "novena" "arm-linux-gnueabihf"
+ ;; Patch configuration to disable loading u-boot.img from FAT partition,
+ ;; allowing it to be installed at a device offset.
+ #:configs '("# CONFIG_SPL_FS_FAT is not set")
+ #:append-description "This U-Boot is built for Novena. Be advised that this
+version, contrary to Novena upstream, does not load u-boot.img from the first
+partition."))
(define-public u-boot-cubieboard
(make-u-boot-package "Cubieboard" "arm-linux-gnueabihf"))
@@ -927,16 +1005,16 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(package
(inherit base)
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'set-environment
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31"
- (search-input-file inputs "/bl31.elf"))))
- ;; Phases do not succeed on the bl31 ELF.
- (delete 'strip)
- (delete 'validate-runpath)))))
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
+ ;; Phases do not succeed on the bl31 ELF.
+ (delete 'strip)
+ (delete 'validate-runpath)))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3399)
,@(package-native-inputs base))))))
@@ -988,65 +1066,62 @@ to Novena upstream, does not load u-boot.img from the first partition.")
(package
(inherit base)
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'set-environment
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
- ;; Phases do not succeed on the bl31 ELF.
- (delete 'strip)
- (delete 'validate-runpath)))))
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "BL31" (search-input-file inputs "/bl31.elf"))))
+ ;; Phases do not succeed on the bl31 ELF.
+ (delete 'strip)
+ (delete 'validate-runpath)))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3399)
,@(package-native-inputs base))))))
(define-public u-boot-rockpro64-rk3399
- (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu")))
+ (let ((base (make-u-boot-package "rockpro64-rk3399" "aarch64-linux-gnu"
+ #:configs '("CONFIG_USB=y"
+ "CONFIG_AHCI=y"
+ "CONFIG_AHCI_PCI=y"
+ "CONFIG_SATA=y"
+ "CONFIG_SATA_SIL=y"
+ "CONFIG_SCSI=y"
+ "CONFIG_SCSI_AHCI=y"
+ "CONFIG_DM_SCSI=y"))))
(package
(inherit base)
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'set-environment
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31"
- (search-input-file inputs "/bl31.elf"))))
- (add-after 'unpack 'patch-config
- (lambda _
- (substitute* "configs/rockpro64-rk3399_defconfig"
- (("CONFIG_USB=y") "\
-CONFIG_USB=y
-CONFIG_AHCI=y
-CONFIG_AHCI_PCI=y
-CONFIG_SATA=y
-CONFIG_SATA_SIL=y
-CONFIG_SCSI=y
-CONFIG_SCSI_AHCI=y
-CONFIG_DM_SCSI=y
-"))
- (substitute* "include/config_distro_bootcmd.h"
- (("\"scsi_need_init=false")
- "\"setenv scsi_need_init false")
- (("#define BOOTENV_SET_SCSI_NEED_INIT \"scsi_need_init=;")
- "#define BOOTENV_SET_SCSI_NEED_INIT \"setenv scsi_need_init;"))
- (substitute* "include/configs/rockchip-common.h"
- (("#define BOOT_TARGET_DEVICES\\(func\\)")
- "
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
+ (add-after 'unpack 'patch-header
+ (lambda _
+ (substitute* "include/config_distro_bootcmd.h"
+ (("\"scsi_need_init=false")
+ "\"setenv scsi_need_init false")
+ (("#define BOOTENV_SET_SCSI_NEED_INIT \"scsi_need_init=;")
+ "#define BOOTENV_SET_SCSI_NEED_INIT \"setenv scsi_need_init;"))
+ (substitute* "include/configs/rockchip-common.h"
+ (("#define BOOT_TARGET_DEVICES\\(func\\)")
+ "
#if CONFIG_IS_ENABLED(CMD_SCSI)
#define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0)
#else
#define BOOT_TARGET_SCSI(func)
#endif
#define BOOT_TARGET_DEVICES(func)")
- (("BOOT_TARGET_NVME\\(func\\) \\\\")
- "\
+ (("BOOT_TARGET_NVME\\(func\\) \\\\")
+ "\
BOOT_TARGET_NVME(func) \\
BOOT_TARGET_SCSI(func) \\"))))
- ;; Phases do not succeed on the bl31 ELF.
- (delete 'strip)
- (delete 'validate-runpath)))))
+ ;; Phases do not succeed on the bl31 ELF.
+ (delete 'strip)
+ (delete 'validate-runpath)))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3399)
,@(package-native-inputs base))))))
@@ -1056,20 +1131,132 @@ BOOT_TARGET_NVME(func) \\
(package
(inherit base)
(arguments
- (substitute-keyword-arguments (package-arguments base)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'set-environment
- (lambda* (#:key inputs #:allow-other-keys)
- (setenv "BL31"
- (search-input-file inputs "/bl31.elf"))))
- ;; Phases do not succeed on the bl31 ELF.
- (delete 'strip)
- (delete 'validate-runpath)))))
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'set-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "BL31"
+ (search-input-file inputs "/bl31.elf"))))
+ ;; Phases do not succeed on the bl31 ELF.
+ (delete 'strip)
+ (delete 'validate-runpath)))))
(native-inputs
`(("firmware" ,arm-trusted-firmware-rk3399)
,@(package-native-inputs base))))))
+(define*-public (make-u-boot-bin-package u-boot-package
+ #:key
+ (u-boot-bin "u-boot.bin"))
+ "Return a package with a single U-BOOT-BIN file from the U-BOOT-PACKAGE.
+The package name will be that of the U-BOOT package suffixed with \"-bin\"."
+ (package
+ (name (string-append (package-name u-boot-package) "-bin"))
+ (version (package-version u-boot-package))
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (mkdir #$output)
+ (symlink (search-input-file %build-inputs
+ (string-append "libexec/" #$u-boot-bin))
+ (string-append #$output "/" #$u-boot-bin))))))
+ (inputs (list u-boot-package))
+ (home-page (package-home-page u-boot-package))
+ (synopsis (package-synopsis u-boot-package))
+ (description (string-append
+ (package-description u-boot-package)
+ "\n\n"
+ (format #f
+ "This package only contains the file ~a."
+ u-boot-bin)))
+ (license (package-license u-boot-package))))
+
+(define-public %u-boot-rpi-efi-configs
+ '("CONFIG_OF_EMBED"
+ "CONFIG_OF_BOARD=y"))
+
+(define %u-boot-rpi-description-32-bit
+ "This is a 32-bit build of U-Boot.")
+
+(define %u-boot-rpi-description-64-bit
+ "This is a common 64-bit build of U-Boot for all 64-bit capable Raspberry Pi
+variants.")
+
+(define %u-boot-rpi-efi-description
+ "It allows network booting and uses the device-tree from the firmware,
+allowing the usage of overlays. It can act as an EFI firmware for the
+grub-efi-netboot-removable-bootloader.")
+
+(define %u-boot-rpi-efi-description-32-bit
+ (string-append %u-boot-rpi-efi-description " "
+ %u-boot-rpi-description-32-bit))
+
+(define-public u-boot-rpi-2
+ (make-u-boot-package "rpi_2" "arm-linux-gnueabihf"
+ #:append-description %u-boot-rpi-description-32-bit))
+
+(define-public u-boot-rpi-3-32b
+ (make-u-boot-package "rpi_3_32b" "arm-linux-gnueabihf"
+ #:append-description %u-boot-rpi-description-32-bit))
+
+(define-public u-boot-rpi-4-32b
+ (make-u-boot-package "rpi_4_32b" "arm-linux-gnueabihf"
+ #:append-description %u-boot-rpi-description-32-bit))
+
+(define-public u-boot-rpi-arm64
+ (make-u-boot-package "rpi_arm64" "aarch64-linux-gnu"
+ #:append-description %u-boot-rpi-description-64-bit))
+
+(define-public u-boot-rpi-2-efi
+ (make-u-boot-package "rpi_2" "arm-linux-gnueabihf"
+ #:name-suffix "-efi"
+ #:configs %u-boot-rpi-efi-configs
+ #:append-description %u-boot-rpi-efi-description-32-bit))
+
+(define-public u-boot-rpi-3-32b-efi
+ (make-u-boot-package "rpi_3_32b" "arm-linux-gnueabihf"
+ #:name-suffix "-efi"
+ #:configs %u-boot-rpi-efi-configs
+ #:append-description %u-boot-rpi-efi-description-32-bit))
+
+(define-public u-boot-rpi-4-32b-efi
+ (make-u-boot-package "rpi_4_32b" "arm-linux-gnueabihf"
+ #:name-suffix "-efi"
+ #:configs %u-boot-rpi-efi-configs
+ #:append-description %u-boot-rpi-efi-description-32-bit))
+
+(define-public u-boot-rpi-arm64-efi
+ (make-u-boot-package "rpi_arm64""aarch64-linux-gnu"
+ #:name-suffix "-efi"
+ #:configs %u-boot-rpi-efi-configs
+ #:append-description (string-append
+ %u-boot-rpi-efi-description " "
+ %u-boot-rpi-description-64-bit)))
+
+(define-public u-boot-rpi-2-bin (make-u-boot-bin-package u-boot-rpi-2))
+
+(define-public u-boot-rpi-3_32b-bin (make-u-boot-bin-package u-boot-rpi-3-32b))
+
+(define-public u-boot-rpi-4_32b-bin (make-u-boot-bin-package u-boot-rpi-4-32b))
+
+(define-public u-boot-rpi-arm64-bin (make-u-boot-bin-package u-boot-rpi-arm64))
+
+(define-public u-boot-rpi-2-efi-bin (make-u-boot-bin-package u-boot-rpi-2-efi))
+
+(define-public u-boot-rpi-3-32b-efi-bin
+ (make-u-boot-bin-package u-boot-rpi-3-32b-efi))
+
+(define-public u-boot-rpi-4-32b-efi-bin
+ (make-u-boot-bin-package u-boot-rpi-4-32b-efi))
+
+(define-public u-boot-rpi-arm64-efi-bin
+ (make-u-boot-bin-package u-boot-rpi-arm64-efi))
+
(define-public vboot-utils
(package
(name "vboot-utils")
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 8627f699a1..6c1350c44f 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -204,8 +204,8 @@ programs and other files depend.")
(license license:bsd-3)))
(define-public gn
- (let ((commit "e327ffdc503815916db2543ec000226a8df45163")
- (revision "1819")) ;as returned by `git describe`, used below
+ (let ((commit "1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41")
+ (revision "2072")) ;as returned by `git describe`, used below
(package
(name "gn")
(version (git-version "0.0" revision commit))
@@ -215,49 +215,56 @@ programs and other files depend.")
(uri (git-reference (url home-page) (commit commit)))
(sha256
(base32
- "0kvlfj3www84zp1vmxh76x8fdjm9hyk8lkh2vdsidafpmm75fphr"))
+ "02621c9nqpr4pwcapy31x36l5kbyd0vdgd0wdaxj5p8hrxk67d6b"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-before 'configure 'set-build-environment
- (lambda _
- (setenv "CC" "gcc") (setenv "CXX" "g++")
- (setenv "AR" "ar")))
- (replace 'configure
- (lambda _
- (invoke "python" "build/gen.py"
- "--no-last-commit-position")))
- (add-after 'configure 'create-last-commit-position
- (lambda _
- ;; Create "last_commit_position.h" to avoid a dependency
- ;; on 'git' (and the checkout..).
- (call-with-output-file "out/last_commit_position.h"
- (lambda (port)
- (format port
- (string-append
- "#define LAST_COMMIT_POSITION_NUM ~a\n"
- "#define LAST_COMMIT_POSITION \"~a (~a)\"\n")
- ,revision ,revision ,(string-take commit 8))))))
- (replace 'build
- (lambda _
- (invoke "ninja" "-C" "out" "gn"
- "-j" (number->string (parallel-job-count)))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (if tests?
- (begin
- (invoke "ninja" "-C" "out" "gn_unittests"
- "-j" (number->string (parallel-job-count)))
- (invoke "./out/gn_unittests"))
- (format #t "test suite not run~%"))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (install-file "out/gn" (string-append out "/bin"))))))))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'set-build-environment
+ (lambda _
+ (setenv "CC" "gcc")
+ (setenv "CXX" "g++")
+ (setenv "AR" "ar")))
+ (replace 'configure
+ (lambda _
+ (invoke "python" "build/gen.py"
+ "--no-last-commit-position")))
+ (add-after 'configure 'create-last-commit-position
+ (lambda _
+ ;; Mimic GenerateLastCommitPosition from gen.py.
+ (call-with-output-file "out/last_commit_position.h"
+ (lambda (port)
+ (format port
+ "// Generated by Guix.
+
+#ifndef OUT_LAST_COMMIT_POSITION_H_
+#define OUT_LAST_COMMIT_POSITION_H_
+
+#define LAST_COMMIT_POSITION_NUM ~a
+#define LAST_COMMIT_POSITION \"~a (~a)\"
+
+#endif // OUT_LAST_COMMIT_POSITION_H_
+"
+ #$revision #$revision
+ #$(string-take commit 12))))))
+ (replace 'build
+ (lambda _
+ (invoke "ninja" "-C" "out" "gn"
+ "-j" (number->string (parallel-job-count)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ (invoke "ninja" "-C" "out" "gn_unittests"
+ "-j" (number->string (parallel-job-count)))
+ (invoke "./out/gn_unittests"))
+ (format #t "test suite not run~%"))))
+ (replace 'install
+ (lambda _
+ (install-file "out/gn" (string-append #$output "/bin")))))))
(native-inputs
- `(("ninja" ,ninja)
- ("python" ,python-wrapper)))
+ (list ninja python-wrapper))
(synopsis "Generate Ninja build files")
(description
"GN is a tool that collects information about a project from @file{.gn}
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index 8cf106b5e4..b544f0e59d 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -515,7 +515,7 @@ capacity is user-selectable.")
#t)))
#:tests? #f)) ; No tests.
(inputs ; TODO package bundled wxvillalib
- `(("wxwidgets" ,wxwidgets-3.1)
+ `(("wxwidgets" ,wxwidgets)
("wssvg" ,wxsvg)
("dbus" ,dbus)
("cdrtools" ,cdrtools)
diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm
index e0a9f5fbad..7ef5104006 100644
--- a/gnu/packages/chromium.scm
+++ b/gnu/packages/chromium.scm
@@ -183,11 +183,11 @@
"third_party/libaddressinput" ;ASL2.0
"third_party/libaom" ;BSD-2 or "Alliance for Open Media Patent License 1.0"
"third_party/libaom/source/libaom/third_party/fastfeat" ;BSD-3
+ "third_party/libaom/source/libaom/third_party/SVT-AV1" ;BSD-3
"third_party/libaom/source/libaom/third_party/vector" ;Expat
"third_party/libaom/source/libaom/third_party/x86inc" ;ISC
"third_party/libjxl" ;ASL2.0
"third_party/libgav1" ;ASL2.0
- "third_party/libgifcodec" ;MPL1.1/GPL2+/LGPL2.1+, BSD-3, BSD-2
"third_party/libjingle_xmpp" ;BSD-3
"third_party/libphonenumber" ;ASL2.0
"third_party/libsecret" ;LGPL2.1+
@@ -273,7 +273,7 @@
"third_party/utf" ;Expat
"third_party/vulkan-deps" ;ASL2.0, BSD-3, Expat
"third_party/vulkan_memory_allocator" ;Expat
- "third_party/wayland/protocol" ;Expat
+ "third_party/wayland/src/protocol" ;Expat
"third_party/wayland/stubs" ;BSD-3, Expat
"third_party/wayland/wayland_scanner_wrapper.py" ;BSD-3
"third_party/wayland-protocols" ;Expat
@@ -317,10 +317,10 @@
;; run the Blink performance tests, just remove everything to save ~70MiB.
'("third_party/blink/perf_tests"))
-(define %chromium-version "107.0.5304.121")
+(define %chromium-version "108.0.5359.94")
(define %ungoogled-revision (string-append %chromium-version "-1"))
(define %debian-revision "debian/102.0.5005.61-1")
-(define %arch-revision "6afedb08139b97089ce8ef720ece5cd14c83948c")
+(define %arch-revision "4de5019014aeb77187a517c5ca6db8723d622a40")
(define %ungoogled-origin
(origin
@@ -330,7 +330,7 @@
(file-name (git-file-name "ungoogled-chromium" %ungoogled-revision))
(sha256
(base32
- "1ns664y7qx0ry8hg8r704z64jmx8j6rpxn2lkliv0xjfwlrbbfx3"))))
+ "0hlrcp34cf6m8c7100m8xr99s02ch0vmkgwl9pqkrinaghh29kgn"))))
(define %debian-origin
(origin
@@ -360,9 +360,6 @@
"system/zlib.patch"
"system/openjpeg.patch")))
-(define %gcc-patches
- '())
-
(define (arch-patch revision name hash)
(origin
(method url-fetch)
@@ -376,10 +373,12 @@
(arch-patch %arch-revision "REVERT-roll-src-third_party-ffmpeg-m102.patch"
"0i7crn6fcwq09kd6a4smqnffaldyv61lmv2p0drcnpfrwalmkprh")
(arch-patch %arch-revision "REVERT-roll-src-third_party-ffmpeg-m106.patch"
- "0li10cvxnppmmmsc7w77b1s7z02s5bzd39zsal9x768708fx64jc")
- ;; Fix crash when using Global Media Controls.
- (arch-patch %arch-revision "REVERT-enable-GlobalMediaControlsCastStartStop.patch"
- "1ilsw421lylkjnq3lvc607bdx7cvwlish8qzgwx9s84l4hzv37vp")))
+ "0li10cvxnppmmmsc7w77b1s7z02s5bzd39zsal9x768708fx64jc")))
+
+(define %arch-patches
+ (list
+ (arch-patch %arch-revision "disable-GlobalMediaControlsCastStartStop.patch"
+ "00m361ka38d60zpbss7qnfw80vcwnip2pjcz3wf46wd2sqi1nfvz")))
(define %guix-patches
(list (local-file
@@ -398,6 +397,9 @@
(assume-valid-file-name
(search-patch "ungoogled-chromium-system-nspr.patch")))))
+(define %patches
+ (append %debian-patches %arch-patches %guix-patches))
+
;; This is a source 'snippet' that does the following:
;; *) Applies various patches for unbundling purposes and libstdc++ compatibility.
;; *) Runs the ungoogled patch-, domain substitution-, and scrubbing scripts.
@@ -419,8 +421,7 @@
(for-each (lambda (patch)
(invoke "patch" "-p1" "--force" "--input"
patch "--no-backup-if-mismatch"))
- (append '#+%debian-patches '#+%guix-patches
- '#+%gcc-patches))
+ '#+%patches)
;; These patches are "reversed", i.e. their changes should be undone.
(for-each (lambda (patch)
@@ -495,7 +496,7 @@
%chromium-version ".tar.xz"))
(sha256
(base32
- "12z0fhgxcsdkf6shnsg9maj3v901226cjcy8y2x8m88maw2apc0j"))
+ "1zmndi4q9x8fyixwl1mp5qyf883x9xafq7ipzf9vk9d8h62521q6"))
(modules '((guix build utils)))
(snippet (force ungoogled-chromium-snippet))))
(build-system gnu-build-system)
@@ -561,7 +562,7 @@
"use_system_libjpeg=true"
"use_system_libopenjpeg2=true"
"use_system_libpng=true"
- "use_system_libwayland_server=true"
+ "use_system_libwayland=true"
"use_system_wayland_scanner=true"
(string-append "system_wayland_scanner_path=\""
(search-input-file %build-inputs
@@ -613,11 +614,12 @@
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-stuff
(lambda* (#:key inputs #:allow-other-keys)
- (let ((openjpeg (search-input-directory
- inputs "include/openjpeg-2.4")))
+ (let* ((libopenjp2 (search-input-file inputs "lib/libopenjp2.so"))
+ (openjpeg (dirname (dirname libopenjp2))))
(substitute* "third_party/pdfium/BUILD.gn"
;; This include path is added by Debians openjpeg patch.
- (("/usr/include/openjpeg-2.4") openjpeg))
+ (("/usr/include/openjpeg-")
+ (string-append openjpeg "/include/openjpeg-")))
;; Adjust minizip header inclusions.
(substitute* (find-files "third_party/tflite_support\
@@ -910,7 +912,7 @@
gdk-pixbuf
glib
gtk+
- harfbuzz-3
+ harfbuzz-5
icu4c-71
jsoncpp
lcms
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index 1bbbb1e2fe..0ed978a768 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -391,7 +391,7 @@ features that are not supported by the standard @code{stdio} implementation.")
(define-public universal-ctags
(package
(name "universal-ctags")
- (version "5.9.20220807.0")
+ (version "5.9.20221127.0")
(source
(origin
(method git-fetch)
@@ -401,7 +401,7 @@ features that are not supported by the standard @code{stdio} implementation.")
(file-name (git-file-name name version))
(sha256
(base32
- "1wjj6hlda7xyjm8yrl2zz74ks7azymm9yyrpz36zxxpx2scf6lsk"))
+ "0nvkx5j2vyzjf935a2s5w56gamlr6f12jy1x38bkqz78p5l0d3ja"))
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index f60ed4f597..d2a1ed36f7 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1127,7 +1127,7 @@ tarballs.")
(define-public libjcat
(package
(name "libjcat")
- (version "0.1.11")
+ (version "0.1.12")
(source
(origin
(method git-fetch)
@@ -1137,7 +1137,7 @@ tarballs.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "08zywwhm9q8m8v17w2mp23w3w93p40ir1w4x18zrlbhs10xnhiys"))))
+ (base32 "0fbcmnpc0y7s2ls3q829dv3ardhv0m5gxqqmbn0dnkzgkh42vv7p"))))
(build-system meson-build-system)
(native-inputs
(list gobject-introspection help2man pkg-config))
@@ -2695,7 +2695,7 @@ to their original, binary CD format.")
(define-public libdeflate
(package
(name "libdeflate")
- (version "1.12")
+ (version "1.14")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -2704,7 +2704,7 @@ to their original, binary CD format.")
(file-name (git-file-name name version))
(sha256
(base32
- "16n9232zjavcp5wp17cx0gh2v7gipxpncsha05j3ybajfs7g88jv"))))
+ "09y69mnbv3mprgjp53zvin5zqznqajginrk5b25xmi9y0b83bns8"))))
(build-system gnu-build-system)
(arguments
(list #:make-flags
diff --git a/gnu/packages/cook.scm b/gnu/packages/cook.scm
index 7a064480d4..584f561ceb 100644
--- a/gnu/packages/cook.scm
+++ b/gnu/packages/cook.scm
@@ -24,8 +24,8 @@
#:use-module (guix download)
#:use-module (gnu packages ed)
#:use-module (gnu packages bison)
- #:use-module (gnu packages groff)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages groff)
#:use-module (guix build-system gnu))
(define-public cook
@@ -70,7 +70,7 @@
(setenv "SH" (which "sh"))
#t)))))
- (native-inputs (list bison
+ (native-inputs (list bison-3.0
;; For building the documentation:
groff
;; For the tests:
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index ad0657ef3b..5c5258d6e0 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm