From db09b0e0a5bdd4dd24def3f2cd11316a3eab3026e904f13b507864febe305adb Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 6 Feb 2023 17:37:12 +0000 Subject: [PATCH 01/10] Update to trytond Version 6.0.27 - Bugfix Release OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=162 --- Update_changed_fields.diff | 47 ++++++++++++ fix_werkzeug.patch | 38 ++++++++++ fix_werkzeug_2.x.patch | 52 +++++++++++++ revert_werkzeug_setup.patch | 12 +++ trytond-5.0.36.tar.gz | 3 + trytond-5.0.36.tar.gz.asc | 12 +++ trytond-5.0.44.tar.gz | 3 + trytond-5.0.44.tar.gz.asc | 12 +++ trytond-6.0.26.tar.gz | 3 - trytond-6.0.26.tar.gz.asc | 12 --- trytond-6.0.27.tar.gz | 3 + trytond-6.0.27.tar.gz.asc | 12 +++ trytond.changes | 5 ++ trytond.conf.example | 143 ++++++++++++++++++++++++++++++++++++ trytond.spec | 2 +- 15 files changed, 343 insertions(+), 16 deletions(-) create mode 100644 Update_changed_fields.diff create mode 100644 fix_werkzeug.patch create mode 100644 fix_werkzeug_2.x.patch create mode 100644 revert_werkzeug_setup.patch create mode 100644 trytond-5.0.36.tar.gz create mode 100644 trytond-5.0.36.tar.gz.asc create mode 100644 trytond-5.0.44.tar.gz create mode 100644 trytond-5.0.44.tar.gz.asc delete mode 100644 trytond-6.0.26.tar.gz delete mode 100644 trytond-6.0.26.tar.gz.asc create mode 100644 trytond-6.0.27.tar.gz create mode 100644 trytond-6.0.27.tar.gz.asc create mode 100644 trytond.conf.example diff --git a/Update_changed_fields.diff b/Update_changed_fields.diff new file mode 100644 index 0000000..93bd3d4 --- /dev/null +++ b/Update_changed_fields.diff @@ -0,0 +1,47 @@ +diff --git a/trytond/convert.py b/trytond/convert.py +index c1dde99f19ae579d3d84d0e9f75272ea857f86f1..b57f1c710aefb7579d4edd9d07baad30df23ba8b 100644 +--- a/trytond/convert.py ++++ b/trytond/convert.py +@@ -9,6 +9,8 @@ import re + from collections import defaultdict + from decimal import Decimal + ++from trytond.config import config ++ + from . import __version__ + from .tools import grouped_slice + from .transaction import Transaction +@@ -19,6 +21,9 @@ logger = logging.getLogger(__name__) + CDATA_START = re.compile('^\s*\<\!\[cdata\[', re.IGNORECASE) + CDATA_END = re.compile('\]\]\>\s*$', re.IGNORECASE) + ++_update_changed_fields = config.getboolean('optional', ++ 'update_changed_fields', default=True) ++ + + class DummyTagHandler: + """Dubhandler implementing empty methods. Will be used when whe +@@ -668,11 +673,18 @@ class TrytondXmlHandler(sax.handler.ContentHandler): + # if they are not false in a boolean context (ie None, + # False, {} or []) + if db_field != expected_value and (db_field or expected_value): +- logger.warning( +- "Field %s of %s@%s not updated (id: %s), because " +- "it has changed since the last update", +- key, record.id, model, fs_id) +- continue ++ if _update_changed_fields: ++ logger.warning( ++ "Field %s of %s@%s (id: %s) " ++ "has changed since the last update\n" ++ "It will be nevertheless updated", ++ key, record.id, model, fs_id) ++ else: ++ logger.warning( ++ "Field %s of %s@%s not updated (id: %s), because " ++ "it has changed since the last update", ++ key, record.id, model, fs_id) ++ continue + + # so, the field in the fs and in the db are different, + # and no user changed the value in the db: diff --git a/fix_werkzeug.patch b/fix_werkzeug.patch new file mode 100644 index 0000000..0632b27 --- /dev/null +++ b/fix_werkzeug.patch @@ -0,0 +1,38 @@ +diff -U 3 -dHrN -- a/trytond/wsgi.py b/trytond/wsgi.py +--- a/trytond/wsgi.py 2021-02-12 10:14:41.000000000 +0100 ++++ b/trytond/wsgi.py 2021-02-15 12:37:50.432511576 +0100 +@@ -10,13 +10,23 @@ + from werkzeug.wrappers import Response + from werkzeug.routing import Map, Rule + from werkzeug.exceptions import abort, HTTPException, InternalServerError +-from werkzeug.contrib.fixers import ProxyFix ++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.security import safe_join + except ImportError: + safe_join = posixpath.join +- +-from werkzeug.wsgi import SharedDataMiddleware ++try: ++ from werkzeug.middleware.shared_data import SharedDataMiddleware ++except ImportError: ++ from werkzeug.wsgi import SharedDataMiddleware + + import wrapt + +@@ -157,6 +167,6 @@ + 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 diff --git a/fix_werkzeug_2.x.patch b/fix_werkzeug_2.x.patch new file mode 100644 index 0000000..0fc88a1 --- /dev/null +++ b/fix_werkzeug_2.x.patch @@ -0,0 +1,52 @@ +--- a/trytond/protocols/wrappers.py ++++ b/trytond/protocols/wrappers.py +@@ -12,7 +12,6 @@ + from http import client as HTTPStatus + + from werkzeug.wrappers import Request as _Request, Response +-from werkzeug.http import wsgi_to_bytes, bytes_to_wsgi + from werkzeug.datastructures import Authorization + from werkzeug.exceptions import abort, HTTPException + +@@ -113,7 +112,8 @@ + def parse_authorization_header(value): + if not value: + return +- value = wsgi_to_bytes(value) ++ if not isinstance(value, bytes): ++ value = value.encode('latin1') + try: + auth_type, auth_info = value.split(None, 1) + auth_type = auth_type.lower() +@@ -127,9 +127,9 @@ + except Exception: + return + return Authorization('session', { +- 'username': bytes_to_wsgi(username), ++ 'username': username.decode("latin1"), + 'userid': userid, +- 'session': bytes_to_wsgi(session), ++ 'session': session.decode("latin1"), + }) + + +@@ -214,16 +214,16 @@ + pool = Pool() + UserApplication = pool.get('res.user.application') + +- authorization = wsgi_to_bytes(request.headers['Authorization']) ++ authorization = request.headers['Authorization'] + try: + auth_type, auth_info = authorization.split(None, 1) + auth_type = auth_type.lower() + except ValueError: + abort(HTTPStatus.UNAUTHORIZED) +- if auth_type != b'bearer': ++ if auth_type != 'bearer': + abort(HTTPStatus.FORBIDDEN) + +- application = UserApplication.check(bytes_to_wsgi(auth_info), name) ++ application = UserApplication.check(auth_info, name) + if not application: + abort(HTTPStatus.FORBIDDEN) + transaction = Transaction() diff --git a/revert_werkzeug_setup.patch b/revert_werkzeug_setup.patch new file mode 100644 index 0000000..fc50520 --- /dev/null +++ b/revert_werkzeug_setup.patch @@ -0,0 +1,12 @@ +--- a/setup.py ++++ b/setup.py +@@ -108,7 +108,7 @@ + 'python-dateutil', + 'polib', + 'python-sql >= 0.5', +- 'werkzeug < 1.0', ++ 'werkzeug', + 'wrapt', + 'passlib >= 1.7.0', + ], + diff --git a/trytond-5.0.36.tar.gz b/trytond-5.0.36.tar.gz new file mode 100644 index 0000000..6139299 --- /dev/null +++ b/trytond-5.0.36.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a49073c88cc3fb6a4d80e56a4fa888f92ff797bb6fa65d79d7f3aabf0c35c9a0 +size 660286 diff --git a/trytond-5.0.36.tar.gz.asc b/trytond-5.0.36.tar.gz.asc new file mode 100644 index 0000000..043e2c3 --- /dev/null +++ b/trytond-5.0.36.tar.gz.asc @@ -0,0 +1,12 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmDLoPkACgkQV09u/05H +dRftPgf5AZAZvbFS876LerbKNJsYUPegdfDtojOpYYRIVLsad5Wcc5FKPvmKZqry +ba1L3PFaUAG8wLEYWF34ISw5aAS+BgdIypoWkj8BeiMnK3yGWZMvj7tE2Z/103QL +dtuLEGE0eTrYQhrQNEKiHt4Jo1aThpba3Mle4J52VavYaUCccobv9raZj3LK5snt +KwZbNWgSrHpKWO3lSCwEHDXSNmHC3eefFmFtkzt3qqB9ac9HVnT9Ia3TUXIOvguE +N9ATbyaqQl0KrcIsFkjXaXW+F3zbwdPoVk/YVdum6KoX0p78cSMh14y2zwRlolz1 +tXoDOqHk9iETWaaQS7wTHFhOIABZpg== +=lOWf +-----END PGP SIGNATURE----- diff --git a/trytond-5.0.44.tar.gz b/trytond-5.0.44.tar.gz new file mode 100644 index 0000000..b3ef1e6 --- /dev/null +++ b/trytond-5.0.44.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fea00a36f8d279f4d48fc458f824b4791596c91844397090f74e92f01adfad02 +size 661565 diff --git a/trytond-5.0.44.tar.gz.asc b/trytond-5.0.44.tar.gz.asc new file mode 100644 index 0000000..b2a4667 --- /dev/null +++ b/trytond-5.0.44.tar.gz.asc @@ -0,0 +1,12 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmH5aqAACgkQV09u/05H +dRe1Agf/aEs72XXkbooX4WEPZv8MwMzYXfGc/2Rp2yWMDlSLp37EqhfouYyaE2yI +Ae3uLZv+I6DTWPYSANFXakpOr0auPrVSvI12z5KcQ7A5dga9Gm3hxYCdmwaXthfp +/tUHAS6WTo1nzbI2SUnxSOFu9N8RZXiPoM7L2m2vHckP6yaFsr0oLuHbRf+Y1hPP +w8D/grArlyxCMMrxv0IQuF9TrNUtTV5p7vjFlpH5+vZT5C1QG6Dn3fAAzi1YI0jv +oZ9kZWH8QslAYg1S0ZkO+3/Pn6n89GVcLvwliIFdbRf+a7g6Tnsr6Mn9WMxv83RW +FsWim8WDhe0RDhKuEpGBE+mTo0CFjQ== +=sKp7 +-----END PGP SIGNATURE----- diff --git a/trytond-6.0.26.tar.gz b/trytond-6.0.26.tar.gz deleted file mode 100644 index cfafa3f..0000000 --- a/trytond-6.0.26.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17f3149d275453640a46bb99d510fa50566a50fe4567978cbd908e2b7b1ca8de -size 852606 diff --git a/trytond-6.0.26.tar.gz.asc b/trytond-6.0.26.tar.gz.asc deleted file mode 100644 index 495bcc8..0000000 --- a/trytond-6.0.26.tar.gz.asc +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmPEOQQACgkQV09u/05H -dRegmAf+OvgY1Mba4p4X4c4Sm2pE5VyKea2aSr5UMlXctxrSn4sYa1yzECEv48gN -PfMdh8Mkt+G796G9izOZlx1umWLnSvLTEOApJLYfRClRH2GY5A2EgQ45qTih6Zfc -tYkokz3FJE4hjNmrPOuzQXiHKPMvzDFli7JWyTdOHtakVv5iuUXbbP8BK8UlVMe3 -HN5bmqRE2SJeWCQrAq1VfTUf1b4TKfX5DDXE3Gg4G8Oc1VydHv5sp9GRM5USxfmX -2ZeObrhvOryNJfbY716CwssbTc9Ti/pqaGsw1aCTaSpWzGXZtnVxBBgawp/Hu7lA -2I6uRykB96C+F9sb1q0uxCZkLjYUjw== -=F5Jk ------END PGP SIGNATURE----- diff --git a/trytond-6.0.27.tar.gz b/trytond-6.0.27.tar.gz new file mode 100644 index 0000000..508bb27 --- /dev/null +++ b/trytond-6.0.27.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc955437e7af8bb2546d91212f941b563e0947c80f93465979c4a2005322dee1 +size 852589 diff --git a/trytond-6.0.27.tar.gz.asc b/trytond-6.0.27.tar.gz.asc new file mode 100644 index 0000000..253b35d --- /dev/null +++ b/trytond-6.0.27.tar.gz.asc @@ -0,0 +1,12 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmPgFo4ACgkQV09u/05H +dRfj+Qf9ERTUFZkJT/DYphet7D7iooqg2vG/8p2a9C5p+q9+NfWuONKSVMSAddQ+ +wDGiokFejqFa1Vc07eSL+tJQb+BTwSSoobU0zRYq9rNMAs5Ezak+J0OjDG8fRi7F +qB9qZLiKp94+0POqhteGQWw/mYIBbvFI8wAMdCU766bO4dj1axm0lTZNToXC4hTe +/F2y1coc3ebhUxT8moJ/z2btC77dsP+Y0NAN9BIYIAmO4Nme2W9Hvw5J83q8ieyl +OmpZGM3YLEf78SuHxx1xFOem55yZPVVOs6unSiZxDPyGjBvPiHRK2v53sH/JL5/Y +VFFze+mQmV8jRlchVcyESDeUhcwHzQ== +=tx+t +-----END PGP SIGNATURE----- diff --git a/trytond.changes b/trytond.changes index 489dce4..38b1f93 100644 --- a/trytond.changes +++ b/trytond.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 6 17:36:41 UTC 2023 - Axel Braun + +- Version 6.0.27 - Bugfix Release + ------------------------------------------------------------------- Mon Jan 16 21:18:26 UTC 2023 - Axel Braun diff --git a/trytond.conf.example b/trytond.conf.example new file mode 100644 index 0000000..43751b7 --- /dev/null +++ b/trytond.conf.example @@ -0,0 +1,143 @@ +# /etc/tryton/trytond.conf - Configuration file for Tryton Server (trytond) +# +# This file contains the most common settings for trytond (Defaults +# are commented). +# For more information read +# /usr/share/doc/packages/trytond + +[database] +# Database related settings + +# The URI to connect to the SQL database (following RFC-3986) +# uri = database://username:password@host:port/ +# (Internal default: sqlite:// (i.e. a local SQLite database)) +# +# PostgreSQL via Unix domain sockets +# (e.g. PostgreSQL database running on the same machine (localhost)) +#uri = postgresql://tryton:tryton@/ +# +#Default setting for a local postgres database + +uri = postgresql:/// + +# +# PostgreSQL via TCP/IP +# (e.g. connecting to a PostgreSQL database running on a remote machine or +# by means of md5 authentication. Needs PostgreSQL to be configured to accept +# those connections (pg_hba.conf).) +#uri = postgresql://tryton:tryton@localhost:5432/ + +# The path to the directory where the Tryton Server stores files. +# The server must have write permissions to this directory. +# (Internal default: /var/lib/trytond) +path = /var/lib/tryton + +# Shall available databases be listed in the client? +#list = True + +# The number of retries of the Tryton Server when there are errors +# in a request to the database +#retry = 5 + +# The primary language, that is used to store entries in translatable +# fields into the database. +#language = en_US + +[ssl] +# SSL settings +# Activation of SSL for all available protocols. +# Uncomment the following settings for key and certificate +# to enable SSL. + +# The path to the private key +#privatekey = /etc/ssl/private/ssl-cert-snakeoil.key + +# The path to the certificate +#certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem + +[jsonrpc] +# Settings for the JSON-RPC network interface + +# The IP/host and port number of the interface +# (Internal default: localhost:8000) +# +# Listen on all interfaces (IPv4) + +listen = 0.0.0.0:8000 + +# +# Listen on all interfaces (IPv4 and IPv6) +#listen = [::]:8000 + +# The hostname for this interface +#hostname = + +# The root path to retrieve data for GET requests +#data = jsondata + +[xmlrpc] +# Settings for the XML-RPC network interface + +# The IP/host and port number of the interface +#listen = localhost:8069 + +[webdav] +# Settings for the WebDAV network interface + +# The IP/host and port number of the interface +#listen = localhost:8080 + +[session] +# Session settings + +# 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 + +# The URI to connect to the SMTP server. +# Available protocols are: +# - smtp: simple SMTP +# - smtp+tls: SMTP with STARTTLS +# - smtps: SMTP with SSL +#uri = smtp://localhost:25 + +# The From address used by the Tryton Server to send emails. +#from = tryton@localhost + +[report] +# Report settings + +# Unoconv parameters for connection to the unoconv service. +#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext + +# Module settings +# +# Some modules are reading configuration parameters from this +# configuration file. These settings only apply when those modules +# are installed. +# +#[ldap_authentication] +# The URI to connect to the LDAP server. +#uri = ldap://host:port/dn?attributes?scope?filter?extensions +# A basic default URL could look like +#uri = ldap://localhost:389/ + +[web] +# Path for the web-frontend +#root = /usr/lib/node-modules/tryton-sao + +[webdav] +# The port on which the webdav server listens +listen = [::]:8080 diff --git a/trytond.spec b/trytond.spec index c8fa049..488015a 100644 --- a/trytond.spec +++ b/trytond.spec @@ -20,7 +20,7 @@ %define majorver 6.0 %define base_name tryton Name: trytond -Version: %{majorver}.26 +Version: %{majorver}.27 Release: 0 Summary: An Enterprise Resource Planning (ERP) system License: GPL-3.0-or-later From a1e14ebd0ee9205d28f1e473b9929f909dd4ee2a0f2ae7437a021b10c93b49af Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 6 Feb 2023 17:37:39 +0000 Subject: [PATCH 02/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=163 --- trytond-5.0.36.tar.gz | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 trytond-5.0.36.tar.gz diff --git a/trytond-5.0.36.tar.gz b/trytond-5.0.36.tar.gz deleted file mode 100644 index 6139299..0000000 --- a/trytond-5.0.36.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a49073c88cc3fb6a4d80e56a4fa888f92ff797bb6fa65d79d7f3aabf0c35c9a0 -size 660286 From 2df4aa28d5af7fb4978aae24a43c79e306358730d8458a08c5d63ebcbf2c59a4 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 6 Feb 2023 17:37:48 +0000 Subject: [PATCH 03/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=164 --- trytond-5.0.36.tar.gz.asc | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 trytond-5.0.36.tar.gz.asc diff --git a/trytond-5.0.36.tar.gz.asc b/trytond-5.0.36.tar.gz.asc deleted file mode 100644 index 043e2c3..0000000 --- a/trytond-5.0.36.tar.gz.asc +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmDLoPkACgkQV09u/05H -dRftPgf5AZAZvbFS876LerbKNJsYUPegdfDtojOpYYRIVLsad5Wcc5FKPvmKZqry -ba1L3PFaUAG8wLEYWF34ISw5aAS+BgdIypoWkj8BeiMnK3yGWZMvj7tE2Z/103QL -dtuLEGE0eTrYQhrQNEKiHt4Jo1aThpba3Mle4J52VavYaUCccobv9raZj3LK5snt -KwZbNWgSrHpKWO3lSCwEHDXSNmHC3eefFmFtkzt3qqB9ac9HVnT9Ia3TUXIOvguE -N9ATbyaqQl0KrcIsFkjXaXW+F3zbwdPoVk/YVdum6KoX0p78cSMh14y2zwRlolz1 -tXoDOqHk9iETWaaQS7wTHFhOIABZpg== -=lOWf ------END PGP SIGNATURE----- From 48408e2a9f3fcb8bb5d65773530bfb03cd5341c10ac2d0be7aa9eea76233f793 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 6 Feb 2023 17:37:57 +0000 Subject: [PATCH 04/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=165 --- trytond-5.0.44.tar.gz | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 trytond-5.0.44.tar.gz diff --git a/trytond-5.0.44.tar.gz b/trytond-5.0.44.tar.gz deleted file mode 100644 index b3ef1e6..0000000 --- a/trytond-5.0.44.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fea00a36f8d279f4d48fc458f824b4791596c91844397090f74e92f01adfad02 -size 661565 From e23563a7fbb53919f75b05f5ae12fde86f88673a2e2759e0c9759010b41f53be Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 6 Feb 2023 17:38:07 +0000 Subject: [PATCH 05/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=166 --- trytond-5.0.44.tar.gz.asc | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 trytond-5.0.44.tar.gz.asc diff --git a/trytond-5.0.44.tar.gz.asc b/trytond-5.0.44.tar.gz.asc deleted file mode 100644 index b2a4667..0000000 --- a/trytond-5.0.44.tar.gz.asc +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmH5aqAACgkQV09u/05H -dRe1Agf/aEs72XXkbooX4WEPZv8MwMzYXfGc/2Rp2yWMDlSLp37EqhfouYyaE2yI -Ae3uLZv+I6DTWPYSANFXakpOr0auPrVSvI12z5KcQ7A5dga9Gm3hxYCdmwaXthfp -/tUHAS6WTo1nzbI2SUnxSOFu9N8RZXiPoM7L2m2vHckP6yaFsr0oLuHbRf+Y1hPP -w8D/grArlyxCMMrxv0IQuF9TrNUtTV5p7vjFlpH5+vZT5C1QG6Dn3fAAzi1YI0jv -oZ9kZWH8QslAYg1S0ZkO+3/Pn6n89GVcLvwliIFdbRf+a7g6Tnsr6Mn9WMxv83RW -FsWim8WDhe0RDhKuEpGBE+mTo0CFjQ== -=sKp7 ------END PGP SIGNATURE----- From 4d4cb10299e69c363d460c16b7e737e3e7d3f18b223d466f14cbb427525773b9 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 12 Feb 2023 15:47:31 +0000 Subject: [PATCH 06/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=167 --- Update_changed_fields.diff | 47 -------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 Update_changed_fields.diff diff --git a/Update_changed_fields.diff b/Update_changed_fields.diff deleted file mode 100644 index 93bd3d4..0000000 --- a/Update_changed_fields.diff +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/trytond/convert.py b/trytond/convert.py -index c1dde99f19ae579d3d84d0e9f75272ea857f86f1..b57f1c710aefb7579d4edd9d07baad30df23ba8b 100644 ---- a/trytond/convert.py -+++ b/trytond/convert.py -@@ -9,6 +9,8 @@ import re - from collections import defaultdict - from decimal import Decimal - -+from trytond.config import config -+ - from . import __version__ - from .tools import grouped_slice - from .transaction import Transaction -@@ -19,6 +21,9 @@ logger = logging.getLogger(__name__) - CDATA_START = re.compile('^\s*\<\!\[cdata\[', re.IGNORECASE) - CDATA_END = re.compile('\]\]\>\s*$', re.IGNORECASE) - -+_update_changed_fields = config.getboolean('optional', -+ 'update_changed_fields', default=True) -+ - - class DummyTagHandler: - """Dubhandler implementing empty methods. Will be used when whe -@@ -668,11 +673,18 @@ class TrytondXmlHandler(sax.handler.ContentHandler): - # if they are not false in a boolean context (ie None, - # False, {} or []) - if db_field != expected_value and (db_field or expected_value): -- logger.warning( -- "Field %s of %s@%s not updated (id: %s), because " -- "it has changed since the last update", -- key, record.id, model, fs_id) -- continue -+ if _update_changed_fields: -+ logger.warning( -+ "Field %s of %s@%s (id: %s) " -+ "has changed since the last update\n" -+ "It will be nevertheless updated", -+ key, record.id, model, fs_id) -+ else: -+ logger.warning( -+ "Field %s of %s@%s not updated (id: %s), because " -+ "it has changed since the last update", -+ key, record.id, model, fs_id) -+ continue - - # so, the field in the fs and in the db are different, - # and no user changed the value in the db: From 4f539b0dfc3f538569a88136c4e3655e973b29847f2fd6945c27969337d7cabe Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 12 Feb 2023 15:51:25 +0000 Subject: [PATCH 07/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=168 --- fix_werkzeug.patch | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 fix_werkzeug.patch diff --git a/fix_werkzeug.patch b/fix_werkzeug.patch deleted file mode 100644 index 0632b27..0000000 --- a/fix_werkzeug.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -U 3 -dHrN -- a/trytond/wsgi.py b/trytond/wsgi.py ---- a/trytond/wsgi.py 2021-02-12 10:14:41.000000000 +0100 -+++ b/trytond/wsgi.py 2021-02-15 12:37:50.432511576 +0100 -@@ -10,13 +10,23 @@ - from werkzeug.wrappers import Response - from werkzeug.routing import Map, Rule - from werkzeug.exceptions import abort, HTTPException, InternalServerError --from werkzeug.contrib.fixers import ProxyFix -+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.security import safe_join - except ImportError: - safe_join = posixpath.join -- --from werkzeug.wsgi import SharedDataMiddleware -+try: -+ from werkzeug.middleware.shared_data import SharedDataMiddleware -+except ImportError: -+ from werkzeug.wsgi import SharedDataMiddleware - - import wrapt - -@@ -157,6 +167,6 @@ - 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 From 805e10ebeb257110440e4e74a9e95c1ee17de7b1acb5a20f825e2c6166d0d6cc Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 12 Feb 2023 16:08:54 +0000 Subject: [PATCH 08/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=169 --- fix_werkzeug_2.x.patch | 52 ------------------------------------------ 1 file changed, 52 deletions(-) delete mode 100644 fix_werkzeug_2.x.patch diff --git a/fix_werkzeug_2.x.patch b/fix_werkzeug_2.x.patch deleted file mode 100644 index 0fc88a1..0000000 --- a/fix_werkzeug_2.x.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/trytond/protocols/wrappers.py -+++ b/trytond/protocols/wrappers.py -@@ -12,7 +12,6 @@ - from http import client as HTTPStatus - - from werkzeug.wrappers import Request as _Request, Response --from werkzeug.http import wsgi_to_bytes, bytes_to_wsgi - from werkzeug.datastructures import Authorization - from werkzeug.exceptions import abort, HTTPException - -@@ -113,7 +112,8 @@ - def parse_authorization_header(value): - if not value: - return -- value = wsgi_to_bytes(value) -+ if not isinstance(value, bytes): -+ value = value.encode('latin1') - try: - auth_type, auth_info = value.split(None, 1) - auth_type = auth_type.lower() -@@ -127,9 +127,9 @@ - except Exception: - return - return Authorization('session', { -- 'username': bytes_to_wsgi(username), -+ 'username': username.decode("latin1"), - 'userid': userid, -- 'session': bytes_to_wsgi(session), -+ 'session': session.decode("latin1"), - }) - - -@@ -214,16 +214,16 @@ - pool = Pool() - UserApplication = pool.get('res.user.application') - -- authorization = wsgi_to_bytes(request.headers['Authorization']) -+ authorization = request.headers['Authorization'] - try: - auth_type, auth_info = authorization.split(None, 1) - auth_type = auth_type.lower() - except ValueError: - abort(HTTPStatus.UNAUTHORIZED) -- if auth_type != b'bearer': -+ if auth_type != 'bearer': - abort(HTTPStatus.FORBIDDEN) - -- application = UserApplication.check(bytes_to_wsgi(auth_info), name) -+ application = UserApplication.check(auth_info, name) - if not application: - abort(HTTPStatus.FORBIDDEN) - transaction = Transaction() From 41cb25e608912636fcdf1f58501cc64768bedc59205be934417012ca10eb765a Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 12 Feb 2023 16:11:06 +0000 Subject: [PATCH 09/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=170 --- revert_werkzeug_setup.patch | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 revert_werkzeug_setup.patch diff --git a/revert_werkzeug_setup.patch b/revert_werkzeug_setup.patch deleted file mode 100644 index fc50520..0000000 --- a/revert_werkzeug_setup.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/setup.py -+++ b/setup.py -@@ -108,7 +108,7 @@ - 'python-dateutil', - 'polib', - 'python-sql >= 0.5', -- 'werkzeug < 1.0', -+ 'werkzeug', - 'wrapt', - 'passlib >= 1.7.0', - ], - From c2cb6435867812bcc4d21e24750127393dc392f85b004ff82e487546f6a216eb Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sun, 12 Feb 2023 16:18:04 +0000 Subject: [PATCH 10/10] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=171 --- trytond.conf.example | 143 ------------------------------------------- 1 file changed, 143 deletions(-) delete mode 100644 trytond.conf.example diff --git a/trytond.conf.example b/trytond.conf.example deleted file mode 100644 index 43751b7..0000000 --- a/trytond.conf.example +++ /dev/null @@ -1,143 +0,0 @@ -# /etc/tryton/trytond.conf - Configuration file for Tryton Server (trytond) -# -# This file contains the most common settings for trytond (Defaults -# are commented). -# For more information read -# /usr/share/doc/packages/trytond - -[database] -# Database related settings - -# The URI to connect to the SQL database (following RFC-3986) -# uri = database://username:password@host:port/ -# (Internal default: sqlite:// (i.e. a local SQLite database)) -# -# PostgreSQL via Unix domain sockets -# (e.g. PostgreSQL database running on the same machine (localhost)) -#uri = postgresql://tryton:tryton@/ -# -#Default setting for a local postgres database - -uri = postgresql:/// - -# -# PostgreSQL via TCP/IP -# (e.g. connecting to a PostgreSQL database running on a remote machine or -# by means of md5 authentication. Needs PostgreSQL to be configured to accept -# those connections (pg_hba.conf).) -#uri = postgresql://tryton:tryton@localhost:5432/ - -# The path to the directory where the Tryton Server stores files. -# The server must have write permissions to this directory. -# (Internal default: /var/lib/trytond) -path = /var/lib/tryton - -# Shall available databases be listed in the client? -#list = True - -# The number of retries of the Tryton Server when there are errors -# in a request to the database -#retry = 5 - -# The primary language, that is used to store entries in translatable -# fields into the database. -#language = en_US - -[ssl] -# SSL settings -# Activation of SSL for all available protocols. -# Uncomment the following settings for key and certificate -# to enable SSL. - -# The path to the private key -#privatekey = /etc/ssl/private/ssl-cert-snakeoil.key - -# The path to the certificate -#certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem - -[jsonrpc] -# Settings for the JSON-RPC network interface - -# The IP/host and port number of the interface -# (Internal default: localhost:8000) -# -# Listen on all interfaces (IPv4) - -listen = 0.0.0.0:8000 - -# -# Listen on all interfaces (IPv4 and IPv6) -#listen = [::]:8000 - -# The hostname for this interface -#hostname = - -# The root path to retrieve data for GET requests -#data = jsondata - -[xmlrpc] -# Settings for the XML-RPC network interface - -# The IP/host and port number of the interface -#listen = localhost:8069 - -[webdav] -# Settings for the WebDAV network interface - -# The IP/host and port number of the interface -#listen = localhost:8080 - -[session] -# Session settings - -# 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 - -# The URI to connect to the SMTP server. -# Available protocols are: -# - smtp: simple SMTP -# - smtp+tls: SMTP with STARTTLS -# - smtps: SMTP with SSL -#uri = smtp://localhost:25 - -# The From address used by the Tryton Server to send emails. -#from = tryton@localhost - -[report] -# Report settings - -# Unoconv parameters for connection to the unoconv service. -#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext - -# Module settings -# -# Some modules are reading configuration parameters from this -# configuration file. These settings only apply when those modules -# are installed. -# -#[ldap_authentication] -# The URI to connect to the LDAP server. -#uri = ldap://host:port/dn?attributes?scope?filter?extensions -# A basic default URL could look like -#uri = ldap://localhost:389/ - -[web] -# Path for the web-frontend -#root = /usr/lib/node-modules/tryton-sao - -[webdav] -# The port on which the webdav server listens -listen = [::]:8080