Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#43066 - [uwsgi] cgi_plugin.so should be included

Attached to Project: Community Packages
Opened by David Runge (dvzrv) - Wednesday, 10 December 2014, 11:20 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 11 December 2014, 08:16 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Daniel Wallace (gtmanfred)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: According to https://uwsgi-docs.readthedocs.org/en/latest/CGI.html there is a CGI plugin included.
Is there any reason this is not automatically generated alongside the others? It is needed!


I fixed the PKGBUILD, etc. of the current uwsgi package in community to do that:

archlinux.ini
[uwsgi]
plugin_dir = /usr/lib/uwsgi
plugins = rack, rbthreads, fiber, psgi, lua, php, jvm, mono, cgi
main_plugin = systemd_logger,pam
inherit = base

PKGBUILD

# $Id: PKGBUILD 123605 2014-12-07 22:18:10Z svenstaro $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Valentin Hăloiu <vially.ichb+aur@gmail.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Kevin Zuber <uKev@knet.eu>
# Contributor: Vsevolod Balashov <vsevolod@balashov.name>

pkgbase=uwsgi
pkgname=(uwsgi
uwsgi-plugin-rack
uwsgi-plugin-psgi
uwsgi-plugin-cgi
uwsgi-plugin-python2
uwsgi-plugin-python
uwsgi-plugin-pypy
uwsgi-plugin-php
uwsgi-plugin-lua51
uwsgi-plugin-jvm
uwsgi-plugin-mono)
pkgver=2.0.8
pkgrel=2
arch=(i686 x86_64)
url="http://projects.unbit.it/$pkgbase"
license=(GPL2)
backup=('etc/uwsgi/emperor.ini')
conflicts=(python-$pkgbase)
makedepends=(gcc python python2 ruby python2-greenlet python-greenlet php-embed curl libxml2 libyaml
perl lua51 pcre libedit openssl bzip2 gmp pam java-environment=7
jansson classpath pypy mono python2-gevent)
source=(http://projects.unbit.it/downloads/$pkgbase-$pkgver.tar.gz
archlinux.ini
tmpfilesd
uwsgi_at.service
uwsgi_at.socket
uwsgi_fix_rpath.patch
uwsgi_ruby20_compatibility.patch
uwsgi_trick_chroot.patch
emperor.ini
emperor.uwsgi.service
emperor.uwsgi.socket)

md5sums=('356b71060aa4c1f0e888dbca03567bd5'
'30d101f1190ef83b4cc79a2cc079be7e'
'752475ee32286acfbafa49b898616817'
'4ec6c345df2f9b881f0a6b6c0c95eb1b'
'ea381549fe65a5d72fa1abb5ceb7d3ef'
'1a4516d5cdcf5b95b036f4eae2d0c152'
'4d09535ce379c8acd76160f35d5d6b55'
'0c09a52fdb88f08c36a8b380f451ce6d'
'5fa14ddea9a3dae17b5be28468d47b80'
'd6b323f136dbdeeee185c793c004df3c'
'3ab4486e02f5c217566fb6c8d469c246')

prepare(){
cd $srcdir/$pkgbase-$pkgver
cp $srcdir/archlinux.ini buildconf/archlinux.ini
#sed -i 's/LIBS .*-lphp5.*/LIBS = []/' plugins/php/uwsgiplugin.py
for patch in uwsgi_fix_rpath.patch uwsgi_ruby20_compatibility.patch uwsgi_trick_chroot.patch; do
patch -Np1 -i $srcdir/$patch
done
rm -rf plugins/ruby
mv plugins/ruby{19,}
sed -i 's:\(ruby\)19:\1:' plugins/ruby/uwsgiplugin.py

}
build() {
pushd $srcdir/$pkgbase-$pkgver

python uwsgiconfig.py --build archlinux
python uwsgiconfig.py --plugin plugins/python archlinux python
python uwsgiconfig.py --plugin plugins/greenlet archlinux greenlet
python2 uwsgiconfig.py --plugin plugins/python archlinux python2
python2 uwsgiconfig.py --plugin plugins/greenlet archlinux greenlet2
python2 uwsgiconfig.py --plugin plugins/gevent archlinux gevent2
python2 uwsgiconfig.py --plugin plugins/pypy archlinux pypy
python2 uwsgiconfig.py --plugin plugins/cgi archlinux cgi
}

package_uwsgi() {
pkgdesc="A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C"
depends=(python2 libxml2 jansson libyaml systemd)
install=uwsgi.install
cd $srcdir/$pkgbase-$pkgver
install -Dm755 uwsgi $pkgdir/usr/bin/uwsgi
install -Dm644 $srcdir/uwsgi_at.service $pkgdir/usr/lib/systemd/system/uwsgi@.service
install -Dm644 $srcdir/uwsgi_at.socket $pkgdir/usr/lib/systemd/system/uwsgi@.socket
install -Dm644 $srcdir/emperor.uwsgi.service $pkgdir/usr/lib/systemd/system/emperor.uwsgi.service
install -Dm644 $srcdir/emperor.uwsgi.socket $pkgdir/usr/lib/systemd/system/emperor.uwsgi.socket
install -Dm644 $srcdir/emperor.ini $pkgdir/etc/uwsgi/emperor.ini
install -Dm644 $srcdir/tmpfilesd $pkgdir/usr/lib/tmpfiles.d/uwsgi.conf
}

package_uwsgi-plugin-cgi() {
depends=(uwsgi)
pkgdesc="CGI plugin"
install -Dm755 $pkgbase-$pkgver/cgi_plugin.so $pkgdir/usr/lib/uwsgi/cgi_plugin.so
}

package_uwsgi-plugin-rack() {
depends=(uwsgi ruby)
pkgdesc="Ruby rack plugin"
install -Dm755 $pkgbase-$pkgver/rack_plugin.so $pkgdir/usr/lib/uwsgi/rack_plugin.so
install -Dm755 $pkgbase-$pkgver/fiber_plugin.so $pkgdir/usr/lib/uwsgi/fiber_plugin.so
install -Dm755 $pkgbase-$pkgver/rbthreads_plugin.so $pkgdir/usr/lib/uwsgi/rbthreads_plugin.so
}

package_uwsgi-plugin-psgi() {
depends=(uwsgi perl)
pkgdesc="Perl psgi plugin"
install -Dm755 $pkgbase-$pkgver/psgi_plugin.so $pkgdir/usr/lib/uwsgi/psgi_plugin.so
}

package_uwsgi-plugin-python2() {
depends=(uwsgi python2-gevent python2-greenlet)
pkgdesc="Plugin for Python2 support"
install -Dm755 $pkgbase-$pkgver/python2_plugin.so $pkgdir/usr/lib/uwsgi/python2_plugin.so
install -Dm755 $pkgbase-$pkgver/greenlet2_plugin.so $pkgdir/usr/lib/uwsgi/greenlet2_plugin.so
install -Dm755 $pkgbase-$pkgver/gevent2_plugin.so $pkgdir/usr/lib/uwsgi/gevent2_plugin.so
install -Dm644 $pkgbase-$pkgver/uwsgidecorators.py $pkgdir/usr/lib/python2.7/site-packages/uwsgidecorators.py
python2 -m compileall $pkgdir/usr/lib/python2.7/site-packages/
python2 -O -m compileall $pkgdir/usr/lib/python2.7/site-packages/
}

package_uwsgi-plugin-python() {
depends=(uwsgi python python-greenlet)
pkgdesc="Plugin for Python support"
install -Dm755 $pkgbase-$pkgver/python_plugin.so $pkgdir/usr/lib/uwsgi/python_plugin.so
install -Dm755 $pkgbase-$pkgver/greenlet_plugin.so $pkgdir/usr/lib/uwsgi/greenlet_plugin.so
install -Dm644 $pkgbase-$pkgver/uwsgidecorators.py $pkgdir/usr/lib/python3.4/site-packages/uwsgidecorators.py
python -m compileall $pkgdir/usr/lib/python3.4/site-packages/
python -O -m compileall $pkgdir/usr/lib/python3.4/site-packages/
}

package_uwsgi-plugin-pypy() {
depends=(uwsgi pypy)
pkgdesc="Plugin for PyPy support"
install -Dm755 $pkgbase-$pkgver/pypy_plugin.so $pkgdir/usr/lib/uwsgi/pypy_plugin.so
install -Dm644 $pkgbase-$pkgver/uwsgidecorators.py $pkgdir/opt/pypy/site-packages/uwsgidecorators.py
pypy -m compileall $pkgdir/opt/pypy/site-packages/
pypy -O -m compileall $pkgdir/opt/pypy/site-packages/
}

package_uwsgi-plugin-lua51() {
depends=(uwsgi lua51)
pkgdesc="Plugin for Lua support"
install -Dm755 $pkgbase-$pkgver/lua_plugin.so $pkgdir/usr/lib/uwsgi/lua_plugin.so
}

package_uwsgi-plugin-php() {
depends=(uwsgi php-embed libyaml jansson)
pkgdesc="Plugin for PHP support"
install -Dm755 $pkgbase-$pkgver/php_plugin.so $pkgdir/usr/lib/uwsgi/php_plugin.so
}

package_uwsgi-plugin-jvm() {
depends=(uwsgi java-environment=7 classpath)
pkgdesc="Plugin for Jvm support"
install -Dm644 $pkgbase-$pkgver/plugins/jvm/uwsgi.jar $pkgdir/usr/share/java/uwsgi.jar
install -Dm755 $pkgbase-$pkgver/jvm_plugin.so $pkgdir/usr/lib/uwsgi/jvm_plugin.so
}

package_uwsgi-plugin-mono() {
depends=(uwsgi mono)
pkgdesc="Plugin for mono support"
install -Dm755 $pkgbase-$pkgver/plugins/mono/uwsgi.dll $pkgdir/usr/lib/mono/2.0/uwsgi.dll
install -Dm755 $pkgbase-$pkgver/mono_plugin.so $pkgdir/usr/lib/uwsgi/mono_plugin.so
}

This should smoothly auto-generate uwsgi-plugin-cgi, too, so you can run CGI stuff with uwsgi, too. One application would be cgit for example.

Steps to reproduce:
Try to install uwsgi-plugin-cgi (there's none)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 11 December 2014, 08:16 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 10 December 2014, 17:32 GMT
Please attach a patch for that.
Comment by David Runge (dvzrv) - Wednesday, 10 December 2014, 18:01 GMT
lol, sorry for the clutter.
Got you diffs of archlinux.ini and PKGBUILD in attachment. It's basically just adding a function and building the plugin.

Loading...