;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages disk)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix git-download)
- #:use-module (guix build-system gnu)
- #:use-module (guix build-system trivial)
- #:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
- #:use-module (gnu packages databases)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto)
+ #:use-module (gnu packages cryptsetup)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages elf)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
- #:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages guile)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
- #:use-module (gnu packages guile)
- #:use-module (gnu packages compression)
+ #:use-module (gnu packages sphinx)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages vim)
#:use-module (gnu packages w3m)
- #:use-module (gnu packages xml)
- #:use-module (gnu packages cryptsetup)
- #:use-module (gnu packages gnuzilla)
- #:use-module (gnu packages gnupg)
- #:use-module (gnu packages swig)
- #:use-module (gnu packages autotools)
#:use-module (gnu packages web)
- #:use-module (gnu packages documentation)
- #:use-module (gnu packages bash)
- #:use-module (gnu packages c))
+ #:use-module (gnu packages xml)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python)
+ #:use-module (guix build-system trivial)
+ #:use-module (guix build-system scons)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages))
(define-public parted
(package
(name "parted")
- (version "3.2")
+ (version "3.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/parted/parted-"
version ".tar.xz"))
- (patches (search-patches "parted-glibc-compat.patch"))
(sha256
(base32
- "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
+ "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after
- 'unpack 'fix-locales-and-python
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "tests/t0251-gpt-unicode.sh"
- (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
- (substitute* "tests/msdos-overlap"
- (("/usr/bin/python") (which "python"))))))))
+ (add-after 'unpack 'fix-locales-and-python
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "tests/t0251-gpt-unicode.sh"
+ (("C.UTF-8") "en_US.utf8")) ;not in Glibc locales
+ (substitute* "tests/msdos-overlap"
+ (("/usr/bin/python") (which "python")))
+ #t)))))
(inputs
`(("lvm2" ,lvm2)
("readline" ,readline)
- ("util-linux" ,util-linux)))
+ ("util-linux" ,util-linux "lib")))
(native-inputs
`(("gettext" ,gettext-minimal)
+
;; For the tests.
+ ("e2fsprogs" ,e2fsprogs)
("perl" ,perl)
- ("python" ,python-2)))
+ ("python" ,python-2)
+ ("util-linux" ,util-linux)))
(home-page "https://www.gnu.org/software/parted/")
(synopsis "Disk partition editor")
(description
(inputs
`(("gettext" ,gettext-minimal)
("guile" ,guile-1.8)
- ("util-linux" ,util-linux)
+ ("util-linux" ,util-linux "lib")
("parted" ,parted)))
;; The build neglects to look for its own headers in its own tree. A next
;; release should fix this, but may never come: GNU fdisk looks abandoned.
`(("gettext" ,gettext-minimal)
("ncurses" ,ncurses)
("popt" ,popt)
- ("util-linux" ,util-linux))) ; libuuid
+ ("util-linux" ,util-linux "lib"))) ;libuuid
(arguments
`(#:test-target "test"
#:phases
(define-public ddrescue
(package
(name "ddrescue")
- (version "1.23")
+ (version "1.24")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/ddrescue/ddrescue-"
version ".tar.lz"))
(sha256
- (base32
- "13cd6c0x91zq10vdlyl6r5rib47bmsn5sshmkin3igwj8pa2vbm9"))))
+ (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab"))))
(build-system gnu-build-system)
(home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
(synopsis "Data recovery utility")
"0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
(build-system gnu-build-system)
(arguments
- `(#:make-flags (list (string-append "PREFIX=" %output)
+ `(#:configure-flags (list "--enable-compat-symlinks")
+ #:make-flags (list (string-append "PREFIX=" %output)
"CC=gcc")))
(native-inputs
`(("xxd" ,xxd))) ; for tests
(define-public gparted
(package
(name "gparted")
- (version "0.32.0")
+ (version "1.0.0")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
version "/gparted-" version ".tar.gz"))
(sha256
- (base32 "1fjp4c8jc0kjbbih1x1vs9v40d9lncma642kflnmy0bixxnvh7df"))))
+ (base32
+ "0mdvn85jvy72ff7nds3dakx9kzknh8gx1z8i0w2sf970q03qp2z4"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; tests require a network connection
- #:configure-flags '("--disable-scrollkeeper")))
+ ;; Tests require access to paths outside the build container, such
+ ;; as '/dev/disk/by-id'
+ `(#:tests? #f))
(inputs
- `(("util-linux" ,util-linux)
+ `(("util-linux" ,util-linux "lib")
("parted" ,parted)
("glib" ,glib)
- ("gtkmm" ,gtkmm-2)
+ ("gtkmm" ,gtkmm)
("libxml2" ,libxml2)
- ("libxslt" ,libxslt)
- ("gnome-doc-utils" ,gnome-doc-utils)
- ("docbook-xml" ,docbook-xml-4.2)
- ("python" ,python-2)
- ("python-libxml2" ,python2-libxml2)
- ("which" ,which)))
+ ("yelp-tools" ,yelp-tools)))
(native-inputs
`(("intltool" ,intltool)
+ ("itstool" ,itstool)
+ ("lvm2" ,lvm2) ; for tests
("pkg-config" ,pkg-config)))
(home-page "https://gparted.org/")
(synopsis "Partition editor to graphically manage disk partitions")
(define-public f3
(package
(name "f3")
- (version "7.1")
+ (version "7.2")
(source
(origin
(method git-fetch)
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32
- "0zglsmz683jg7f9wc6vmgljyg9w87pbnjw5x4w6x02w8233zvjqf"))))
+ (base32 "1iwdg0r4wkgc8rynmw1qcqz62l0ldgc8lrazq33msxnk5a818jgy"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f ; no check target
(define-public python-parted
(package
(name "python-parted")
- (version "3.11.1")
+ (version "3.11.2")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://github.com/dcantrell/pyparted/archive/v"
- version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dcantrell/pyparted.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32
- "0r1nyjj40nacnfnv17x2mnsj6ga1qplyxyza82v2809dfhim2fwq"))))
+ (base32 "0r6916n3w4vldxrq30a3z2iagvxgly4vfmlidjm65vwqnyv17bvn"))))
(build-system python-build-system)
(arguments
`(#:phases
(define-public duperemove
(package
(name "duperemove")
- (version "0.11")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/markfasheh/duperemove/archive/v"
- version ".tar.gz"))
- (sha256
- (base32
- "0rjmmh42yqw9a5j6sp31cqwxk3s97dsi4xz0wpxpllj7bsp3aiw5"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ (version "0.11.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/markfasheh/duperemove.git")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
+ (file-name (git-file-name name version))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(define-public ranger
(package
(name "ranger")
- (version "1.9.1")
+ (version "1.9.3")
(source (origin
(method url-fetch)
(uri (string-append "https://ranger.github.io/"
"ranger-" version ".tar.gz"))
(sha256
(base32
- "1lnzkrxcnlwnyi3z0v8ybyp8d5rm26qm35rr68kbs2lbs06inha0"))))
+ "0lfjrpv3z4h0knd3v94fijrw2zjba51mrp3mjqx2c98wr428l26f"))))
(build-system python-build-system)
(inputs
`(("w3m" ,w3m)))
- (native-inputs ;for tests
- `(("python-pytest" ,python-pytest)
- ("python-pylint" ,python-pylint)
- ("python-flake8" ,python-flake8)
- ("which" ,which)))
+ (native-inputs
+ `(("which" ,which)
+
+ ;; For tests.
+ ("python-pytest" ,python-pytest)))
(arguments
- '(#:test-target "test"
+ '( ;; The 'test' target runs developer tools like pylint, which fail.
+ #:test-target "test_pytest"
#:phases
(modify-phases %standard-phases
(add-after 'configure 'wrap-program
"/libexec/w3m/w3mimgdisplay")))
(wrap-program ranger
`("W3MIMGDISPLAY_PATH" ":" prefix (,w3mimgdisplay)))
- #t))))))
+ #t)))
+ (replace 'check
+ ;; The default check phase simply prints 'Ran 0 tests in 0.000s'.
+ (lambda* (#:key test-target #:allow-other-keys)
+ (invoke "make" test-target))))))
(home-page "https://ranger.github.io/")
(synopsis "Console file manager")
(description "ranger is a console file manager with Vi key bindings. It
(define-public volume-key
(package
(name "volume-key")
- (version "0.3.11")
+ (version "0.3.12")
(source (origin
(method url-fetch)
(uri (string-append "https://releases.pagure.org/volume_key/volume_key-"
version ".tar.xz"))
(sha256
(base32
- "0vaz15rcgdkh5z4yxc22x76wi44gh50jxnrqz5avaxz4bb17kcp6"))))
+ "16rhfz6sjwxlmss1plb2wv2i3jq6wza02rmz1d2jrlnsq67p98vc"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
- ("util-linux" ,util-linux)
("swig" ,swig)
- ("python" ,python-3))) ; Used to generate the Python bindings.
+ ("python" ,python-3))) ; used to generate the Python bindings
(inputs
`(("cryptsetup" ,cryptsetup)
("nss" ,nss)
- ("lvm2" ,lvm2) ; For "-ldevmapper".
+ ("libblkid" ,util-linux "lib")
+ ("lvm2" ,lvm2) ; for "-ldevmapper"
("glib" ,glib)
("gpgme" ,gpgme)))
(arguments
- `(#:tests? #f ; Not sure how tests are supposed to pass, even when run manually.
+ `(#:tests? #f ; not sure how tests are supposed to pass, even when run manually
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-python.h-path
(define-public ndctl
(package
(name "ndctl")
- (version "61.2")
+ (version "67")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/pmem/ndctl")
+ (url "https://github.com/pmem/ndctl.git")
(commit (string-append "v" version))))
- (file-name (string-append name "-" version "-checkout"))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0vid78jzhmzh505bpwn8mvlamfhcvl6rlfjc29y4yn7zslpydxl7"))))
+ "076jgw1g2aafqgnq705in0wnabysqk46dq5yxdv1qzgjmyhka39n"))))
(build-system gnu-build-system)
(native-inputs
`(("asciidoc" ,asciidoc)
("automake" ,automake)
("autoconf" ,autoconf)
+ ("bash-completion" ,bash-completion)
("docbook-xsl" ,docbook-xsl)
("libtool" ,libtool)
("libxml2" ,libxml2)
("pkg-config" ,pkg-config)
("xmlto" ,xmlto)
- ;; Required for offline docbook generation:
+ ;; Required for offline docbook generation.
("which" ,which)))
(inputs
`(("eudev" ,eudev)
("json-c" ,json-c)
+ ("keyutils" ,keyutils)
("kmod" ,kmod)
- ("util-linux" ,util-linux)))
+ ("util-linux" ,util-linux "lib")))
(arguments
- `(#:phases
+ `(#:configure-flags
+ (list "--disable-asciidoctor" ; use docbook-xsl instead
+ "--without-systemd")
+ #:phases
(modify-phases %standard-phases
- (add-after 'unpack 'autogen
+ (add-after 'unpack 'patch-FHS-file-names
(lambda _
- (substitute* "autogen.sh"
- (("/bin/sh") (which "sh")))
(substitute* "git-version-gen"
(("/bin/sh") (which "sh")))
(substitute* "git-version"
- (("/bin/bash") (which "bash"))))))
+ (("/bin/bash") (which "bash")))
+ #t)))
#:make-flags
(let ((out (assoc-ref %outputs "out")))
(list (string-append "BASH_COMPLETION_DIR=" out
(define-public libblockdev
(package
(name "libblockdev")
- (version "2.18")
+ (version "2.23")
(source (origin
(method url-fetch)
- (uri (string-append "https://github.com/storaged-project/libblockdev/releases/download/"
+ (uri (string-append "https://github.com/storaged-project/"
+ "libblockdev/releases/download/"
version "-1/libblockdev-" version ".tar.gz"))
(sha256
(base32
- "1a3kpdr9s6g7nfibazi92i27wbv692b5gm2r24gimis6l6jq4pbh"))))
+ "15c7g2gbkahmy8c6677pvbvblan5h8jxcqqmn6nlvqwqynq2mkjm"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
LVM D-Bus API).")
- ;; XXX: Copying says LGPL2.1, but the source files with license
- ;; information are GPL2+.
- (license license:gpl2+)))
+ (license license:lgpl2.1+)))
+
+(define-public rmlint
+ (package
+ (name "rmlint")
+ (version "2.9.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sahib/rmlint")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1b5cziam14h80xrfb285fmfrzz2rligxcpsq1xsig14xf4l2875i"))))
+ (build-system scons-build-system)
+ (arguments
+ `(#:scons ,scons-python2
+ #:scons-flags (list (string-append "--prefix=" %output)
+ (string-append "--actual-prefix=" %output))
+ #:tests? #f ; No tests?
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'scons-propagate-environment
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; TODO: `rmlint --gui` fails with
+ ;; "Failed to load shredder: No module named 'shredder'".
+ ;; The GUI might also need extra dependencies, such as
+ ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
+ (substitute* "lib/cmdline.c"
+ (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
+ (string-append
+ "const char *commands[] = {\""
+ (assoc-ref inputs "python") "/bin/python"
+ "\", \"python\", NULL};")))
+ ;; By design, SCons does not, by default, propagate
+ ;; environment variables to subprocesses. See:
+ ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
+ ;; Here, we modify the SConstruct file to arrange for
+ ;; environment variables to be propagated.
+ (substitute* "SConstruct"
+ (("^env = Environment\\(.*\\)" all)
+ (string-append
+ all
+ "\nenv['ENV']=os.environ"))))))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("glib:bin" ,glib "bin")
+ ("python-sphinx" ,python-sphinx)))
+ (inputs
+ `(("python" ,python-wrapper)
+ ("glib" ,glib)
+ ("libelf" ,libelf)
+ ("elfutils" ,elfutils)
+ ("json-glib" ,json-glib)
+ ("libblkid" ,util-linux "lib")))
+ (home-page "https://rmlint.rtfd.org")
+ (synopsis "Remove duplicates and other lint from the file system")
+ (description "@command{rmlint} finds space waste and other broken things
+on your file system and offers to remove it. @command{rmlint} can find:
+
+@itemize
+@item duplicate files and duplicate directories,
+@item non-stripped binaries (i.e. binaries with debug symbols),
+@item broken symbolic links,
+@item empty files and directories,
+@item files with broken user and/or group ID.
+@end itemize\n")
+ (license license:gpl3+)))