* [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/
@ 2020-06-17 17:02 Rick Farina
0 siblings, 0 replies; 4+ messages in thread
From: Rick Farina @ 2020-06-17 17:02 UTC (permalink / raw
To: gentoo-commits
commit: 609c0e26160f0f7672721e632e1f6f21d1b8fea2
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 17 17:02:12 2020 +0000
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Jun 17 17:02:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=609c0e26
app-crypt/hashcat: pull upstream fix
https://github.com/hashcat/hashcat/issues/2455
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
.../files/hashcat-6.0.0-missing-not-fatal.patch | 53 ++++++++++++++++++++++
...ashcat-6.0.0.ebuild => hashcat-6.0.0-r1.ebuild} | 15 ++++--
app-crypt/hashcat/hashcat-9999.ebuild | 12 +++--
3 files changed, 71 insertions(+), 9 deletions(-)
diff --git a/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch b/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch
new file mode 100644
index 00000000000..52120e0e05c
--- /dev/null
+++ b/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch
@@ -0,0 +1,53 @@
+diff --git a/docs/changes.txt b/docs/changes.txt
+index 1527da46..420c2102 100644
+--- a/docs/changes.txt
++++ b/docs/changes.txt
+@@ -1,3 +1,11 @@
++* changes v6.0.0 -> v6.0.x
++
++##
++## Improvements
++##
++
++- OpenCL Runtime: Reinterpret return code CL_DEVICE_NOT_FOUND from clGetDeviceIDs() as non-fatal
++
+ * changes v5.1.0 -> v6.0.0
+
+ ##
+diff --git a/src/backend.c b/src/backend.c
+index 80fdbb38..7f79879f 100644
+--- a/src/backend.c
++++ b/src/backend.c
+@@ -5185,7 +5185,31 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
+ {
+ event_log_error (hashcat_ctx, "clGetDeviceIDs(): %s", val2cstr_cl (CL_rc));
+
+- return -1;
++ // Special handling for CL_DEVICE_NOT_FOUND, see: https://github.com/hashcat/hashcat/issues/2455
++
++ #define IGNORE_DEVICE_NOT_FOUND 1
++
++ if (IGNORE_DEVICE_NOT_FOUND)
++ {
++ backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
++
++ OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl;
++
++ const cl_int CL_err = ocl->clGetDeviceIDs (opencl_platform, CL_DEVICE_TYPE_ALL, DEVICES_MAX, opencl_platform_devices, &opencl_platform_devices_cnt);
++
++ if (CL_err == CL_DEVICE_NOT_FOUND)
++ {
++ // we ignore this error
++ }
++ else
++ {
++ return -1;
++ }
++ }
++ else
++ {
++ return -1;
++ }
+ }
+
+ opencl_platforms_devices[opencl_platforms_idx] = opencl_platform_devices;
diff --git a/app-crypt/hashcat/hashcat-6.0.0.ebuild b/app-crypt/hashcat/hashcat-6.0.0-r1.ebuild
similarity index 88%
rename from app-crypt/hashcat/hashcat-6.0.0.ebuild
rename to app-crypt/hashcat/hashcat-6.0.0-r1.ebuild
index 4c3c141fcb4..eab3098c5c1 100644
--- a/app-crypt/hashcat/hashcat-6.0.0.ebuild
+++ b/app-crypt/hashcat/hashcat-6.0.0-r1.ebuild
@@ -13,18 +13,23 @@ if [ "${PV}" = "9999" ]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/hashcat/hashcat.git"
else
- #this doesn't work for me, so it doesn't get keywords
- #KEYWORDS="~amd64"
+ KEYWORDS="~amd64"
SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz"
fi
IUSE="brain video_cards_nvidia"
-DEPEND="virtual/opencl
+DEPEND="
app-arch/lzma
brain? ( dev-libs/xxhash )
- video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )"
+ 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}/${P}-missing-not-fatal.patch" )
+
src_prepare() {
#remove bundled stuff
rm -r deps/OpenCL-Headers || die "Failed to remove bundled OpenCL Headers"
@@ -39,7 +44,7 @@ src_prepare() {
export PREFIX=/usr
export LIBRARY_FOLDER="/usr/$(get_libdir)"
export DOCUMENT_FOLDER="/usr/share/doc/${P}"
- eapply_user
+ default
}
src_compile() {
diff --git a/app-crypt/hashcat/hashcat-9999.ebuild b/app-crypt/hashcat/hashcat-9999.ebuild
index bc8b3fb95c5..32005fae3ae 100644
--- a/app-crypt/hashcat/hashcat-9999.ebuild
+++ b/app-crypt/hashcat/hashcat-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit eutils pax-utils multilib
@@ -18,10 +18,14 @@ else
fi
IUSE="brain video_cards_nvidia"
-DEPEND="virtual/opencl
+DEPEND="
app-arch/lzma
brain? ( dev-libs/xxhash )
- video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )"
+ video_cards_nvidia? ( >x11-drivers/nvidia-drivers-440.64
+ || ( dev-util/nvidia-cuda-toolkit
+ virtual/opencl )
+ )
+ !video_cards_nvidia? ( virtual/opencl )"
RDEPEND="${DEPEND}"
src_prepare() {
@@ -38,7 +42,7 @@ src_prepare() {
export PREFIX=/usr
export LIBRARY_FOLDER="/usr/$(get_libdir)"
export DOCUMENT_FOLDER="/usr/share/doc/${P}"
- eapply_user
+ default
}
src_compile() {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/
@ 2021-02-17 16:21 Rick Farina
0 siblings, 0 replies; 4+ messages in thread
From: Rick Farina @ 2021-02-17 16:21 UTC (permalink / raw
To: gentoo-commits
commit: 53f8f941471a761360d8f925092c6eb60917da4d
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 17 16:21:09 2021 +0000
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Feb 17 16:21:09 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53f8f941
app-crypt/hashcat: bump
cleanup
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>
app-crypt/hashcat/Manifest | 3 +-
.../files/hashcat-6.0.0-missing-not-fatal.patch | 53 -----------------
app-crypt/hashcat/hashcat-5.1.0.ebuild | 68 ----------------------
...ashcat-6.0.0-r1.ebuild => hashcat-6.1.1.ebuild} | 4 +-
4 files changed, 2 insertions(+), 126 deletions(-)
diff --git a/app-crypt/hashcat/Manifest b/app-crypt/hashcat/Manifest
index 81244abeb2e..6a7e552c332 100644
--- a/app-crypt/hashcat/Manifest
+++ b/app-crypt/hashcat/Manifest
@@ -1,2 +1 @@
-DIST hashcat-5.1.0.tar.gz 4266878 BLAKE2B 677554fc5d6c5a93d0f4955c2e3cb6a40913ca2f7d00a89cf0c00bb48cadcaca94d3fdf55b853208f9fda4ce1bcc13fed865c5128a7c429223bcf8b4b825a15b SHA512 90605c2bcd0ec275d2f6ec581899b95cdc320b1494613a19803192c8a08037a7829b3776ed42c58eb6551ec1a746f47f94ab5b273958ca74e0fc57315e209ece
-DIST hashcat-6.0.0.tar.gz 5360568 BLAKE2B 9d44c94d136a4c4cf7254ee11dc978db6bb1159d66ea525777c0a3dae59149983c9e8220f50cdbe6c24e330c757f3519b48f920662582e914f80068723ba5acd SHA512 b508c77e1735c02bb59c427774a3f4fafdea37d09777ef2dcb6e5081cb993d02c4f46a6ab846dc97a8cef2b0f69bbc191e26b8f1608a299bc2c1a6b3d2474f96
+DIST hashcat-6.1.1.tar.gz 5385180 BLAKE2B a1a90f691222c7810150a23d513bd1d24bca4682dd8dec2ff5bdc9cc9f82d5a2b00407de966a7c7db131cf1c1709b5f78c97d45176598d6bb7ebd381c38b4ba8 SHA512 788539b488ba55684d6d93ce18f3b05fa822a8cbfcdbcde9c2b54001d8927580dca253e0e9ff9a19f4278045046d732e104054fc743c39f47952ca24d2e93724
diff --git a/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch b/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch
deleted file mode 100644
index 52120e0e05c..00000000000
--- a/app-crypt/hashcat/files/hashcat-6.0.0-missing-not-fatal.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff --git a/docs/changes.txt b/docs/changes.txt
-index 1527da46..420c2102 100644
---- a/docs/changes.txt
-+++ b/docs/changes.txt
-@@ -1,3 +1,11 @@
-+* changes v6.0.0 -> v6.0.x
-+
-+##
-+## Improvements
-+##
-+
-+- OpenCL Runtime: Reinterpret return code CL_DEVICE_NOT_FOUND from clGetDeviceIDs() as non-fatal
-+
- * changes v5.1.0 -> v6.0.0
-
- ##
-diff --git a/src/backend.c b/src/backend.c
-index 80fdbb38..7f79879f 100644
---- a/src/backend.c
-+++ b/src/backend.c
-@@ -5185,7 +5185,31 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
- {
- event_log_error (hashcat_ctx, "clGetDeviceIDs(): %s", val2cstr_cl (CL_rc));
-
-- return -1;
-+ // Special handling for CL_DEVICE_NOT_FOUND, see: https://github.com/hashcat/hashcat/issues/2455
-+
-+ #define IGNORE_DEVICE_NOT_FOUND 1
-+
-+ if (IGNORE_DEVICE_NOT_FOUND)
-+ {
-+ backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
-+
-+ OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl;
-+
-+ const cl_int CL_err = ocl->clGetDeviceIDs (opencl_platform, CL_DEVICE_TYPE_ALL, DEVICES_MAX, opencl_platform_devices, &opencl_platform_devices_cnt);
-+
-+ if (CL_err == CL_DEVICE_NOT_FOUND)
-+ {
-+ // we ignore this error
-+ }
-+ else
-+ {
-+ return -1;
-+ }
-+ }
-+ else
-+ {
-+ return -1;
-+ }
- }
-
- opencl_platforms_devices[opencl_platforms_idx] = opencl_platform_devices;
diff --git a/app-crypt/hashcat/hashcat-5.1.0.ebuild b/app-crypt/hashcat/hashcat-5.1.0.ebuild
deleted file mode 100644
index bc8b3fb95c5..00000000000
--- a/app-crypt/hashcat/hashcat-5.1.0.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit eutils pax-utils multilib
-
-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="virtual/opencl
- app-arch/lzma
- brain? ( dev-libs/xxhash )
- video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )"
-RDEPEND="${DEPEND}"
-
-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"
- #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
- export PREFIX=/usr
- export LIBRARY_FOLDER="/usr/$(get_libdir)"
- export DOCUMENT_FOLDER="/usr/share/doc/${P}"
- eapply_user
-}
-
-src_compile() {
- emake SHARED=1 PRODUCTION=1 ENABLE_BRAIN=$(usex brain 1 0) USE_SYSTEM_LZMA=0 USE_SYSTEM_OPENCL=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_XXHASH=1 VERSION_PURE="${PV}" install
-}
diff --git a/app-crypt/hashcat/hashcat-6.0.0-r1.ebuild b/app-crypt/hashcat/hashcat-6.1.1.ebuild
similarity index 96%
rename from app-crypt/hashcat/hashcat-6.0.0-r1.ebuild
rename to app-crypt/hashcat/hashcat-6.1.1.ebuild
index eab3098c5c1..2f467f39c05 100644
--- a/app-crypt/hashcat/hashcat-6.0.0-r1.ebuild
+++ b/app-crypt/hashcat/hashcat-6.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -28,8 +28,6 @@ DEPEND="
!video_cards_nvidia? ( virtual/opencl )"
RDEPEND="${DEPEND}"
-PATCHES=( "${FILESDIR}/${P}-missing-not-fatal.patch" )
-
src_prepare() {
#remove bundled stuff
rm -r deps/OpenCL-Headers || die "Failed to remove bundled OpenCL Headers"
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/
@ 2021-09-07 20:27 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2021-09-07 20:27 UTC (permalink / raw
To: gentoo-commits
commit: 1632d007342a9cf30f0b201fb2085e9bdc2e96c2
Author: Miezhiko <Miezhiko <AT> gmail <DOT> com>
AuthorDate: Thu Sep 2 14:01:36 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> 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 <Miezhiko <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> 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 <Miezhiko@gmail.com>
+Date: Thu, 2 Sep 2021 17:52:27 +0400
+Subject: [PATCH] Fix compilation without brain
+
+Signed-off-by: Miezhiko <Miezhiko@gmail.com>
+---
+ 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
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/
@ 2023-10-19 10:38 罗百科
0 siblings, 0 replies; 4+ messages in thread
From: 罗百科 @ 2023-10-19 10:38 UTC (permalink / raw
To: gentoo-commits
commit: aef92da9f6a2b917c908793ffa58eb20f2ec9813
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 10:36:51 2023 +0000
Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 10:38:45 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aef92da9
app-crypt/hashcat: Fix HIP backend
patch in upstream git, not in a release yet.
Also fix missing opencl-headers dep.
Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
app-crypt/hashcat/files/hashcat-hip.patch | 170 +++++++++++++++++++++
...ashcat-6.2.6.ebuild => hashcat-6.2.6-r1.ebuild} | 7 +-
2 files changed, 176 insertions(+), 1 deletion(-)
diff --git a/app-crypt/hashcat/files/hashcat-hip.patch b/app-crypt/hashcat/files/hashcat-hip.patch
new file mode 100644
index 000000000000..775dfb455d8a
--- /dev/null
+++ b/app-crypt/hashcat/files/hashcat-hip.patch
@@ -0,0 +1,170 @@
+commit eaf3de164bdc327c059d3ae1bd3d2a79f6cd47bd
+Author: Jens Steube <jens.steube@gmail.com>
+Date: Tue Nov 1 19:36:03 2022 +0100
+
+ Remove option "-flegacy-pass-manager" if HIP backend is used. Support was removed from LLVM 15. There's no alternative option available.
+ Fixes #3469
+
+diff --git a/src/backend.c b/src/backend.c
+index 46a0bcdf1..193bbb447 100644
+--- a/src/backend.c
++++ b/src/backend.c
+@@ -8396,7 +8389,7 @@ static bool load_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_p
+
+ hiprtc_options[1] = "-nocudainc";
+ hiprtc_options[2] = "-nocudalib";
+- hiprtc_options[3] = "-flegacy-pass-manager";
++ hiprtc_options[3] = "";
+ hiprtc_options[4] = "";
+
+ // untested but it should work
+diff --git a/src/modules/module_00500.c b/src/modules/module_00500.c
+index deb73024b..e86de7a19 100644
+--- a/src/modules/module_00500.c
++++ b/src/modules/module_00500.c
+@@ -57,19 +57,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c
+ return tmp_size;
+ }
+
+-char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
+-{
+- char *jit_build_options = NULL;
+-
+- // AMD HIP
+- if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
+- {
+- hc_asprintf (&jit_build_options, "-flegacy-pass-manager");
+- }
+-
+- return jit_build_options;
+-}
+-
+ static void md5crypt_decode (u8 digest[16], const u8 buf[22])
+ {
+ int l;
+@@ -304,7 +291,7 @@ void module_init (module_ctx_t *module_ctx)
+ module_ctx->module_hook23 = MODULE_DEFAULT;
+ module_ctx->module_hook_salt_size = MODULE_DEFAULT;
+ module_ctx->module_hook_size = MODULE_DEFAULT;
+- module_ctx->module_jit_build_options = module_jit_build_options;
++ module_ctx->module_jit_build_options = MODULE_DEFAULT;
+ module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
+diff --git a/src/modules/module_00501.c b/src/modules/module_00501.c
+index 22b28e385..b22c8f80d 100644
+--- a/src/modules/module_00501.c
++++ b/src/modules/module_00501.c
+@@ -59,19 +59,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c
+ return tmp_size;
+ }
+
+-char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
+-{
+- char *jit_build_options = NULL;
+-
+- // AMD HIP
+- if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
+- {
+- hc_asprintf (&jit_build_options, "-flegacy-pass-manager");
+- }
+-
+- return jit_build_options;
+-}
+-
+ static void AES128_decrypt_cbc (const u32 key[4], const u32 iv[4], const u32 in[16], u32 out[16])
+ {
+ AES_KEY skey;
+@@ -383,7 +370,7 @@ void module_init (module_ctx_t *module_ctx)
+ module_ctx->module_hook23 = MODULE_DEFAULT;
+ module_ctx->module_hook_salt_size = MODULE_DEFAULT;
+ module_ctx->module_hook_size = MODULE_DEFAULT;
+- module_ctx->module_jit_build_options = module_jit_build_options;
++ module_ctx->module_jit_build_options = MODULE_DEFAULT;
+ module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
+diff --git a/src/modules/module_01500.c b/src/modules/module_01500.c
+index fcd6e9f04..acc09c075 100644
+--- a/src/modules/module_01500.c
++++ b/src/modules/module_01500.c
+@@ -168,11 +168,11 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
+ {
+ if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
+ {
+- hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u -D _unroll -flegacy-pass-manager", hashes->salts_buf[0].salt_buf[0] & 0xfff);
++ hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
+ }
+ else
+ {
+- hc_asprintf (&jit_build_options, "-D _unroll -flegacy-pass-manager");
++ hc_asprintf (&jit_build_options, "-D _unroll");
+ }
+ }
+ else
+diff --git a/src/modules/module_01600.c b/src/modules/module_01600.c
+index 63f6038a6..5c62252b1 100644
+--- a/src/modules/module_01600.c
++++ b/src/modules/module_01600.c
+@@ -57,19 +57,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c
+ return tmp_size;
+ }
+
+-char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
+-{
+- char *jit_build_options = NULL;
+-
+- // AMD HIP
+- if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
+- {
+- hc_asprintf (&jit_build_options, "-flegacy-pass-manager");
+- }
+-
+- return jit_build_options;
+-}
+-
+ static void md5crypt_decode (u8 digest[16], const u8 buf[22])
+ {
+ int l;
+@@ -304,7 +291,7 @@ void module_init (module_ctx_t *module_ctx)
+ module_ctx->module_hook23 = MODULE_DEFAULT;
+ module_ctx->module_hook_salt_size = MODULE_DEFAULT;
+ module_ctx->module_hook_size = MODULE_DEFAULT;
+- module_ctx->module_jit_build_options = module_jit_build_options;
++ module_ctx->module_jit_build_options = MODULE_DEFAULT;
+ module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
+diff --git a/src/modules/module_06300.c b/src/modules/module_06300.c
+index 34dbb7a74..02fc4d051 100644
+--- a/src/modules/module_06300.c
++++ b/src/modules/module_06300.c
+@@ -57,19 +57,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c
+ return tmp_size;
+ }
+
+-char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
+-{
+- char *jit_build_options = NULL;
+-
+- // AMD HIP
+- if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
+- {
+- hc_asprintf (&jit_build_options, "-flegacy-pass-manager");
+- }
+-
+- return jit_build_options;
+-}
+-
+ static void md5crypt_decode (u8 digest[16], const u8 buf[22])
+ {
+ int l;
+@@ -295,7 +282,7 @@ void module_init (module_ctx_t *module_ctx)
+ module_ctx->module_hook23 = MODULE_DEFAULT;
+ module_ctx->module_hook_salt_size = MODULE_DEFAULT;
+ module_ctx->module_hook_size = MODULE_DEFAULT;
+- module_ctx->module_jit_build_options = module_jit_build_options;
++ module_ctx->module_jit_build_options = MODULE_DEFAULT;
+ module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
+ module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
diff --git a/app-crypt/hashcat/hashcat-6.2.6.ebuild b/app-crypt/hashcat/hashcat-6.2.6-r1.ebuild
similarity index 95%
rename from app-crypt/hashcat/hashcat-6.2.6.ebuild
rename to app-crypt/hashcat/hashcat-6.2.6-r1.ebuild
index d2c503812e53..162c494087d4 100644
--- a/app-crypt/hashcat/hashcat-6.2.6.ebuild
+++ b/app-crypt/hashcat/hashcat-6.2.6-r1.ebuild
@@ -31,9 +31,14 @@ DEPEND="app-arch/lzma
virtual/opencl
)
)
- !video_cards_nvidia? ( virtual/opencl )"
+ !video_cards_nvidia? (
+ virtual/opencl
+ dev-util/opencl-headers
+ )"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/hashcat-hip.patch" )
+
src_prepare() {
# Remove bundled stuff
rm -r deps/OpenCL-Headers || die "Failed to remove bundled OpenCL Headers"
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-19 10:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-07 20:27 [gentoo-commits] repo/gentoo:master commit in: app-crypt/hashcat/, app-crypt/hashcat/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-10-19 10:38 罗百科
2021-02-17 16:21 Rick Farina
2020-06-17 17:02 Rick Farina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox