From d64f652b52db78911ea7568bafbf37976a262aa8a2648aeedfee61d07145711a Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Fri, 29 Nov 2019 14:19:18 +0000 Subject: [PATCH] Accepting request 750811 from Application:ERP:GNUHealth:3.6 version bump OBS-URL: https://build.opensuse.org/request/show/750811 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=74 --- get_login_trytond-46.patch | 48 -------------------------------------- tryton-server.README.SUSE | 18 ++++++++++++-- trytond-4.6.22.tar.gz | 3 --- trytond-5.0.15.tar.gz | 3 +++ trytond.changes | 6 +++++ trytond.conf | 10 ++++++++ trytond.spec | 28 +++++++++------------- 7 files changed, 46 insertions(+), 70 deletions(-) delete mode 100644 get_login_trytond-46.patch delete mode 100644 trytond-4.6.22.tar.gz create mode 100644 trytond-5.0.15.tar.gz diff --git a/get_login_trytond-46.patch b/get_login_trytond-46.patch deleted file mode 100644 index a8eb29a..0000000 --- a/get_login_trytond-46.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ruN a/trytond/res/user.py b/trytond/res/user.py -- --- a/trytond/res/user.py 2018-11-22 09:21:59.077931014 +0000 -+++ b/trytond/res/user.py 2018-11-22 09:21:04.423129737 +0000 -@@ -20,6 +20,7 @@ - from sql.conditionals import Coalesce - from sql.aggregate import Count - from sql.operators import Concat -+from random import randint - - try: - import bcrypt -@@ -542,12 +543,15 @@ - ''' - Return user id if password matches - ''' -- - LoginAttempt = Pool().get('res.user.login.attempt') -- - count = LoginAttempt.count(login) -- - if count > config.getint('session', 'max_attempt', default=5): -- - LoginAttempt.add(login) -- - raise RateLimitException() -- - Transaction().atexit(time.sleep, 2 ** count - 1) -+ login_max_delay = config.getint('session', 'login_max_delay') -+ -+ #Use a random delay (default between 1 and login_max_delay) -+ #If the param is not set, it defaults to 3 -+ -+ if (not login_max_delay) or (login_max_delay < 1): -+ login_max_delay = 3 -+ delay = randint(1,login_max_delay) -+ - for method in config.get( - 'session', 'authentications', default='password').split(','): - try: -@@ -557,10 +561,11 @@ - continue - user_id = func(login, parameters) - if user_id: -- - LoginAttempt.remove(login) - return user_id -- - LoginAttempt.add(login) -- - -+ else: -+ logger.warning('Invalid login from : %s', login) -+ time.sleep(delay) -+ - @classmethod - def _login_password(cls, login, parameters): - if 'password' not in parameters: diff --git a/tryton-server.README.SUSE b/tryton-server.README.SUSE index 00167b3..edbf72e 100644 --- a/tryton-server.README.SUSE +++ b/tryton-server.README.SUSE @@ -160,9 +160,23 @@ For manual creation of the database, the folowing steps are to be performed: As result you will have a bare Tryton database with the base modules installed. -See: http://doc.tryton.org/4.6/trytond/doc/topics/configuration.html +See: http://doc.tryton.org/4.2/trytond/doc/topics/configuration.html +Installation of the Webfrontend for tryton (sao) from package +------------------------------------------------------------- + +For most openSUSE Flavours tryton-sao is packed. You can install it with + > zypper install tryton-sao + +You need to edit /etc/tryton/trytond.conf. Installation of tryton-sao follows the +standards for nodejs-installations, so the path is within the node-modules: + +In the section [web], set the path: + root = /usr/lib/node-modules/tryton-sao + +Now restart trytond. + Installation of the Webfrontend for tryton (sao) from source ------------------------------------------------------------ @@ -237,7 +251,7 @@ Now, you're finished with the system setup. Please be aware of the following thi * Only the same major version of Tryton client and Tryton server can connect. - -- Axel Braun März 20, 2019, 19:20:02 + -- Axel Braun MON Jun 11 10:27:14 UTC 2018 This file is based on tryton-server.README.Debian diff --git a/trytond-4.6.22.tar.gz b/trytond-4.6.22.tar.gz deleted file mode 100644 index 4da70a2..0000000 --- a/trytond-4.6.22.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4892073d086b97ee3025bfbace9652f45fd36be87defc0cd0d36926c11607c06 -size 611113 diff --git a/trytond-5.0.15.tar.gz b/trytond-5.0.15.tar.gz new file mode 100644 index 0000000..9dea205 --- /dev/null +++ b/trytond-5.0.15.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62d25144a13d89ede50a51515abe50a8036574929c20c26b295a217b42fe4723 +size 648771 diff --git a/trytond.changes b/trytond.changes index ea85d3d..9e0acaf 100644 --- a/trytond.changes +++ b/trytond.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Nov 21 14:01:30 UTC 2019 - Axel Braun + +- version 5.0.15 (upgrade to GNU Health 3.6.x) + get_login_trytond-46.patch removed + ------------------------------------------------------------------- Mon Nov 11 17:59:05 UTC 2019 - Axel Braun diff --git a/trytond.conf b/trytond.conf index 4613009..dd8f724 100644 --- a/trytond.conf +++ b/trytond.conf @@ -92,6 +92,16 @@ listen = [::]:8000 # The time (in seconds) until an inactive session expires #timeout = 3600 +# The server administration password used by the client for +# the execution of database management tasks. It is encrypted +# using using the Unix crypt(3) routine. A password can be +# generated using the following command line (on one line): +# $ python -c 'import getpass,crypt,random,string; \ +# print crypt.crypt(getpass.getpass(), \ +# "".join(random.sample(string.ascii_letters + string.digits, 8)))' +# Example password with 'admin' +#super_pwd = jkUbZGvFNeugk + [email] # Mail settings diff --git a/trytond.spec b/trytond.spec index be1d865..41e7cd6 100644 --- a/trytond.spec +++ b/trytond.spec @@ -1,8 +1,8 @@ # # spec file for package trytond # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. -# Copyright (c) 2015-2018 Dr. Axel Braun +# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2015 2017 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,25 +17,25 @@ # -%define majorver 4.6 +%define majorver 5.0 %define base_name tryton Name: trytond -Version: %{majorver}.22 +Version: %{majorver}.15 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: http://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: get_login_trytond-46.patch - +#Patch0: %{name}_server.diff # List of additional build dependencies BuildRequires: fdupes BuildRequires: python3-Werkzeug @@ -82,7 +82,7 @@ security. %setup -q cp %{S:1} . cp %{S:2} . -%patch0 -p1 +#%patch0 -p1 %build python3 setup.py build @@ -98,16 +98,9 @@ mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -p -m 644 %{SOURCE20} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/{lib,log}/%{base_name} - -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%fdupes -s %{buildroot} %pre - -#Write GH Variable /etc/tryton/gnuhealthrc -cat > /etc/tryton/gnuhealthrc << "EOF" -TRYTON_VERSION=%{version} -EOF - getent group tryton > /dev/null || %{_sbindir}/groupadd -r tryton || : getent passwd tryton > /dev/null || %{_sbindir}/useradd -r -g tryton \ -d %{_localstatedir}/lib/tryton -s /sbin/nologin \ @@ -132,6 +125,7 @@ getent passwd tryton > /dev/null || %{_sbindir}/useradd -r -g tryton \ %{_bindir}/%{name} %{_bindir}/%{name}-admin %{_bindir}/%{name}-cron +%{_bindir}/%{name}-worker %{_unitdir}/%{name}.service %attr(640,root,tryton) %config(noreplace)%{_sysconfdir}/%{base_name}/%{name}.conf %attr(640,root,tryton) %config(noreplace)%{_sysconfdir}/%{base_name}/%{name}_log.conf