Bug 224198 - www/uwsgi Using the python 3.6 flavor (uwsgi-py36) breaks the rc.d script
Summary: www/uwsgi Using the python 3.6 flavor (uwsgi-py36) breaks the rc.d script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 09:36 UTC by Christian Sturm
Modified: 2017-12-24 06:50 UTC (History)
3 users (show)

See Also:


Attachments
uwsgi.diff (905 bytes, patch)
2017-12-09 11:30 UTC, Tobias Kortkamp
tobik: maintainer-approval? (eugene)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Sturm 2017-12-09 09:36:34 UTC
When installing uwsgi using the uwsgi-py36 package, no /usr/local/bin/uwsgi will exist. Instead using that package (created as FLAVOR of uwsgi) will only install /usr/local/bin/uwsgi-3.6.

Since this doesn't match the command parameter in the rc.d script using it will fail. There is no /usr/local/bin/uwsgi.

A fix would be dynamically setting the command in the rc.d script based on the actual path of the uwsgi binary.
Comment 1 Christian Sturm 2017-12-09 10:03:32 UTC
For better explanation here the mismatch between the binary and the command in the rc script:

# pkg info -l uwsgi-py36
uwsgi-py36-2.0.15_2:
        /usr/local/bin/uwsgi-3.6
        /usr/local/etc/rc.d/uwsgi
        /usr/local/lib/python3.6/site-packages/uwsgidecorators.py
        /usr/local/share/licenses/uwsgi-py36-2.0.15_2/GPLv2
        /usr/local/share/licenses/uwsgi-py36-2.0.15_2/LICENSE
        /usr/local/share/licenses/uwsgi-py36-2.0.15_2/catalog.mk

# grep command= /usr/local/etc/rc.d/uwsgi
command=/usr/local/bin/uwsgi
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2017-12-09 11:30:02 UTC
Created attachment 188645 [details]
uwsgi.diff

Here's a quick fix.  You still can't install both uwsgi and uwsgi-py36
side by side because they conflict on etc/rc.d/uwsgi, but at least it
can be started.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-12-24 06:47:07 UTC
A commit references this bug:

Author: tobik
Date: Sun Dec 24 06:46:49 UTC 2017
New revision: 457125
URL: https://svnweb.freebsd.org/changeset/ports/457125

Log:
  www/uwsgi: Fix rc.d script when using the uwsgi-py3* packages

  PR:		224198
  Submitted by:	Christian Sturm <reezer@reezer.org>
  Approved by:	eugene@zhegan.in (maintainer timeout, 2 weeks)

Changes:
  head/www/uwsgi/Makefile
  head/www/uwsgi/files/uwsgi.in