Bug 197492 - www/uwsgi: port doesn't build any of uwsgi's plugins
Summary: www/uwsgi: port doesn't build any of uwsgi's plugins
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-09 16:42 UTC by Eli Gwynn
Modified: 2019-11-17 22:09 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eli Gwynn 2015-02-09 16:42:18 UTC
There is a `plugins` folder in the uwsgi source folder, which its included Makefile references. Its contents doesn't get built properly by the port, and there are no options for including them.

Personally, I was most interested in building its `cgi` plugin. I've found that uwsgi offers a much nicer configuration/debugging experience than `fcgiwrap` and so was exploring using it in its place. My workaround is to build the port with

> make UWSGI_EMBED_PLUGINS=cgi

and then use `cgi-mode` instead of `plugins=cgi` in my uwsgi ini file.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-02-09 16:42:18 UTC
Auto-assigned to maintainer demon@FreeBSD.org
Comment 2 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-08-03 10:37:20 UTC
Instead of embedding specific plugins, or creating ~120 uwsgi-plugin-<foo> ports right away, I would much rather go with a port uwsgi-plugins that has an option for using the different build configurations specified in ${WRKSRC}/buildconf/*.ini.

Most of them seem to inherit from base - which is what www/uwsgi is built off at the moment - and the cgi.ini one looks much like the one Eli Gwynn could want.
Comment 3 Kevin Bowling freebsd_committer freebsd_triage 2015-10-25 09:19:19 UTC
In the short term, can we simply add "cgi = true" to files/patch-buildconf-base.ini?  There are no new deps and I suspect it is a wanted default feature by many ports users.
Comment 4 Kevin Bowling freebsd_committer freebsd_triage 2015-10-25 09:45:31 UTC
I edited the port Makefile with:
MAKE_ARGS=      UWSGI_EMBED_PLUGINS=cgi

It does what I need for now, and respects the ports patches to base.ini.
Comment 5 Dmitry Sivachenko freebsd_committer freebsd_triage 2015-10-25 12:17:46 UTC
I enabled cgi plugin by default.
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-10-25 12:17:56 UTC
A commit references this bug:

Author: demon
Date: Sun Oct 25 12:17:28 UTC 2015
New revision: 400149
URL: https://svnweb.freebsd.org/changeset/ports/400149

Log:
  Build cgi plugin by default.

  PR:		197492
  Requested by:	kevin.bowling@kev009.com

Changes:
  head/www/uwsgi/Makefile
Comment 7 Kevin Bowling freebsd_committer freebsd_triage 2016-01-01 01:50:25 UTC
For some reason cgi no longer works in 2.0.12.  I had to move UWSGI_EMBED_PLUGINS=cgi to MAKE_ENV rather than MAKE_ARGS.
Comment 8 Dmitry Sivachenko freebsd_committer freebsd_triage 2016-01-02 09:59:54 UTC
I moved it to MAKE_ENV, can you please test if it does work as expected?
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-01-02 10:00:35 UTC
A commit references this bug:

Author: demon
Date: Sat Jan  2 09:59:35 UTC 2016
New revision: 405059
URL: https://svnweb.freebsd.org/changeset/ports/405059

Log:
  Move UWSGI_EMBED_PLUGINS assignment to MAKE_ENV as submitter reports it
  does not works anymore is defined in MAKE_ARGS.

  PR:		197492
  Submitted by:	kevin.bowling@kev009.com

Changes:
  head/www/uwsgi/Makefile
Comment 10 Kevin Bowling freebsd_committer freebsd_triage 2016-01-02 23:20:55 UTC
(In reply to Dmitry Sivachenko from comment #8)
Yes, working as intended again thanks!
Comment 11 emz 2016-03-30 05:11:14 UTC
Stepped onto same issue. At this time www/uwsgi port is pretty much useless and clueless, unless python is all you need. In the same time there's an alternative port on GitHub, https://github.com/thomaslegg/uwsgi-stable-modular-port , which does contain all of the needed modules (at least for me, including python) and has ports options for them. I tested it - it works as intended, furthermore I'm using it.

My opinion - it should be committed in the ports tree instead of the current one.
Comment 12 Dmitry Sivachenko freebsd_committer freebsd_triage 2016-04-04 09:09:10 UTC
(In reply to emz from comment #11)

Right now, in buildconf/base.ini there are a number of embedded_plugins which are included into uwsgi in current configuration.

uwsgi-modular port you are referring to uses bulidconf/modular.ini, which redefines embedded_plugins to null, so only plugins explicitly listed in Makefile are built.

So I do not understand why in current shape the port is "pretty much useless": if you are missing a particular plugin which required external library as a dependency, we can add it using OPTIONS framework.  If it does not (like CGI), we can just compile it in unconditionally and that's it.

As far as I can see it it's current shape uwsgi-modular provides much less plugins.

May be I am missing something?
Comment 13 emz 2016-07-11 17:41:21 UTC
Port doesn't supply neither any informwation on installed plugins, nor any pkg-message on how to obtain them. CGI plugin doesn't work. Generic documentation doesn't operate any "embedded plugins". I am using FreeBSD in production for 16 years, but I'm not familiar with any "buildconf.ini" files, - it's like I'm in some god forsaken Ubuntu, or in Solaris, trying to build from sources. No port config either.

At this moment this port structure and supplied plugins are evident and obvious only to it's author.

I was kinda up for giving the port a second chance, but after serious consideration it still does look like a black box.

I'm off to github one, at least it's more similar to the thing the FreeBSD port should look like.
Comment 14 Dan Langille freebsd_committer freebsd_triage 2019-11-17 18:15:03 UTC
Three years later, I hit the same problem.

No Python plugin.
Comment 15 Dan Langille freebsd_committer freebsd_triage 2019-11-17 19:37:42 UTC
I have a proof of concept.  Code review at https://reviews.freebsd.org/D22435

$ pkg info -l uwsgi
uwsgi-2.0.16_4:
	/usr/local/bin/uwsgi
	/usr/local/bin/uwsgi-3.6
	/usr/local/etc/rc.d/uwsgi
	/usr/local/lib/python3.6/site-packages/python_plugin.so
	/usr/local/lib/python3.6/site-packages/uwsgidecorators.py

My clue came from https://marc.info/?l=uwsgi&m=146811498626046&w=2

We might want to use a plugins directory.