Shebangfix Error

Hello, I'm trying to update this port and I got an error of
Code:
====> Running Q/A tests (stage-qa)
Error: '/usr/bin/env python3' is an invalid shebang you need USES=shebangfix for 'libexec/{port}/settings-history.py

I have added the appropriate code to my Makefile, but I am still getting the error. What do you guys think? I could add a patch file, but that is not ideal.
 
Hello, I'm trying to update this port and I got an error of
Code:
====> Running Q/A tests (stage-qa)
Error: '/usr/bin/env python3' is an invalid shebang you need USES=shebangfix for 'libexec/{port}/settings-history.py

I have added the appropriate code to my Makefile, but I am still getting the error. What do you guys think? I could add a patch file, but that is not ideal.
I'm quite confused to answer.
  • For which port? In-tree one? Or your original one?
  • If it's your original one, is it sanely sits in /usr/ports (by default) as category/port style (i.e., if it's intended to be misc/setting-history, exist as /usr/ports/misc/setting-history/Makefile, ...)? Or is it an overlay?
  • If it's a overlay, is it sanely set in /etc/make.conf?
  • In case it's an overlay, how do you build it? Bare-metal make? Bare metal tools something like ports-mgmt/pkg_replace? Or clean room builder something like ports-mgmt/poudriere?
  • If it's an overlay and you're building with poudriere, you need to guard overlay configuration something like below to guard from poudriere and add the overlay as an additional ports tree.
 
I am working on updating the Dovecot port. I added this to the Makefile
Code:
USES=        cpe iconv libtool pkgconfig ssl python:3.0+
USES+=        shebangfix
SHEBANG_FILES=    libexec/dovecot/settings-history.py

I tried including shebangfix in the original USES line with no success.
 
Yeah, you need to fix the source file, not the destination where it ends up. The fix is applied before the 'install' stage, not afterwards.

Code:
USES=        cpe iconv libtool pkgconfig ssl python:3.0+
USES+=        shebangfix
This should be all on one USES line. In alphabetical order.
 
After updating my Makefile
Code:
USES=           cpe iconv libtool pkgconfig python:3.0+ shebangfix ssl
SHEBANG_FILES=  src/lib-settings/settings-history.py

Still getting the error.
 
Looking into Mk/Uses/shebangfix.mk which actually doing the job for USES= shebangfix, you'll also need to add python to USES line.
python is on my uses line.

I even tried SHEBANG_GLOB= *.py with the same result. Trying the command find . -type f -name *.py gives the two python files in the project and that appears to be what shebangfix is running to find them.
 
Back
Top