Accepting request 135583 from server:http

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/135583
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/uwsgi?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2012-09-25 09:08:15 +00:00 committed by Git OBS Bridge
commit 228ab15eb6
4 changed files with 148 additions and 93 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 11 22:13:54 UTC 2012 - jfunk@funktronics.ca
- Install uwsgidecorators module for Python plugin
- Create sysconfig file for adding uwsgi options
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 9 19:11:43 UTC 2012 - jfunk@funktronics.ca Sun Sep 9 19:11:43 UTC 2012 - jfunk@funktronics.ca

View File

@ -27,7 +27,17 @@ test -x $UWSGI_BIN || { echo "$UWSGI_BIN not installed";
if [ "$1" = "stop" ]; then exit 0; if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; } else exit 5; fi; }
UWSGI_VASSALS=/etc/uwsgi/vassals UWSGI_CONFIG=/etc/sysconfig/uwsgi
test -r $UWSGI_CONFIG || { echo "$UWSGI_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
. $UWSGI_CONFIG
UWSGI_OPTIONS="$UWSGI_OPTIONS --autoload"
if [ "$UWSGI_EMPEROR_MODE" = "true" ] ; then
UWSGI_OPTIONS="$UWSGI_OPTIONS --emperor $UWSGI_VASSALS"
fi
. /etc/rc.status . /etc/rc.status
@ -36,7 +46,7 @@ rc_reset
case "$1" in case "$1" in
start) start)
echo -n "Starting uWSGI " echo -n "Starting uWSGI "
/sbin/startproc $UWSGI_BIN --autoload --emperor $UWSGI_VASSALS /sbin/startproc $UWSGI_BIN $UWSGI_OPTIONS
rc_status -v rc_status -v
;; ;;
stop) stop)

View File

@ -13,15 +13,16 @@
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: uwsgi Name: uwsgi
Version: 1.2.6 Version: 1.2.6
Release: 0 Release: 0
License: GPL-2.0+
Summary: Application Container Server for Networked/Clustered Web Applications Summary: Application Container Server for Networked/Clustered Web Applications
Url: http://projects.unbit.it/uwsgi/wiki License: GPL-2.0+
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Url: http://projects.unbit.it/uwsgi/wiki
Source: http://projects.unbit.it/downloads/uwsgi-%{version}.tar.gz Source: http://projects.unbit.it/downloads/uwsgi-%{version}.tar.gz
Source1: opensuse.ini.in Source1: opensuse.ini.in
Source2: uwsgi.init Source2: uwsgi.init
@ -30,6 +31,7 @@ Source4: rails.yml.example
Source5: trac.ini.example Source5: trac.ini.example
Source6: werkzeug.xml.example Source6: werkzeug.xml.example
Source7: README.openSUSE Source7: README.openSUSE
Source8: uwsgi.sysconfig
# PATCH-FIX-OPENSUSE uwsgi-1.2.6-plugin_build_path.patch - Don't attempt to install plugins to target dest during build # PATCH-FIX-OPENSUSE uwsgi-1.2.6-plugin_build_path.patch - Don't attempt to install plugins to target dest during build
Patch0: uwsgi-1.2.6-plugin_build_path.patch Patch0: uwsgi-1.2.6-plugin_build_path.patch
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -40,8 +42,8 @@ BuildRequires: postgresql-devel
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: ruby-devel BuildRequires: ruby-devel
%if 0%{?suse_version} && 0%{?suse_version} > 1210 %if 0%{?suse_version} && 0%{?suse_version} > 1210
BuildRequires: lua51-devel
BuildRequires: erlang BuildRequires: erlang
BuildRequires: lua51-devel
%else %else
BuildRequires: lua-devel BuildRequires: lua-devel
%endif %endif
@ -80,9 +82,9 @@ different technology on top of the same core.
%package carbon %package carbon
Summary: Carbon Plugin for Graphite Integration for uWSGI Summary: Carbon Plugin for Graphite Integration for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description carbon %description carbon
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -95,9 +97,9 @@ See http://projects.unbit.it/uwsgi/wiki/Carbon for more info.
%package cgi %package cgi
Summary: CGI Plugin for uWSGI Summary: CGI Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description cgi %description cgi
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -109,9 +111,9 @@ See http://projects.unbit.it/uwsgi/wiki/CGI for more info.
%package fastrouter %package fastrouter
Summary: Fastrouter Plugin for uWSGI Summary: Fastrouter Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description fastrouter %description fastrouter
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -124,10 +126,10 @@ See http://projects.unbit.it/uwsgi/wiki/FastRouter for more info.
%package gevent %package gevent
Summary: Gevent Plugin for uWSGI Summary: Gevent Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
%description gevent %description gevent
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -140,9 +142,9 @@ See http://projects.unbit.it/uwsgi/wiki/Gevent for more info.
%package graylog2 %package graylog2
Summary: Graylog2 Plugin for uWSGI Summary: Graylog2 Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description graylog2 %description graylog2
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -152,9 +154,9 @@ This package contains support for logging to Graylog2 log servers.
%package http %package http
Summary: HTTP Plugin for uWSGI Summary: HTTP Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description http %description http
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -166,9 +168,9 @@ See http://projects.unbit.it/uwsgi/wiki/HTTPserver for more info.
%package jvm %package jvm
Summary: JVM Plugin for uWSGI Summary: JVM Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description jvm %description jvm
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -180,10 +182,10 @@ See http://projects.unbit.it/uwsgi/wiki/JVM for more info.
%package jwsgi %package jwsgi
Summary: Java WSGI Plugin for uWSGI Summary: Java WSGI Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-jvm = %{version} Requires: %{name}-jvm = %{version}
%description jwsgi %description jwsgi
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -195,9 +197,9 @@ See http://projects.unbit.it/uwsgi/wiki/jwsgi for more info.
%package logsocket %package logsocket
Summary: Socket Logging Plugin for uWSGI Summary: Socket Logging Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description logsocket %description logsocket
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -209,9 +211,9 @@ See http://projects.unbit.it/uwsgi/wiki/SocketLogging for more info.
%package lua %package lua
Summary: Lua Plugin for uWSGI Summary: Lua Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description lua %description lua
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -223,9 +225,9 @@ See http://projects.unbit.it/uwsgi/wiki/Lua for more info.
%package nagios %package nagios
Summary: Nagios Plugin for uWSGI Summary: Nagios Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description nagios %description nagios
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -237,9 +239,9 @@ See http://projects.unbit.it/uwsgi/wiki/Nagios for more info.
%package pam %package pam
Summary: PAM Plugin for uWSGI Summary: PAM Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description pam %description pam
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -249,9 +251,9 @@ This package contains support for PAM authentication.
%package probepg %package probepg
Summary: PostgreSQL Probe Plugin for uWSGI Summary: PostgreSQL Probe Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description probepg %description probepg
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -261,9 +263,9 @@ This package contains support for probing PostgreSQL servers.
%package psgi %package psgi
Summary: PSGI Plugin for uWSGI Summary: PSGI Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description psgi %description psgi
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -276,9 +278,9 @@ See http://projects.unbit.it/uwsgi/wiki/PSGI for more info.
%package python %package python
Summary: Python Plugin for uWSGI Summary: Python Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description python %description python
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -290,9 +292,9 @@ See http://projects.unbit.it/uwsgi/wiki/Quickstart for more info.
%package ruby %package ruby
Summary: Ruby Plugin for uWSGI Summary: Ruby Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description ruby %description ruby
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -304,9 +306,9 @@ See http://projects.unbit.it/uwsgi/wiki/Rack for more info.
%package redislog %package redislog
Summary: Redis Logging Plugin for uWSGI Summary: Redis Logging Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description redislog %description redislog
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -316,9 +318,9 @@ This package contains support for logging to a Redis server.
%package rrdtool %package rrdtool
Summary: RRDTool Plugin for uWSGI Summary: RRDTool Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description rrdtool %description rrdtool
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -328,9 +330,9 @@ This package contains support for saving statistics in RRD bastabase files.
%package rsyslog %package rsyslog
Summary: Rsyslog Plugin for uWSGI Summary: Rsyslog Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description rsyslog %description rsyslog
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -340,9 +342,9 @@ This package contains support for logging to Rsyslog servers.
%package syslog %package syslog
Summary: Syslog Plugin for uWSGI Summary: Syslog Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description syslog %description syslog
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -352,10 +354,10 @@ This package contains support for logging to syslog servers.
%package ugreen %package ugreen
Summary: Green Threads Plugin for uWSGI Summary: Green Threads Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
%description ugreen %description ugreen
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -367,9 +369,9 @@ See http://projects.unbit.it/uwsgi/wiki/uGreen for more info.
%package zergpool %package zergpool
Summary: Zerg Mode Plugin for uWSGI Summary: Zerg Mode Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description zergpool %description zergpool
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -383,10 +385,10 @@ See http://projects.unbit.it/uwsgi/wiki/ZergMode for more info.
%if 0%{?suse_version} && 0%{?suse_version} > 1210 %if 0%{?suse_version} && 0%{?suse_version} > 1210
%package fiber %package fiber
Summary: Ruby Fibers Plugin for uWSGI Summary: Ruby Fibers Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-ruby = %{version} Requires: %{name}-ruby = %{version}
%description fiber %description fiber
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -399,9 +401,9 @@ See http://projects.unbit.it/uwsgi/wiki/FiberLoop for more info.
%package erlang %package erlang
Summary: Erlang Plugin for uWSGI Summary: Erlang Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
%description erlang %description erlang
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -414,11 +416,11 @@ See http://projects.unbit.it/uwsgi/wiki/ErlangIntegration for more info.
%package pyerl %package pyerl
Summary: Python-Erlang Plugin for uWSGI Summary: Python-Erlang Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-erlang = %{version} Requires: %{name}-erlang = %{version}
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
%description pyerl %description pyerl
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -430,13 +432,12 @@ Python applications.
See http://projects.unbit.it/uwsgi/wiki/ErlangIntegration for more info. See http://projects.unbit.it/uwsgi/wiki/ErlangIntegration for more info.
%endif %endif
%if 0%{?suse_version} && 0%{?suse_version} > 1140 %if 0%{?suse_version} && 0%{?suse_version} > 1140
%package greenlet %package greenlet
Summary: Greenlet Plugin for uWSGI Summary: Greenlet Plugin for uWSGI
Group: Productivity/Networking/Web/Servers Group: Productivity/Networking/Web/Servers
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: %{name}-python = %{version} Requires: %{name}-python = %{version}
%description greenlet %description greenlet
uWSGI is a fast, self-healing and developer/sysadmin-friendly application uWSGI is a fast, self-healing and developer/sysadmin-friendly application
@ -448,7 +449,6 @@ framework.
See http://projects.unbit.it/uwsgi/wiki/AsyncSupport for more info. See http://projects.unbit.it/uwsgi/wiki/AsyncSupport for more info.
%endif %endif
%prep %prep
%setup -q -n uwsgi-%{version} %setup -q -n uwsgi-%{version}
%patch0 -p1 %patch0 -p1
@ -483,6 +483,9 @@ install -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{buildroot}%{_sysco
install -m 0644 vassals/broodlord.ini %{buildroot}%{_sysconfdir}/uwsgi/vassals/broodlord.ini.example install -m 0644 vassals/broodlord.ini %{buildroot}%{_sysconfdir}/uwsgi/vassals/broodlord.ini.example
install -m 0644 vassals/cc.ini %{buildroot}%{_sysconfdir}/uwsgi/vassals/cc.ini.example install -m 0644 vassals/cc.ini %{buildroot}%{_sysconfdir}/uwsgi/vassals/cc.ini.example
install -m 0644 vassals/multi.xml %{buildroot}%{_sysconfdir}/uwsgi/vassals/multi.xml.example install -m 0644 vassals/multi.xml %{buildroot}%{_sysconfdir}/uwsgi/vassals/multi.xml.example
install -D -m 0644 uwsgidecorators.py %{buildroot}%{python_sitelib}/uwsgidecorators.py
%py_compile %{buildroot}%{python_sitelib}
install -D -m 0644 %{SOURCE8} %{buildroot}/%{_var}/adm/fillup-templates/sysconfig.uwsgi
%post %post
%fillup_and_insserv uwsgi %fillup_and_insserv uwsgi
@ -517,6 +520,7 @@ install -m 0644 vassals/multi.xml %{buildroot}%{_sysconfdir}/uwsgi/vassals/multi
%{_libdir}/uwsgi/signal_plugin.so %{_libdir}/uwsgi/signal_plugin.so
%{_libdir}/uwsgi/spooler_plugin.so %{_libdir}/uwsgi/spooler_plugin.so
%{_libdir}/uwsgi/symcall_plugin.so %{_libdir}/uwsgi/symcall_plugin.so
%{_var}/adm/fillup-templates/sysconfig.uwsgi
%files carbon %files carbon
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -577,6 +581,7 @@ install -m 0644 vassals/multi.xml %{buildroot}%{_sysconfdir}/uwsgi/vassals/multi
%files python %files python
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/uwsgi/python_plugin.so %{_libdir}/uwsgi/python_plugin.so
%{python_sitelib}/uwsgidecorators.py*
%files ruby %files ruby
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -629,5 +634,4 @@ install -m 0644 vassals/multi.xml %{buildroot}%{_sysconfdir}/uwsgi/vassals/multi
%{_libdir}/uwsgi/greenlet_plugin.so %{_libdir}/uwsgi/greenlet_plugin.so
%endif %endif
%changelog %changelog

35
uwsgi.sysconfig Normal file
View File

@ -0,0 +1,35 @@
## Path: Network/WWW/uWSGI
## Description: Run uWSGI in Emperor Mode
## Type: boolean
## Default: true
#
# uWSGI emperor mode is a method of running many different applications
# (vassals) in individual uWSGI processes, managed by a single master (emperor)
# process. It is recommended in most cases.
#
UWSGI_EMPEROR_MODE=true
## Path: Network/WWW/uWSGI
## Description: uWSGI Vassals Directory
## Type: string
## Default: /etc/uwsgi/vassals
#
# When uWSGI is running in emperor mode, this is the directory where individual
# application configurations (vassals) are found. Configuration files can be in
# xml, ini, yaml, and json format. Vassals are started automatically when a
# file is placed in this directory and restarted if a file is changed.
#
UWSGI_VASSALS="/etc/uwsgi/vassals/"
## Path: Network/WWW/uWSGI
## Description: Additional uWSGI Options
## Type: string
## Default: ""
#
# Specify additional uWSGI options here. This is normally unnecessary since
# options can be specified in per-application configuration files when running
# in emperor mode. However, if emperor mode is disabled, this option will be
# necessary. If emperor mode is enabled, these options are specified in
# addition to the emperor mode settings.
#
UWSGI_OPTIONS=""