mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-06-06 18:00:30 +00:00
Compare commits
7 Commits
9e60a11917
...
0b6b5feb72
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b6b5feb72 | ||
|
|
ac3a5d8db9 | ||
|
|
29f4881cce | ||
|
|
cc8751302c | ||
|
|
f5d9daa038 | ||
|
|
920c6d63c7 | ||
|
|
7ee922362a |
@ -16,31 +16,6 @@
|
|||||||
#:use-module (gnu packages emacs-xyz)
|
#:use-module (gnu packages emacs-xyz)
|
||||||
#:use-module (rosenthal packages version-control))
|
#:use-module (rosenthal packages version-control))
|
||||||
|
|
||||||
(define-public emacs-arei/dolly
|
|
||||||
(let* ((commit "c348103a4562e183a3c094dc945fc2af8bf0b704")
|
|
||||||
(revision "0"))
|
|
||||||
(package
|
|
||||||
(inherit emacs-arei)
|
|
||||||
(name "emacs-arei-dolly")
|
|
||||||
(version (git-version "0.9.6" revision commit))
|
|
||||||
(source
|
|
||||||
(origin
|
|
||||||
(method git-fetch)
|
|
||||||
(uri (git-reference
|
|
||||||
(url "https://git.sr.ht/~abcdw/emacs-arei")
|
|
||||||
(commit commit)))
|
|
||||||
(file-name (git-file-name name version))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0h0fxybdb23cyx4xqz4axyp4sbqi2bqcvcwqin74l59wmfwpz0rr"))))
|
|
||||||
(arguments
|
|
||||||
(substitute-keyword-arguments arguments
|
|
||||||
((#:lisp-directory _ #f) "lisp")))
|
|
||||||
(propagated-inputs
|
|
||||||
(modify-inputs propagated-inputs
|
|
||||||
(prepend emacs-consult)))
|
|
||||||
(properties '((disable-updater? . #t))))))
|
|
||||||
|
|
||||||
(define-public emacs-caddyfile-mode
|
(define-public emacs-caddyfile-mode
|
||||||
(let ((commit "fc41148f5a7eb320f070666f046fb9d88cf17680")
|
(let ((commit "fc41148f5a7eb320f070666f046fb9d88cf17680")
|
||||||
(revision "0"))
|
(revision "0"))
|
||||||
@ -147,8 +122,8 @@ some keybindings are slightly simplified.")
|
|||||||
(properties '((disable-updater? . #t)))))
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
(define-public emacs-majutsu/dolly
|
(define-public emacs-majutsu/dolly
|
||||||
(let ((commit "2ab2adb7db8d379bdf2177901db7bcadfc9677d1")
|
(let ((commit "aebd5acdecd1fa6de249dabd274b963cd73d3bfc")
|
||||||
(revision "1"))
|
(revision "2"))
|
||||||
(package
|
(package
|
||||||
(inherit emacs-majutsu)
|
(inherit emacs-majutsu)
|
||||||
(name "emacs-majutsu-dolly")
|
(name "emacs-majutsu-dolly")
|
||||||
@ -161,10 +136,7 @@ some keybindings are slightly simplified.")
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0hhil3j9a8p9q7wivkd5vac6kwn1w6brw1zairfqa4r1nm23kx94"))))
|
"1m5w49j9z61lbcz1bdx03iamnb7pkg2zfmqf6dzm19zlhg5489mk"))))
|
||||||
(inputs
|
|
||||||
(modify-inputs inputs
|
|
||||||
(replace "jujutsu" jujutsu/dolly)))
|
|
||||||
(properties '((disable-updater? . #t))))))
|
(properties '((disable-updater? . #t))))))
|
||||||
|
|
||||||
(define-public emacs-pcmpl-tailscale
|
(define-public emacs-pcmpl-tailscale
|
||||||
|
|||||||
@ -22,13 +22,12 @@
|
|||||||
(package
|
(package
|
||||||
(inherit
|
(inherit
|
||||||
(package-with-extra-patches guix
|
(package-with-extra-patches guix
|
||||||
(rosenthal-patches "guix-change-publish-cache-storage.patch"
|
(rosenthal-patches "guix-change-publish-cache-storage.patch")))
|
||||||
"guix-allow-out-of-tree-modules-in-initrd.patch"
|
|
||||||
"guix-wip-zfs-boot-support.patch")))
|
|
||||||
(name "guix-dolly")
|
(name "guix-dolly")
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments arguments
|
(substitute-keyword-arguments arguments
|
||||||
((#:parallel-build? _ #f) #t)))
|
((#:parallel-build? _ #f) #t)
|
||||||
|
((#:tests? _ #t) #f)))
|
||||||
(properties '((disable-updater? . #t)))))
|
(properties '((disable-updater? . #t)))))
|
||||||
|
|
||||||
(define-public mirror-substitutes
|
(define-public mirror-substitutes
|
||||||
|
|||||||
@ -1,270 +0,0 @@
|
|||||||
From 4323514d1b259a0dd61572e3c0859fab4250d297 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-ID: <4323514d1b259a0dd61572e3c0859fab4250d297.1757725903.git.hako@ultrarare.space>
|
|
||||||
From: Brian Cully <bjc@spork.org>
|
|
||||||
Date: Sun, 16 Feb 2025 21:52:45 +0900
|
|
||||||
Subject: [PATCH] Allow copying of out-of-tree modules to the Linux initrd.
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
With this patch, modules for ‘initrd-modules’ will not only be searched for in
|
|
||||||
the in-tree Linux modules, but also any additional modules specified in
|
|
||||||
‘kernel-loadable-modules’.
|
|
||||||
|
|
||||||
* gnu/build/linux-modules.scm (find-module-file): Change DIRECTORY argument to
|
|
||||||
DIRECTORIES. Now takes a list of directories to search, rather than a single
|
|
||||||
one.
|
|
||||||
* gnu/system/linux-initrd.scm (flat-linux-module-directory): change LINUX
|
|
||||||
argument to PACKAGES. Now contains a list of file-like objects to search for
|
|
||||||
modules.
|
|
||||||
(raw-initrd): Add LINUX-EXTRA-MODULE-DIRECTORIES keyword argument. Pass it
|
|
||||||
to (flat-linux-module-directory) along with the selected LINUX package.
|
|
||||||
(base-initrd): Add LINUX-EXTRA-MODULE-DIRECTORIES keyword argument. Pass it
|
|
||||||
to (raw-initrd).
|
|
||||||
* gnu/system.scm (operating-system-initrd-file): Pass in operating system
|
|
||||||
definition's kernel-loadable-modules into (make-initrd) as
|
|
||||||
LINUX-EXTRA-MODULE-DIRECTORIES.
|
|
||||||
* doc/guix.texi (Initial RAM Disk): Document how out-of-tree modules can be
|
|
||||||
used.
|
|
||||||
|
|
||||||
Change-Id: Ic39f2abcfabc3ec34a71acce840038396bf9c82e
|
|
||||||
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
||||||
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
|
||||||
Modified-by: Hilton Chain <hako@ultrarare.space>
|
|
||||||
---
|
|
||||||
doc/guix.texi | 15 ++++++++++
|
|
||||||
gnu/build/linux-modules.scm | 23 ++++++++++-----
|
|
||||||
gnu/system.scm | 2 ++
|
|
||||||
gnu/system/linux-initrd.scm | 58 +++++++++++++++++++++++--------------
|
|
||||||
4 files changed, 69 insertions(+), 29 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/guix.texi b/doc/guix.texi
|
|
||||||
index 4ab404dcdb2..3c05428829b 100644
|
|
||||||
--- a/doc/guix.texi
|
|
||||||
+++ b/doc/guix.texi
|
|
||||||
@@ -46404,6 +46404,21 @@ Initial RAM Disk
|
|
||||||
(initrd-modules (cons "megaraid_sas" %base-initrd-modules)))
|
|
||||||
@end lisp
|
|
||||||
|
|
||||||
+If a module listed in @code{initrd-modules} is not included in the
|
|
||||||
+Linux-libre kernel, then its location must be provided via the
|
|
||||||
+@code{kernel-loadable-modules} list.
|
|
||||||
+
|
|
||||||
+As an example, if you need the driver for a Realtek RTL8821CE wireless
|
|
||||||
+network adapter for mounting the root file system over NFS, your
|
|
||||||
+configuration might include the following:
|
|
||||||
+
|
|
||||||
+@lisp
|
|
||||||
+(operating-system
|
|
||||||
+ ;; @dots{}
|
|
||||||
+ (initrd-modules (cons "8821ce" %base-initrd-modules))
|
|
||||||
+ (kernel-loadable-modules (list (list rtl8821ce-linux-module "module"))))
|
|
||||||
+@end lisp
|
|
||||||
+
|
|
||||||
@defvar %base-initrd-modules
|
|
||||||
This is the list of kernel modules included in the initrd by default.
|
|
||||||
@end defvar
|
|
||||||
diff --git a/gnu/build/linux-modules.scm b/gnu/build/linux-modules.scm
|
|
||||||
index 32baf6c5259..f45db55f861 100644
|
|
||||||
--- a/gnu/build/linux-modules.scm
|
|
||||||
+++ b/gnu/build/linux-modules.scm
|
|
||||||
@@ -246,8 +246,8 @@ (define (file-name->module-name file)
|
|
||||||
'.ko[.gz|.xz|.zst]' and normalizing it."
|
|
||||||
(normalize-module-name (strip-extension (basename file))))
|
|
||||||
|
|
||||||
-(define (find-module-file directory module)
|
|
||||||
- "Lookup module NAME under DIRECTORY, and return its absolute file name.
|
|
||||||
+(define (find-module-file directories module)
|
|
||||||
+ "Lookup module NAME under DIRECTORIES, and return its absolute file name.
|
|
||||||
NAME can be a file name with or without '.ko', or it can be a module name.
|
|
||||||
Raise an error if it could not be found.
|
|
||||||
|
|
||||||
@@ -255,6 +255,10 @@ (define (find-module-file directory module)
|
|
||||||
module names usually (always?) use underscores as the inter-word separator,
|
|
||||||
whereas file names often, but not always, use hyphens. Examples:
|
|
||||||
\"usb-storage.ko\", \"serpent_generic.ko\"."
|
|
||||||
+ ;; For backward compatibility.
|
|
||||||
+ (define %directories (if (pair? directories)
|
|
||||||
+ directories
|
|
||||||
+ (list directories)))
|
|
||||||
(define names
|
|
||||||
;; List of possible file names. XXX: It would of course be cleaner to
|
|
||||||
;; have a database that maps module names to file names and vice versa,
|
|
||||||
@@ -268,16 +272,19 @@ (define (find-module-file directory module)
|
|
||||||
(else chr)))
|
|
||||||
module))))
|
|
||||||
|
|
||||||
- (match (find-files directory
|
|
||||||
- (lambda (file stat)
|
|
||||||
- (member (strip-extension
|
|
||||||
- (basename file)) names)))
|
|
||||||
+ (match (append-map
|
|
||||||
+ (cut find-files <>
|
|
||||||
+ (lambda (file _)
|
|
||||||
+ (member (strip-extension
|
|
||||||
+ (basename file))
|
|
||||||
+ names)))
|
|
||||||
+ %directories)
|
|
||||||
((file)
|
|
||||||
file)
|
|
||||||
(()
|
|
||||||
- (error "kernel module not found" module directory))
|
|
||||||
+ (error "kernel module not found" module %directories))
|
|
||||||
((_ ...)
|
|
||||||
- (error "several modules by that name" module directory))))
|
|
||||||
+ (error "several modules by that name" module %directories))))
|
|
||||||
|
|
||||||
(define* (recursive-module-dependencies files
|
|
||||||
#:key (lookup-module dot-ko))
|
|
||||||
diff --git a/gnu/system.scm b/gnu/system.scm
|
|
||||||
index 78a30646e1b..b709686744d 100644
|
|
||||||
--- a/gnu/system.scm
|
|
||||||
+++ b/gnu/system.scm
|
|
||||||
@@ -1380,6 +1380,8 @@ (define (operating-system-initrd-file os)
|
|
||||||
#:linux (operating-system-kernel os)
|
|
||||||
#:linux-modules
|
|
||||||
(operating-system-initrd-modules os)
|
|
||||||
+ #:linux-extra-module-directories
|
|
||||||
+ (operating-system-kernel-loadable-modules os)
|
|
||||||
#:mapped-devices mapped-devices
|
|
||||||
#:keyboard-layout (operating-system-keyboard-layout os)))
|
|
||||||
|
|
||||||
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
|
|
||||||
index 17c2e6f6bfd..978084062b2 100644
|
|
||||||
--- a/gnu/system/linux-initrd.scm
|
|
||||||
+++ b/gnu/system/linux-initrd.scm
|
|
||||||
@@ -120,13 +120,19 @@ (define* (expression->initrd exp
|
|
||||||
`(#:references-graphs (("closure" ,init))))
|
|
||||||
"/initrd.cpio.gz"))
|
|
||||||
|
|
||||||
-(define (flat-linux-module-directory linux modules)
|
|
||||||
+(define (flat-linux-module-directory packages modules)
|
|
||||||
"Return a flat directory containing the Linux kernel modules listed in
|
|
||||||
-MODULES and taken from LINUX."
|
|
||||||
+MODULES and taken from PACKAGES."
|
|
||||||
(define imported-modules
|
|
||||||
(source-module-closure '((gnu build linux-modules)
|
|
||||||
(guix build utils))))
|
|
||||||
|
|
||||||
+ (define package-inputs
|
|
||||||
+ (map (match-lambda
|
|
||||||
+ ((p o) (gexp-input p o))
|
|
||||||
+ (p (gexp-input p "out")))
|
|
||||||
+ packages))
|
|
||||||
+
|
|
||||||
(define build-exp
|
|
||||||
(with-imported-modules imported-modules
|
|
||||||
(with-extensions (list guile-zlib guile-zstd)
|
|
||||||
@@ -138,13 +144,17 @@ (define (flat-linux-module-directory linux modules)
|
|
||||||
(srfi srfi-26)
|
|
||||||
(ice-9 match))
|
|
||||||
|
|
||||||
- (define module-dir
|
|
||||||
- (string-append #$linux "/lib/modules"))
|
|
||||||
+ (define module-dirs
|
|
||||||
+ (map (cut string-append <> "/lib/modules")
|
|
||||||
+ '#$package-inputs))
|
|
||||||
|
|
||||||
(define builtin-modules
|
|
||||||
- (match (find-files module-dir (lambda (file stat)
|
|
||||||
- (string=? (basename file)
|
|
||||||
- "modules.builtin")))
|
|
||||||
+ (match (append-map
|
|
||||||
+ (cut find-files <>
|
|
||||||
+ (lambda (file stat)
|
|
||||||
+ (string=? (basename file)
|
|
||||||
+ "modules.builtin")))
|
|
||||||
+ module-dirs)
|
|
||||||
((file . _)
|
|
||||||
(call-with-input-file file
|
|
||||||
(lambda (port)
|
|
||||||
@@ -157,7 +167,7 @@ (define (flat-linux-module-directory linux modules)
|
|
||||||
(lset-difference string=? '#$modules builtin-modules))
|
|
||||||
|
|
||||||
(define modules
|
|
||||||
- (let* ((lookup (cut find-module-file module-dir <>))
|
|
||||||
+ (let* ((lookup (cut find-module-file module-dirs <>))
|
|
||||||
(modules (map lookup modules-to-lookup)))
|
|
||||||
(append modules
|
|
||||||
(recursive-module-dependencies
|
|
||||||
@@ -192,6 +202,7 @@ (define* (raw-initrd file-systems
|
|
||||||
#:key
|
|
||||||
(linux linux-libre)
|
|
||||||
(linux-modules '())
|
|
||||||
+ (linux-extra-module-directories '())
|
|
||||||
(pre-mount #t)
|
|
||||||
(mapped-devices '())
|
|
||||||
(keyboard-layout #f)
|
|
||||||
@@ -199,15 +210,16 @@ (define* (raw-initrd file-systems
|
|
||||||
qemu-networking?
|
|
||||||
volatile-root?
|
|
||||||
(on-error 'debug))
|
|
||||||
- "Return as a file-like object a raw initrd, with kernel
|
|
||||||
-modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be
|
|
||||||
-mounted by the initrd, possibly in addition to the root file system specified
|
|
||||||
-on the kernel command line via 'root'. LINUX-MODULES is a list of kernel
|
|
||||||
-modules to be loaded at boot time. MAPPED-DEVICES is a list of device
|
|
||||||
-mappings to realize before FILE-SYSTEMS are mounted. PRE-MOUNT is a
|
|
||||||
-G-expression to evaluate before realizing MAPPED-DEVICES.
|
|
||||||
-HELPER-PACKAGES is a list of packages to be copied in the initrd. It may include
|
|
||||||
-e2fsck/static or other packages needed by the initrd to check root partition.
|
|
||||||
+ "Return as a file-like object a raw initrd, with kernel modules taken from
|
|
||||||
+LINUX. FILE-SYSTEMS is a list of file-systems to be mounted by the initrd,
|
|
||||||
+possibly in addition to the root file system specified on the kernel command
|
|
||||||
+line via 'root'. LINUX-MODULES is a list of kernel modules to be loaded at
|
|
||||||
+boot time. LINUX-EXTRA-MODULE-DIRECTORIES is a list of file-like objects which
|
|
||||||
+will be searched for modules in addition to the linux kernel. MAPPED-DEVICES
|
|
||||||
+is a list of device mappings to realize before FILE-SYSTEMS are mounted.
|
|
||||||
+HELPER-PACKAGES is a list of packages to be copied in the initrd. It may
|
|
||||||
+include e2fsck/static or other packages needed by the initrd to check root
|
|
||||||
+partition.
|
|
||||||
|
|
||||||
When true, KEYBOARD-LAYOUT is a <keyboard-layout> record denoting the desired
|
|
||||||
console keyboard layout. This is done before MAPPED-DEVICES are set up and
|
|
||||||
@@ -244,7 +256,8 @@ (define* (raw-initrd file-systems
|
|
||||||
#~())))
|
|
||||||
|
|
||||||
(define kodir
|
|
||||||
- (flat-linux-module-directory linux linux-modules))
|
|
||||||
+ (flat-linux-module-directory (cons linux linux-extra-module-directories)
|
|
||||||
+ linux-modules))
|
|
||||||
|
|
||||||
(expression->initrd
|
|
||||||
(with-imported-modules (source-module-closure
|
|
||||||
@@ -392,6 +405,7 @@ (define* (base-initrd file-systems
|
|
||||||
#:key
|
|
||||||
(linux linux-libre)
|
|
||||||
(linux-modules '())
|
|
||||||
+ (linux-extra-module-directories '())
|
|
||||||
(mapped-devices '())
|
|
||||||
(keyboard-layout #f)
|
|
||||||
qemu-networking?
|
|
||||||
@@ -412,9 +426,10 @@ (define* (base-initrd file-systems
|
|
||||||
QEMU-NETWORKING? and VOLATILE-ROOT? behaves as in raw-initrd.
|
|
||||||
|
|
||||||
The initrd is automatically populated with all the kernel modules necessary
|
|
||||||
-for FILE-SYSTEMS and for the given options. Additional kernel
|
|
||||||
-modules can be listed in LINUX-MODULES. They will be added to the initrd, and
|
|
||||||
-loaded at boot time in the order in which they appear."
|
|
||||||
+for FILE-SYSTEMS and for the given options. Additional kernel modules can be
|
|
||||||
+listed in LINUX-MODULES. Additional directories for modules can be listed in
|
|
||||||
+LINUX-EXTRA-MODULE-DIRECTORIES. They will be added to the initrd, and loaded
|
|
||||||
+at boot time in the order in which they appear."
|
|
||||||
(define linux-modules*
|
|
||||||
;; Modules added to the initrd and loaded from the initrd.
|
|
||||||
`(,@linux-modules
|
|
||||||
@@ -434,6 +449,7 @@ (define* (base-initrd file-systems
|
|
||||||
(raw-initrd file-systems
|
|
||||||
#:linux linux
|
|
||||||
#:linux-modules linux-modules*
|
|
||||||
+ #:linux-extra-module-directories linux-extra-module-directories
|
|
||||||
#:mapped-devices mapped-devices
|
|
||||||
#:helper-packages helper-packages
|
|
||||||
#:keyboard-layout keyboard-layout
|
|
||||||
|
|
||||||
base-commit: 6174b135ffa3328fd7ad404b15b1586fc64e5666
|
|
||||||
prerequisite-patch-id: f71061d735b69d75799eb03df6215bbcb20d53b2
|
|
||||||
prerequisite-patch-id: 88337e68e714f3b1fe0d8e6588a1a4f423251610
|
|
||||||
--
|
|
||||||
2.51.0
|
|
||||||
|
|
||||||
@ -1,175 +0,0 @@
|
|||||||
From 1067857a13a015602c9bc8c5cf0aa81e7869739c Mon Sep 17 00:00:00 2001
|
|
||||||
Message-ID: <1067857a13a015602c9bc8c5cf0aa81e7869739c.1773748638.git.hako@ultrarare.space>
|
|
||||||
From: Hilton Chain <hako@ultrarare.space>
|
|
||||||
Date: Sun, 7 Sep 2025 13:52:57 +0800
|
|
||||||
Subject: [PATCH] WIP: ZFS boot support.
|
|
||||||
|
|
||||||
Change-Id: I6579a36d66fcd0a487fe262c9a7c36e51532cb70
|
|
||||||
---
|
|
||||||
gnu/build/file-systems.scm | 14 ++++++++++----
|
|
||||||
gnu/build/linux-boot.scm | 1 +
|
|
||||||
gnu/system/file-systems.scm | 30 +++++++++++++++++++++---------
|
|
||||||
gnu/system/linux-initrd.scm | 25 ++++++++++++++++++++-----
|
|
||||||
guix/scripts/system.scm | 3 ++-
|
|
||||||
5 files changed, 54 insertions(+), 19 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
|
|
||||||
index 33b035aa967..7a863afd1ea 100644
|
|
||||||
--- a/gnu/build/file-systems.scm
|
|
||||||
+++ b/gnu/build/file-systems.scm
|
|
||||||
@@ -1226,10 +1226,16 @@ (define (canonicalize-device-spec spec)
|
|
||||||
|
|
||||||
(match spec
|
|
||||||
((? string?)
|
|
||||||
- (if (string-prefix? "/dev/" spec)
|
|
||||||
- ;; Nothing to do, but wait until SPEC shows up.
|
|
||||||
- (resolve device-exists? spec identity)
|
|
||||||
- spec)) ; do not resolve NFS / CIFS / tmpfs devices
|
|
||||||
+ (cond
|
|
||||||
+ ((string-prefix? "/dev/" spec)
|
|
||||||
+ ;; Nothing to do, but wait until SPEC shows up.
|
|
||||||
+ (resolve device-exists? spec identity))
|
|
||||||
+ ((string-prefix? "zfs:" spec)
|
|
||||||
+ ;; "zfs:zpool/dataset" => "zpool/dataset"
|
|
||||||
+ (string-drop spec 4))
|
|
||||||
+ (else
|
|
||||||
+ ;; Do not resolve NFS / CIFS / tmpfs devices
|
|
||||||
+ spec)))
|
|
||||||
((? file-system-label?)
|
|
||||||
;; Resolve the label.
|
|
||||||
(resolve find-partition-by-label
|
|
||||||
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
|
|
||||||
index e0743eae55a..f0085f74962 100644
|
|
||||||
--- a/gnu/build/linux-boot.scm
|
|
||||||
+++ b/gnu/build/linux-boot.scm
|
|
||||||
@@ -542,6 +542,7 @@ (define* (boot-system #:key
|
|
||||||
;; So check for all four.
|
|
||||||
(cond ((string-prefix? "/" device-string) device-string)
|
|
||||||
((string-contains device-string ":/") device-string) ; nfs-root
|
|
||||||
+ ((string-prefix? "zfs:" device-string) device-string)
|
|
||||||
((uuid device-string) => identity)
|
|
||||||
(else (file-system-label device-string))))
|
|
||||||
|
|
||||||
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
|
|
||||||
index f83b67c4770..00c611eaa97 100644
|
|
||||||
--- a/gnu/system/file-systems.scm
|
|
||||||
+++ b/gnu/system/file-systems.scm
|
|
||||||
@@ -372,7 +372,9 @@ (define %pseudo-file-system-types
|
|
||||||
;; List of know pseudo file system types. This is used when validating file
|
|
||||||
;; system definitions.
|
|
||||||
'("binfmt_misc" "cgroup" "cgroup2" "debugfs" "devpts" "devtmpfs" "efivarfs" "fusectl"
|
|
||||||
- "hugetlbfs" "overlay" "proc" "securityfs" "sysfs" "tmpfs" "tracefs" "virtiofs" "xenfs"))
|
|
||||||
+ "hugetlbfs" "overlay" "proc" "securityfs" "sysfs" "tmpfs" "tracefs" "virtiofs" "xenfs"
|
|
||||||
+ ;; HACK
|
|
||||||
+ "zfs"))
|
|
||||||
|
|
||||||
(define %fuse-control-file-system
|
|
||||||
;; Control file system for Linux' file systems in user-space (FUSE).
|
|
||||||
@@ -628,18 +630,21 @@ (define (file-system-mount-point-predicate mount-point)
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
|
||||||
-;;; Btrfs specific helpers.
|
|
||||||
+;;; Btrfs specific helpers. TODO: Refactor
|
|
||||||
;;;
|
|
||||||
|
|
||||||
(define (btrfs-subvolume? fs)
|
|
||||||
"Predicate to check if FS, a file-system object, is a Btrfs subvolume."
|
|
||||||
- (and-let* ((btrfs-file-system? (string= "btrfs" (file-system-type fs)))
|
|
||||||
- (option-keys (map (match-lambda
|
|
||||||
- ((key . value) key)
|
|
||||||
- (key key))
|
|
||||||
- (file-system-options->alist
|
|
||||||
- (file-system-options fs)))))
|
|
||||||
- (find (cut string-prefix? "subvol" <>) option-keys)))
|
|
||||||
+ (or (and-let* ((btrfs-file-system? (string= "btrfs" (file-system-type fs)))
|
|
||||||
+ (option-keys (map (match-lambda
|
|
||||||
+ ((key . value) key)
|
|
||||||
+ (key key))
|
|
||||||
+ (file-system-options->alist
|
|
||||||
+ (file-system-options fs)))))
|
|
||||||
+ (find (cut string-prefix? "subvol" <>) option-keys))
|
|
||||||
+ (and (string=? "zfs" (file-system-type fs))
|
|
||||||
+ ;; "zfs:zpool/dataset"
|
|
||||||
+ (string-contains (file-system-device fs) "/"))))
|
|
||||||
|
|
||||||
(define (btrfs-store-subvolume-file-name file-systems)
|
|
||||||
"Return the subvolume file name within the Btrfs top level onto which the
|
|
||||||
@@ -665,6 +670,13 @@ (define (btrfs-store-subvolume-file-name file-systems)
|
|
||||||
;; XXX: Deriving the subvolume name based from a subvolume ID is not
|
|
||||||
;; supported, as we'd need to query the actual file system.
|
|
||||||
(or (and=> (assoc-ref options "subvol") prepend-slash/maybe)
|
|
||||||
+ (and (string=? "zfs" (file-system-type store-subvolume-fs))
|
|
||||||
+ ;; "zfs:zpool/dataset" => "/dataset@"
|
|
||||||
+ (and=> (file-system-device store-subvolume-fs)
|
|
||||||
+ (lambda (device)
|
|
||||||
+ (string-append
|
|
||||||
+ (substring device (string-index device #\/))
|
|
||||||
+ "@"))))
|
|
||||||
(raise (condition
|
|
||||||
(&message
|
|
||||||
(message "The store is on a Btrfs subvolume, but the \
|
|
||||||
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
|
|
||||||
index a9dabde7a32..3f0d8fc9f30 100644
|
|
||||||
--- a/gnu/system/linux-initrd.scm
|
|
||||||
+++ b/gnu/system/linux-initrd.scm
|
|
||||||
@@ -249,11 +249,25 @@ (define* (raw-initrd file-systems
|
|
||||||
;; File systems like btrfs need help to assemble multi-device file systems
|
|
||||||
;; but do not use manually-specified <mapped-devices>.
|
|
||||||
(let ((file-system-types (map file-system-type file-systems)))
|
|
||||||
- (if (member "btrfs" file-system-types)
|
|
||||||
- ;; Ignore errors: if the system manages to boot anyway, the better.
|
|
||||||
- #~((system* (string-append #$btrfs-progs/static "/bin/btrfs")
|
|
||||||
- "device" "scan"))
|
|
||||||
- #~())))
|
|
||||||
+ (and
|
|
||||||
+ (if (member "btrfs" file-system-types)
|
|
||||||
+ ;; Ignore errors: if the system manages to boot anyway, the better.
|
|
||||||
+ #~((system* (string-append #$btrfs-progs/static "/bin/btrfs")
|
|
||||||
+ "device" "scan"))
|
|
||||||
+ #~())
|
|
||||||
+ (map (lambda (zpool)
|
|
||||||
+ ;; Ignore errors: if the system manages to boot anyway, the
|
|
||||||
+ ;; better.
|
|
||||||
+ #~(system* #$(file-append zfs "/sbin/zpool")
|
|
||||||
+ "import" "-N" #$zpool))
|
|
||||||
+ (delete-duplicates
|
|
||||||
+ ;; "zfs:zpool/dataset" => "zpool"
|
|
||||||
+ (map (compose second
|
|
||||||
+ (cut string-split <> (char-set #\: #\/))
|
|
||||||
+ file-system-device)
|
|
||||||
+ (filter (lambda (fs)
|
|
||||||
+ (equal? (file-system-type fs) "zfs"))
|
|
||||||
+ file-systems)))))))
|
|
||||||
|
|
||||||
(define kodir
|
|
||||||
(flat-linux-module-directory (cons linux linux-extra-module-directories)
|
|
||||||
@@ -364,6 +378,7 @@ (define file-system-type-modules
|
|
||||||
("jfs" => '("jfs"))
|
|
||||||
("f2fs" => '("f2fs" "crc32_cryptoapi"))
|
|
||||||
("xfs" => '("xfs"))
|
|
||||||
+ ("zfs" => '("zfs"))
|
|
||||||
(else '())))
|
|
||||||
|
|
||||||
(define (file-system-modules file-systems)
|
|
||||||
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
|
|
||||||
index 8a56f1cc63d..75a5bb1d5f1 100644
|
|
||||||
--- a/guix/scripts/system.scm
|
|
||||||
+++ b/guix/scripts/system.scm
|
|
||||||
@@ -610,7 +610,8 @@ (define (check-file-system-availability file-systems)
|
|
||||||
|
|
||||||
(define literal
|
|
||||||
(filter (lambda (fs)
|
|
||||||
- (string? (file-system-device fs)))
|
|
||||||
+ (and (string? (file-system-device fs))
|
|
||||||
+ (not (string=? "zfs" (file-system-type fs)))))
|
|
||||||
relevant))
|
|
||||||
|
|
||||||
(define uuid
|
|
||||||
|
|
||||||
base-commit: aeeb8be0e27b4109eb2be27efe6bb7b2aa50e003
|
|
||||||
prerequisite-patch-id: 0362b1fd022cc44cfa7181eda3d5dfea669519a3
|
|
||||||
prerequisite-patch-id: 813f6928b0d005ee2b7a441c93b1a6f9472a3483
|
|
||||||
--
|
|
||||||
2.52.0
|
|
||||||
|
|
||||||
@ -11,7 +11,6 @@
|
|||||||
;; Guix build systems
|
;; Guix build systems
|
||||||
#:use-module (guix build-system cargo)
|
#:use-module (guix build-system cargo)
|
||||||
#:use-module (guix build-system pyproject)
|
#:use-module (guix build-system pyproject)
|
||||||
#:use-module (guix build-system python)
|
|
||||||
;; Guix origin methods
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
@ -39,6 +38,7 @@
|
|||||||
(sha256
|
(sha256
|
||||||
(base32 "0va113rfa0i8sns2if8mnkzwliks0nvlzp1db71klbblrq1i81yq"))))
|
(base32 "0va113rfa0i8sns2if8mnkzwliks0nvlzp1db71klbblrq1i81yq"))))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
|
(arguments (list #:tests? #f)) ;No tests.
|
||||||
(native-inputs (list python-flit-core))
|
(native-inputs (list python-flit-core))
|
||||||
(home-page "https://pypi.org/project/coherent.licensed/")
|
(home-page "https://pypi.org/project/coherent.licensed/")
|
||||||
(synopsis "License management tooling")
|
(synopsis "License management tooling")
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
(define-public noctalia-shell
|
(define-public noctalia-shell
|
||||||
(package
|
(package
|
||||||
(name "noctalia-shell")
|
(name "noctalia-shell")
|
||||||
(version "4.7.6")
|
(version "4.7.7")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
@ -49,7 +49,7 @@
|
|||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"00g0ylp01y8yjbq8kb6rcisfkyxg7ybss8ib89qxiaplqdd1hqx0"))))
|
"0pchvsd89js4q7k10q621w3jqndv6raw6zy0px2b43ygh2kcpk22"))))
|
||||||
(build-system copy-build-system)
|
(build-system copy-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
@ -108,7 +108,8 @@ exec ~a --config ~a/etc/xdg/quickshell/noctalia-shell \"$@\"~%"
|
|||||||
"bin/which"
|
"bin/which"
|
||||||
"bin/wl-paste"
|
"bin/wl-paste"
|
||||||
"bin/wlsunset"
|
"bin/wlsunset"
|
||||||
"bin/wtype"))))
|
"bin/wtype"
|
||||||
|
"bin/xdg-open"))))
|
||||||
(chmod script #o555)
|
(chmod script #o555)
|
||||||
(install-file script (in-vicinity #$output "bin")))))
|
(install-file script (in-vicinity #$output "bin")))))
|
||||||
(add-after 'make-wrapper 'qt-wrap
|
(add-after 'make-wrapper 'qt-wrap
|
||||||
@ -142,7 +143,8 @@ exec ~a --config ~a/etc/xdg/quickshell/noctalia-shell \"$@\"~%"
|
|||||||
which
|
which
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wlsunset
|
wlsunset
|
||||||
wtype))
|
wtype
|
||||||
|
xdg-utils))
|
||||||
(home-page "https://noctalia.dev/")
|
(home-page "https://noctalia.dev/")
|
||||||
(synopsis "Wayland desktop shell")
|
(synopsis "Wayland desktop shell")
|
||||||
(description
|
(description
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user