Opened 7 years ago
Closed 5 years ago
#56283 closed submission (fixed)
new portfile: hashcat
Reported by: | gaming-hacker (G Alexander) | Owned by: | Jann Röder <jann@…> |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | Cc: | ||
Port: | hashcat |
Description (last modified by gaming-hacker (G Alexander))
Hello,
There are too many differences between my fork and the macports main repo, like 12,000? to submit a specific PR, someone would have to cherry-pick my repo.
Anyway I have a new Portfile for hashcat.
Attachments (1)
Change History (11)
Changed 7 years ago by gaming-hacker (G Alexander)
comment:1 Changed 7 years ago by gaming-hacker (G Alexander)
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by raimue (Rainer Müller)
Replying to gaming-hacker:
There are too many differences between my fork and the macports main repo, like 12,000? to submit a specific PR, someone would have to cherry-pick my repo.
Set your branch to follow origin/master
(assuming origin is macports/macports-ports), then try to rebase all your changes on top of the latest commit in macports-ports:
$ git branch --set-upstream-to=origin/master $ git pull --rebase --autostash
Then check which commits are only on your branch:
$ git log --oneline @{upstream}..HEAD
If you only see the commits you want to submit, push that branch to GitHub and open a pull request from there.
comment:3 Changed 7 years ago by kencu (Ken)
I worked on this a bit for you. This works as is on 10.13, needs a bit more tuning to be perfect. Haven't explored older systems at all yet. -- Ken
# -*- coding: utf-8; mode: _tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2 PortSystem 1.0 PortGroup github 1.0 github.setup hashcat hashcat 4.1.0 # this is one of those weird git URLs I always have trouble making the github PG do # Ryan always seems to come up with some incantation I can never figure out # https://github.com/hashcat/hashcat/archive/v4.1.0.tar.gz master_sites https://github.com/hashcat/hashcat/archive/ distfiles v${version}.tar.gz checksums rmd160 d7f1701ec8cb6b729b7ec21f40e9b84f267d2c50 \ sha256 bd23997153c5a8c8b35da3931ff74a808561399de3f3e07058ff4d2f8617119c # might need to download the git submodules before building? # not needed on newer clangs that have the opencl headers, I believe # not sure just what systems or compilers might need the opencl headers # from https://github.com/KhronosGroup/OpenCL-Headers.git categories security license MIT platforms darwin maintainers {@gaming-hacker YOUR_OBFUSCATED_EMAIL_HERE} description World's fastest and most advanced password recovery utility. long_description hashcat is the world's fastest and most advanced \ password recovery utility, supporting five unique modes \ of attack for over 200 highly-optimized hashing algorithms. \ hashcat currently supports CPUs, GPUs, and other hardware \ accelerators on Linux, Windows, and macOS, and has \ facilities to help enable distributed password cracking homepage https://hashcat.net/hashcat/ use_configure no # I haven't tested these parts thoroughly yet # it is not needed on 10.13, at least -- possibly on older systems? #depends_build port:gmake #build.cmd ${prefix}/bin/gmake build.env-append PREFIX=${prefix} build.target destroot.env-append PREFIX=${prefix}
comment:4 Changed 7 years ago by raimue (Rainer Müller)
The fetch URL does not seem special. You are only missing the v
tag prefix as the 4th argument to github.setup
.
github.setup hashcat hashcat 4.1.0 v
comment:5 Changed 7 years ago by kencu (Ken)
I tried that, and it didn't work. I must be a moron.
-- edit: Yeah, this
github.setup hashcat hashcat 4.1.0 v
gives me this URL:
https://github.com/hashcat/hashcat/tarball/v4.1.0/hashcat-4.1.0.tar.gz
comment:6 Changed 7 years ago by gaming-hacker (G Alexander)
Thanks Ken for the help on the file.
Hmm, portfile passed the port lint hashcat without problems. well i figured for this initial portifle on jumping through the hoops on getting the port submitted first. yes, i put the gmake there for older systems and i don't like depending on defaulting to the system flavor of 'make'.
if you use this portfile there is a probability it won't work. in my fork, i had to modify the makefile as the default makefile is hard wired to install to /usr/local, so in my fork i changed it to /opt/local. there is probably a better way to do this with a macport global var like ${prefix}??
that's why i pointed the portfile to this commit and bumped the version to 4.1.1
github.setup gaming-hacker hashcat bde4f7a09273c529784c8b5019c48a2977d42468
and you really need to keep this or make sure you're not passing any args, this makefile is bare bones to support a lot of platforms.
build.target-delete -w all
comment:7 Changed 7 years ago by raimue (Rainer Müller)
Keywords: | new removed |
---|
You should use patchfiles
in the Portfile to make modifications to the upstream source code:
https://guide.macports.org/#development.patches.source
comment:8 Changed 7 years ago by kencu (Ken)
It's best practice to invoke gmake
only on the system versions that need it -- a bit of testing involved.
We shouldn't hardcode /opt/local
, you have to set the PREFIX instead to ${prefix} in case someone wants to use a prefix other than /opt/local
. Instead of patching in this case, you just set the PREFIX like I've done. That's very commonly needed in ports that don't use configure.
if you set this:
build.target
then it removes all the build targets, which is what you want and is the right way to do what you're trying to do there.
comment:9 Changed 7 years ago by gaming-hacker (G Alexander)
can someone close this ticket?
i don't have the time to do all of the regression tests.
i'm content with my hacked and working portfile and github repo as i keep my repo updated with bleeding edge builds/libs.
if someone wants to use hashcat they'll stumble across this ticket and fix the portfile or use my repo.
comment:10 Changed 5 years ago by Jann Röder <jann@…>
Owner: | set to Jann Röder <jann@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Portfile for hashcat