GNU bug report logs - #58344
[PATCH] gnu: Add wipe.

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Fri, 7 Oct 2022 00:58:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58344 in the body.
You can then email your comments to 58344 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#58344; Package guix-patches. (Fri, 07 Oct 2022 00:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 07 Oct 2022 00:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH] gnu: Add wipe.
Date: Fri,  7 Oct 2022 02:57:05 +0200
* gnu/packages/disk.scm (wipe): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> 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
+                        (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+)))

base-commit: fd6cd9de8682c7ddf96bf8deb637b1ca6cdbd205
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58344; Package guix-patches. (Sat, 08 Oct 2022 05:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 58344 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 58344 <at> debbugs.gnu.org
Subject: Re: bug#58344: [PATCH] gnu: Add wipe.
Date: Sat, 08 Oct 2022 01:17:45 -0400
Hi,

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

> * gnu/packages/disk.scm (wipe): New variable.
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> 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 :-).

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#58344; Package guix-patches. (Fri, 28 Oct 2022 14:08:02 GMT) Full text and rfc822 format available.

Message #11 received at 58344 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 58344 <at> debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH v2] gnu: Add wipe.
Date: Fri, 28 Oct 2022 16:07:00 +0200
* gnu/packages/disk.scm (wipe): New variable.
---
ChangeLog:
- The phases modification have been indented more on the left
- native-inputs have been converted to a list
- replacing (invoke "autoreconf" "-vfi") by (delete-file "configure")
  resulted in the following build failure:
      configure flags: ("CONFIG_SHELL=/gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/kx6s2s5s2c99ckzvp81qgzd00qx5l8hp-wipe-2.3.1" "--enable-fast-install" "--build=i686-unknown-linux-gnu")
      /gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash: ./configure: No such file or directory
      error: in phase 'configure': uncaught exception:
  so I kept (invoke "autoreconf" "-vfi").
---
 gnu/packages/disk.scm | 54 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 818ca065b8..ef1fd1385b 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 (list autoconf automake 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+)))

base-commit: 302eae2fc3f92b64682ea30a80139867d448084b
-- 
2.38.0





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Mon, 31 Oct 2022 15:45:01 GMT) Full text and rfc822 format available.

Notification sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
bug acknowledged by developer. (Mon, 31 Oct 2022 15:45:02 GMT) Full text and rfc822 format available.

Message #16 received at 58344-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 58344-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add wipe.
Date: Mon, 31 Oct 2022 11:44:38 -0400
Hi Denis,

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

> * gnu/packages/disk.scm (wipe): New variable.
> ---
> ChangeLog:
> - The phases modification have been indented more on the left
> - native-inputs have been converted to a list
> - replacing (invoke "autoreconf" "-vfi") by (delete-file "configure")
>   resulted in the following build failure:
>       configure flags: ("CONFIG_SHELL=/gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "SHELL=/gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "--prefix=/gnu/store/kx6s2s5s2c99ckzvp81qgzd00qx5l8hp-wipe-2.3.1" "--enable-fast-install" "--build=i686-unknown-linux-gnu")
>       /gnu/store/7s2zlc4r9wqvlh9x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash: ./configure: No such file or directory
>       error: in phase 'configure': uncaught exception:
>   so I kept (invoke "autoreconf" "-vfi").
>

Thanks for the changes; for the last point, it works for me; see the
diff below.

I've normalized the indentation a bit, stressed in the description that
users shouldn't blindly put their trust in the tool...

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/disk.scm
@@ -1469,42 +1469,36 @@ (define-public wipe
     (build-system gnu-build-system)
     (arguments
      (list
-      #:tests? #f ;no tests
+      #: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"))))))
+      #~(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) "))))
+          (add-after 'unpack 'force-autotools-bootstrap
+            (lambda _
+              ;; Rebuild the build system scripts, as the ones in bundles are
+              ;; very old and do not support all the options used by Guix.
+              (delete-file "configure"))))))
     (native-inputs (list autoconf automake 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.")
+relies on several assumptions like having the block device write the correct
+sectors, etc.  For files it also doesn't work on log-structured file systems
+such as F2FS, JFFS, LogFS, etc.  You should @emph{not} trust @command{wipe} to
+work as advertised until you have manually verified that all its assumption
+hold true on your system.  To overwrite data it uses the Mersenne Twister
+pseudo-random number generator (PRNG) that is seeded with @file{/dev/urandom}
+or, if unavailable, @file{/dev/random}.")
     (license license:gpl2+)))
--8<---------------cut here---------------end--------------->8---

... and pushed!

Thank you,

Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Nov 2022 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.