summaryrefslogtreecommitdiff
path: root/gnu/packages/disk.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/disk.scm')
-rw-r--r--gnu/packages/disk.scm140
1 files changed, 82 insertions, 58 deletions
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index a452c849fc..9504cf548e 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -24,7 +24,7 @@
;;; Copyright © 2021 Justin Veilleux <terramorpha@cock.li>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;; Copyright © 2014, 2022 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022, 2025 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2022 Disseminate Dissent <disseminatedissent@protonmail.com>
;;; Copyright © 2023 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2023 Morgan Smith <Morgan.J.Smith@outlook.com>
@@ -74,7 +74,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages c)
- #:use-module (gnu packages certs)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages crypto)
@@ -764,10 +764,15 @@ maintained fork of https://github.com/cleech/open-isns.")
#~(list "-Dno_systemd=true"
(string-append "-Discsi_sbindir="
#$output "/sbin")
- (string-append "-Ddbroot="
- #$output "/var/lib/iscsi")
(string-append "--sbindir="
- #$output "/sbin"))))
+ #$output "/sbin"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'dont-install-to-/var
+ (lambda _
+ (substitute* "meson.build"
+ (("install_data\\(iscsi_etc_iface_file_src, install_dir: db_root \\/ 'ifaces'\\)")
+ "")))))))
(native-inputs
(list meson
ninja
@@ -1336,6 +1341,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
(build-system gnu-build-system)
(arguments
(list
+ #:modules (cons '(ice-9 format) %default-gnu-modules)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-configuration-directory
@@ -1343,22 +1349,72 @@ to create devices with respective mappings for the ATARAID sets discovered.")
(substitute* "src/lib/blockdev.c"
(("/etc/libblockdev/conf.d/" path)
(string-append #$output path)))))
- (add-after 'unpack 'patch-plugin-paths
+ (add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
+ (define* (find-program program #:key fail-if-missing?)
+ (or (and (string=? "vfat-resize" program)
+ (string-append #$output "/bin/vfat-resize"))
+ (false-if-exception
+ (search-input-file inputs
+ (string-append "bin/" program)))
+ (false-if-exception
+ (search-input-file inputs
+ (string-append "sbin/" program)))
+ (if fail-if-missing?
+ (error "could not find" program)
+ (begin
+ (format (current-warning-port)
+ "warning: program ~s left unpatched~%"
+ program)
+ program))))
(substitute* (find-files "src/plugins" "\\.c$")
(("(gchar \\*arg.+\\{\")([^\"]+)" all start program)
(string-append
- start (or (false-if-exception
- (search-input-file inputs
- (string-append "bin/" program)))
- (false-if-exception
- (search-input-file inputs
- (string-append "sbin/" program)))
- (begin
- (format (current-warning-port)
- "warning: program ~s left unpatched~%"
- program)
- program))))))))))
+ start (find-program program))))
+ (substitute* "src/plugins/fs/generic.c"
+ (("_util = \"([^\"]*)\"" all program)
+ (format #f "_util = ~s" (find-program program))))
+ ;; Tip: look for check_deps calls in the source to find where
+ ;; commands are looked up from PATH.
+ (let-syntax
+ ((patch-helpers
+ (lambda (x)
+ (syntax-case x ()
+ ((_ file (helpers ...))
+ (with-syntax ((pattern (datum->syntax x 'pattern)))
+ #'(let ((pattern (format #f "\"(~{~a~^|~})\""
+ '(helpers ...))))
+ (substitute* file
+ ((pattern dummy program)
+ (format
+ #f "~s"
+ (find-program
+ program #:fail-if-missing? #t)))))))))))
+
+ (patch-helpers "src/plugins/fs/btrfs.c"
+ ("mkfs.btrfs" "btrfsck" "btrfs" "btrfstune"))
+ (patch-helpers "src/plugins/fs/exfat.c"
+ ("mkfs.exfat" "fsck.exfat" "tune.exfat"))
+ (patch-helpers "src/plugins/fs/ext.c"
+ ("mke2fs" "e2fsck" "tune2fs" "resize2fs"))
+ (patch-helpers "src/plugins/fs/f2fs.c"
+ ("mkfs.f2fs" "fsck.f2fs" "dump.f2fs"
+ "resize.f2fs"))
+ (patch-helpers "src/plugins/fs/nilfs.c"
+ ("mkfs.nilfs2" "nilfs-tune" "nilfs-resize"))
+ (patch-helpers "src/plugins/fs/ntfs.c"
+ ("mkntfs" "ntfsfix" "ntfsresize" "ntfslabel"
+ "ntfsinfo"))
+ (patch-helpers "src/plugins/fs/udf.c"
+ ("mkudffs" "udflabel" "udfinfo"))
+ (patch-helpers "src/plugins/fs/vfat.c"
+ ("mkfs.vfat" "fat label" "fsck.vfat"
+ "vfat-resize" "fatlabel"))
+ (patch-helpers "src/plugins/fs/xfs.c"
+ ("mkfs.xfs" "xfs_db" "xfs_repair" "xfs_admin"
+ "xfs_growfs"))
+ (patch-helpers "src/plugins/swap.c"
+ ("mkswap" "swaplabel"))))))))
(native-inputs
(list gobject-introspection
pkg-config
@@ -1375,6 +1431,8 @@ to create devices with respective mappings for the ATARAID sets discovered.")
dmraid
e2fsprogs
eudev
+ exfatprogs
+ f2fs-tools
glib
gptfdisk
json-glib-minimal
@@ -1387,9 +1445,11 @@ to create devices with respective mappings for the ATARAID sets discovered.")
lvm2
mdadm
ndctl
+ nilfs-utils
nss
ntfs-3g
parted
+ udftools
util-linux
volume-key
xfsprogs)))
@@ -1469,16 +1529,16 @@ on your file system and offers to remove it. @command{rmlint} can find:
(define-public lf
(package
(name "lf")
- (version "33")
+ (version "37")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/gokcehan/lf")
- (commit (string-append "r" version))))
+ (url "https://github.com/gokcehan/lf")
+ (commit (string-append "r" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1jmqf27ysi35n3hqahlzs5hym7i4w1mplklrvv0lc0baddzx7av8"))))
+ (base32 "0m2h0dnxbfqsnafy9bwvis35k0197zn768r764zs53qg9f3fdc93"))))
(build-system go-build-system)
(arguments
(list
@@ -1491,8 +1551,7 @@ on your file system and offers to remove it. @command{rmlint} can find:
go-github-com-mattn-go-runewidth
go-github-com-xuanwo-go-locale
go-golang-org-x-sys
- go-golang-org-x-term
- go-golang-org-x-text))
+ go-golang-org-x-term))
(home-page "https://github.com/gokcehan/lf")
(synopsis "Console file browser similar to Ranger")
(description
@@ -1699,41 +1758,6 @@ and a partitioning of the heap between kinds of memory (for NUMA).")
inspecting MMC storage devices from userspace.")
(license license:gpl2))))
-(define-public bmaptools
- (package
- (name "bmaptools")
- (version "3.6")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/intel/bmap-tools")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "01xzrv5nvd2nvj91lz4x9s91y9825j9pj96z0ap6yvy3w2dgvkkl"))))
- (build-system python-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- ;; XXX: Remove failing test.
- (invoke "nosetests" "-v"
- "--exclude" "test_bmap_helpers"))))))
- (native-inputs
- (list python-mock python-nose))
- (propagated-inputs
- (list python-six))
- (home-page "https://github.com/intel/bmap-tools")
- (synopsis "Create block map for a file or copy a file using block map")
- (description "Bmaptool is a tool for creating the block map (bmap) for a
-file and copying files using the block map. The idea is that large files,
-like raw system image files, can be copied or flashed a lot faster and more
-reliably with @code{bmaptool} than with traditional tools, like @code{dd} or
-@code{cp}.")
- (license license:gpl2)))
-
(define-public duc
(package
(name "duc")