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
@ -430,7 +432,6 @@ 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
@ -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=""