[Bug 2045884] Review Request: uwsgi - Fast, self-healing, application container server [unretire]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2045884



--- Comment #6 from Ralf Ertzinger <redhat-bugzilla@xxxxxxxxxxxxxx> ---
Final version, probably.

https://copr.fedorainfracloud.org/coprs/ertzing/scratch_x64/build/3258602/

Builds in F34, F35, EL7 and EL8, doesn't build in rawhide which I'll blame on
rawhide.

------------------------
--- uwsgi.orig/uwsgi.spec       2021-01-29 06:39:14.000000000 +0100
+++ uwsgi/uwsgi.spec    2022-01-28 18:26:20.980948342 +0100
@@ -1,5 +1,5 @@
 # Documentation sources:
-%global commit 8d868eadfb460785a735030271afa233ac854763
+%global commit 9b4ef5fa68fe42929a5e5410165d36fcc7b2d2c7
 %global shortcommit %(c=%{commit}; echo ${c:0:7})
 %global docrepo uwsgi-docs

@@ -8,18 +8,14 @@

 # This is primarily built for fedora, make it easy right now
 %if 0%{?fedora}
-%bcond_without systemd
 %bcond_without go
-%if 0%{?fedora} < 31
-%bcond_without python2
-%bcond_without python2_greenlet
-%endif
 %bcond_without python3
 %bcond_without ruby19
 %bcond_without tuntap
 %bcond_without zeromq
 %bcond_without perl
 %bcond_without glusterfs
+%bcond_without php
 # javapackages-tools retired (apache-ivy orphanage)
 %bcond_with java
 # Fedora httpd includes mod_proxy_uwsgi
@@ -45,41 +41,15 @@
 #Fedora endif
 %endif

-# Conditionally disable some things in epel6
-%if 0%{?rhel} == 6
-# javapackages-tools retired in epel (apache-ivy orphanage)
-%bcond_with java
-# el6 doesn't ship with systemd
-%bcond_with systemd
-# el6 doesn't have go
-%bcond_with go
-%bcond_without python2
-%bcond_without python2_greenlet
-# el6 ships with ruby 1.8 but fiberloop/rbthreads needs 1.9
-%bcond_with ruby19
-# el6 doesn't have perl-PSGI
-# el6 does have perl-Coro
-%bcond_with perl
-# el6 httpd does not include mod_proxy_uwsgi
-%bcond_without mod_proxy_uwsgi
-# this fails in el not sure why
-%bcond_with gridfs
-%bcond_with tuntap
-%bcond_with mongodblibs
-%global manual_py_compile 0
-%else
-%global manual_py_compile 1
-%endif
-
 # Conditionally enable/disable some things in epel7
 %if 0%{?rhel} == 7
 # el7 does have java
 %bcond_without java
-# el7 does have systemd
-%bcond_without systemd
 %bcond_without python2
 %bcond_without python3
 %bcond_without python3_other
+# This only exists on EL7
+%bcond_without tcp_wrappers
 # el7 doesn't have zeromq
 %bcond_with zeromq
 # el7 does have python-greenlet, but only on x86_64
@@ -99,21 +69,53 @@
 %endif
 # this fails in el7 not sure why
 %bcond_with gridfs
+# EL7 PHP is too old
+%bcond_with php
+%endif
+
+# epel8 builds pretty similar to Fedora for now
+%if 0%{?rhel} == 8
+%bcond_without go
+%bcond_without python3
+%bcond_without ruby19
+%bcond_without tuntap
+%bcond_without zeromq
+%bcond_without perl
+%bcond_without glusterfs
+%bcond_without php
+# javapackages-tools retired (apache-ivy orphanage)
+%bcond_with java
+# Fedora httpd includes mod_proxy_uwsgi
+# https://bugzilla.redhat.com/show_bug.cgi?id=1574335
+%bcond_with mod_proxy_uwsgi
+#mono
+%ifarch %{mono_arches}
+%bcond_without mono
+%else
+%bcond_with mono
+%endif
+# mongodblibs
+# mongo-cxx-driver-legacy broken in rawhide rhbz#1675407
+%bcond_with mongodblibs
+# v8-314 retired
+%bcond_with v8
+#mongodblibs dependency
+%if %{without mongodblibs}
+%bcond_with gridfs
+%else
+%bcond_without gridfs
+%endif
+#EL8 endif
 %endif

+%global manual_py_compile 1
+
 # Turn off byte compilation so it doesn't try
 # to auto-optimize the code in /usr/src/uwsgi
 %if %{manual_py_compile} == 1
 %global __os_install_post %(echo '%{__os_install_post}' | sed -e
's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
 %endif

-# Disable router_access in fedora >= 28 because tcp_wrappers deprecation
-%if 0%{?fedora} >= 28
-%bcond_with tcp_wrappers
-%else
-%bcond_without tcp_wrappers
-%endif
-
 # Set %%__python to the newest possible version
 %if %{with python3}
 %global __python %{__python3}
@@ -130,8 +132,8 @@
 %endif

 Name:           uwsgi
-Version:        2.0.18
-Release:        16%{?dist}
+Version:        2.0.20
+Release:        0.7%{?dist}
 Summary:        Fast, self-healing, application container server
 # uwsgi is licensed under GPLv2 with a linking exception
 # docs are licensed under MIT
@@ -144,7 +146,6 @@
 Source3:        emperor.ini
 Source4:       
https://github.com/unbit/%{docrepo}/archive/%{commit}/%{docrepo}-%{shortcommit}.tar.gz
 Source5:        README.Fedora
-Source6:        uwsgi.init
 Source7:        uwsgi.tmpfiles

 Patch0:         uwsgi_trick_chroot_rpmbuild.patch
@@ -155,12 +156,11 @@
 Patch5:         uwsgi_fix_mongodb.patch
 Patch6:         uwsgi_v8-314_compatibility.patch
 Patch7:         uwsgi_fix_mono.patch
-# https://github.com/unbit/uwsgi/pull/1772
-Patch9:         uwsgi-2.0.16-glfs.patch
-# https://github.com/unbit/uwsgi/pull/2141
-Patch10:        uwsgi_fix_psgi.patch
-# https://github.com/unbit/uwsgi/pull/2105
-Patch11:        uwsgi_fix_php74_zend.patch
+# https://github.com/unbit/uwsgi/issues/2283
+Patch12:        uwsgi_fix_php8.patch
+Patch13:        uwsgi_fix_chroot_chdir.patch
+# https://github.com/unbit/uwsgi/issues/2356
+Patch14:        uwsgi_fix_php_arginfo.patch

 BuildRequires:  curl, libxml2-devel, libuuid-devel, jansson-devel
 BuildRequires:  libyaml-devel, ruby-devel
@@ -184,7 +184,10 @@
 BuildRequires:  glusterfs-devel, glusterfs-api-devel
 %endif
 BuildRequires:  lua-devel, ruby, pcre-devel
-BuildRequires:  php-devel, php-embedded, libedit-devel, krb5-devel
+%if %{with php}
+BuildRequires:  php-devel, php-embedded
+%endif
+BuildRequires:  libedit-devel, krb5-devel
 BuildRequires:  openssl-devel
 BuildRequires:  bzip2-devel, gmp-devel, pam-devel
 BuildRequires:  sqlite-devel, libcap-devel
@@ -202,28 +205,26 @@
 %if %{with go}
 BuildRequires:  gcc-go
 %endif
-%if %{with systemd}
 BuildRequires:  systemd-devel, systemd-units
-%endif
 %if %{with mono}
 BuildRequires:  mono-devel, mono-web, glib2-devel
 %endif
 %if %{with v8}
-%if 0%{?fedora} >= 25
+%if 0%{?fedora}
 BuildRequires:  v8-314-devel
 %else
 BuildRequires:  v8-devel
 %endif
 %endif
 %if %{with mongodblibs}
-%if 0%{?fedora} >= 30
+%if 0%{?fedora}
 BuildRequires:  mongo-cxx-driver-legacy-devel
 %else
 BuildRequires:  mongo-cxx-driver-devel
 %endif
 %endif

-%if 0%{?fedora} >= 28
+%if 0%{?fedora}
 BuildRequires:  libargon2-devel
 Obsoletes:      uwsgi-router-access <= 2.0.16
 %endif
@@ -234,13 +235,7 @@
 Obsoletes:      uwsgi-plugin-admin <= 2.0.6

 Requires(pre):    shadow-utils
-%if %{with systemd}
 %{?systemd_requires}
-%else
-Requires(post): chkconfig
-Requires(preun): chkconfig
-Requires(preun): initscripts
-%endif

 %filter_requires_in %{_usrsrc}
 %filter_provides_in %{_usrsrc}
@@ -292,7 +287,8 @@
 %endif

 %description -n python%{python3_pkgversion}-uwsgidecorators
-The uwsgidecorators Python %{python3_version} module provides higher-level
access to the uWSGI API.
+The uwsgidecorators Python %{python3_version} module provides higher-level
+access to the uWSGI API.
 %endif

 %if %{with python3_other}
@@ -302,7 +298,8 @@
 Requires:       uwsgi-plugin-python%{python3_other_pkgversion} =
%{version}-%{release}

 %description -n python%{python3_other_pkgversion}-uwsgidecorators
-The uwsgidecorators Python %{python3_other_version} module provides
higher-level access to the uWSGI API.
+The uwsgidecorators Python %{python3_other_version} module provides
+higher-level access to the uWSGI API.
 %endif

 %package -n uwsgi-docs
@@ -363,7 +360,7 @@

 %package -n uwsgi-alarm-curl
 Summary:  uWSGI - Curl alarm plugin
-Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-alarm-curl
 This package contains the alarm_curl alarm plugin for uWSGI
@@ -446,7 +443,7 @@

 %package -n uwsgi-logger-graylog2
 Summary:   uWSGI - Graylog2 logger plugin
-Requires:  uwsgi-plugin-common = %{version}-%{release}, zlib
+Requires:  uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-logger-graylog2
 This package contains the graylog2 logger plugin for uWSGI
@@ -505,14 +502,12 @@
 %description -n uwsgi-logger-syslog
 This package contains the syslog logger plugin for uWSGI

-%if %{with systemd}
 %package -n uwsgi-logger-systemd
 Summary:  uWSGI - systemd journal logger plugin
 Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-logger-systemd
 This package contains the systemd journal logger plugin for uWSGI
-%endif

 %if %{with zeromq}
 %package -n uwsgi-logger-zeromq
@@ -527,7 +522,7 @@

 %package -n uwsgi-plugin-airbrake
 Summary:  uWSGI - Plugin for AirBrake support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-airbrake
 This package contains the airbrake plugin for uWSGI
@@ -571,14 +566,14 @@

 %package -n uwsgi-plugin-cplusplus
 Summary:  uWSGI - Plugin for C++ support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libstdc++
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-cplusplus
 This package contains the cplusplus plugin for uWSGI

 %package -n uwsgi-plugin-curl-cron
 Summary:  uWSGI - Plugin for CURL Cron support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libcurl
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-curl-cron
 This package contains the curl_cron plugin for uWSGI
@@ -623,7 +618,7 @@
 %if %{with python2}
 %package -n uwsgi-plugin-python2-gevent
 Summary:  uWSGI - Plugin for Python 2 GEvent support
-Requires: uwsgi-plugin-python2 = %{version}-%{release}, libevent
+Requires: uwsgi-plugin-python2 = %{version}-%{release}
 Obsoletes: uwsgi-plugin-gevent < 2.0.16-4
 Provides: uwsgi-plugin-gevent = %{version}-%{release}

@@ -634,7 +629,7 @@
 %if %{with python3}
 %package -n uwsgi-plugin-python%{python3_pkgversion}-gevent
 Summary:  uWSGI - Plugin for Python %{python3_version} GEvent support
-Requires: uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release},
libevent
+Requires: uwsgi-plugin-python%{python3_pkgversion} = %{version}-%{release}

 %description -n uwsgi-plugin-python%{python3_pkgversion}-gevent
 This package contains the Python %{python3_version} gevent plugin for uWSGI
@@ -759,12 +754,14 @@
 %description -n uwsgi-plugin-pam
 This package contains the PAM plugin for uWSGI

+%if %{with php}
 %package -n uwsgi-plugin-php
 Summary:  uWSGI - Plugin for PHP support
 Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-php
 This package contains the PHP plugin for uWSGI
+%endif

 %package -n uwsgi-plugin-pty
 Summary:  uWSGI - Plugin for PTY support
@@ -886,10 +883,6 @@
 %package -n uwsgi-plugin-python%{python3_pkgversion}-tornado
 Summary:  uWSGI - Plugin for Tornado (Python %{python3_version}) support
 Requires: uwsgi-plugin-common = %{version}-%{release},
python%{python3_pkgversion}-tornado
-%if 0%{?fedora} && 0%{?fedora} < 29
-Obsoletes: uwsgi-plugin-tornado3 < 2.0.16-4
-Provides: uwsgi-plugin-tornado3 = %{version}-%{release}
-%endif

 %description -n uwsgi-plugin-python%{python3_pkgversion}-tornado
 This package contains the tornado (Python %{python3_version}) plugin for uWSGI
@@ -913,21 +906,21 @@

 %package -n uwsgi-plugin-webdav
 Summary:  uWSGI - Plugin for WebDAV support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libattr
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-webdav
 This package contains the webdav plugin for uWSGI

 %package -n uwsgi-plugin-xattr
 Summary:  uWSGI - Plugin for Extra Attributes support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libattr
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-xattr
 This package contains the xattr plugin for uWSGI

 %package -n uwsgi-plugin-xslt
 Summary:  uWSGI - Plugin for XSLT transformation support
-Requires: uwsgi-plugin-common = %{version}-%{release}, libxslt
+Requires: uwsgi-plugin-common = %{version}-%{release}

 %description -n uwsgi-plugin-xslt
 This package contains the xslt plugin for uWSGI
@@ -1133,41 +1126,23 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%if 0%{?fedora} >= 22
+%if 0%{?fedora}
 %patch5 -p1
 %endif
-%if %{with v8} && 0%{?fedora} >= 25
+%if %{with v8} && 0%{?fedora}
 %patch6 -p1
 %endif
 %if %{with mono}
 %patch7 -p1
 %endif
-%patch9 -p1
-%if 0%{?fedora} >= 32
-%patch10 -p1
-%endif
-%patch11 -p1
-
-#disable plug-ins
-%if %{without mongodblibs}
-sed -in "s/mongodblog, //" buildconf/fedora.ini
-sed -in "s/stats_pusher_mongodb, //" buildconf/fedora.ini
-%endif
-%if %{without v8}
-sed -in "s/v8, //" buildconf/fedora.ini
-%endif
-%if %{without gridfs}
-sed -in "s/gridfs, //" buildconf/fedora.ini
-%endif
-%if %{without mono}
-sed -in "s/mono, //" buildconf/fedora.ini
-%endif
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1

 %if %{with perl} && (%{with python3} || %{with python3_other})
 %{__python} -m lib2to3 --write --nobackups plugins/coroae/uwsgiplugin.py
 %endif

-
 %build
 CFLAGS="%{optflags} -Wno-error -Wno-unused-but-set-variable" %{__python}
uwsgiconfig.py --build fedora.ini
 %if %{with python2}
@@ -1191,19 +1166,22 @@
 %if %{with mono}
 CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/mono fedora
 %endif
+%if %{with php}
+CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/php fedora
+%endif
 %if %{with v8}
 CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/v8 fedora
 %endif
 %if %{with go}
-CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/gccgo fedora
+# In EL* distributions, the gccgo compiler needs to be explicitly used to
+# compile Go code, gcc will not work. However, gccgo can compile C code,
+# so use that instead
+CC="gccgo" CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python}
uwsgiconfig.py --plugin plugins/gccgo fedora
 %endif
 %if %{with ruby19}
 CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/fiber fedora
 CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/rbthreads fedora
 %endif
-%if %{with systemd}
-CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/systemd_logger fedora
-%endif
 %if %{with tuntap}
 CFLAGS="%{optflags} -Wno-unused-but-set-variable" %{__python} uwsgiconfig.py
--plugin plugins/tuntap fedora
 %endif
@@ -1245,9 +1223,6 @@
 install -d %{buildroot}%{_usrsrc}/uwsgi/%{version}
 install -d %{buildroot}%{_includedir}/uwsgi
 install -d %{buildroot}%{_libdir}/uwsgi
-%if %{without systemd}
-install -d -m 0775 %{buildroot}%{_localstatedir}/run/uwsgi
-%endif
 %if %{with mono}
 install -d %{buildroot}%{_monogacdir}
 %endif
@@ -1287,12 +1262,8 @@
 gacutil -i plugins/mono/uwsgi.dll -f -package uwsgi -root %{buildroot}/usr/lib
 %endif
 install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/uwsgi.ini
-%if %{with systemd}
 install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/uwsgi.service
 install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/uwsgi.conf
-%else
-install -D -p -m 0755 %{SOURCE6} %{buildroot}%{_initddir}/uwsgi
-%endif
 %if %{with mod_proxy_uwsgi}
 install -D -p -m 0755 apache2/.libs/mod_proxy_uwsgi.so
%{buildroot}%{_httpd_moddir}/mod_proxy_uwsgi.so
 %endif
@@ -1301,13 +1272,11 @@
 %pre
 getent group uwsgi >/dev/null || groupadd -r uwsgi
 getent passwd uwsgi >/dev/null || \
-    useradd -r -g uwsgi -d %{!?with_systemd:%{_localstatedir}}/run/uwsgi -s
/sbin/nologin \
+    useradd -r -g uwsgi -d /run/uwsgi -s /sbin/nologin \
     -c "uWSGI daemon user" uwsgi
 exit 0

 %post
-%if %{with systemd}
-echo "Executing systemd post-install tasks"
 %if 0%{?systemd_post:1}
     %systemd_post uwsgi.service
 %else
@@ -1316,14 +1285,8 @@
         /bin/systemctl daemon-reload >/dev/null 2>&1 || :
     fi
 %endif
-%else
-echo "Executing System V post-install tasks"
-/sbin/chkconfig --add uwsgi
-%endif

 %preun
-%if %{with systemd}
-echo "Executing systemd pre-uninstall tasks"
 %if 0%{?systemd_preun:1}
     %systemd_preun uwsgi.service
 %else
@@ -1333,17 +1296,8 @@
         /bin/systemctl stop uwsgi.service > /dev/null 2>&1 || :
     fi
 %endif
-%else
-echo "Executing System V pre-uninstall tasks"
-if [ $1 -eq 0 ] ; then
-    /sbin/service uwsgi stop >/dev/null 2>&1
-    /sbin/chkconfig --del uwsgi
-fi
-%endif

 %postun
-%if %{with systemd}
-echo "Executing systemd post-uninstall tasks"
 %if 0%{?systemd_postun:1}
     %systemd_postun uwsgi.service
 %else
@@ -1353,27 +1307,14 @@
         /bin/systemctl try-restart uwsgi.service >/dev/null 2>&1 || :
     fi
 %endif
-%else
-echo "Executing System V post-uninstall tasks"
-if [ "$1" -ge "1" ] ; then
-    /sbin/service uwsgi condrestart >/dev/null 2>&1 || :
-fi
-%endif


 %files
 %{_sbindir}/uwsgi
 %config(noreplace) %{_sysconfdir}/uwsgi.ini
-%if %{with systemd}
 %{_unitdir}/uwsgi.service
 %{_tmpfilesdir}/uwsgi.conf
-%else
-%{_initddir}/uwsgi
-%endif
 %dir %{_sysconfdir}/uwsgi.d
-%if %{without systemd}
-%attr(0775,uwsgi,uwsgi) %dir %{_localstatedir}/run/uwsgi
-%endif
 %doc README README.Fedora CHANGELOG
 %license LICENSE

@@ -1487,10 +1428,8 @@
 %files -n uwsgi-logger-syslog
 %{_libdir}/uwsgi/syslog_plugin.so

-%if %{with systemd}
 %files -n uwsgi-logger-systemd
 %{_libdir}/uwsgi/systemd_logger_plugin.so
-%endif

 %if %{with zeromq}
 %files -n uwsgi-logger-zeromq
@@ -1615,8 +1554,10 @@
 %files -n uwsgi-plugin-pam
 %{_libdir}/uwsgi/pam_plugin.so

+%if %{with php}
 %files -n uwsgi-plugin-php
 %{_libdir}/uwsgi/php_plugin.so
+%endif

 %files -n uwsgi-plugin-pty
 %{_libdir}/uwsgi/pty_plugin.so
@@ -1775,6 +1716,9 @@


 %changelog
+* Sun Jan 23 2022 Ralf Ertzinger <ralf@xxxxxxxxxxx> - 2.0.20-0.7
+- Update to 2.0.20
+
 * Wed Jan 27 2021 Fedora Release Engineering <releng@xxxxxxxxxxxxxxxxx> -
2.0.18-16
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2045884
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux