From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A2E8C158041 for ; Tue, 7 Sep 2021 20:27:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7612DE0895; Tue, 7 Sep 2021 20:27:17 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4269DE0895 for ; Tue, 7 Sep 2021 20:27:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1372B33BF3C for ; Tue, 7 Sep 2021 20:27:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 79BB99E for ; Tue, 7 Sep 2021 20:27:13 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1631046417.1632d007342a9cf30f0b201fb2085e9bdc2e96c2.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-crypt/hashcat/Manifest app-crypt/hashcat/files/hashcat-6.2.4-brainless.patch app-crypt/hashcat/hashcat-6.2.4.ebuild X-VCS-Directories: app-crypt/hashcat/files/ app-crypt/hashcat/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1632d007342a9cf30f0b201fb2085e9bdc2e96c2 X-VCS-Branch: master Date: Tue, 7 Sep 2021 20:27:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f81706fb-6ef7-458c-829c-294ca8c7b527 X-Archives-Hash: 787cfa70256314c3174b75205b25973f commit: 1632d007342a9cf30f0b201fb2085e9bdc2e96c2 Author: Miezhiko gmail com> AuthorDate: Thu Sep 2 14:01:36 2021 +0000 Commit: Sam James gentoo org> CommitDate: Tue Sep 7 20:26:57 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1632d007 app-crypt/hashcat: update to 6.2.4 and fix compilation without brain Signed-off-by: Miezhiko gmail.com> Signed-off-by: Sam James gentoo.org> app-crypt/hashcat/Manifest | 1 + .../hashcat/files/hashcat-6.2.4-brainless.patch | 41 ++++++++ app-crypt/hashcat/hashcat-6.2.4.ebuild | 112 +++++++++++++++++++++ 3 files changed, 154 insertions(+) diff --git a/app-crypt/hashcat/Manifest b/app-crypt/hashcat/Manifest index 47f1c021b86..cb78361074a 100644 --- a/app-crypt/hashcat/Manifest +++ b/app-crypt/hashcat/Manifest @@ -1 +1,2 @@ DIST hashcat-6.2.1.tar.gz 5815254 BLAKE2B b6ce0edf7a7fe725570e557b6b414c8aad02e24933b2610be2607c895778d635543a90806aa40c3521f83f93de3b7556f04274d4f9893dacb53af82974df0be2 SHA512 435d8c66e1de14a4a95364eb06f41d10d221c4cf3286bed5ce333d3d07fe7ec2097fa57a3f925ef108a0c17091a65dc18b9c782f69ab8c0575061c14c9354563 +DIST hashcat-6.2.4.tar.gz 6269444 BLAKE2B 15d774253841350710e89bb6358f5fd615ef6e0645f271507d5bfc3e814be1533f78b83b90c11b24c7088ac60f2bb9098cf3410c4bedb5d53b0ccff4d840664c SHA512 bb18646794e168616e6f018b41c1a17c26bb0d8625aaeec0bd0d734efbc331008f432efde7b3d08e8838c995c771a406670812edaf7d605e7fdff9ef001aa954 diff --git a/app-crypt/hashcat/files/hashcat-6.2.4-brainless.patch b/app-crypt/hashcat/files/hashcat-6.2.4-brainless.patch new file mode 100644 index 00000000000..66d85d45c0b --- /dev/null +++ b/app-crypt/hashcat/files/hashcat-6.2.4-brainless.patch @@ -0,0 +1,41 @@ +https://github.com/hashcat/hashcat/pull/2961#event-5251978340 +From 0d5aed883b45cf3c218cb71916b08d56ae3d25a3 Mon Sep 17 00:00:00 2001 +From: Miezhiko +Date: Thu, 2 Sep 2021 17:52:27 +0400 +Subject: [PATCH] Fix compilation without brain + +Signed-off-by: Miezhiko +--- + src/hashcat.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/hashcat.c b/src/hashcat.c +index 163d7408d..bf936ccc0 100644 +--- a/src/hashcat.c ++++ b/src/hashcat.c +@@ -922,7 +922,10 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) + + // clean up + ++ #ifdef WITH_BRAIN + brain_ctx_destroy (hashcat_ctx); ++ #endif ++ + bitmap_ctx_destroy (hashcat_ctx); + combinator_ctx_destroy (hashcat_ctx); + cpt_ctx_destroy (hashcat_ctx); +@@ -1090,13 +1093,13 @@ int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder + } + } + #endif +- #endif + + /** + * brain + */ + + if (brain_ctx_init (hashcat_ctx) == -1) return -1; ++ #endif + + /** + * logfile diff --git a/app-crypt/hashcat/hashcat-6.2.4.ebuild b/app-crypt/hashcat/hashcat-6.2.4.ebuild new file mode 100644 index 00000000000..4a204caae63 --- /dev/null +++ b/app-crypt/hashcat/hashcat-6.2.4.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pax-utils toolchain-funcs + +DESCRIPTION="World's fastest and most advanced password recovery utility" +HOMEPAGE="https://github.com/hashcat/hashcat" +LICENSE="MIT" +SLOT="0" +if [ "${PV}" = "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hashcat/hashcat.git" +else + KEYWORDS="~amd64" + SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +IUSE="brain video_cards_nvidia" +DEPEND=" + app-arch/lzma + app-arch/unrar + sys-libs/zlib[minizip] + brain? ( dev-libs/xxhash ) + video_cards_nvidia? ( >x11-drivers/nvidia-drivers-440.64 + || ( dev-util/nvidia-cuda-toolkit + virtual/opencl ) + ) + !video_cards_nvidia? ( virtual/opencl )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-6.2.4-brainless.patch +) + +src_prepare() { + # remove bundled stuff + rm -r deps/OpenCL-Headers || die "Failed to remove bundled OpenCL Headers" + rm -r deps/xxHash || die "Failed to remove bundled xxHash" + # TODO: Gentoo's app-arch/lzma doesn't install the needed files + #rm -r deps/LZMA-SDK || die "Failed to remove bundled LZMA-SDK" + #rm -r deps || die "Failed to remove bundled deps" + + # do not strip + sed -i "/LFLAGS += -s/d" src/Makefile + # do not add random CFLAGS + sed -i "s/-O2//" src/Makefile || die + #sed -i "#LZMA_SDK_INCLUDE#d" src/Makefile || die + # respect CC, CXX, AR + sed -i \ + -e 's/:= gcc/:= $(CC)/' \ + -e 's/:= g++/:= $(CXX)/' \ + -e 's/:= ar/:= $(AR)/' \ + src/Makefile || die + + export PREFIX="${EPREFIX}"/usr + export LIBRARY_FOLDER="/usr/$(get_libdir)" + export DOCUMENT_FOLDER="/usr/share/doc/${PF}" + + default +} + +src_compile() { + tc-export CC CXX AR + + # Use bundled unrar for now, bug #792720 + emake \ + SHARED=1 \ + PRODUCTION=1 \ + ENABLE_BRAIN=$(usex brain 1 0) \ + USE_SYSTEM_LZMA=0 \ + USE_SYSTEM_OPENCL=1 \ + USE_SYSTEM_UNRAR=0 \ + USE_SYSTEM_ZLIB=1 \ + USE_SYSTEM_XXHASH=1 \ + VERSION_PURE="${PV}" + + pax-mark -mr hashcat +} + +src_test() { + if use video_cards_nvidia; then + addwrite /dev/nvidia0 + addwrite /dev/nvidiactl + addwrite /dev/nvidia-uvm + if [ ! -w /dev/nvidia0 ]; then + einfo "To run these tests, portage likely must be in the video group." + einfo "Please run \"gpasswd -a portage video\" if the tests will fail" + fi + #elif use vidia_cards_fglrx; then + # addwrite /dev/ati + fi + #this always exits with 255 despite success + #./hashcat -b -m 2500 || die "Test failed" + LD_PRELOAD=./libhashcat.so.${PV} ./hashcat -a 3 -m 1500 nQCk49SiErOgk || die "Test failed" +} + +src_install() { + emake \ + DESTDIR="${ED}" \ + SHARED=1 \ + PRODUCTION=1 \ + ENABLE_BRAIN=$(usex brain 1 0) \ + USE_SYSTEM_LZMA=0 \ + USE_SYSTEM_OPENCL=1 \ + USE_SYSTEM_UNRAR=1 \ + USE_SYSTEM_ZLIB=1 \ + USE_SYSTEM_XXHASH=1 \ + VERSION_PURE="${PV}" \ + install +}