[MacPorts] #56283: new portfile: hashcat

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[MacPorts] #56283: new portfile: hashcat

MacPorts
#56283: new portfile:  hashcat
---------------------------+---------------------
 Reporter:  gaming-hacker  |      Owner:  (none)
     Type:  submission     |     Status:  new
 Priority:  Normal         |  Milestone:
Component:  ports          |    Version:  2.4.2
 Keywords:  new            |       Port:  hashcat
---------------------------+---------------------
 Hello,

 There are too many differences between my fork and the macports main repo,
 like 12,000?

 Anyway I have a new Portfile for hashcat.

--
Ticket URL: <https://trac.macports.org/ticket/56283>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------
Changes (by gaming-hacker):

 * Attachment "Portfile" added.

 Portfile for hashcat

--
Ticket URL: <https://trac.macports.org/ticket/56283>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------
Description changed by gaming-hacker:

Old description:

> Hello,
>
> There are too many differences between my fork and the macports main
> repo, like 12,000?
>
> Anyway I have a new Portfile for hashcat.

New description:

 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.

--

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------

Comment (by raimue):

 Replying to [ticket:56283 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.

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------

Comment (by kencu):

 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 incantatation 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}
 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}

 }}}

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------

Comment (by raimue):

 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
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------

Comment (by kencu):

 I tried that, and it didn't work. I must be a moron.

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:  new
      Port:  hashcat        |
----------------------------+--------------------

Comment (by gaming-hacker):

 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

 {{{
 github.setup        gaming-hacker hashcat
 bde4f7a09273c529784c8b5019c48a2977d42468
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:
      Port:  hashcat        |
----------------------------+--------------------
Changes (by raimue):

 * keywords:  new =>


Comment:

 You should use `patchfiles` in the Portfile to make modifications to the
 upstream source code:\\
 https://guide.macports.org/#development.patches.source

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:
      Port:  hashcat        |
----------------------------+--------------------

Comment (by kencu):

 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.

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|

Re: [MacPorts] #56283: new portfile: hashcat

MacPorts
In reply to this post by MacPorts
#56283: new portfile:  hashcat
----------------------------+--------------------
  Reporter:  gaming-hacker  |      Owner:  (none)
      Type:  submission     |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.4.2
Resolution:                 |   Keywords:
      Port:  hashcat        |
----------------------------+--------------------

Comment (by gaming-hacker):

 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.

--
Ticket URL: <https://trac.macports.org/ticket/56283#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS