diff mbox series

[bug#58344] gnu: Add wipe.

Message ID 20221007005706.31133-1-GNUtoo@cyberdimension.org
State New
Headers show
Series [bug#58344] gnu: Add wipe. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Denis 'GNUtoo' Carikli Oct. 7, 2022, 12:57 a.m. UTC
* gnu/packages/disk.scm (wipe): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
 gnu/packages/disk.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)


base-commit: fd6cd9de8682c7ddf96bf8deb637b1ca6cdbd205

Comments

Maxim Cournoyer Oct. 8, 2022, 5:17 a.m. UTC | #1
Hi,

Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> writes:

> * gnu/packages/disk.scm (wipe): New variable.
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> ---
>  gnu/packages/disk.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
> index 818ca065b8..b5e6c07cc3 100644
> --- a/gnu/packages/disk.scm
> +++ b/gnu/packages/disk.scm
> @@ -1454,3 +1454,57 @@ (define-public qdirstat
>  gone and to help you to clean it up.")
>      (home-page "https://github.com/shundhammer/qdirstat")
>      (license license:gpl2)))
> +
> +(define-public wipe
> +  (package
> +    (name "wipe")
> +    (version "2.3.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "mirror://sourceforge/wipe/wipe/" version
> +                                  "/wipe-" version ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "180snqvh6k6il6prb19fncflf2jcvkihlb4w84sbndcv1wvicfa6"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     (list #:tests? #f ;no tests
> +           #:phases #~(modify-phases %standard-phases
> +                        (add-after 'unpack 'patch-makefile
> +                          (lambda _
> +                            (substitute* "Makefile.in"
> +                              ;; The Makefile.in uses install -o root, but
> +                              ;; during the build there is no root user, so if
> +                              ;; we leave that in, the build fails with the
> +                              ;; following error:
> +                              ;; /gnu/[...]/install: invalid user ‘root’
> +                              (("-o root") "")
> +                              ;; It's up to the distribution to strip the
> +                              ;; binaries or not.
> +                              (("\\$\\(INSTALL_BIN\\) -s ")
> +                               "$(INSTALL_BIN) "))))
> +                        ;; We need to regenerate the configure script otherwise
> +                        ;; configure fails with the following error:
> +                        ;; configure: warning:
> +                        ;; CONFIG_SHELL=/gnu/[...]-bash-minimal-5.1.8/bin/bash:
> +                        ;; invalid host type
> +                        ;; configure: warning:
> +                        ;; SHELL=/gnu/[...]-bash-minimal-5.1.8/bin/bash:
> +                        ;; invalid host type
> +                        ;; configure: error: can only configure for one host
> +                        ;; and one target at a time

nitpick: the phases would gain in readability if indented more left, as
is more common.  To force regenerating the build scripts with the
gnu-build-system, you can simply delete the existing 'configure' file
after 'unpack.

> +                        (add-before 'configure 'autoreconf
> +                          (lambda _
> +                            (invoke "autoreconf" "-vfi"))))))
> +    (native-inputs `(("automake" ,automake)
> +                     ("autoreconf" ,autoconf)
> +                     ("libtool" ,libtool)))

Please do not use labels anymore.  A simple (list autoconf automake
libtool) (ordered) will do.

> +    (home-page "https://wipe.sourceforge.net")
> +    (synopsis "Secure file/block device wiping utility")
> +    (description
> +     "Wipe can erase files and block devices securely.  To work properly it
> +relies on several assumptions like having the block device write the
> +correct sectors, etc.  For files it also doesn't work on log based
> +filesystems.  To overwrite data it uses the mersenne twister PRNG that
> +is seeded with /dev/urandom or, if unavailable, /dev/random.")
> +    (license license:gpl2+)))

Otherwise, it looks fine :-).
diff mbox series

Patch

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 818ca065b8..b5e6c07cc3 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -1454,3 +1454,57 @@  (define-public qdirstat
 gone and to help you to clean it up.")
     (home-page "https://github.com/shundhammer/qdirstat")
     (license license:gpl2)))
+
+(define-public wipe
+  (package
+    (name "wipe")
+    (version "2.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/wipe/wipe/" version
+                                  "/wipe-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "180snqvh6k6il6prb19fncflf2jcvkihlb4w84sbndcv1wvicfa6"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'patch-makefile
+                          (lambda _
+                            (substitute* "Makefile.in"
+                              ;; The Makefile.in uses install -o root, but
+                              ;; during the build there is no root user, so if
+                              ;; we leave that in, the build fails with the
+                              ;; following error:
+                              ;; /gnu/[...]/install: invalid user ‘root’
+                              (("-o root") "")
+                              ;; It's up to the distribution to strip the
+                              ;; binaries or not.
+                              (("\\$\\(INSTALL_BIN\\) -s ")
+                               "$(INSTALL_BIN) "))))
+                        ;; We need to regenerate the configure script otherwise
+                        ;; configure fails with the following error:
+                        ;; configure: warning:
+                        ;; CONFIG_SHELL=/gnu/[...]-bash-minimal-5.1.8/bin/bash:
+                        ;; invalid host type
+                        ;; configure: warning:
+                        ;; SHELL=/gnu/[...]-bash-minimal-5.1.8/bin/bash:
+                        ;; invalid host type
+                        ;; configure: error: can only configure for one host
+                        ;; and one target at a time
+                        (add-before 'configure 'autoreconf
+                          (lambda _
+                            (invoke "autoreconf" "-vfi"))))))
+    (native-inputs `(("automake" ,automake)
+                     ("autoreconf" ,autoconf)
+                     ("libtool" ,libtool)))
+    (home-page "https://wipe.sourceforge.net")
+    (synopsis "Secure file/block device wiping utility")
+    (description
+     "Wipe can erase files and block devices securely.  To work properly it
+relies on several assumptions like having the block device write the
+correct sectors, etc.  For files it also doesn't work on log based
+filesystems.  To overwrite data it uses the mersenne twister PRNG that
+is seeded with /dev/urandom or, if unavailable, /dev/random.")
+    (license license:gpl2+)))