Opened 7 months ago

Last modified 6 months ago

#68600 assigned enhancement

Make john use only Python 3 dependencies by default

Reported by: tux-o-matic (Benjamin Merot) Owned by: catap (Kirill A. Korinsky)
Priority: Normal Milestone:
Component: ports Version:
Keywords: python2 python3 py-pysap Cc:
Port: john

Description

john (John the ripper) and its sub ports can be built using Python 3 version of its Python dependencies except for py-pysap which is Python 2 only until work on https://github.com/OWASP/pysap#roadmap is done. It's getting harder and harder to keep Python 2.7 dependencies working. So I think that all of John dependencies should use Python 3 dependencies and keep support for SAP as an optional variant that then uses Python 2.7

I could build john-jumbo-devel (which includes pretty much everything and pulls the bleeding branch from the project which works on recent compilers) by modifying the Portfile of John. The SAP support is in a separate Python script in the John distribution so it doesn't affect the main binary.

Change History (11)

comment:1 Changed 7 months ago by jmroot (Joshua Root)

Owner: set to catap
Status: newassigned

comment:2 Changed 7 months ago by catap (Kirill A. Korinsky)

Long story short: not all scripts are migrated to python3.

See:

comment:3 Changed 7 months ago by tux-o-matic (Benjamin Merot)

So that would be more Python script to erase from the installed port if installing as a Python 3 only dep. I don't know if those problematic Python 2 scripts are part of the regular "john" port or only the jumbo variants. If they're only in the jumbo variant than at least the standard "john" port should be installed without Python 2.7 dependencies.

comment:4 Changed 6 months ago by catap (Kirill A. Korinsky)

Benjamin, standard john port doesn't depend on any python version at all, nor installed any python scripts.

I suggest to use john-jumbo-devel which should have no python2 dependency as soon as possible, because release cycle of john / john-jumbo is unpredictable long.

comment:5 Changed 6 months ago by tux-o-matic (Benjamin Merot)

You're right. And I based my Python 2-less test on john-jumbo-devel because that Port fetches the "bleeding" branch from john's GitHub where as the john-jumbo Port is based on the old 1.9.0 release they cut which at the time of testing wouldn't even build anymore. But both jumbo and jumbo-devel supports have a set of common dependencies and some of those are Python 2.7 related. And as mentioned, some of those Python 2.7 can be replaced with Python variants and some aren't supported yet by the developers.

So should we agree that the outcome of this issue should be to only leave Python 3 dependencies in the common dependency list shared by the jumbo and jumbo-devel subports and move the remaining Python 2 dependencies to the jumbo subport?

comment:6 Changed 6 months ago by catap (Kirill A. Korinsky)

This is interesting idea to cut all old python2.7 script for released version of john-jumbo. I'll think about it for a bit.

comment:7 Changed 6 months ago by catap (Kirill A. Korinsky)

Benjamin, this can be solution, indeed. Unfortunately it requires some time to invest to make it done, and I simple hasn't got enough time these days :( If you willing to do it, PR are welcome.

But, personally, I not really care that python2.7 is installed on my machine.

comment:8 Changed 6 months ago by tux-o-matic (Benjamin Merot)

I got something working locally so I should be able to come up with a PR.

I was ok with the few occasional Python 2.7 dependencies but since some of them started to force/break in Python 2.7 in their migration process to 3.x, some Ports such as john-jumbo started to break.

comment:9 Changed 6 months ago by catap (Kirill A. Korinsky)

Em, now I’m confused.

If a new version of some port broke old python, such support should be simple pin on the last working version

comment:10 Changed 6 months ago by tux-o-matic (Benjamin Merot)

Someone did that a few days ago: https://github.com/macports/macports-ports/commit/c05f80b73c95c2e9591f4577a0771bda0bb097ea

I guess this is only going to get worse over time so I'd still like to see john-jumbo-devel remove dependencies on Python 2.7.

comment:11 Changed 6 months ago by catap (Kirill A. Korinsky)

The right way is fix all that legacy scripts in john-jumbo, and ask for a new release to make things clear :)

Note: See TracTickets for help on using tickets.