pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
hashcat: initialize correctly with NetBSD
Module Name: pkgsrc-wip
Committed By: Pierre Pronchery <khorben%defora.org@localhost>
Pushed By: khorben
Date: Mon Jan 10 00:40:39 2022 +0100
Changeset: 7a6e34ede3c8528953600bb7ae1055f4f27b1238
Modified Files:
hashcat/distinfo
hashcat/patches/patch-include_sort__r.h
hashcat/patches/patch-src_affinity.c
hashcat/patches/patch-src_folder.c
Log Message:
hashcat: initialize correctly with NetBSD
There is very little chance hashcat can currently work on NetBSD though:
it requires either the OpenCL Runtime for Intel processors (only
available on Linux and Windows at the moment AFAICT), or a specific
(proprietary) NVIDIA driver and runtime.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7a6e34ede3c8528953600bb7ae1055f4f27b1238
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
hashcat/distinfo | 6 +++---
hashcat/patches/patch-include_sort__r.h | 2 +-
hashcat/patches/patch-src_affinity.c | 2 +-
hashcat/patches/patch-src_folder.c | 34 ++++++++++++++++++++++++++-------
4 files changed, 32 insertions(+), 12 deletions(-)
diffs:
diff --git a/hashcat/distinfo b/hashcat/distinfo
index ad1f8a0f77..8335a826a3 100644
--- a/hashcat/distinfo
+++ b/hashcat/distinfo
@@ -3,8 +3,8 @@ $NetBSD$
BLAKE2s (hashcat-6.2.5.tar.gz) = 425d720ca0bb48e585988dc0557a829b3906d697ad14722c68e34fb5b4f7ebaa
SHA512 (hashcat-6.2.5.tar.gz) = 2b881146c625172c91cb74b33851473155dcde2421fba1b4acfba28116499b9cff832a62c4dbc24e16df06a827494f30699a7d0e5195d5ed107704f525255383
Size (hashcat-6.2.5.tar.gz) = 6341872 bytes
-SHA1 (patch-include_sort__r.h) = b5418315b7abd50d95b9ec526964f94418c1aafd
+SHA1 (patch-include_sort__r.h) = 75ea3e5ceb01383d603cd86e449f69299bc22fcd
SHA1 (patch-src_Makefile) = 427c7d162ff8373d6b180718fff4845bdb119d1c
-SHA1 (patch-src_affinity.c) = 6054fea2478244292bd855bb8eb8d064aa0d81d1
-SHA1 (patch-src_folder.c) = dfac6b9c75ce0e6e694eb2f3e902a040226b2e6e
+SHA1 (patch-src_affinity.c) = cfdfbf3aca280e7a08d98aad7940613df89d929a
+SHA1 (patch-src_folder.c) = 58cde3211ccb057eda93de587404c82542224b54
SHA1 (patch-src_terminal.c) = 40b52cdb1f9030b9ad7649bf0a9a4cf17b1f52fe
diff --git a/hashcat/patches/patch-include_sort__r.h b/hashcat/patches/patch-include_sort__r.h
index 2498e3c89c..66079fa41c 100644
--- a/hashcat/patches/patch-include_sort__r.h
+++ b/hashcat/patches/patch-include_sort__r.h
@@ -2,7 +2,7 @@ $NetBSD$
Fix the build for NetBSD
---- include/sort_r.h.orig 2022-01-05 22:11:43.619407583 +0000
+--- include/sort_r.h.orig 2021-11-21 15:39:01.000000000 +0000
+++ include/sort_r.h
@@ -25,7 +25,7 @@ Slightly modified to work with hashcat t
*/
diff --git a/hashcat/patches/patch-src_affinity.c b/hashcat/patches/patch-src_affinity.c
index 736e40baf4..9f86a5c6bf 100644
--- a/hashcat/patches/patch-src_affinity.c
+++ b/hashcat/patches/patch-src_affinity.c
@@ -2,7 +2,7 @@ $NetBSD$
Fix the build for NetBSD
---- src/affinity.c.orig 2022-01-05 22:06:04.906472892 +0000
+--- src/affinity.c.orig 2021-11-21 15:39:01.000000000 +0000
+++ src/affinity.c
@@ -45,6 +45,12 @@ static int pthread_setaffinity_np (pthre
typedef cpuset_t cpu_set_t;
diff --git a/hashcat/patches/patch-src_folder.c b/hashcat/patches/patch-src_folder.c
index 6e7aaee2fc..5bb2d5d65c 100644
--- a/hashcat/patches/patch-src_folder.c
+++ b/hashcat/patches/patch-src_folder.c
@@ -2,7 +2,7 @@ $NetBSD$
Fix the build for NetBSD
---- src/folder.c.orig 2022-01-05 22:09:38.453961988 +0000
+--- src/folder.c.orig 2021-11-21 15:39:01.000000000 +0000
+++ src/folder.c
@@ -13,6 +13,9 @@
@@ -14,14 +14,34 @@ Fix the build for NetBSD
#endif
static int get_exec_path (char *exec_path, const size_t exec_path_sz)
-@@ -43,9 +46,7 @@ static int get_exec_path (char *exec_pat
+@@ -45,8 +48,6 @@ static int get_exec_path (char *exec_pat
- const size_t len = strlen (exec_path);
+ #elif defined (__FreeBSD__)
-- #elif defined (__FreeBSD__)
--
- #include <sys/sysctl.h>
-+ #elif defined (__FreeBSD__) || defined (__NetBSD__)
-
+-
int mib[4];
+ mib[0] = CTL_KERN;
+@@ -60,6 +61,21 @@ static int get_exec_path (char *exec_pat
+
+ const size_t len = strlen (exec_path);
+
++ #elif defined (__NetBSD__)
++
++ int mib[4];
++
++ mib[0] = CTL_KERN;
++ mib[1] = KERN_PROC_ARGS;
++ mib[2] = getpid();
++ mib[3] = KERN_PROC_PATHNAME;
++
++ size_t size = exec_path_sz;
++
++ sysctl (mib, 4, exec_path, &size, NULL, 0);
++
++ const size_t len = strlen (exec_path);
++
+ #else
+ #error Your Operating System is not supported or detected
+ #endif
Home |
Main Index |
Thread Index |
Old Index