forked from pool/trytond
Accepting request 781668 from Application:ERP:GNUHealth:Factory
boo#1164970 OBS-URL: https://build.opensuse.org/request/show/781668 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/trytond?expand=0&rev=42
This commit is contained in:
commit
283456bdbd
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>
|
Sun Feb 2 18:40:27 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
38
trytond.spec
38
trytond.spec
@ -22,21 +22,17 @@
|
|||||||
Name: trytond
|
Name: trytond
|
||||||
Version: %{majorver}.18
|
Version: %{majorver}.18
|
||||||
Release: 0
|
Release: 0
|
||||||
|
|
||||||
Summary: An Enterprise Resource Planning (ERP) system
|
Summary: An Enterprise Resource Planning (ERP) system
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
Group: Productivity/Office/Management
|
Group: Productivity/Office/Management
|
||||||
URL: http://www.tryton.org/
|
URL: https://www.tryton.org/
|
||||||
Source0: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz
|
||||||
#Patch0: trytond_get_login.patch
|
|
||||||
Source1: tryton-server.README.SUSE
|
Source1: tryton-server.README.SUSE
|
||||||
Source2: trytond.conf.example
|
Source2: trytond.conf.example
|
||||||
Source3: %{name}.conf
|
Source3: %{name}.conf
|
||||||
Source4: %{name}_log.conf
|
Source4: %{name}_log.conf
|
||||||
#Source11: %{name}.sysconfig
|
|
||||||
Source20: %{name}.service
|
Source20: %{name}.service
|
||||||
#Patch0: %{name}_server.diff
|
Patch0: fix_werkzeug.patch
|
||||||
# List of additional build dependencies
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python3-Werkzeug
|
BuildRequires: python3-Werkzeug
|
||||||
BuildRequires: python3-bcrypt
|
BuildRequires: python3-bcrypt
|
||||||
@ -65,9 +61,8 @@ Requires: python3-relatorio >= 0.7.0
|
|||||||
Requires: python3-simpleeval
|
Requires: python3-simpleeval
|
||||||
Requires: python3-wrapt
|
Requires: python3-wrapt
|
||||||
Requires: unoconv
|
Requires: unoconv
|
||||||
Requires(pre): /usr/sbin/groupadd
|
Requires(pre): %{_sbindir}/groupadd
|
||||||
Requires(pre): /usr/sbin/useradd
|
Requires(pre): %{_sbindir}/useradd
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
@ -80,24 +75,24 @@ security.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
cp %{S:1} .
|
cp %{SOURCE1} .
|
||||||
cp %{S:2} .
|
cp %{SOURCE2} .
|
||||||
#%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python3 setup.py build
|
python3 setup.py build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python3 setup.py install --prefix=%_prefix --root=%buildroot
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
# only for systemd
|
# only for systemd
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}
|
mkdir -p %{buildroot}%{_sysconfdir}/%{base_name}
|
||||||
install -p -m 640 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}.conf
|
install -p -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{base_name}/%{name}.conf
|
||||||
install -p -m 640 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
install -p -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{base_name}/%{name}_log.conf
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
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}
|
%fdupes -s %{buildroot}
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -117,9 +112,8 @@ getent passwd tryton > /dev/null || %{_sbindir}/useradd -r -g tryton \
|
|||||||
%service_del_postun trytond.service
|
%service_del_postun trytond.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
#%files -f filelist
|
%license LICENSE
|
||||||
%defattr(-,root,root)
|
%doc README tryton-server.README.SUSE trytond.conf.example doc/*
|
||||||
%doc README tryton-server.README.SUSE trytond.conf.example LICENSE doc/*
|
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%dir %{_sysconfdir}/%{base_name}
|
%dir %{_sysconfdir}/%{base_name}
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
|
Loading…
Reference in New Issue
Block a user