From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yDxKJJHtX2OJtAAAbAwnHQ (envelope-from ) for ; Mon, 31 Oct 2022 16:45:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yABUJJHtX2P9TwAA9RJhRA (envelope-from ) for ; Mon, 31 Oct 2022 16:45:21 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1C59A1C94E for ; Mon, 31 Oct 2022 16:45:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opWyG-0006nI-1W; Mon, 31 Oct 2022 11:45:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opWyE-0006mR-Fn for guix-patches@gnu.org; Mon, 31 Oct 2022 11:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opWyE-0005Oi-5r for guix-patches@gnu.org; Mon, 31 Oct 2022 11:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opWyE-0007r3-14 for guix-patches@gnu.org; Mon, 31 Oct 2022 11:45:02 -0400 Subject: bug#58344: [PATCH v2] gnu: Add wipe. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 31 Oct 2022 15:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 58344 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Denis 'GNUtoo' Carikli Cc: 58344-done@debbugs.gnu.org Mail-Followup-To: 58344@debbugs.gnu.org, maxim.cournoyer@gmail.com, GNUtoo@cyberdimension.org Received: via spool by 58344-done@debbugs.gnu.org id=D58344.166723108730153 (code D ref 58344); Mon, 31 Oct 2022 15:45:01 +0000 Received: (at 58344-done) by debbugs.gnu.org; 31 Oct 2022 15:44:47 +0000 Received: from localhost ([127.0.0.1]:41570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opWxy-0007qH-Px for submit@debbugs.gnu.org; Mon, 31 Oct 2022 11:44:47 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:39655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opWxx-0007q4-IO for 58344-done@debbugs.gnu.org; Mon, 31 Oct 2022 11:44:46 -0400 Received: by mail-qt1-f173.google.com with SMTP id r19so7634495qtx.6 for <58344-done@debbugs.gnu.org>; Mon, 31 Oct 2022 08:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=cdKH2OS50zzmvJKY9b6TnjY7PbdLUtW+mJ/C11CWgs0=; b=JwcYy49UjNKtStJVY1zJQZh/RiBvm3xghguFS4N3sGgpJhg1K07IyWDMyE3j5klAP6 aP8I0Ji18D62IJ8DuXIcvObu5wT+gIA7OwFe9GRataC07oVUC1lm9B48Fz5JwxixbzAM 9X5KTItQ6xj8+l5p9ckUKhHCAlSkl8CEikp1jzsc1SB6N8Of4VQXf78gM5A5Yp+zQF8M aauqK1dAnddRBPVW+C5TRvjMxHiMsQ5/hpzV8ZDK3OfjxS9Jz6ICcuYtUicddyONVjpD aahkeio6JwhPVu+mterxLSKLdHsVK/jo9bnQvGENBxwFFgiRC4O1rRtBveiTQSNgmgdj sbpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cdKH2OS50zzmvJKY9b6TnjY7PbdLUtW+mJ/C11CWgs0=; b=HUcvsFo1hne7KMLdzMCQq70jgZJrZ1OMOrlP7qDNcdUyTolvhTB9s5cEP46A0Z2FUT jXjc6lA7Cq56wtxPMX3O4CZJ7MeKXfXg5fHxXwniYwEs6t6PshWnqZrCAFsc+csEHFhC AoAc7+iWgw+CWA8MDoRqUn/MGH72qj0FJQ+RDtzTNEzdf7F4dc6H8xtGRjOxo+KUgvAH aET9DKKvv+ZD7/yseNW6nTdfscJG4j/EGjS3hPJDnLSkEfI00ZiO59iekF+v0fHoqnuR tTEn1k4wXg0NOGdQ61RAeLoYUZoyhHp2aYA/upQHqMeZ+RBOApYOS+kK5hCoPUAeSAAK juQA== X-Gm-Message-State: ACrzQf0neKvFHm9vJCScQUARvFg6aVbV+I+kn2orojmKvp07GG2SxDPJ G34el3QjE4A1UvV+nHh3VE6LwElcshU= X-Google-Smtp-Source: AMsMyM5fQ2igHjWZ88D8QaFAC5bQa063QGiCdeptiua9FauC0v5MRByquZhdsL8VBLMblLiMrSA2bw== X-Received: by 2002:a05:622a:11cf:b0:39c:d63a:d79 with SMTP id n15-20020a05622a11cf00b0039cd63a0d79mr11290799qtk.260.1667231079709; Mon, 31 Oct 2022 08:44:39 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id r17-20020a05620a03d100b006eee3a09ff3sm4809165qkm.69.2022.10.31.08.44.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 08:44:39 -0700 (PDT) From: Maxim Cournoyer References: <20221028140700.2799-1-GNUtoo@cyberdimension.org> Date: Mon, 31 Oct 2022 11:44:38 -0400 In-Reply-To: <20221028140700.2799-1-GNUtoo@cyberdimension.org> (Denis Carikli's message of "Fri, 28 Oct 2022 16:07:00 +0200") Message-ID: <874jvkdml5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-patches" Errors-To: guix-patches-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667231121; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cdKH2OS50zzmvJKY9b6TnjY7PbdLUtW+mJ/C11CWgs0=; b=RR7B8WBSsHzcGu12Sp+SHRY8gfiRNGC+bX8fZpO16K4wW73U4hTYAILBrCe9bv2E757dI7 KvJGeQo58OvdPEYDAIwVXxfp8T+1PEoLexgmeM2fPrkC4grOhxgLqEsY8ShN/aIITSr7Vi ZBKWfscPtvCb93QCqEc7BBGHx+pOFU9V9Glyt7zZ9Yi3wRNXBIzyJBpaKHXIN3ZxRh0w3K qPQWV7E4UzDZcFq3iygL/r+uxkZnVcPCsaDxdJfxCiNwNldCK9bGIJeFlvKcStEUtNvRsO UIoopJ5Rc35ez4qOW8aY106JVT990hpHdMUMDb+uxEcfbboVMwoSDPwmEJzdFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667231121; a=rsa-sha256; cv=none; b=AH33+ZumjkwSOMDQKhmptrFfyVEys6cjRWu9NqLtaLSVx95yP6zg2sbT51JCwBK3JnP91g nnb1spjPPWbpM+JE4dlz+B/G+2q+tTuA6MsHJQUcxe6ZJhL1An6xztf6821C3y5NKATMfd ULj6/smSVveMJ2n3Gt3ggYJUyZigxlpG/DP5m408x0BRQGUR3FNTmTDwc55xu/uzzD103x MtiGp4ikcjsSDtylRz2C4sdRJL0XmbJAKiAyucvVEtZsKRfGuAk10osQQkwvkpHF1p4sRP sNC/zsp9N/cABNVGID0xyGimPXHibyrVKg/kGbOZmpytw+t2HFf6X/Aad30/yg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JwcYy49U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.23 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=JwcYy49U; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1C59A1C94E X-Spam-Score: 5.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: CAqJH20wFAtR Hi Denis, Denis 'GNUtoo' Carikli 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=3D/gnu/store/7s2zlc4r9wqvlh9x2gqmzm= 4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "SHELL=3D/gnu/store/7s2zlc4r9wqvlh9= x2gqmzm4lnmbsdzmn-bash-minimal-5.1.8/bin/bash" "--prefix=3D/gnu/store/kx6s2= s5s2c99ckzvp81qgzd00qx5l8hp-wipe-2.3.1" "--enable-fast-install" "--build=3D= 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 =E2=80=98root=E2=80=99 - (("-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=3D/gnu/[...]-bash-minimal-5.1.8/bin/bash: - ;; invalid host type configure: warning: - ;; SHELL=3D/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 =E2=80=98root=E2=80=99 + (("-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 corre= ct +sectors, etc. For files it also doesn't work on log-structured file syste= ms +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/urand= om} +or, if unavailable, @file{/dev/random}.") (license license:gpl2+))) --8<---------------cut here---------------end--------------->8--- ... and pushed! Thank you, Maxim