From 2c6855f1630f38b2ad2bb8f40e7bb20876a05ee9fd485244802fcb2c0588acf7 Mon Sep 17 00:00:00 2001 From: James Oakley Date: Fri, 31 May 2013 20:55:51 +0000 Subject: [PATCH] - Fix path to uwsgi binary in service file - Install uwsgi.ini - Fix signed/unsigned comparison in emperor_amqp OBS-URL: https://build.opensuse.org/package/show/server:http/uwsgi?expand=0&rev=6 --- ...i-1.9.11-emperor_amqp-fix-comparison.patch | 12 +++++++++ uwsgi-1.9.11-systemd_logger-old_systemd.patch | 9 +++++++ uwsgi.changes | 7 +++++ uwsgi.service | 2 +- uwsgi.spec | 26 ++++++++++++++++++- 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 uwsgi-1.9.11-emperor_amqp-fix-comparison.patch create mode 100644 uwsgi-1.9.11-systemd_logger-old_systemd.patch diff --git a/uwsgi-1.9.11-emperor_amqp-fix-comparison.patch b/uwsgi-1.9.11-emperor_amqp-fix-comparison.patch new file mode 100644 index 0000000..3f03507 --- /dev/null +++ b/uwsgi-1.9.11-emperor_amqp-fix-comparison.patch @@ -0,0 +1,12 @@ +--- a/plugins/emperor_amqp/amqp.c ++++ b/plugins/emperor_amqp/amqp.c +@@ -453,7 +453,8 @@ static int amqp_wait_connection_tune(int + static char *amqp_simple_get_frame(int fd, struct amqp_frame_header *fh) { + + char *ptr = (char *) fh; +- ssize_t len = 0, rlen; ++ size_t len = 0; ++ ssize_t rlen; + + while(len < 7) { + rlen = recv(fd, ptr, 7-len, 0); diff --git a/uwsgi-1.9.11-systemd_logger-old_systemd.patch b/uwsgi-1.9.11-systemd_logger-old_systemd.patch new file mode 100644 index 0000000..270af1d --- /dev/null +++ b/uwsgi-1.9.11-systemd_logger-old_systemd.patch @@ -0,0 +1,9 @@ +--- a/plugins/systemd_logger/systemd_logger.c ++++ b/plugins/systemd_logger/systemd_logger.c +@@ -1,5 +1,6 @@ + #include "../../uwsgi.h" + ++#include + #include + + ssize_t uwsgi_systemd_logger(struct uwsgi_logger *ul, char *message, size_t len) { diff --git a/uwsgi.changes b/uwsgi.changes index aa54f42..671c438 100644 --- a/uwsgi.changes +++ b/uwsgi.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 31 18:52:08 UTC 2013 - jfunk@funktronics.ca + +- Fix path to uwsgi binary in service file +- Install uwsgi.ini +- Fix signed/unsigned comparison in emperor_amqp + ------------------------------------------------------------------- Wed May 29 17:26:24 UTC 2013 - jfunk@funktronics.ca diff --git a/uwsgi.service b/uwsgi.service index 5bbb3f7..aee8f0d 100644 --- a/uwsgi.service +++ b/uwsgi.service @@ -2,7 +2,7 @@ Description=Application Container Server for Networked/Clustered Web Applications [Service] -ExecStart=/usr/bin/uwsgi --autoload --ini /etc/uwsgi/uwsgi.ini +ExecStart=/usr/sbin/uwsgi --autoload --ini /etc/uwsgi/uwsgi.ini Restart=always Type=notify NotifyAccess=all diff --git a/uwsgi.spec b/uwsgi.spec index a21b06e..d30faf8 100644 --- a/uwsgi.spec +++ b/uwsgi.spec @@ -31,11 +31,18 @@ Source4: rails.yml.example Source5: trac.ini.example Source6: werkzeug.xml.example Source7: README.openSUSE +Source8: uwsgi.ini # PATCH-FIX-OPENSUSE uwsgi-1.9.11-plugin_build_path.patch - Don't attempt to install plugins to target dest during build Patch0: uwsgi-1.9.11-plugin_build_path.patch # PATCH-FIX-OPENSUSE uwsgi-1.9.11-no-LD_RUN_PATH.patch - Disable invalid rpath in plugins Patch1: uwsgi-1.9.11-no-LD_RUN_PATH.patch +# PATCH-FIX-UPSTREAM uwsgi-1.9.11-emperor_amqp-fix-comparison.patch - Fix signed/unsigned comparison +Patch2: uwsgi-1.9.11-emperor_amqp-fix-comparison.patch +# PATCH-FIX-OPENSUSE uwsgi-1.9.11-systemd_logger-old_systemd.patch - Older systemd in 12.2 does not implicity include syslog.h +Patch3: uwsgi-1.9.11-systemd_logger-old_systemd.patch +%if 0%{?suse_version} > 1210 BuildRequires: erlang +%endif BuildRequires: gcc-c++ #BuildRequires: go BuildRequires: java-devel @@ -44,13 +51,19 @@ BuildRequires: libGeoIP-devel BuildRequires: libattr-devel BuildRequires: libcap-devel BuildRequires: libcurl-devel +%if 0%{?suse_version} > 1210 BuildRequires: libjansson-devel +%endif #BuildRequires: libmono-2_0-devel BuildRequires: libuuid-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: libyaml-devel +%if 0%{?suse_version} > 1210 BuildRequires: lua51-devel +%else +BuildRequires: lua-devel +%endif #BuildRequires: mono-web BuildRequires: openldap2-devel BuildRequires: openssl-devel @@ -61,7 +74,11 @@ BuildRequires: pkg-config BuildRequires: postgresql-devel BuildRequires: python-devel BuildRequires: python-greenlet-devel +%if 0%{?suse_version} > 1230 +BuildRequires: ruby19-devel +%else BuildRequires: ruby-devel +%endif BuildRequires: sqlite3-devel BuildRequires: systemd-devel BuildRequires: tcpd-devel @@ -150,6 +167,7 @@ This package contains an emperor plugin allowing for configuration of applications (vassals) via ZeroMQ. +%if 0%{?suse_version} > 1210 %package erlang Summary: Erlang Plugin for uWSGI Group: Productivity/Networking/Web/Servers @@ -161,7 +179,7 @@ container server coded in pure C. This package contains support for uWSGI to act as an Erlang C-Node and exchange messages and rpc with Erlang nodes. - +%endif %package geoip Summary: GeoIP Plugin for uWSGI @@ -361,6 +379,8 @@ This package contains support for rendering XML content using XSLT. %setup -q -n uwsgi-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 # Generate a config that builds all plugins except for examples and stuff we # can't satisfy the requirements for or are just broken excluded_plugins="" @@ -425,6 +445,7 @@ install -d -m 0755 %{buildroot}%{_libdir}/uwsgi install -m 0755 *_plugin.so %{buildroot}%{_libdir}/uwsgi install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/uwsgi.service install -d -m 0755 %{buildroot}%{_sysconfdir}/uwsgi/vassals +install -D -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/uwsgi/uwsgi.ini install -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{buildroot}%{_sysconfdir}/uwsgi/vassals 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 @@ -450,6 +471,7 @@ install -D plugins/jvm/uwsgi.jar %{buildroot}%{_javadir}/uwsgi.jar %doc CONTRIBUTORS LICENSE README uwsgi_API.txt contrib examples README.openSUSE %{_sbindir}/uwsgi %dir %{_sysconfdir}/uwsgi/ +%config %{_sysconfdir}/uwsgi/uwsgi.ini %dir %{_sysconfdir}/uwsgi/vassals %{_sysconfdir}/uwsgi/vassals/* %dir %{_libdir}/uwsgi @@ -520,9 +542,11 @@ install -D plugins/jvm/uwsgi.jar %{buildroot}%{_javadir}/uwsgi.jar %defattr(-,root,root,-) %{_libdir}/uwsgi/emperor_zeromq_plugin.so +%if 0%{?suse_version} > 1210 %files erlang %defattr(-,root,root,-) %{_libdir}/uwsgi/erlang_plugin.so +%endif %files geoip %defattr(-,root,root,-)