unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 57560@debbugs.gnu.org
Cc: Maxime Devos <maximedevos@telenet.be>
Subject: [bug#57560] [PATCH 2/4] hashcat: Unbundle everything but LZMA-SDK.
Date: Sat,  3 Sep 2022 14:08:25 +0200	[thread overview]
Message-ID: <20220903120827.25648-2-maximedevos@telenet.be> (raw)
In-Reply-To: <20220903120827.25648-1-maximedevos@telenet.be>

There does not appear to be a convenient Guix package for LZMA-SDK yet.
I currently have a bit of a dirty working tree (fiddling with imports), so the
use-modules is in the wrong place. Also, a small rebase conflict, the version
and source hash of hashcat has been updated.

* gnu/packages/password-utils.scm (hashcat)[source]{snippet}: Delete
everything from deps except for deps/LZMA-SDK.
(hashcat)[inputs]: Add minizip, xxhash and zlib.
(hashcat)[arguments]<#:make-flags>: Add USE_SYSTEM_ZLIB, USE_SYSTEM_OPENCL and
USE_SYSTEM_XXHASH.
---
 gnu/packages/password-utils.scm | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index f64a205610..ec4aff048a 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -1110,6 +1110,8 @@ (define-public pass-rotate
 your online accounts makes it necessary.")
     (license license:expat)))
 
+;; XXX: move this import upwards before merging this patch
+(use-modules (gnu packages digest))
 (define-public hashcat
   (package
     (name "hashcat")
@@ -1121,13 +1123,25 @@ (define-public hashcat
                            version ".tar.gz"))
        (sha256
         (base32
-         "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))))
+         "104z63m7lqbb0sdrxhf9yi15l4a9zwf9m6zs9dbb3gf0nfxl1h9r"))
+       (modules '((guix build utils)))
+       ;; Delete bundled libraries.
+       (snippet
+        ;; TODO: Unbundle LZMA-SDK as well
+        #~(for-each delete-file-recursively
+                    '("deps/zlib" "deps/xxHash" "deps/OpenCL-Headers")))))
     (native-inputs
      (list opencl-headers))
+    (inputs (list minizip xxhash zlib))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f                      ;no tests
-       #:make-flags (list (string-append "PREFIX=" %output))
+       #:make-flags (list (string-append "PREFIX=" %output)
+                          ;; TODO: unbundle
+                          ;; (string-append "USE_SYSTEM_LZMA=1")
+                          (string-append "USE_SYSTEM_ZLIB=1")
+                          (string-append "USE_SYSTEM_OPENCL=1")
+                          (string-append "USE_SYSTEM_XXHASH=1"))
        #:phases
        (modify-phases %standard-phases
          ;; Don't embed timestamps, for bit-for-bit reproducibility.
-- 
2.37.2





  reply	other threads:[~2022-09-03 12:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03 12:04 [bug#57560] [PATCH 0/4] Fix multiple hashcat issue Maxime Devos
2022-09-03 12:08 ` [bug#57560] [PATCH 1/4] hashcat: Don't embed timestamp, fixing reproducibility Maxime Devos
2022-09-03 12:08   ` Maxime Devos [this message]
2022-09-03 12:08   ` [bug#57560] [PATCH 3/4] hashcat: Rewrite with G-exps Maxime Devos
2022-09-03 12:08   ` [bug#57560] [PATCH 4/4] gnu: hashcat: Fix cross-compilation Maxime Devos
2022-09-04 21:08 ` [bug#57187] bug#57560: [PATCH 0/4] Fix multiple hashcat issue Ludovic Courtès

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=20220903120827.25648-2-maximedevos@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=57560@debbugs.gnu.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).