unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Cc: 58344-done@debbugs.gnu.org
Subject: bug#58344: [PATCH v2] gnu: Add wipe.
Date: Mon, 31 Oct 2022 11:44:38 -0400	[thread overview]
Message-ID: <874jvkdml5.fsf@gmail.com> (raw)
In-Reply-To: <20221028140700.2799-1-GNUtoo@cyberdimension.org> (Denis Carikli's message of "Fri, 28 Oct 2022 16:07:00 +0200")

Hi Denis,

Denis 'GNUtoo' Carikli <GNUtoo@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




      reply	other threads:[~2022-10-31 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07  0:57 [bug#58344] [PATCH] gnu: Add wipe Denis 'GNUtoo' Carikli
2022-10-08  5:17 ` Maxim Cournoyer
2022-10-28 14:07 ` [bug#58344] [PATCH v2] " Denis 'GNUtoo' Carikli
2022-10-31 15:44   ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jvkdml5.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=58344-done@debbugs.gnu.org \
    --cc=GNUtoo@cyberdimension.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).