package created using the webbuild interface [release 2.0.19.1-1mamba;Sat Sep 18 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 18:53:24 +01:00
parent 2f16cdeadc
commit 759b5cd875
11 changed files with 335 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# uwsgi
A full stack for building hosting services.

2
emperor.ini Normal file
View File

@ -0,0 +1,2 @@
[uwsgi]
emperor = /etc/uwsgi/vassals

15
emperor.uwsgi.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=uWSGI Emperor
After=syslog.target
[Service]
ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi/emperor.ini
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -INT $MAINPID
Restart=always
Type=notify
NotifyAccess=all
KillSignal=SIGQUIT
[Install]
WantedBy=multi-user.target

9
emperor.uwsgi.socket Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Socket for uWSGI Emperor
[Socket]
# Change this to your uwsgi application port or unix socket location
ListenStream=/run/uwsgi/emperor.sock
[Install]
WantedBy=sockets.target

6
uwsgi-openmamba.ini Normal file
View File

@ -0,0 +1,6 @@
[uwsgi]
plugin_build_dir = .
plugin_dir = @LIBDIR@/uwsgi
plugins = asyncio, cgi, fiber, gevent, greenlet, php, lua, mono, notfound, psgi, pypy, python, rack, rbthreads, webdav, zabbix
main_plugin = systemd_logger,pam
inherit = base

10
uwsgi.logrotate Normal file
View File

@ -0,0 +1,10 @@
/var/log/uwsgi/*.log /var/log/uwsgi/*/*.log {
copytruncate
daily
rotate 7
compress
delaycompress
missingok
notifempty
su root uwsgi
}

265
uwsgi.spec Normal file
View File

@ -0,0 +1,265 @@
Name: uwsgi
Version: 2.0.19.1
Release: 1mamba
Summary: A full stack for building hosting services
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://uwsgi-docs.readthedocs.io/en/latest/
Source: https://github.com/unbit/uwsgi.git/%{version}/uwsgi-%{version}.tar.bz2
Source1: uwsgi-openmamba.ini
Source2: uwsgi.tmpfiles
Source3: uwsgi.sysusers
Source4: uwsgi_at.service
Source5: uwsgi_at.socket
Source6: uwsgi.logrotate
Source7: emperor.uwsgi.service
Source8: emperor.uwsgi.socket
Source9: emperor.ini
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: apache-mod_php
BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libbzip2-devel
BuildRequires: libcap-devel
BuildRequires: libcurl-devel
BuildRequires: libdb53-devel
BuildRequires: libgd-devel
BuildRequires: libicu-devel
BuildRequires: libjansson-devel
BuildRequires: liblua-devel
BuildRequires: liblzma-devel
BuildRequires: libnsl-devel
BuildRequires: libonig-devel
BuildRequires: libopenssl-devel
BuildRequires: libpam-devel
BuildRequires: libpcre-devel
BuildRequires: libperl
BuildRequires: libpython3-devel
BuildRequires: libreadline-devel
BuildRequires: libruby-devel
BuildRequires: libstdc++6-devel
BuildRequires: libsystemd-devel
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
BuildRequires: mono-devel
## AUTOBUILDREQ-END
BuildRequires: python-greenlet-py3
%description
A full stack for building hosting services.
%package plugin-cgi
Group: System/Libraries
Summary: CGI plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-cgi
This package contains the CGI plugin for %{name}.
%package plugin-rack
Group: System/Libraries
Summary: Ruby rack plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: ruby
%description plugin-rack
This package contains the Ruby rack plugin for %{name}.
%package plugin-psgi
Group: System/Libraries
Summary: Perl psgi plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: perl
%description plugin-psgi
This package contains the Perl psgi plugin for %{name}.
%package plugin-python
Group: System/Libraries
Summary: Python plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: python3
Requires: python-greenlet-py3
%description plugin-python
This package contains the Python plugin for %{name}.
%package plugin-pypy
Group: System/Libraries
Summary: Pypy plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-pypy
This package contains the Pypy plugin for %{name}.
%package plugin-lua
Group: System/Libraries
Summary: LUA plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: lua
%description plugin-lua
This package contains the LUA plugin for %{name}.
%package plugin-php
Group: System/Libraries
Summary: PHP plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: php
%description plugin-php
This package contains the PHP plugin for %{name}.
%package plugin-mono
Group: System/Libraries
Summary: mono plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: mono
%description plugin-mono
This package contains the mono plugin for %{name}.
%package plugin-webdav
Group: System/Libraries
Summary: WebDav plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-webdav
This package contains the WebDav plugin for %{name}.
%package plugin-zabbix
Group: System/Libraries
Summary: Zabbix plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-zabbix
This package contains the Zabbix plugin for %{name}.
%package plugin-notfound
Group: System/Libraries
Summary: notfound plugin for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description plugin-notfound
This package contains the notfound plugin for %{name}.
%debug_package
%prep
%setup -q
cp %{SOURCE1} buildconf/openmamba.ini
sed -i "s|@LIBDIR@|%{_libdir}|" buildconf/openmamba.ini
# Fix linking to libphp7.so
sed -i "s|ld_run_path = None|ld_run_path = '%{_libdir}/apache'|" plugins/php/uwsgiplugin.py
%build
export UWSGICONFIG_PHPLIBDIR=%{_libdir}/apache/libphp7.so
%make PYTHON=%{__python3} PROFILE=openmamba
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m0755 uwsgi %{buildroot}%{_bindir}/uwsgi
install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/uwsgi@.service
install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/uwsgi@.socket
install -D -m0644 %{SOURCE2} %{buildroot}%{_tpmfilesdir}/uwsgi.conf
install -D -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/uwsgi
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysusersdir}/uwsgi.conf
install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/emperor.uwsgi.service
install -D -m0644 %{SOURCE8} %{buildroot}%{_unitdir}/emperor.uwsgi.socket
install -D -m0644 %{SOURCE9} %{buildroot}%{_sysconfdir}/uwsgi/emperor.ini
# Install plugins
install -D -m0755 *_plugin.so -t %{buildroot}%{_libdir}/uwsgi/
# Python
install -D -m0644 uwsgidecorators.py %{buildroot}%{python3_sitearch}/uwsgidecorators.py
%{__python3} -m compileall %{buildroot}%{python3_sitearch}
%{__python3} -O -m compileall %{buildroot}%{python3_sitearch}
# Pypy
install -D -m0644 uwsgidecorators.py %{buildroot}/opt/pypy/site-packages/uwsgidecorators.py
%{__python3} -m compileall %{buildroot}/opt/pypy/site-packages
%{__python3} -O -m compileall %{buildroot}/opt/pypy/site-packages
# Mono
install -D -m0755 plugins/mono/uwsgi.dll %{buildroot}%{_prefix}/lib/mono/2.0/uwsgi.dll
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/uwsgi
%config(noreplace) %{_sysconfdir}/uwsgi/emperor.ini
%{_sysconfdir}/logrotate.d/uwsgi
%{_bindir}/uwsgi
%{_unitdir}/uwsgi@.service
%{_unitdir}/uwsgi@.socket
%{_unitdir}/emperor.uwsgi.service
%{_unitdir}/emperor.uwsgi.socket
%{_sysusersdir}/uwsgi.conf
%doc LICENSE
%files plugin-cgi
%defattr(-,root,root)
%{_libdir}/uwsgi/cgi_plugin.so
%files plugin-rack
%defattr(-,root,root)
%{_libdir}/uwsgi/rack_plugin.so
%{_libdir}/uwsgi/fiber_plugin.so
%{_libdir}/uwsgi/rbthreads_plugin.so
%files plugin-psgi
%defattr(-,root,root)
%{_libdir}/uwsgi/psgi_plugin.so
%files plugin-python
%defattr(-,root,root)
%{_libdir}/uwsgi/asyncio_plugin.so
%{_libdir}/uwsgi/gevent_plugin.so
%{_libdir}/uwsgi/greenlet_plugin.so
%{_libdir}/uwsgi/python_plugin.so
%{python3_sitearch}/uwsgidecorators.py
%{python3_sitearch}/__pycache__/uwsgidecorators.cpython*pyc
%files plugin-pypy
%defattr(-,root,root)
%{_libdir}/uwsgi/pypy_plugin.so
/opt/pypy/site-packages/uwsgidecorators.py
/opt/pypy/site-packages/__pycache__/uwsgidecorators.cpython*pyc
%files plugin-lua
%defattr(-,root,root)
%{_libdir}/uwsgi/lua_plugin.so
%files plugin-php
%defattr(-,root,root)
%{_libdir}/uwsgi/php_plugin.so
%files plugin-mono
%defattr(-,root,root)
%{_libdir}/uwsgi/mono_plugin.so
%{_prefix}/lib/mono/2.0/uwsgi.dll
%files plugin-webdav
%defattr(-,root,root)
%{_libdir}/uwsgi/webdav_plugin.so
%files plugin-zabbix
%defattr(-,root,root)
%{_libdir}/uwsgi/zabbix_plugin.so
%files plugin-notfound
%defattr(-,root,root)
%{_libdir}/uwsgi/notfound_plugin.so
%changelog
* Sat Sep 18 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.19.1-1mamba
- package created using the webbuild interface

1
uwsgi.sysusers Normal file
View File

@ -0,0 +1 @@
g uwsgi - -

1
uwsgi.tmpfiles Normal file
View File

@ -0,0 +1 @@
d /run/uwsgi 0775 root nobody - -

15
uwsgi_at.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=uWSGI service unit
After=syslog.target
[Service]
ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi/%I.ini
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -INT $MAINPID
Restart=always
Type=notify
NotifyAccess=all
KillSignal=SIGQUIT
[Install]
WantedBy=multi-user.target

9
uwsgi_at.socket Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Socket for uWSGI %I
[Socket]
# Change this to your uwsgi application port or unix socket location
ListenStream=/run/uwsgi/%I.sock
[Install]
WantedBy=sockets.target