Remove "guile-zlib" extension when unused.
This is a follow-up of 755f365b02
.
As (zlib) is autoloaded in (gnu build linux-modules), "guile-zlib" is needed
as an extension only when it is effectively used.
* gnu/installer.scm (installer-program): Remove "guile-zlib" from 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/shadow.scm (account-shepherd-service): Ditto.
master
parent
5fe12be0dd
commit
dac7dd1b0b
|
@ -342,8 +342,7 @@ selected keymap."
|
|||
;; packages …), etc. modules.
|
||||
(with-extensions (list guile-gcrypt guile-newt
|
||||
guile-parted guile-bytestructures
|
||||
guile-json-3 guile-git guile-zlib
|
||||
guix)
|
||||
guile-json-3 guile-git guix)
|
||||
(with-imported-modules `(,@(source-module-closure
|
||||
`(,@modules
|
||||
(gnu services herd)
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#:use-module (gnu bootloader)
|
||||
#:use-module (gnu machine)
|
||||
#:autoload (gnu packages gnupg) (guile-gcrypt)
|
||||
#:autoload (gnu packages guile) (guile-zlib)
|
||||
#:use-module (gnu system)
|
||||
#:use-module (gnu system file-systems)
|
||||
#:use-module (gnu system uuid)
|
||||
|
@ -249,7 +248,6 @@ not available in the initrd."
|
|||
'((gnu build file-systems)
|
||||
(gnu build linux-modules)
|
||||
(gnu system uuid)))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(begin
|
||||
(use-modules (gnu build file-systems)
|
||||
(gnu build linux-modules)
|
||||
|
@ -264,9 +262,8 @@ not available in the initrd."
|
|||
#~(find-partition-by-label
|
||||
#$(file-system-label->string device)))))
|
||||
|
||||
(missing-modules dev
|
||||
'#$(operating-system-initrd-modules
|
||||
(machine-operating-system machine))))))))
|
||||
(missing-modules dev '#$(operating-system-initrd-modules
|
||||
(machine-operating-system machine)))))))
|
||||
|
||||
(remote-let ((missing remote-exp))
|
||||
(unless (null? missing)
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#:use-module (guix modules)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (gnu packages hurd)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
|
@ -586,14 +585,13 @@ ACTIVATION-SCRIPT-TYPE."
|
|||
(with-imported-modules (source-module-closure
|
||||
'((gnu build activation)
|
||||
(guix build utils)))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(begin
|
||||
(use-modules (gnu build activation)
|
||||
(guix build utils))
|
||||
|
||||
;; Make sure the user accounting database exists. If
|
||||
;; it does not exist, 'setutxent' does not create it
|
||||
;; and thus there is no accounting at all.
|
||||
;; Make sure the user accounting database exists. If it
|
||||
;; does not exist, 'setutxent' does not create it and
|
||||
;; thus there is no accounting at all.
|
||||
(close-port (open-file "/var/run/utmpx" "a0"))
|
||||
|
||||
;; Same for 'wtmp', which is populated by mingetty et
|
||||
|
@ -601,14 +599,14 @@ ACTIVATION-SCRIPT-TYPE."
|
|||
(mkdir-p "/var/log")
|
||||
(close-port (open-file "/var/log/wtmp" "a0"))
|
||||
|
||||
;; Set up /run/current-system. Among other things
|
||||
;; this sets up locales, which the activation snippets
|
||||
;; Set up /run/current-system. Among other things this
|
||||
;; sets up locales, which the activation snippets
|
||||
;; executed below may expect.
|
||||
(activate-current-system)
|
||||
|
||||
;; Run the services' activation snippets.
|
||||
;; TODO: Use 'load-compiled'.
|
||||
(for-each primitive-load '#$actions))))))
|
||||
(for-each primitive-load '#$actions)))))
|
||||
|
||||
(define (gexps->activation-gexp gexps)
|
||||
"Return a gexp that runs the activation script containing GEXPS."
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
#:select (coreutils glibc glibc-utf8-locales))
|
||||
#:use-module (gnu packages package-management)
|
||||
#:use-module ((gnu packages gnupg) #:select (guile-gcrypt))
|
||||
#:use-module ((gnu packages guile) #:select (guile-zlib))
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (gnu packages terminals)
|
||||
#:use-module ((gnu build file-systems)
|
||||
|
@ -837,7 +836,6 @@ the message of the day, among other things."
|
|||
to use as the tty. This is primarily useful for headless systems."
|
||||
(with-imported-modules (source-module-closure
|
||||
'((gnu build linux-boot))) ;for 'find-long-options'
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(begin
|
||||
;; console=device,options
|
||||
;; device: can be tty0, ttyS0, lp0, ttyUSB0 (serial).
|
||||
|
@ -846,8 +844,7 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
(let* ((not-comma (char-set-complement (char-set #\,)))
|
||||
(command (linux-command-line))
|
||||
(agetty-specs (find-long-options "agetty.tty" command))
|
||||
(console-specs
|
||||
(filter (lambda (spec)
|
||||
(console-specs (filter (lambda (spec)
|
||||
(and (string-prefix? "tty" spec)
|
||||
(not (or
|
||||
(string-prefix? "tty0" spec)
|
||||
|
@ -868,7 +865,7 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
;; Extract device name from first spec.
|
||||
(match (string-tokenize spec not-comma)
|
||||
((device-name _ ...)
|
||||
device-name)))))))))
|
||||
device-name))))))))
|
||||
|
||||
(define agetty-shepherd-service
|
||||
(match-lambda
|
||||
|
@ -893,7 +890,6 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
(start
|
||||
(with-imported-modules (source-module-closure
|
||||
'((gnu build linux-boot)))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(lambda args
|
||||
(let ((defaulted-tty #$(or tty (default-serial-port))))
|
||||
(apply
|
||||
|
@ -925,10 +921,10 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
#$@(if no-clear?
|
||||
#~("--noclear")
|
||||
#~())
|
||||
;;; FIXME This doesn't work as expected. According to agetty(8), if this
|
||||
;;; option is not passed, then the default is 'auto'. However, in my tests,
|
||||
;;; when that option is selected, agetty never presents the login prompt, and
|
||||
;;; the term-ttyS0 service respawns every few seconds.
|
||||
;;; FIXME This doesn't work as expected. According to agetty(8), if this option
|
||||
;;; is not passed, then the default is 'auto'. However, in my tests, when that
|
||||
;;; option is selected, agetty never presents the login prompt, and the
|
||||
;;; term-ttyS0 service respawns every few seconds.
|
||||
#$@(if local-line
|
||||
#~(#$(match local-line
|
||||
('auto "--local-line=auto")
|
||||
|
@ -960,8 +956,7 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
#~("--keep-baud")
|
||||
#~())
|
||||
#$@(if timeout
|
||||
#~("--timeout"
|
||||
#$(number->string timeout))
|
||||
#~("--timeout" #$(number->string timeout))
|
||||
#~())
|
||||
#$@(if detect-case?
|
||||
#~("--detect-case")
|
||||
|
@ -1010,7 +1005,7 @@ to use as the tty. This is primarily useful for headless systems."
|
|||
#~(#$term)
|
||||
#~())))
|
||||
(const #f)) ; never start.
|
||||
args))))))
|
||||
args)))))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
||||
(define agetty-service-type
|
||||
|
@ -1944,7 +1939,6 @@ item of @var{packages}."
|
|||
(start
|
||||
(with-imported-modules (source-module-closure
|
||||
'((gnu build linux-boot)))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(lambda ()
|
||||
(define udevd
|
||||
;; 'udevd' from eudev.
|
||||
|
@ -1984,9 +1978,7 @@ item of @var{packages}."
|
|||
(make-static-device-nodes directory))
|
||||
(umask old-umask))
|
||||
|
||||
(let ((pid
|
||||
(fork+exec-command
|
||||
(list udevd)
|
||||
(let ((pid (fork+exec-command (list udevd)
|
||||
#:environment-variables
|
||||
(cons*
|
||||
;; The first one is for udev, the second one for
|
||||
|
@ -2010,7 +2002,7 @@ item of @var{packages}."
|
|||
;; Wait for things to settle down.
|
||||
(system* #$(file-append udev "/bin/udevadm")
|
||||
"settle")
|
||||
pid)))))
|
||||
pid))))
|
||||
(stop #~(make-kill-destructor))
|
||||
|
||||
;; When halting the system, 'udev' is actually killed by
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
(match (package-transitive-propagated-inputs package)
|
||||
(((labels packages) ...)
|
||||
packages))))
|
||||
(list guile-gcrypt guile-sqlite3 guile-zlib)))
|
||||
(list guile-gcrypt guile-sqlite3)))
|
||||
|
||||
(define-syntax-rule (with-imported-modules* gexp* ...)
|
||||
(with-extensions gcrypt-sqlite3&co
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#:use-module ((gnu packages admin)
|
||||
#:select (shadow))
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (srfi srfi-34)
|
||||
|
@ -325,12 +324,11 @@ accounts among ACCOUNTS+GROUPS."
|
|||
(start (with-imported-modules (source-module-closure
|
||||
'((gnu build activation)
|
||||
(gnu system accounts)))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(lambda ()
|
||||
(activate-user-home
|
||||
(map sexp->user-account
|
||||
(list #$@(map user-account->gexp accounts))))
|
||||
#t)))) ;success
|
||||
#t))) ;success
|
||||
(documentation "Create user home directories."))))
|
||||
|
||||
(define (shells-file shells)
|
||||
|
|
Reference in New Issue