guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: Add gpart.


From: guix-commits
Subject: 01/04: gnu: Add gpart.
Date: Sat, 27 Mar 2021 17:49:37 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit 8521e875b49a3171c921d41ba865dffcd6ba6328
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sat Mar 27 22:05:26 2021 +0100

    gnu: Add gpart.
    
    * gnu/packages/disk.scm (gpart): New public variable.
---
 gnu/packages/disk.scm | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 81197c9..6b9a9e4 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -302,6 +302,58 @@ fdisk.  fdisk is used for the creation and manipulation of 
disk partition
 tables, and it understands a variety of different formats.")
     (license license:gpl3+)))
 
+(define-public gpart
+  ;; The latest (0.3) release is from 2015 and is missing a crash fix.
+  (let ((commit "ec03350a01ad69708b5a3e2d47b8e002b0eba6c9")
+        (revision "0"))
+    (package
+      (name "gpart")
+      (version (git-version "0.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/baruch/gpart";)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1dassswliaiwhhmx7yz540yyxgk53fvg672dbvgc5q0v6cqrh5jx"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:configure-flags
+         (list (string-append "--docdir=" (assoc-ref %outputs "out") 
"/share/doc/"
+                              ,name "-" ,version))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'skip-premature-configuration
+             (lambda _
+               (substitute* "autogen.sh"
+                 (("\\./configure") "")))))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)))
+      (home-page "https://github.com/baruch/gpart";)
+      (synopsis "Guess and recover PC-style partition tables")
+      (description
+       "Gpart tries to guess the partitions on a PC-style, MBR-partitioned disk
+after they have been inadvertently deleted or the primary partition table at
+sector 0 damaged.  In both cases, the contents of these partitions still exist
+on the disk but the operating system cannot access them.
+
+Gpart ignores the partition table and scans each sector of the device or image
+file for several known file system and partition types.  Only partitions which
+have been formatted in some way can be recognized.  Several file system 
guessing
+modules are built in; more can be written and loaded at run time.
+
+The guessed table can be restored manually, for example with @command{fdisk},
+written to a file, or---if you firmly believe it's entirely correct---directly
+to disk.
+
+It should be stressed that gpart does a very heuristic job.  It can easily be
+right in its guesswork but it can also be terribly wrong.  Never believe its
+output without any plausability checks.")
+      (license license:gpl2+))))
+
 (define-public gptfdisk
   (package
     (name "gptfdisk")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]