Page MenuHomeFreeBSD

security/klee: Depend on `python3` executable at runtime.
ClosedPublic

Authored by arrowd on Mar 31 2019, 7:42 AM.

Details

Summary

Not sure if I did it right, but I haven't found anything in python.mk that would add python3 executable to depends list

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

arrowd created this revision.Mar 31 2019, 7:42 AM

python3 is only a symlink, not an actual executable. You need one of the actual python3.x packages. Also the python3 port does not follow eg. a custom DEFAULT_VERSIONS=python=3.7 -- for that you need DEFAULT_VERSIONS=python3=3.7 -- which puzzled me for some time after I switched all my systems to the latest python-3.7, and yet pkg kept insisting that python-3.6 needed to be installed...

This technically make the port flavored, but as there would only be the python-3.6 flavour built by default, you should be able to get away without PYTHON_PKGNAMEPREFIX or PYTHON_PKGNAMESUFFIX.

security/klee/Makefile
18 ↗(On Diff #55645)

You shouldn't depend on one of the convenience meta-ports for pkg dependencies. Those are purely for human usage.

20 ↗(On Diff #55645)

Instead say ...

USES= ... python:3.5+,run ...

(3.5+ because that's both what's currently available in ports and what is generally supported upstream nowadays for python3)

mat added a subscriber: mat.Mar 31 2019, 1:00 PM

There is nothing in USES=python because the python, python2 and python3 are purely for end users convenience, they cannot be used as dependencies. You need to use USES=shebangfix. If the installed files references /usr/local/bin/python3, they should be patched to reference ${PYTHON_CMD}.

mat added a comment.Mar 31 2019, 1:03 PM

Side note, if you add python3 to the dependencies, you your port no longer passes QA checks.

arrowd marked 2 inline comments as done.Apr 3 2019, 5:55 PM
arrowd updated this revision to Diff 55782.

Remove python3 dependency, use python:3.5+.

arrowd updated this revision to Diff 55814.Apr 4 2019, 7:15 PM

Depend on py-tabulate.

This revision is now accepted and ready to land.Apr 5 2019, 5:04 AM
This revision was automatically updated to reflect the committed changes.