www/jetty8 comes with a control script (/usr/local/sbin/jettyctl) written in python.
The package Makefile does not seem to depend on a specific version of python,
but said control script makes use of python2 syntax.
When trying to start jetty, I get:
File "/usr/local/sbin/jettyctl", line 83
executable = stat.S_IMODE(finfo) & 0111
SyntaxError: invalid token
/usr/local/etc/rc.d/jetty: WARNING: failed to start jetty
I do not know much python, but in python3 leading zeros are no longer accepted, so I guess an octal bitmask for file permissions would need to be written as 0o0111.
However, while doing so will fix the particular error message, the script still does not work.
Upstream, there is a shell script for starting and stopping jetty. Maybe that would be a better approach? If, as may well be, this control script is the only reason why jetty needs to pull in python as a dependency, using a shell script instead sounds like a reasonable thing to do?
*** Bug 242015 has been marked as a duplicate of this bug. ***
- Is jettyctl FreeBSD authored/provided, or upstream provided?
- Does upstream claim/document support for Python 3?
- Can we find references that say only Python 2.x is currently supported?
- Are there any upstream bug reports, PR's or commits that add Python 3 support?
(In reply to Kubilay Kocak from comment #2)
jettyctl is provided by the FreeBSD package as www/jetty8/files/jettyctl.in.
I could not find any reference to jettyctl in the upstream tarball:
(nor does the tarball contain the string 'python' anywhere :D)
Indeed, jetty9 no longer has a python based script in FreeBSD either, but patches the upstream-provided jetty.sh.
I will try to adapt that and see if I can come up with a patch to the package to make it work the same way as jetty9.
Created attachment 209203 [details]
proposed patch: use the upstream start/stop script
I am unsure if there are other things in the Makefile that should be adjusted,
but with this patch, jetty8 will use the upstream start/stop script.
poudriere testport worked without problems (tested on a 12.1-RELEASE jail), as did starting and stopping jetty.