diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2020-07-05 12:23:21 +0200 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-08-25 11:53:20 +0200 |
| commit | 755f365b02b42a5d1e8ef3000dadef069553a478 (patch) | |
| tree | 57ce759104439219c2c6076aa3c1af875487c5c1 /gnu/services.scm | |
| parent | 46ef674b34fd63f6bcd5bd07348d5c66eb8bdf29 (diff) | |
linux-libre: Support module compression.
This commit adds support for GZIP compression for linux-libre kernel
modules. The initrd modules are kept uncompressed as the initrd is already
compressed as a whole.
The linux-libre kernel also supports XZ compression, but as Guix does not have
any available bindings for now, and the compression time is far more
significant, GZIP seems to be a better option.
* gnu/build/linux-modules.scm (modinfo-section-contents): Use
'call-with-gzip-input-port' to read from a module file using '.gz' extension,
(strip-extension): new procedure,
(dot-ko): adapt to support compression,
(ensure-dot-ko): ditto,
(file-name->module-name): ditto,
(find-module-file): ditto,
(load-linux-module*): ditto,
(module-name->file-name/guess): ditto,
(module-name-lookup): ditto,
(write-module-name-database): ditto,
(write-module-alias-database): ditto,
(write-module-device-database): ditto.
* gnu/installer.scm (installer-program): Add "guile-zlib" to the extensions.
* gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto.
* gnu/services.scm (activation-script): Ditto.
* gnu/services/base.scm (default-serial-port): Ditto,
(agetty-shepherd-service): ditto,
(udev-service-type): ditto.
* gnu/system/image.scm (gcrypt-sqlite3&co): Ditto.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Add "guile-zlib"
to the extensions and make sure that the initrd only contains
uncompressed module files.
* gnu/system/shadow.scm (account-shepherd-service): Add "guile-zlib" to the
extensions.
* guix/profiles.scm (linux-module-database): Ditto.
Diffstat (limited to 'gnu/services.scm')
| -rw-r--r-- | gnu/services.scm | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/gnu/services.scm b/gnu/services.scm index 11ba21e8245..3e59c6401f6 100644 --- a/gnu/services.scm +++ b/gnu/services.scm | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #:use-module (guix modules) | 35 | #:use-module (guix modules) |
| 36 | #:use-module (gnu packages base) | 36 | #:use-module (gnu packages base) |
| 37 | #:use-module (gnu packages bash) | 37 | #:use-module (gnu packages bash) |
| 38 | #:use-module (gnu packages guile) | ||
| 38 | #:use-module (gnu packages hurd) | 39 | #:use-module (gnu packages hurd) |
| 39 | #:use-module (srfi srfi-1) | 40 | #:use-module (srfi srfi-1) |
| 40 | #:use-module (srfi srfi-9) | 41 | #:use-module (srfi srfi-9) |
| @@ -585,28 +586,29 @@ ACTIVATION-SCRIPT-TYPE." | |||
| 585 | (with-imported-modules (source-module-closure | 586 | (with-imported-modules (source-module-closure |
| 586 | '((gnu build activation) | 587 | '((gnu build activation) |
| 587 | (guix build utils))) | 588 | (guix build utils))) |
| 588 | #~(begin | 589 | (with-extensions (list guile-zlib) |
| 589 | (use-modules (gnu build activation) | 590 | #~(begin |
| 590 | (guix build utils)) | 591 | (use-modules (gnu build activation) |
| 591 | 592 | (guix build utils)) | |
| 592 | ;; Make sure the user accounting database exists. If it | 593 | |
| 593 | ;; does not exist, 'setutxent' does not create it and | 594 | ;; Make sure the user accounting database exists. If |
| 594 | ;; thus there is no accounting at all. | 595 | ;; it does not exist, 'setutxent' does not create it |
| 595 | (close-port (open-file "/var/run/utmpx" "a0")) | 596 | ;; and thus there is no accounting at all. |
| 596 | 597 | (close-port (open-file "/var/run/utmpx" "a0")) | |
| 597 | ;; Same for 'wtmp', which is populated by mingetty et | 598 | |
| 598 | ;; al. | 599 | ;; Same for 'wtmp', which is populated by mingetty et |
| 599 | (mkdir-p "/var/log") | 600 | ;; al. |
| 600 | (close-port (open-file "/var/log/wtmp" "a0")) | 601 | (mkdir-p "/var/log") |
| 601 | 602 | (close-port (open-file "/var/log/wtmp" "a0")) | |
| 602 | ;; Set up /run/current-system. Among other things this | 603 | |
| 603 | ;; sets up locales, which the activation snippets | 604 | ;; Set up /run/current-system. Among other things |
| 604 | ;; executed below may expect. | 605 | ;; this sets up locales, which the activation snippets |
| 605 | (activate-current-system) | 606 | ;; executed below may expect. |
| 606 | 607 | (activate-current-system) | |
| 607 | ;; Run the services' activation snippets. | 608 | |
| 608 | ;; TODO: Use 'load-compiled'. | 609 | ;; Run the services' activation snippets. |
| 609 | (for-each primitive-load '#$actions))))) | 610 | ;; TODO: Use 'load-compiled'. |
| 611 | (for-each primitive-load '#$actions)))))) | ||
| 610 | 612 | ||
| 611 | (define (gexps->activation-gexp gexps) | 613 | (define (gexps->activation-gexp gexps) |
| 612 | "Return a gexp that runs the activation script containing GEXPS." | 614 | "Return a gexp that runs the activation script containing GEXPS." |
