| |
@@ -75,6 +75,7 @@
|
| |
Requires: python%{python_pkgversion}-six
|
| |
Requires: python%{python_pkgversion}-sqlalchemy >= 0.8
|
| |
Requires: python%{python_pkgversion}-straight-plugin
|
| |
+ Requires: python%{python_pkgversion}-whitenoise
|
| |
Requires: python%{python_pkgversion}-wtforms
|
| |
%endif
|
| |
|
| |
@@ -365,22 +366,12 @@
|
| |
# Switch interpreter for systemd units
|
| |
sed -e "s|/usr/bin/python|%{__python}|g" -i $RPM_BUILD_ROOT/%{_unitdir}/*.service
|
| |
|
| |
- %if 0%{?rhel} && 0%{?rhel} < 8
|
| |
- # Change to correct static file path for apache httpd and nginx
|
| |
- sed -e "s/pythonX.Y/python%{python2_version}/g" -i \
|
| |
- $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/pagure.conf \
|
| |
- $RPM_BUILD_ROOT/%{_sysconfdir}/nginx/conf.d/pagure.conf
|
| |
- %else
|
| |
+ %if ! (0%{?rhel} && 0%{?rhel} < 8)
|
| |
# Switch all systemd units to use the correct celery
|
| |
sed -e "s|/usr/bin/celery|/usr/bin/celery-3|g" -i $RPM_BUILD_ROOT/%{_unitdir}/*.service
|
| |
|
| |
# Switch all systemd units to use the correct gunicorn
|
| |
sed -e "s|/usr/bin/gunicorn|/usr/bin/gunicorn-3|g" -i $RPM_BUILD_ROOT/%{_unitdir}/*.service
|
| |
-
|
| |
- # Change to correct static file path for apache httpd and nginx
|
| |
- sed -e "s/pythonX.Y/python%{python3_version}/g" -i \
|
| |
- $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/pagure.conf \
|
| |
- $RPM_BUILD_ROOT/%{_sysconfdir}/nginx/conf.d/pagure.conf
|
| |
%endif
|
| |
|
| |
# Make log directories
|
| |
In order to make it easier to run Pagure in a containerized environment,
the web frontend needs to be capable of serving all of the frontend static
files. This change introduces WhiteNoise as a dependency that would enable
the Flask application itself to serve the static assets correctly.
This makes it possible to run a Pagure server without Apache or Nginx at all
in a containerized environment for all of the main functions.
Note that the releases folder is still not served through WhiteNoise, and
deployments that have uploading releases enabled will need something to
serve them.
Signed-off-by: Neal Gompa ngompa13@gmail.com