diff options
Diffstat (limited to 'app-crypt/hashcat')
-rw-r--r-- | app-crypt/hashcat/Manifest | 6 | ||||
-rw-r--r-- | app-crypt/hashcat/files/hashcat-hip.patch | 170 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-4.1.0.ebuild | 49 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-4.2.0.ebuild | 50 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-4.2.1.ebuild | 51 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-5.0.0.ebuild | 57 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-5.1.0.ebuild | 69 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-6.2.6-r1.ebuild | 121 | ||||
-rw-r--r-- | app-crypt/hashcat/hashcat-9999.ebuild | 95 | ||||
-rw-r--r-- | app-crypt/hashcat/metadata.xml | 4 |
10 files changed, 365 insertions, 307 deletions
diff --git a/app-crypt/hashcat/Manifest b/app-crypt/hashcat/Manifest index 8d23660abb11..526ecd2eb137 100644 --- a/app-crypt/hashcat/Manifest +++ b/app-crypt/hashcat/Manifest @@ -1,5 +1 @@ -DIST hashcat-4.1.0.tar.gz 3956136 BLAKE2B f9d6f9322e4c50ee1e156c283da1257a24f0e2cb22618cf93b8b11dd1964f6741f409429ee904412f70301e4b2381b388bcab0296a30ea3a94569efe7aaaeec6 SHA512 c9e01847c89dd8521da8734ea324c69f1e9bfef50c059e9dc29d4b947fe090405774a57ae688f907698c7d9a2d1f087b730e0a994dc5ed0d5d937a9ef950dd73 -DIST hashcat-4.2.0.tar.gz 3965021 BLAKE2B ad208f2debe1e4ece893e4a277b199962aa98aab57a2e78aef1d4177dcf7fc03bf262657dfe0f51c2ae845c8ed92232de7131f909d63bdc91e9f14e0b9602bb6 SHA512 686975db24737a718b484dd84b66807dfbe9694f1832da648b3c3b9fc8b859cd5c4c4d0aebf04ae862de38656d92c989e4e9515a07bec19b3779d74350beb0bd -DIST hashcat-4.2.1.tar.gz 3966264 BLAKE2B 2034fff6aa8724cded0c8576cb4593d90f94eaea8f932e511ed82f2576ded2ffd6f686dac484e52a9ebb3029e90845469418ac414f2edf03e3fdc3350df8766f SHA512 a2cfc7e19e82b237892bacc79ca1a62a3b2ea598e4e5f60d4e275a0c128d865945595d8f918e3bb93bf62376f11f448ff53257faa12fd051dfc64973fbb6ed1e -DIST hashcat-5.0.0.tar.gz 4019964 BLAKE2B 5d33bb2b0d82018d8ea6a906bee48375376879a47e5ca8f880d6fad6c6763d1ef90d44b228257021603e560acadf3d8fbfcbafdbd41dbad3733141d3c3957762 SHA512 090f07a011961a2c9a9bdf31e8a5efae4b443b6b205e964a6cd74bed6efe8fae2377f22ce7728ad7e732e9f943cf30da88066fe0990d085547f1e2ba000a3d95 -DIST hashcat-5.1.0.tar.gz 4266878 BLAKE2B 677554fc5d6c5a93d0f4955c2e3cb6a40913ca2f7d00a89cf0c00bb48cadcaca94d3fdf55b853208f9fda4ce1bcc13fed865c5128a7c429223bcf8b4b825a15b SHA512 90605c2bcd0ec275d2f6ec581899b95cdc320b1494613a19803192c8a08037a7829b3776ed42c58eb6551ec1a746f47f94ab5b273958ca74e0fc57315e209ece +DIST hashcat-6.2.6.tar.gz 14234640 BLAKE2B fbbebc0a35b920442d4e1fb5822a8b9867db62bcc2404fba514fe1f06f0aa859a116cbe204eed71d340ad826dcfffffadca6963e5eec875ae2fee59068968b61 SHA512 b5e4f40fb5ed0a47977243e1f95bf1deae0b04bd5ca26338395305c42573fe5b17557835f6f5d8b7402812e8eadda2b260d6b927ce99429fd1b87eb26f002f8a 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-4.1.0.ebuild b/app-crypt/hashcat/hashcat-4.1.0.ebuild deleted file mode 100644 index 71db0a6fe5dd..000000000000 --- a/app-crypt/hashcat/hashcat-4.1.0.ebuild +++ /dev/null @@ -1,49 +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" -SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="custom-cflags video_cards_nvidia" -DEPEND="virtual/opencl" -RDEPEND="${DEPEND}" - -src_prepare() { - #do not strip - sed -i "/LFLAGS += -s/d" src/Makefile - #do not add random CFLAGS - sed -i "s/-O2//" src/Makefile || die - export PREFIX=/usr - export LIBRARY_FOLDER="/usr/$(get_libdir)" - eapply_user -} - -src_compile() { - default - 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" - ./hashcat -a 3 -m 1500 nQCk49SiErOgk || die "Test failed" -} diff --git a/app-crypt/hashcat/hashcat-4.2.0.ebuild b/app-crypt/hashcat/hashcat-4.2.0.ebuild deleted file mode 100644 index b94ec8299ae8..000000000000 --- a/app-crypt/hashcat/hashcat-4.2.0.ebuild +++ /dev/null @@ -1,50 +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" -SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="video_cards_nvidia" -DEPEND="virtual/opencl - video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )" -RDEPEND="${DEPEND}" - -src_prepare() { - #do not strip - sed -i "/LFLAGS += -s/d" src/Makefile - #do not add random CFLAGS - sed -i "s/-O2//" src/Makefile || die - export PREFIX=/usr - export LIBRARY_FOLDER="/usr/$(get_libdir)" - eapply_user -} - -src_compile() { - default - 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" - ./hashcat -a 3 -m 1500 nQCk49SiErOgk || die "Test failed" -} diff --git a/app-crypt/hashcat/hashcat-4.2.1.ebuild b/app-crypt/hashcat/hashcat-4.2.1.ebuild deleted file mode 100644 index 6e73c7c23841..000000000000 --- a/app-crypt/hashcat/hashcat-4.2.1.ebuild +++ /dev/null @@ -1,51 +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" -SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="video_cards_nvidia" -DEPEND="virtual/opencl - video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )" -RDEPEND="${DEPEND}" - -src_prepare() { - #do not strip - sed -i "/LFLAGS += -s/d" src/Makefile - #do not add random CFLAGS - sed -i "s/-O2//" src/Makefile || die - export PREFIX=/usr - export LIBRARY_FOLDER="/usr/$(get_libdir)" - export DOCUMENT_FOLDER="/usr/share/doc/${P}" - eapply_user -} - -src_compile() { - default - 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" - ./hashcat -a 3 -m 1500 nQCk49SiErOgk || die "Test failed" -} diff --git a/app-crypt/hashcat/hashcat-5.0.0.ebuild b/app-crypt/hashcat/hashcat-5.0.0.ebuild deleted file mode 100644 index 30255c39d174..000000000000 --- a/app-crypt/hashcat/hashcat-5.0.0.ebuild +++ /dev/null @@ -1,57 +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" -SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64" - -IUSE="video_cards_nvidia" -DEPEND="virtual/opencl - app-arch/lzma - video_cards_nvidia? ( >x11-drivers/nvidia-drivers-367.0 )" -RDEPEND="${DEPEND}" - -src_prepare() { - #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=0 SYSTEM_LZMA_SDK=0 - 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=0 SYSTEM_LZMA_SDK=0 install -} 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 d85c65f96f6b..000000000000 --- a/app-crypt/hashcat/hashcat-5.1.0.ebuild +++ /dev/null @@ -1,69 +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" - KEYWORDS="" -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.2.6-r1.ebuild b/app-crypt/hashcat/hashcat-6.2.6-r1.ebuild new file mode 100644 index 000000000000..162c494087d4 --- /dev/null +++ b/app-crypt/hashcat/hashcat-6.2.6-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit pax-utils toolchain-funcs + +DESCRIPTION="World's fastest and most advanced password recovery utility" +HOMEPAGE="https://github.com/hashcat/hashcat" +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 + +LICENSE="MIT" +SLOT="0" +IUSE="brain video_cards_nvidia" +RESTRICT=test + +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 + 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" + 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 || die + + # 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 + 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 +} diff --git a/app-crypt/hashcat/hashcat-9999.ebuild b/app-crypt/hashcat/hashcat-9999.ebuild index d85c65f96f6b..d2c503812e53 100644 --- a/app-crypt/hashcat/hashcat-9999.ebuild +++ b/app-crypt/hashcat/hashcat-9999.ebuild @@ -1,49 +1,85 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=8 -inherit eutils pax-utils multilib +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 +if [[ ${PV} == "9999" ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/hashcat/hashcat.git" - KEYWORDS="" else KEYWORDS="~amd64" SRC_URI="https://github.com/hashcat/hashcat/archive/v${PV}.tar.gz -> ${P}.tar.gz" fi +LICENSE="MIT" +SLOT="0" IUSE="brain video_cards_nvidia" -DEPEND="virtual/opencl - app-arch/lzma +RESTRICT=test + +DEPEND="app-arch/lzma + app-arch/unrar + sys-libs/zlib[minizip] 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() { - #remove bundled stuff + # 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 + + # Do not strip + sed -i "/LFLAGS += -s/d" src/Makefile || die + + # Do not add random CFLAGS sed -i "s/-O2//" src/Makefile || die - sed -i "#LZMA_SDK_INCLUDE#d" src/Makefile || die - export PREFIX=/usr + + #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/${P}" - eapply_user + export DOCUMENT_FOLDER="/usr/share/doc/${PF}" + + default } 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}" + 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 } @@ -52,18 +88,29 @@ src_test() { addwrite /dev/nvidia0 addwrite /dev/nvidiactl addwrite /dev/nvidia-uvm - if [ ! -w /dev/nvidia0 ]; then + + 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 + + # 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 + 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 } diff --git a/app-crypt/hashcat/metadata.xml b/app-crypt/hashcat/metadata.xml index 4379ee24223e..29d0cbb4f79a 100644 --- a/app-crypt/hashcat/metadata.xml +++ b/app-crypt/hashcat/metadata.xml @@ -1,5 +1,5 @@ -<?xml version='1.0' encoding='UTF-8'?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>zerochaos@gentoo.org</email> |