maav / guix-mirror (public) (License: GPLv3+) (since 2019-11-02) (hash sha1)
Mirror of GNU Guix (https://git.savannah.gnu.org/git/guix.git) with personal branches integrated into master branch.
List of commits:
Subject Hash Author Date (UTC)
system: Use of mapped-devices for boot process. 64d196759469dd34488460d870242eba0d551b65 Miguel Ángel Arruga Vivas 2019-10-26 23:35:59
system: Use locale information in grub.cfg. 9f26f384820e17a56fe8820dd4d31bdd03f2de37 Miguel Ángel Arruga Vivas 2019-11-02 17:18:45
doc: Fixes for Texinfo metainfo. c2a382e5108744ef8b0c8a87d383e84f24c7925a Miguel Ángel Arruga Vivas 2020-10-11 17:58:22
doc: Fix minor typos. 3483e6444d541c8c157cb5af754d6af7faa4f845 Miguel Ángel Arruga Vivas 2020-10-11 17:46:16
gnu: python-base58: Update to 2.0.1. cba7a6f7df0d6df181434591b2e5df58dcc9a09d Nicolas Goaziou 2020-10-17 13:07:17
gnu: lynx: Update to 2.9.0dev.6. 201a507b7711e3aeebca9c7512c850c27d161e0b Brett Gilio 2020-10-17 03:07:46
gnu: xlsxio: Update to 0.2.29. 38e5bc92e9946e7a3a3b791bd5236aea37cd213a Brett Gilio 2020-10-17 03:00:52
gnu: swi-prolog: Update to 8.3.9. 4e1380791af07d82481d2b7a8c43afac4cd31855 Brett Gilio 2020-10-17 02:03:20
gnu: emacs-org-journal: Update to 2.1.1. 03267c4c3e3d14632161ea29a5a4db1ba78cec69 Brett Gilio 2020-10-17 01:55:06
gnu: emacs-org-webring: Update to 1.9. d2eb8900570bd8504c47f49646d31d658d50c7ca Brett Gilio 2020-10-17 00:47:47
gnu: emacs-gdscript-mode: Update to 1.4.0. a25512fe82d99ae66d4aae5ed912194dbe1c89a6 AuPath 2020-10-16 10:05:08
services: docker: Fix missing containerd-shim binary. 6a5a477df46a0329cc867c4780b59cdf4340d034 Oleg Pykhalov 2020-10-16 21:40:45
gnu: grass: Fix start-up without python@3 in profile. 6c03d15d7d84c00b02efea0a60e91f55f5541b57 Tobias Geerinckx-Rice 2020-10-16 19:07:06
gnu: grass: Update to 7.8.4. bcf9732059d4463e136f5f21e2784e4bc3fe6dee Tobias Geerinckx-Rice 2020-10-16 15:48:29
gnu: containerd: Don't 'chdir' in build phases. 719246a51d47263c3b424a782d9703f59ce9fdc3 Oleg Pykhalov 2020-10-16 17:02:51
gnu: iproute2: Update to 5.9.0. 1e39c865928fdf4166d152a49e789b26d99fca71 Tobias Geerinckx-Rice 2020-10-16 15:27:01
gnu: make-lua-ossl: Fix bogus use of DESTDIR. 88a099636fb1db32655380a24c698cf0aa6f78a4 Tobias Geerinckx-Rice 2020-10-16 15:15:24
gnu: multitail: Edit synopsis & description. d96241547dba3e4ab454dfd58257a4f411c5a041 Tobias Geerinckx-Rice 2020-10-16 15:07:18
gnu: multitail: Cross-compile. c887f7b3b85a2877926746110b9b394ce21212c7 Tobias Geerinckx-Rice 2020-10-16 15:04:47
gnu: multitail: Remove bogus use of DESTDIR. 7b2b01e38984b23dca44b6d7e87a8f73a671f87c Tobias Geerinckx-Rice 2020-10-16 15:03:37
Commit 64d196759469dd34488460d870242eba0d551b65 - system: Use of mapped-devices for boot process.
* gnu/bootloader/grub.scm (grub-configuration-file)[declaration]: New
parameter crypto-devices, used to ensure unlock every encrypted
partition needed by the bootloader.
[device-uuid->gexp]: New function, emits cryptomount calls.
[body]: Map crypto-devices with device-uuid->gexp.
* gnu/machine/ssh.scm (roll-back-managed-host): Use the crypto-devices
stored from the selected generation in the call to the bootloader
configuration generator.
* gnu/scripts/system.scm (reinstall-bootloader): Likewise.
* gnu/system.scm (define-module)[export]: Export new accessor
boot-parameters-crypto-devices.
(boot-parameters)[crypto-devices]: New field.
(read-boot-parameters)[uuid-sexp->uuid]: New function.
(read-boot-parameters)[body]: Read new field crypto-devices.
(operating-system-boot-parameters-file): Add the new field.
(operating-system-boot-crypto-devices): New function. Warn about
devices without an UUID. They are ignored as they would be dependant
on the hardware configuration.
(operating-system-bootcfg): Use operating-system-boot-crypto-devices in
the call to the bootloader configuration generator.
(operating-system-boot-parameters): Use
operating-system-boot-crypto-devices to store the needed devices.
Author: Miguel Ángel Arruga Vivas
Author date (UTC): 2019-10-26 23:35
Committer name: Miguel Ángel Arruga Vivas
Committer date (UTC): 2020-10-17 14:58
Parent(s): 9f26f384820e17a56fe8820dd4d31bdd03f2de37
Signing key:
Tree: 0c25161a50e96eba408e013fe2e92d78fb299d57
File Lines added Lines deleted
gnu/bootloader/grub.scm 14 0
gnu/machine/ssh.scm 3 0
gnu/system.scm 39 0
guix/scripts/system.scm 2 0
File gnu/bootloader/grub.scm changed (mode: 100644) (index 611580a350..d42cb70067)
... ... code."
338 338 #:key #:key
339 339 (locale #f) (locale #f)
340 340 (system (%current-system)) (system (%current-system))
341 (crypto-devices '())
341 342 (old-entries '()) (old-entries '())
342 343 store-directory-prefix) store-directory-prefix)
343 344 "Return the GRUB configuration file corresponding to CONFIG, a "Return the GRUB configuration file corresponding to CONFIG, a
 
... ... menuentry ~s {
391 392 (string-join (map string-join '#$modules) (string-join (map string-join '#$modules)
392 393 "\n module " 'prefix)))))) "\n module " 'prefix))))))
393 394
395 (define (device-uuid->gexp device-uuid)
396 (let* ((uuid-string (uuid->string device-uuid))
397 ;; XXX: My tests only worked with UUID values without
398 ;; any hyphen character.
399 (filtered-uuid (string-filter (lambda (c)
400 (not (eqv? c #\-)))
401 uuid-string)))
402 #~(format port "# Unlock encrypted device ~a
403 cryptomount -u ~a~%"
404 #$uuid-string
405 #$filtered-uuid)))
406
394 407 (define (sugar) (define (sugar)
395 408 (let* ((entry (first all-entries)) (let* ((entry (first all-entries))
396 409 (device (menu-entry-device entry)) (device (menu-entry-device entry))
 
... ... keymap ~a~%" #$keymap))))
438 451 "# This file was generated from your Guix configuration. Any changes "# This file was generated from your Guix configuration. Any changes
439 452 # will be lost upon reconfiguration. # will be lost upon reconfiguration.
440 453 ") ")
454 #$@(map device-uuid->gexp crypto-devices)
441 455 #$(sugar) #$(sugar)
442 456 #$locale-config #$locale-config
443 457 #$keyboard-layout-config #$keyboard-layout-config
File gnu/machine/ssh.scm changed (mode: 100644) (index 72ba6bfacf..82611c83eb)
... ... an environment type of 'managed-host."
486 486 (machine-operating-system machine))) (machine-operating-system machine)))
487 487 (locale -> (boot-parameters-locale (locale -> (boot-parameters-locale
488 488 (second boot-parameters))) (second boot-parameters)))
489 (crypto-devices -> (boot-parameters-crypto-devices
490 (second boot-parameters)))
489 491 (bootcfg (lower-object (bootcfg (lower-object
490 492 ((bootloader-configuration-file-generator ((bootloader-configuration-file-generator
491 493 (bootloader-configuration-bootloader (bootloader-configuration-bootloader
492 494 bootloader)) bootloader))
493 495 bootloader entries bootloader entries
494 496 #:locale locale #:locale locale
497 #:crypto-devices crypto-devices
495 498 #:old-entries old-entries))) #:old-entries old-entries)))
496 499 (remote-result (machine-remote-eval machine remote-exp))) (remote-result (machine-remote-eval machine remote-exp)))
497 500 (when (eqv? 'error remote-result) (when (eqv? 'error remote-result)
File gnu/system.scm changed (mode: 100644) (index 2781674062..4e22d42d62)
149 149 boot-parameters-bootloader-menu-entries boot-parameters-bootloader-menu-entries
150 150 boot-parameters-store-device boot-parameters-store-device
151 151 boot-parameters-store-mount-point boot-parameters-store-mount-point
152 boot-parameters-crypto-devices
152 153 boot-parameters-kernel boot-parameters-kernel
153 154 boot-parameters-kernel-arguments boot-parameters-kernel-arguments
154 155 boot-parameters-initrd boot-parameters-initrd
 
... ... directly by the user."
300 301 (store-device boot-parameters-store-device) (store-device boot-parameters-store-device)
301 302 (store-mount-point boot-parameters-store-mount-point) (store-mount-point boot-parameters-store-mount-point)
302 303 (locale boot-parameters-locale) (locale boot-parameters-locale)
304 (crypto-devices boot-parameters-crypto-devices)
303 305 (kernel boot-parameters-kernel) (kernel boot-parameters-kernel)
304 306 (kernel-arguments boot-parameters-kernel-arguments) (kernel-arguments boot-parameters-kernel-arguments)
305 307 (initrd boot-parameters-initrd) (initrd boot-parameters-initrd)
 
... ... file system labels."
333 335 device device
334 336 (file-system-label device)))))) (file-system-label device))))))
335 337
338 (define uuid-sexp->uuid
339 (match-lambda
340 (('uuid (? symbol? type) (? bytevector? bv))
341 (bytevector->uuid bv type))
342 (x
343 (warning (G_ "unrecognized uuid ~a at '~a'~%") x (port-filename port))
344 #f)))
345
336 346 (match (read port) (match (read port)
337 347 (('boot-parameters ('version 0) (('boot-parameters ('version 0)
338 348 ('label label) ('root-device root) ('label label) ('root-device root)
 
... ... file system labels."
382 392 ((_ locale) locale) ((_ locale) locale)
383 393 (#f #f))) (#f #f)))
384 394
395 (crypto-devices
396 (match (assq 'crypto-devices rest)
397 ((_ device-list) (map uuid-sexp->uuid device-list))
398 (#f '())))
399
385 400 (store-device (store-device
386 401 ;; Linux device names like "/dev/sda1" are not suitable GRUB device ;; Linux device names like "/dev/sda1" are not suitable GRUB device
387 402 ;; identifiers, so we just filter them out. ;; identifiers, so we just filter them out.
 
... ... from the initrd."
507 522 (any file-system-needed-for-boot? users))) (any file-system-needed-for-boot? users)))
508 523 devices))) devices)))
509 524
525 (define (operating-system-boot-crypto-devices os)
526 (define (crypto-device? device)
527 (let ((type (mapped-device-type device)))
528 (eq? type luks-device-mapping)))
529 (define (with-uuid? device)
530 (if (uuid? (mapped-device-source device))
531 #t
532 (begin
533 (warning (G_ "the source from mapped-device at ~a is not an UUID.
534 It will be ignored for the bootloader configuration.~%")
535 (mapped-device-location device))
536 #f)))
537 (let* ((mapped-devices (operating-system-boot-mapped-devices os))
538 (crypto-devices (filter crypto-device? mapped-devices))
539 (valid-devices (filter with-uuid? crypto-devices)))
540 (map mapped-device-source valid-devices)))
541
510 542 (define (device-mapping-services os) (define (device-mapping-services os)
511 543 "Return the list of device-mapping services for OS as a list." "Return the list of device-mapping services for OS as a list."
512 544 (map device-mapping-service (map device-mapping-service
 
... ... a list of <menu-entry>, to populate the \"old entries\" menu."
1243 1275 (root-fs (operating-system-root-file-system os)) (root-fs (operating-system-root-file-system os))
1244 1276 (root-device (file-system-device root-fs)) (root-device (file-system-device root-fs))
1245 1277 (locale (operating-system-locale os)) (locale (operating-system-locale os))
1278 (crypto-devices (operating-system-boot-crypto-devices os))
1246 1279 (params (operating-system-boot-parameters (params (operating-system-boot-parameters
1247 1280 os root-device os root-device
1248 1281 #:system-kernel-arguments? #t)) #:system-kernel-arguments? #t))
 
... ... a list of <menu-entry>, to populate the \"old entries\" menu."
1254 1287 (bootloader-configuration-bootloader bootloader-conf))) (bootloader-configuration-bootloader bootloader-conf)))
1255 1288
1256 1289 (generate-config-file bootloader-conf (list entry) (generate-config-file bootloader-conf (list entry)
1290 #:crypto-devices crypto-devices
1257 1291 #:locale locale #:locale locale
1258 1292 #:old-entries old-entries #:old-entries old-entries
1259 1293 #:store-directory-prefix #:store-directory-prefix
 
... ... such as '--root' and '--load' to <boot-parameters>."
1298 1332 (bootloader (bootloader-configuration-bootloader (bootloader (bootloader-configuration-bootloader
1299 1333 (operating-system-bootloader os))) (operating-system-bootloader os)))
1300 1334 (bootloader-name (bootloader-name bootloader)) (bootloader-name (bootloader-name bootloader))
1335 (crypto-devices (operating-system-boot-crypto-devices os))
1301 1336 (label (operating-system-label os)) (label (operating-system-label os))
1302 1337 (multiboot-modules (operating-system-multiboot-modules os))) (multiboot-modules (operating-system-multiboot-modules os)))
1303 1338 (boot-parameters (boot-parameters
 
... ... such as '--root' and '--load' to <boot-parameters>."
1314 1349 (bootloader-menu-entries (bootloader-menu-entries
1315 1350 (bootloader-configuration-menu-entries (operating-system-bootloader os))) (bootloader-configuration-menu-entries (operating-system-bootloader os)))
1316 1351 (locale locale) (locale locale)
1352 (crypto-devices crypto-devices)
1317 1353 (store-device (ensure-not-/dev (file-system-device store))) (store-device (ensure-not-/dev (file-system-device store)))
1318 1354 (store-mount-point (file-system-mount-point store))))) (store-mount-point (file-system-mount-point store)))))
1319 1355
 
... ... being stored into the \"parameters\" file)."
1367 1403 bootloader-configuration-menu-entries) bootloader-configuration-menu-entries)
1368 1404 '()))) '())))
1369 1405 (locale #$(boot-parameters-locale params)) (locale #$(boot-parameters-locale params))
1406 (crypto-devices
1407 #$(map device->sexp
1408 (boot-parameters-crypto-devices params)))
1370 1409 (store (store
1371 1410 (device (device
1372 1411 #$(device->sexp (boot-parameters-store-device params))) #$(device->sexp (boot-parameters-store-device params)))
File guix/scripts/system.scm changed (mode: 100644) (index 9ed5c26483..27c3286aae)
... ... STORE is an open connection to the store."
391 391 %system-profile old-generations)) %system-profile old-generations))
392 392 (entries (cons (boot-parameters->menu-entry params) (entries (cons (boot-parameters->menu-entry params)
393 393 (boot-parameters-bootloader-menu-entries params))) (boot-parameters-bootloader-menu-entries params)))
394 (crypto-devices (boot-parameters-crypto-devices params))
394 395 (old-entries (map boot-parameters->menu-entry old-params))) (old-entries (map boot-parameters->menu-entry old-params)))
395 396 (run-with-store store (run-with-store store
396 397 (mlet* %store-monad (mlet* %store-monad
397 398 ((bootcfg (lower-object ((bootcfg (lower-object
398 399 ((bootloader-configuration-file-generator bootloader) ((bootloader-configuration-file-generator bootloader)
399 400 bootloader-config entries bootloader-config entries
401 #:crypto-devices crypto-devices
400 402 #:locale locale #:locale locale
401 403 #:old-entries old-entries))) #:old-entries old-entries)))
402 404 (drvs -> (list bootcfg))) (drvs -> (list bootcfg)))
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/maav/guix-mirror

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/maav/guix-mirror

Clone this repository using git:
git clone git://git.rocketgit.com/user/maav/guix-mirror

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main