Bug 229227 - x11-wm/fvwm2: 2.6.8 - fvwm-menu-desktop: bad interpreter
Summary: x11-wm/fvwm2: 2.6.8 - fvwm-menu-desktop: bad interpreter
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 10:44 UTC by ILUXA
Modified: 2018-07-02 15:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
Patch (1.08 KB, patch)
2018-06-26 13:54 UTC, Cy Schubert
no flags Details | Diff
pkg info -aI (48.72 KB, text/plain)
2018-06-27 20:31 UTC, ILUXA
no flags Details
pkg info -ao (33.62 KB, text/plain)
2018-06-27 20:33 UTC, ILUXA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ILUXA 2018-06-22 10:44:28 UTC
/usr/local/bin/fvwm-menu-desktop in new FVWM version (2.6.8) uses "bad interpreter", it uses "#!:" instead of proper "#!/usr/local/bin/python3.6" line, so XDG menu generation isn't working, but after changing it manually it is working fine. I don't know what's causing this.
https://i.imgur.com/rDfi08g.png
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-06-22 11:32:51 UTC
I think #!/usr/local/bin/python without version number.
Comment 2 ILUXA 2018-06-22 11:45:31 UTC
(In reply to w.schwarzenfeld from comment #1)
No, it should be definitely python3, because python2 support was removed in FVWM 2.6.8.
Comment 3 ILUXA 2018-06-22 11:54:01 UTC
(In reply to ILUXA from comment #2)
Moreover, it is good idea to add py36-xdg as FVWM dependency, because FVWM XDG menu generation won't work without this package installed.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2018-06-26 13:54:02 UTC
Created attachment 194648 [details]
Patch

Can you try this?
Comment 5 ILUXA 2018-06-26 20:38:53 UTC
It is working (adds py36-xdg as fvwm dependency),
but the main problem with /usr/local/bin/fvwm-menu-desktop file
still exists, it uses "#!:" as its interpreter.
Maybe it is possible to change it via "post-install"?
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2018-06-27 01:24:19 UTC
Something must be unique about your installation.

slippy$ head /usr/local/bin/fvwm-menu-desktop
#!/usr/local/bin/python3
 
# Modification History

# Changed on 18/03/19 by Jaimos Skriletz:
# - Updated script for and require Python 3.
# - Drop support for Python 2.
# - Added support for xdg.Menu.Separator.
# - Added option --term-cmd to state the terminal emulator command
#   to use with Terminal=True .desktop entries. Default: xterm -e
slippy$ 

Can you provide pkg info -aI and pkg info -ao outputs as attachments, please?
Comment 7 ILUXA 2018-06-27 11:26:58 UTC
After I deleted manually "/usr/local/bin/fvwm-menu-desktop"
and then reinstalled fvwm using your new patch,
interpreter changed to "/usr/local/bin/python3",
so it seems fvwm-menu-desktop will not be reinstalled
if you won't delete in manually,try to move
fvwm2 port with new Makefile to /usr/ports/x11-wm/fvwm2.bak
and then extract current fvwm2 port from ports tree:
# portsnap fetch extract x11-wm/fvwm2
then install it, check that fvwm-menu-desktop interpreter is "#!:"
and after fvwm2.bak port will be reinstalled, fvwm-menu-desktop interpreter
shouldn't be changed and it still should be "#!:"

But even when interpreter is "/usr/local/bin/python3"
the problem still exists, because there is no such file
like "/usr/local/bin/python3" and fvwm-menu-desktop won't work
and keeps saying 
"/usr/local/bin/fvwm-menu-desktop: bad interpreter: /usr/local/bin/python3: no such file or directory"
so interpreter should be python3.6 and not python3,
python3 is in use in GNU/Linux, while FreeBSD python3
executable is python3.6.

Also I tested this on a clean 11.1 virtual machine and I got the same results,
so probably it is not a problem with my installation.
Comment 8 Cy Schubert freebsd_committer freebsd_triage 2018-06-27 19:14:40 UTC
Can you provide pkg info -aI and pkg info -ao outputs as attachments, please?
Comment 9 ILUXA 2018-06-27 20:31:19 UTC
Created attachment 194692 [details]
pkg info -aI
Comment 10 ILUXA 2018-06-27 20:33:03 UTC
Created attachment 194693 [details]
pkg info -ao
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-06-29 21:36:16 UTC
A commit references this bug:

Author: cy
Date: Fri Jun 29 21:36:00 UTC 2018
New revision: 473582
URL: https://svnweb.freebsd.org/changeset/ports/473582

Log:
  fvwm-menu-desktop-config.fpl fails to detect any python3 unless
  $LOCALBASE/bin/python3 is installed. Address the issue.

  PR:		229227

Changes:
  head/x11-wm/fvwm2/Makefile
Comment 12 Cy Schubert freebsd_committer freebsd_triage 2018-06-29 22:31:25 UTC
I managed to reproduce the problem. It depends on $LOCALBASE/bin/python3. Dependency added. Fixed.
Comment 13 ILUXA 2018-07-02 15:44:05 UTC
Yes, now it's working without any issues for me also. Thanks.