Accepting request 781490 from home:mimi_vx:branches:Application:ERP:GNUHealth:Factory
- add fix_werkzeug.patch to fix boo#1164970 - remove implicit _service (not needed anymore for download) - spec-clean to meet openSUSE packaging standards OBS-URL: https://build.opensuse.org/request/show/781490 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=83
This commit is contained in:
parent
e9287bd1ac
commit
9876e5e7ff
4
_service
4
_service
@ -1,4 +0,0 @@
|
||||
<services>
|
||||
|
||||
<service name="download_files" mode="localonly" />
|
||||
</services>
|
34
fix_werkzeug.patch
Normal file
34
fix_werkzeug.patch
Normal file
@ -0,0 +1,34 @@
|
||||
Index: trytond-5.0.18/trytond/wsgi.py
|
||||
===================================================================
|
||||
--- trytond-5.0.18.orig/trytond/wsgi.py
|
||||
+++ trytond-5.0.18/trytond/wsgi.py
|
||||
@@ -9,8 +9,19 @@ import traceback
|
||||
from werkzeug.wrappers import Response
|
||||
from werkzeug.routing import Map, Rule
|
||||
from werkzeug.exceptions import abort, HTTPException, InternalServerError
|
||||
-from werkzeug.contrib.fixers import ProxyFix
|
||||
-from werkzeug.wsgi import SharedDataMiddleware
|
||||
+try:
|
||||
+ from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
+
|
||||
+ def NumProxyFix(app, num_proxies):
|
||||
+ return ProxyFix(app,
|
||||
+ x_for=num_proxies, x_proto=num_proxies, x_host=num_proxies,
|
||||
+ x_port=num_proxies, x_prefix=num_proxies)
|
||||
+except ImportError:
|
||||
+ from werkzeug.contrib.fixers import ProxyFix as NumProxyFix
|
||||
+try:
|
||||
+ from werkzeug.middleware.shared_data import SharedDataMiddleware
|
||||
+except ImportError:
|
||||
+ from werkzeug.wsgi import SharedDataMiddleware
|
||||
|
||||
import wrapt
|
||||
|
||||
@@ -150,6 +161,6 @@ if config.get('web', 'root'):
|
||||
app.wsgi_app = SharedDataMiddlewareIndex(app.wsgi_app, static_files)
|
||||
num_proxies = config.getint('web', 'num_proxies')
|
||||
if num_proxies:
|
||||
- app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=num_proxies)
|
||||
+ app.wsgi_app = NumProxyFix(app.wsgi_app, num_proxies)
|
||||
import trytond.protocols.dispatcher
|
||||
import trytond.bus
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 4 12:48:39 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- add fix_werkzeug.patch to fix boo#1164970
|
||||
- remove implicit _service (not needed anymore for download)
|
||||
- spec-clean to meet openSUSE packaging standards
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 2 18:40:27 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||
|
||||
|
42
trytond.spec
42
trytond.spec
@ -22,21 +22,17 @@
|
||||
Name: trytond
|
||||
Version: %{majorver}.18
|
||||
Release: 0
|
||||
|
||||
Summary: An Enterprise Resource Planning (ERP) system
|
||||
License: GPL-3.0-or-later
|
||||
Group: Productivity/Office/Management
|
||||
URL: http://www.tryton.org/
|
||||
URL: https://www.tryton.org/
|
||||
Source0: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz
|
||||
#Patch0: trytond_get_login.patch
|
||||
Source1: tryton-server.README.SUSE
|
||||
Source2: trytond.conf.example
|
||||
Source3: %{name}.conf
|
||||
Source4: %{name}_log.conf
|
||||
#Source11: %{name}.sysconfig
|
||||
Source20: %{name}.service
|
||||
#Patch0: %{name}_server.diff
|
||||
# List of additional build dependencies
|
||||
Patch0: fix_werkzeug.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python3-Werkzeug
|
||||
BuildRequires: python3-bcrypt
|
||||
@ -65,9 +61,8 @@ Requires: python3-relatorio >= 0.7.0
|
||||
Requires: python3-simpleeval
|
||||
Requires: python3-wrapt
|
||||
Requires: unoconv
|
||||
Requires(pre): /usr/sbin/groupadd
|
||||
Requires(pre): /usr/sbin/useradd
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires(pre): %{_sbindir}/groupadd
|
||||
Requires(pre): %{_sbindir}/useradd
|
||||
BuildArch: noarch
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -79,25 +74,25 @@ database engine. Tryton provides modularity, scalability and
|
||||
security.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
cp %{S:1} .
|
||||
cp %{S:2} .
|
||||
#%patch0 -p1
|
||||
%setup -q
|
||||
cp %{SOURCE1} .
|
||||
cp %{SOURCE2} .
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python3 setup.py build
|
||||
|
||||
%install
|
||||
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
||||
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# only for systemd
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}
|
||||
install -p -m 640 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}.conf
|
||||
install -p -m 640 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/%{base_name}
|
||||
install -p -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{base_name}/%{name}.conf
|
||||
install -p -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -p -m 644 %{SOURCE20} %{buildroot}%{_unitdir}/%{name}.service
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/%{base_name}
|
||||
mkdir -p %{buildroot}%{_localstatedir}/{lib,log}/%{base_name}
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%pre
|
||||
@ -116,10 +111,9 @@ getent passwd tryton > /dev/null || %{_sbindir}/useradd -r -g tryton \
|
||||
%postun
|
||||
%service_del_postun trytond.service
|
||||
|
||||
%files
|
||||
#%files -f filelist
|
||||
%defattr(-,root,root)
|
||||
%doc README tryton-server.README.SUSE trytond.conf.example LICENSE doc/*
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README tryton-server.README.SUSE trytond.conf.example doc/*
|
||||
%{python3_sitelib}/*
|
||||
%dir %{_sysconfdir}/%{base_name}
|
||||
%{_bindir}/%{name}
|
||||
|
Loading…
Reference in New Issue
Block a user