openSUSE Commits
Threads by month
- ----- 2024 -----
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
December 2023
- 1 participants
- 1464 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-oslo.log for openSUSE:Factory checked in at 2023-12-28 23:03:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.log (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.log.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.log"
Thu Dec 28 23:03:17 2023 rev:25 rq:1135455 version:5.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-oslo.log/python-oslo.log.changes 2023-08-10 15:35:12.052650390 +0200
+++ /work/SRC/openSUSE:Factory/.python-oslo.log.new.28375/python-oslo.log.changes 2023-12-28 23:04:57.586109474 +0100
@@ -1,0 +2,14 @@
+Thu Dec 28 09:39:45 UTC 2023 - cloud-devel(a)suse.de
+
+- update to version 5.4.0
+ - Cleanup py27 support
+ - Deprecate Windows support
+ - Update master for stable/2023.2
+ - Imported Translations from Zanata
+ - Moves supported python runtimes from version 3.8 to 3.10
+ - Revert "Moves supported python runtimes from version 3.8 to 3.10"
+ - Catch RuntimeError when loading log config file
+ - Bump bandit
+ - Update master for stable/2023.1
+
+-------------------------------------------------------------------
Old:
----
oslo.log-5.2.0.tar.gz
New:
----
oslo.log-5.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.log.spec ++++++
--- /var/tmp/diff_new_pack.s1oBVo/_old 2023-12-28 23:04:58.042126140 +0100
+++ /var/tmp/diff_new_pack.s1oBVo/_new 2023-12-28 23:04:58.046126286 +0100
@@ -17,15 +17,16 @@
Name: python-oslo.log
-Version: 5.2.0
+Version: 5.4.0
Release: 0
Summary: OpenStack log library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/oslo.log
-Source0: https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-5.2.0.ta…
+Source0: https://files.pythonhosted.org/packages/source/o/oslo.log/oslo.log-5.4.0.ta…
BuildRequires: fdupes
BuildRequires: openstack-macros
+BuildRequires: python3-eventlet
BuildRequires: python3-monotonic
BuildRequires: python3-oslo.config >= 5.2.0
BuildRequires: python3-oslo.context >= 2.21.0
@@ -77,14 +78,14 @@
Documentation for the oslo.log library.
%prep
-%autosetup -p1 -n oslo.log-5.2.0
+%autosetup -p1 -n oslo.log-5.4.0
%py_req_cleanup
%build
%{py3_build}
# generate html docs
-PYTHONPATH=. PBR_VERSION=5.2.0 %sphinx_build -b html doc/source doc/build/html
+PYTHONPATH=. PBR_VERSION=5.4.0 %sphinx_build -b html doc/source doc/build/html
rm -rf doc/build/html/.{doctrees,buildinfo}
%install
++++++ oslo.log-5.2.0.tar.gz -> oslo.log-5.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/AUTHORS new/oslo.log-5.4.0/AUTHORS
--- old/oslo.log-5.2.0/AUTHORS 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/AUTHORS 2023-11-14 10:58:27.000000000 +0100
@@ -5,6 +5,7 @@
Alexander Gorodnev <agorodnev(a)mirantis.com>
Alexis Lee <lxsli(a)hpe.com>
Alexis Lee <openstack(a)lxsli.co.uk>
+Alfredo Moralejo <amoralej(a)redhat.com>
Alvaro Lopez Garcia <aloga(a)ifca.unican.es>
Andrea Frittoli <andrea.frittoli(a)gmail.com>
Andreas Jaeger <aj(a)suse.com>
@@ -50,7 +51,6 @@
Edan David <edand(a)mellanox.com>
Edwin Zhai <edwin.zhai(a)intel.com>
Elena Ezhova <eezhova(a)mirantis.com>
-Elod Illes <elod.illes(a)est.tech>
Eric Brown <browne(a)vmware.com>
Eric Harney <eharney(a)redhat.com>
Eric Windisch <eric(a)cloudscaling.com>
@@ -60,6 +60,7 @@
Francois Deppierraz <francois(a)ctrlaltdel.ch>
Gage Hugo <gagehugo(a)gmail.com>
Gary Kotton <gkotton(a)vmware.com>
+Ghanshyam <gmann(a)ghanshyammann.com>
Ghanshyam Mann <gmann(a)ghanshyammann.com>
Gorka Eguileor <geguileo(a)redhat.com>
Goutham Pacha Ravi <gouthampravi(a)gmail.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/ChangeLog new/oslo.log-5.4.0/ChangeLog
--- old/oslo.log-5.2.0/ChangeLog 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/ChangeLog 2023-11-14 10:58:27.000000000 +0100
@@ -1,19 +1,28 @@
CHANGES
=======
-5.2.0
+5.4.0
-----
-* Add 'revert bugfix #1983863' release note
-* Revert "Fix logging in eventlet native threads"
-* Revert "Make the eventlet logging fix execution conditional"
-* Update TOX\_CONSTRAINTS\_FILE for stable/2023.1
-* Update .gitreview for stable/2023.1
+* Deprecate Windows support
+* Update master for stable/2023.2
+
+5.3.0
+-----
+
+* Catch RuntimeError when loading log config file
+* Bump bandit
+* Imported Translations from Zanata
+* Revert "Moves supported python runtimes from version 3.8 to 3.10"
+* Moves supported python runtimes from version 3.8 to 3.10
+* Update master for stable/2023.1
+* Imported Translations from Zanata
5.1.0
-----
* tox - fix allowlist\_external issues
+* Cleanup py27 support
5.0.2
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/PKG-INFO new/oslo.log-5.4.0/PKG-INFO
--- old/oslo.log-5.2.0/PKG-INFO 2023-03-21 17:19:26.847390700 +0100
+++ new/oslo.log-5.4.0/PKG-INFO 2023-11-14 10:58:27.883485300 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.log
-Version: 5.2.0
+Version: 5.4.0
Summary: oslo.log library
Home-page: https://docs.openstack.org/oslo.log/latest
Author: OpenStack
@@ -49,6 +49,7 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/PKG-INFO new/oslo.log-5.4.0/oslo.log.egg-info/PKG-INFO
--- old/oslo.log-5.2.0/oslo.log.egg-info/PKG-INFO 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/PKG-INFO 2023-11-14 10:58:27.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.log
-Version: 5.2.0
+Version: 5.4.0
Summary: oslo.log library
Home-page: https://docs.openstack.org/oslo.log/latest
Author: OpenStack
@@ -49,6 +49,7 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
+Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/SOURCES.txt new/oslo.log-5.4.0/oslo.log.egg-info/SOURCES.txt
--- old/oslo.log-5.2.0/oslo.log.egg-info/SOURCES.txt 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/SOURCES.txt 2023-11-14 10:58:27.000000000 +0100
@@ -60,6 +60,7 @@
oslo_log/handlers.py
oslo_log/helpers.py
oslo_log/log.py
+oslo_log/pipe_mutex.py
oslo_log/rate_limit.py
oslo_log/version.py
oslo_log/versionutils.py
@@ -80,6 +81,7 @@
oslo_log/tests/unit/test_formatters.py
oslo_log/tests/unit/test_helpers.py
oslo_log/tests/unit/test_log.py
+oslo_log/tests/unit/test_pipe_mutex.py
oslo_log/tests/unit/test_rate_limit.py
oslo_log/tests/unit/test_versionutils.py
oslo_log/tests/unit/fixture/__init__.py
@@ -91,6 +93,7 @@
releasenotes/notes/add-reno-e4fedb11ece56f1e.yaml
releasenotes/notes/add-system_scope-to-logging_user_identity_format-0581ce5070740375.yaml
releasenotes/notes/always-add-error-text-715022964364ffa0.yaml
+releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
releasenotes/notes/drop-python27-support-0fe4909a5468feb3.yaml
releasenotes/notes/info-logging-7b7be9fc7a95aebc.yaml
releasenotes/notes/init-global-request-id-eb2031bc221e5fb7.yaml
@@ -98,16 +101,18 @@
releasenotes/notes/jsonformatter-repr-fd616eb6fa6caeb3.yaml
releasenotes/notes/log-global_request_id-f97e6d663e8a80b3.yaml
releasenotes/notes/log-rotation-595f8232cd987a6d.yaml
+releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
releasenotes/notes/reload_log_config-743817192b1172b6.yaml
releasenotes/notes/remove-log-format-b4b949701cee3315.yaml
releasenotes/notes/remove-syslog-rfc-format-7a06772c0bb48e9b.yaml
releasenotes/notes/remove-verbose-option-d0d1381e182d1be1.yaml
-releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
releasenotes/notes/systemd-journal-support-fcbc34b3c5ce93ec.yaml
releasenotes/notes/use-json-option-96f71da54a3b9a18.yaml
releasenotes/notes/use-project-in-user-identity-93fd6e0a2e434a6f.yaml
releasenotes/notes/use_stderr_default_false-50d846b88cf2be90.yaml
releasenotes/notes/windows-eventlog-2beb0a6010e342eb.yaml
+releasenotes/source/2023.1.rst
+releasenotes/source/2023.2.rst
releasenotes/source/conf.py
releasenotes/source/index.rst
releasenotes/source/liberty.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/pbr.json new/oslo.log-5.4.0/oslo.log.egg-info/pbr.json
--- old/oslo.log-5.2.0/oslo.log.egg-info/pbr.json 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/pbr.json 2023-11-14 10:58:27.000000000 +0100
@@ -1 +1 @@
-{"git_version": "16a8a42", "is_release": true}
\ No newline at end of file
+{"git_version": "b5b8c30", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo.log.egg-info/requires.txt new/oslo.log-5.4.0/oslo.log.egg-info/requires.txt
--- old/oslo.log-5.2.0/oslo.log.egg-info/requires.txt 2023-03-21 17:19:26.000000000 +0100
+++ new/oslo.log-5.4.0/oslo.log.egg-info/requires.txt 2023-11-14 10:58:27.000000000 +0100
@@ -17,8 +17,9 @@
systemd-python>=234
[test]
-bandit<1.7.0,>=1.6.0
+bandit<1.8.0,>=1.7.0
coverage>=4.5.1
+eventlet!=0.32.0,>=0.30.1
fixtures>=3.0.0
hacking<2.1.0,>=2.0.0
oslotest>=3.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/_options.py new/oslo.log-5.4.0/oslo_log/_options.py
--- old/oslo.log-5.2.0/oslo_log/_options.py 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/_options.py 2023-11-14 10:58:01.000000000 +0100
@@ -111,6 +111,8 @@
+ _IGNORE_MESSAGE),
cfg.BoolOpt('use_eventlog',
default=False,
+ deprecated_for_removal=True,
+ deprecated_reason='Windows support is no longer maintained.',
help='Log output to Windows Event Log.'),
cfg.IntOpt('log_rotate_interval',
default=1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/log.py new/oslo.log-5.4.0/oslo_log/log.py
--- old/oslo.log-5.2.0/oslo_log/log.py 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/log.py 2023-11-14 10:58:01.000000000 +0100
@@ -231,7 +231,7 @@
logging.config.fileConfig(log_config_append,
disable_existing_loggers=False)
_load_log_config.old_time = new_time
- except (configparser.Error, KeyError, os.error) as exc:
+ except (configparser.Error, KeyError, os.error, RuntimeError) as exc:
raise LogConfigError(log_config_append, str(exc))
@@ -265,8 +265,26 @@
conf.register_mutate_hook(_mutate_hook)
-def setup(conf, product_name, version='unknown'):
+def _fix_eventlet_logging():
+ """Properly setup logging with eventlet on native threads.
+
+ Workaround for: https://github.com/eventlet/eventlet/issues/432
+ """
+
+ # If eventlet was not loaded before call to setup assume it's not used.
+ eventlet = sys.modules.get('eventlet')
+ if eventlet:
+ import eventlet.green.threading
+ from oslo_log import pipe_mutex
+ logging.threading = eventlet.green.threading
+ logging._lock = logging.threading.RLock()
+ logging.Handler.createLock = pipe_mutex.pipe_createLock
+
+
+def setup(conf, product_name, version='unknown', *, fix_eventlet=True):
"""Setup logging for the current application."""
+ if fix_eventlet:
+ _fix_eventlet_logging()
if conf.log_config_append:
_load_log_config(conf.log_config_append)
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/pipe_mutex.py new/oslo.log-5.4.0/oslo_log/pipe_mutex.py
--- old/oslo.log-5.2.0/oslo_log/pipe_mutex.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/pipe_mutex.py 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,142 @@
+# Copyright (c) 2010-2012 OpenStack Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import errno
+import fcntl
+import os
+
+import eventlet
+import eventlet.debug
+import eventlet.greenthread
+import eventlet.hubs
+
+
+class PipeMutex(object):
+ """Mutex using a pipe.
+
+ Works across both greenlets and real threads, even at the same time.
+
+ Class code copied from Swift's swift/common/utils.py
+ Related eventlet bug: https://github.com/eventlet/eventlet/issues/432
+ """
+ def __init__(self):
+ self.rfd, self.wfd = os.pipe()
+
+ # You can't create a pipe in non-blocking mode; you must set it
+ # later.
+ rflags = fcntl.fcntl(self.rfd, fcntl.F_GETFL)
+ fcntl.fcntl(self.rfd, fcntl.F_SETFL, rflags | os.O_NONBLOCK)
+ os.write(self.wfd, b'-') # start unlocked
+
+ self.owner = None
+
+ self.recursion_depth = 0
+ # Usually, it's an error to have multiple greenthreads all waiting
+ # to read the same file descriptor. It's often a sign of inadequate
+ # concurrency control; for example, if you have two greenthreads
+ # trying to use the same memcache connection, they'll end up writing
+ # interleaved garbage to the socket or stealing part of each others'
+ # responses.
+ #
+ # In this case, we have multiple greenthreads waiting on the same
+ # file descriptor by design. This lets greenthreads in real thread A
+ # wait with greenthreads in real thread B for the same mutex.
+ # Therefore, we must turn off eventlet's multiple-reader detection.
+ #
+ # It would be better to turn off multiple-reader detection for only
+ # our calls to trampoline(), but eventlet does not support that.
+ eventlet.debug.hub_prevent_multiple_readers(False)
+
+ def acquire(self, blocking=True):
+ """Acquire the mutex.
+
+ If called with blocking=False, returns True if the mutex was
+ acquired and False if it wasn't. Otherwise, blocks until the mutex
+ is acquired and returns True.
+ This lock is recursive; the same greenthread may acquire it as many
+ times as it wants to, though it must then release it that many times
+ too.
+ """
+ current_greenthread_id = id(eventlet.greenthread.getcurrent())
+ if self.owner == current_greenthread_id:
+ self.recursion_depth += 1
+ return True
+
+ while True:
+ try:
+ # If there is a byte available, this will read it and remove
+ # it from the pipe. If not, this will raise OSError with
+ # errno=EAGAIN.
+ os.read(self.rfd, 1)
+ self.owner = current_greenthread_id
+ return True
+ except OSError as err:
+ if err.errno != errno.EAGAIN:
+ raise
+
+ if not blocking:
+ return False
+
+ # Tell eventlet to suspend the current greenthread until
+ # self.rfd becomes readable. This will happen when someone
+ # else writes to self.wfd.
+ eventlet.hubs.trampoline(self.rfd, read=True)
+
+ def release(self):
+ """Release the mutex."""
+ current_greenthread_id = id(eventlet.greenthread.getcurrent())
+ if self.owner != current_greenthread_id:
+ raise RuntimeError("cannot release un-acquired lock")
+
+ if self.recursion_depth > 0:
+ self.recursion_depth -= 1
+ return
+
+ self.owner = None
+ os.write(self.wfd, b'X')
+
+ def close(self):
+ """Close the mutex.
+
+ This releases its file descriptors.
+ You can't use a mutex after it's been closed.
+ """
+ if self.wfd is not None:
+ os.close(self.wfd)
+ self.wfd = None
+ if self.rfd is not None:
+ os.close(self.rfd)
+ self.rfd = None
+ self.owner = None
+ self.recursion_depth = 0
+
+ def __del__(self):
+ # We need this so we don't leak file descriptors. Otherwise, if you
+ # call get_logger() and don't explicitly dispose of it by calling
+ # logger.logger.handlers[0].lock.close() [1], the pipe file
+ # descriptors are leaked.
+ #
+ # This only really comes up in tests. Service processes tend to call
+ # get_logger() once and then hang on to it until they exit, but the
+ # test suite calls get_logger() a lot.
+ #
+ # [1] and that's a completely ridiculous thing to expect callers to
+ # do, so nobody does it and that's okay.
+ self.close()
+
+
+def pipe_createLock(self):
+ """Replacement for logging.Handler.createLock method."""
+ self.lock = PipeMutex()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/oslo_log/tests/unit/test_pipe_mutex.py new/oslo.log-5.4.0/oslo_log/tests/unit/test_pipe_mutex.py
--- old/oslo.log-5.2.0/oslo_log/tests/unit/test_pipe_mutex.py 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/oslo_log/tests/unit/test_pipe_mutex.py 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,209 @@
+# Copyright (c) 2010-2012 OpenStack Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import contextlib
+import unittest
+from unittest import mock
+
+import eventlet
+from eventlet import debug as eventlet_debug
+from eventlet import greenpool
+
+from oslo_log import pipe_mutex
+
+
+(a)contextlib.contextmanager
+def quiet_eventlet_exceptions():
+ orig_state = greenpool.DEBUG
+ eventlet_debug.hub_exceptions(False)
+ try:
+ yield
+ finally:
+ eventlet_debug.hub_exceptions(orig_state)
+
+
+class TestPipeMutex(unittest.TestCase):
+ """From Swift's test/unit/common/test_utils.py"""
+ def setUp(self):
+ self.mutex = pipe_mutex.PipeMutex()
+
+ def tearDown(self):
+ self.mutex.close()
+
+ def test_nonblocking(self):
+ evt_lock1 = eventlet.event.Event()
+ evt_lock2 = eventlet.event.Event()
+ evt_unlock = eventlet.event.Event()
+
+ def get_the_lock():
+ self.mutex.acquire()
+ evt_lock1.send('got the lock')
+ evt_lock2.wait()
+ self.mutex.release()
+ evt_unlock.send('released the lock')
+
+ eventlet.spawn(get_the_lock)
+ evt_lock1.wait() # Now, the other greenthread has the lock.
+
+ self.assertFalse(self.mutex.acquire(blocking=False))
+ evt_lock2.send('please release the lock')
+ evt_unlock.wait() # The other greenthread has released the lock.
+ self.assertTrue(self.mutex.acquire(blocking=False))
+
+ def test_recursive(self):
+ self.assertTrue(self.mutex.acquire(blocking=False))
+ self.assertTrue(self.mutex.acquire(blocking=False))
+
+ def try_acquire_lock():
+ return self.mutex.acquire(blocking=False)
+
+ self.assertFalse(eventlet.spawn(try_acquire_lock).wait())
+ self.mutex.release()
+ self.assertFalse(eventlet.spawn(try_acquire_lock).wait())
+ self.mutex.release()
+ self.assertTrue(eventlet.spawn(try_acquire_lock).wait())
+
+ def test_release_without_acquire(self):
+ self.assertRaises(RuntimeError, self.mutex.release)
+
+ def test_too_many_releases(self):
+ self.mutex.acquire()
+ self.mutex.release()
+ self.assertRaises(RuntimeError, self.mutex.release)
+
+ def test_wrong_releaser(self):
+ self.mutex.acquire()
+ with quiet_eventlet_exceptions():
+ self.assertRaises(RuntimeError,
+ eventlet.spawn(self.mutex.release).wait)
+
+ def test_blocking(self):
+ evt = eventlet.event.Event()
+
+ sequence = []
+
+ def coro1():
+ eventlet.sleep(0) # let coro2 go
+
+ self.mutex.acquire()
+ sequence.append('coro1 acquire')
+ evt.send('go')
+ self.mutex.release()
+ sequence.append('coro1 release')
+
+ def coro2():
+ evt.wait() # wait for coro1 to start us
+ self.mutex.acquire()
+ sequence.append('coro2 acquire')
+ self.mutex.release()
+ sequence.append('coro2 release')
+
+ c1 = eventlet.spawn(coro1)
+ c2 = eventlet.spawn(coro2)
+
+ c1.wait()
+ c2.wait()
+
+ self.assertEqual(sequence, [
+ 'coro1 acquire',
+ 'coro1 release',
+ 'coro2 acquire',
+ 'coro2 release'])
+
+ def test_blocking_tpool(self):
+ # Note: this test's success isn't a guarantee that the mutex is
+ # working. However, this test's failure means that the mutex is
+ # definitely broken.
+ sequence = []
+
+ def do_stuff():
+ n = 10
+ while n > 0:
+ self.mutex.acquire()
+ sequence.append("<")
+ eventlet.sleep(0.0001)
+ sequence.append(">")
+ self.mutex.release()
+ n -= 1
+
+ greenthread1 = eventlet.spawn(do_stuff)
+ greenthread2 = eventlet.spawn(do_stuff)
+
+ real_thread1 = eventlet.patcher.original('threading').Thread(
+ target=do_stuff)
+ real_thread1.start()
+
+ real_thread2 = eventlet.patcher.original('threading').Thread(
+ target=do_stuff)
+ real_thread2.start()
+
+ greenthread1.wait()
+ greenthread2.wait()
+ real_thread1.join()
+ real_thread2.join()
+
+ self.assertEqual(''.join(sequence), "<>" * 40)
+
+ def test_blocking_preserves_ownership(self):
+ pthread1_event = eventlet.patcher.original('threading').Event()
+ pthread2_event1 = eventlet.patcher.original('threading').Event()
+ pthread2_event2 = eventlet.patcher.original('threading').Event()
+ thread_id = []
+ owner = []
+
+ def pthread1():
+ thread_id.append(id(eventlet.greenthread.getcurrent()))
+ self.mutex.acquire()
+ owner.append(self.mutex.owner)
+ pthread2_event1.set()
+
+ orig_os_write = pipe_mutex.os.write
+
+ def patched_os_write(*a, **kw):
+ try:
+ return orig_os_write(*a, **kw)
+ finally:
+ pthread1_event.wait()
+
+ with mock.patch.object(pipe_mutex.os, 'write', patched_os_write):
+ self.mutex.release()
+ pthread2_event2.set()
+
+ def pthread2():
+ pthread2_event1.wait() # ensure pthread1 acquires lock first
+ thread_id.append(id(eventlet.greenthread.getcurrent()))
+ self.mutex.acquire()
+ pthread1_event.set()
+ pthread2_event2.wait()
+ owner.append(self.mutex.owner)
+ self.mutex.release()
+
+ real_thread1 = eventlet.patcher.original('threading').Thread(
+ target=pthread1)
+ real_thread1.start()
+
+ real_thread2 = eventlet.patcher.original('threading').Thread(
+ target=pthread2)
+ real_thread2.start()
+
+ real_thread1.join()
+ real_thread2.join()
+ self.assertEqual(thread_id, owner)
+ self.assertIsNone(self.mutex.owner)
+
+ @classmethod
+ def tearDownClass(cls):
+ # PipeMutex turns this off when you instantiate one
+ eventlet.debug.hub_prevent_multiple_readers(True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml new/oslo.log-5.4.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml
--- old/oslo.log-5.2.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/notes/deprecate-windows-support-75e6ac72310d5e72.yaml 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,5 @@
+---
+deprecations:
+ - |
+ Windows support has been deprecated, because of the retiremenet of
+ the Winstackers project.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml new/oslo.log-5.4.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml
--- old/oslo.log-5.2.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/notes/native-threads-logging-cc84f7288c4835a0.yaml 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ `Bug #1983863
+ <https://bugs.launchpad.net/oslo.log/+bug/1983863>`_: Fixed logging in
+ eventlet native threads.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml new/oslo.log-5.4.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml
--- old/oslo.log-5.2.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/notes/revert-native-threads-logging-e5e103eb81b4acad.yaml 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
----
-other:
- - |
- This release reverts fix for `Bug #1983863
- <https://bugs.launchpad.net/oslo.log/+bug/1983863>`_: Fixed logging in
- eventlet native threads.
- This fix caused gate problems during cross-project testing and needed
- to be removed from 2023.1 Antelope release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/2023.1.rst new/oslo.log-5.4.0/releasenotes/source/2023.1.rst
--- old/oslo.log-5.2.0/releasenotes/source/2023.1.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/2023.1.rst 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+===========================
+2023.1 Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/2023.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/2023.2.rst new/oslo.log-5.4.0/releasenotes/source/2023.2.rst
--- old/oslo.log-5.2.0/releasenotes/source/2023.2.rst 1970-01-01 01:00:00.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/2023.2.rst 2023-11-14 10:58:01.000000000 +0100
@@ -0,0 +1,6 @@
+===========================
+2023.2 Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/2023.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/index.rst new/oslo.log-5.4.0/releasenotes/source/index.rst
--- old/oslo.log-5.2.0/releasenotes/source/index.rst 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/index.rst 2023-11-14 10:58:01.000000000 +0100
@@ -6,6 +6,8 @@
:maxdepth: 1
unreleased
+ 2023.2
+ 2023.1
victoria
ussuri
train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po new/oslo.log-5.4.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
--- old/oslo.log-5.2.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po 2023-11-14 10:58:01.000000000 +0100
@@ -2,21 +2,26 @@
# Andi Chandler <andi(a)gowling.com>, 2017. #zanata
# Andi Chandler <andi(a)gowling.com>, 2018. #zanata
# Andi Chandler <andi(a)gowling.com>, 2020. #zanata
+# Andi Chandler <andi(a)gowling.com>, 2022. #zanata
+# Andi Chandler <andi(a)gowling.com>, 2023. #zanata
msgid ""
msgstr ""
"Project-Id-Version: oslo.log\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-09-22 12:42+0000\n"
+"POT-Creation-Date: 2023-05-05 13:36+0000\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"PO-Revision-Date: 2020-10-10 02:28+0000\n"
+"PO-Revision-Date: 2023-05-09 12:01+0000\n"
"Last-Translator: Andi Chandler <andi(a)gowling.com>\n"
"Language-Team: English (United Kingdom)\n"
"Language: en_GB\n"
"X-Generator: Zanata 4.3.3\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+msgid "2023.1 Series Release Notes"
+msgstr "2023.1 Series Release Notes"
+
msgid "3.1.0"
msgstr "3.1.0"
@@ -74,6 +79,18 @@
msgid "4.2.0"
msgstr "4.2.0"
+msgid "4.7.0"
+msgstr "4.7.0"
+
+msgid "4.8.0"
+msgstr "4.8.0"
+
+msgid "5.0.0"
+msgstr "5.0.0"
+
+msgid "5.2.0"
+msgstr "5.2.0"
+
msgid ""
"A new ``oslo_log.log.is_debug_enabled`` helper function is added that allows "
"to determine whether debug mode is enabled for logging."
@@ -99,6 +116,20 @@
"avoid same logs on service log and specific log file by option --log-file."
msgid ""
+"Default value of the ``[DEFAULT] logging_context_format_string`` option has "
+"been updated and now Global Request IDs are logged by default."
+msgstr ""
+"Default value of the ``[DEFAULT] logging_context_format_string`` option has "
+"been updated and now Global Request IDs are logged by default."
+
+msgid ""
+"Default value of the ``[DEFAULT] logging_user_identity_format`` option has "
+"been updated and now includes system scope information by default."
+msgstr ""
+"Default value of the ``[DEFAULT] logging_user_identity_format`` option has "
+"been updated and now includes system scope information by default."
+
+msgid ""
"If the log format string includes ``%(error_summary)s``, it will be replaced "
"with a summary of the current error when there is one and with \"``-``\" "
"when there is no error. If the log format string does not include ``"
@@ -111,6 +142,13 @@
"%(error_summary)s`` the error summary will be appended to the end of the "
"line automatically, only if there is an error."
+msgid ""
+"Initialize the ``global_request_id`` context variable with a default value "
+"if the key is not passed in the context."
+msgstr ""
+"Initialise the ``global_request_id`` context variable with a default value "
+"if the key is not passed in the context."
+
msgid "Liberty Series Release Notes"
msgstr "Liberty Series Release Notes"
@@ -185,6 +223,13 @@
"to prevent JSON serialization errors on logging. The fix requires oslo."
"serialisation 2.21.1 or newer. (Bug #1593641)"
+msgid ""
+"The ``logging_user_identity_format`` option's default value is updated to "
+"replace the obsolete ``tenant`` argument with ``project``."
+msgstr ""
+"The ``logging_user_identity_format`` option's default value is updated to "
+"replace the obsolete ``tenant`` argument with ``project``."
+
msgid "The deprecated 'verbose' option has been removed."
msgstr "The deprecated 'verbose' option has been removed."
@@ -223,6 +268,17 @@
"the logs when set to True. The option is also available through the command "
"line via the ``--use-json`` flag."
+msgid ""
+"This release reverts fix for `Bug #1983863 <https://bugs.launchpad.net/oslo."
+"log/+bug/1983863>`_: Fixed logging in eventlet native threads. This fix "
+"caused gate problems during cross-project testing and needed to be removed "
+"from 2023.1 Antelope release."
+msgstr ""
+"This release reverts the fix for `Bug #1983863 <https://bugs.launchpad.net/"
+"oslo.log/+bug/1983863>`_: Fixed logging in eventlet native threads. This fix "
+"caused gate problems during cross-project testing and needed to be removed "
+"from 2023.1 Antelope release."
+
msgid "Train Series Release Notes"
msgstr "Train Series Release Notes"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/setup.cfg new/oslo.log-5.4.0/setup.cfg
--- old/oslo.log-5.2.0/setup.cfg 2023-03-21 17:19:26.847390700 +0100
+++ new/oslo.log-5.4.0/setup.cfg 2023-11-14 10:58:27.887485500 +0100
@@ -17,6 +17,7 @@
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
+ Programming Language :: Python :: 3.10
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/setup.py new/oslo.log-5.4.0/setup.py
--- old/oslo.log-5.2.0/setup.py 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/setup.py 2023-11-14 10:58:01.000000000 +0100
@@ -15,14 +15,6 @@
import setuptools
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
-
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/test-requirements.txt new/oslo.log-5.4.0/test-requirements.txt
--- old/oslo.log-5.2.0/test-requirements.txt 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/test-requirements.txt 2023-11-14 10:58:01.000000000 +0100
@@ -11,8 +11,10 @@
coverage>=4.5.1 # Apache-2.0
# Bandit security code scanner
-bandit>=1.6.0,<1.7.0 # Apache-2.0
+bandit>=1.7.0,<1.8.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
pre-commit>=2.6.0 # MIT
+
+eventlet>=0.30.1,!=0.32.0 # MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/oslo.log-5.2.0/tox.ini new/oslo.log-5.4.0/tox.ini
--- old/oslo.log-5.2.0/tox.ini 2023-03-21 17:18:57.000000000 +0100
+++ new/oslo.log-5.4.0/tox.ini 2023-11-14 10:58:01.000000000 +0100
@@ -8,7 +8,7 @@
allowlist_externals =
find
deps =
- -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+ -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
@@ -27,7 +27,7 @@
[testenv:docs]
allowlist_externals = rm
deps =
- -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+ -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
@@ -36,7 +36,7 @@
[testenv:releasenotes]
allowlist_externals = rm
deps =
- -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/2023.1}
+ -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package hotspot for openSUSE:Factory checked in at 2023-12-28 23:03:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hotspot (Old)
and /work/SRC/openSUSE:Factory/.hotspot.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hotspot"
Thu Dec 28 23:03:13 2023 rev:7 rq:1135434 version:1.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/hotspot/hotspot.changes 2023-03-14 18:16:09.515575905 +0100
+++ /work/SRC/openSUSE:Factory/.hotspot.new.28375/hotspot.changes 2023-12-28 23:04:55.146020294 +0100
@@ -1,0 +2,6 @@
+Wed Dec 27 10:36:51 UTC 2023 - Antonio Larrosa <alarrosa(a)suse.com>
+
+- Add BuildRequires extra-cmake-modules and cmake(KF5Archive) to
+ fix a build failure.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hotspot.spec ++++++
--- /var/tmp/diff_new_pack.D0Racx/_old 2023-12-28 23:04:55.570035791 +0100
+++ /var/tmp/diff_new_pack.D0Racx/_new 2023-12-28 23:04:55.570035791 +0100
@@ -26,6 +26,7 @@
Source: https://github.com/KDAB/hotspot/releases/download/v%{version}/hotspot-v%{ve…
# PATCH-FIX-UPSTREAM Make privilege escalation optional (CVE-2023-28144)
Patch0: 0001-Opt-in-via-CMake-to-allow-privilege-escalation.patch
+BuildRequires: extra-cmake-modules
BuildRequires: glibc-devel-static
BuildRequires: kddockwidgets-devel
BuildRequires: libdw-devel
@@ -33,6 +34,7 @@
BuildRequires: libzstd-devel
BuildRequires: qcustomplot-devel
BuildRequires: cmake(KF5Archive)
+BuildRequires: cmake(KF5Archive)
BuildRequires: cmake(KF5ConfigWidgets)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5I18n)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package crmsh for openSUSE:Factory checked in at 2023-12-28 23:03:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
and /work/SRC/openSUSE:Factory/.crmsh.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crmsh"
Thu Dec 28 23:03:11 2023 rev:319 rq:1135428 version:4.6.0+20231228.83bf1514
Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes 2023-12-25 19:06:34.236263716 +0100
+++ /work/SRC/openSUSE:Factory/.crmsh.new.28375/crmsh.changes 2023-12-28 23:04:53.813971611 +0100
@@ -1,0 +2,6 @@
+Thu Dec 28 06:39:58 UTC 2023 - XLiang(a)suse.com
+
+- Update to version 4.6.0+20231228.83bf1514:
+ * Dev: ui_corosync: Add a completer for corosync.set to enumerate all current paths
+
+-------------------------------------------------------------------
Old:
----
crmsh-4.6.0+20231225.3e2ff633.tar.bz2
New:
----
crmsh-4.6.0+20231228.83bf1514.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.f27d3p/_old 2023-12-28 23:04:54.357991494 +0100
+++ /var/tmp/diff_new_pack.f27d3p/_new 2023-12-28 23:04:54.357991494 +0100
@@ -36,7 +36,7 @@
Summary: High Availability cluster command-line interface
License: GPL-2.0-or-later
Group: %{pkg_group}
-Version: 4.6.0+20231225.3e2ff633
+Version: 4.6.0+20231228.83bf1514
Release: 0
URL: http://crmsh.github.io
Source0: %{name}-%{version}.tar.bz2
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.f27d3p/_old 2023-12-28 23:04:54.397992956 +0100
+++ /var/tmp/diff_new_pack.f27d3p/_new 2023-12-28 23:04:54.401993102 +0100
@@ -9,7 +9,7 @@
</service>
<service name="tar_scm">
<param name="url">https://github.com/ClusterLabs/crmsh.git</param>
- <param name="changesrevision">3e2ff6330cd5ae8b9b03dc5859b59a5fe1825245</param>
+ <param name="changesrevision">9d112588eac7099ed2c95f01e50ef1b7ab7a4bc4</param>
</service>
</servicedata>
(No newline at EOF)
++++++ crmsh-4.6.0+20231225.3e2ff633.tar.bz2 -> crmsh-4.6.0+20231228.83bf1514.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/crmsh-4.6.0+20231225.3e2ff633/crmsh/ui_corosync.py new/crmsh-4.6.0+20231228.83bf1514/crmsh/ui_corosync.py
--- old/crmsh-4.6.0+20231225.3e2ff633/crmsh/ui_corosync.py 2023-12-25 08:18:56.000000000 +0100
+++ new/crmsh-4.6.0+20231228.83bf1514/crmsh/ui_corosync.py 2023-12-28 07:16:15.000000000 +0100
@@ -168,6 +168,7 @@
print(v)
@command.skill_level('administrator')
+ @command.completers(completers.call(corosync.get_all_paths))
def do_set(self, context, path, value):
"Set a corosync configuration value"
corosync.set_value(path, value)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package lttoolbox for openSUSE:Factory checked in at 2023-12-28 23:03:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lttoolbox (Old)
and /work/SRC/openSUSE:Factory/.lttoolbox.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lttoolbox"
Thu Dec 28 23:03:08 2023 rev:6 rq:1135408 version:3.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/lttoolbox/lttoolbox.changes 2022-11-01 13:43:48.440291591 +0100
+++ /work/SRC/openSUSE:Factory/.lttoolbox.new.28375/lttoolbox.changes 2023-12-28 23:04:51.581890035 +0100
@@ -1,0 +2,6 @@
+Thu Dec 28 02:43:38 UTC 2023 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Update to release 3.7.6
+ * Add option to set compound_max_elements in lt-proc
+
+-------------------------------------------------------------------
Old:
----
v3.7.1.tar.gz
New:
----
v3.7.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ lttoolbox.spec ++++++
--- /var/tmp/diff_new_pack.JwFSkN/_old 2023-12-28 23:04:52.005905531 +0100
+++ /var/tmp/diff_new_pack.JwFSkN/_new 2023-12-28 23:04:52.005905531 +0100
@@ -1,7 +1,7 @@
#
# spec file for package lttoolbox
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
Name: lttoolbox
%define lname liblttoolbox3
Summary: Toolbox for lexical processing and morphological analysis
-Version: 3.7.1
+Version: 3.7.6
Release: 0
License: GPL-2.0-or-later
Group: Productivity/Scientific/Other
++++++ v3.7.1.tar.gz -> v3.7.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/CMakeLists.txt new/lttoolbox-3.7.6/CMakeLists.txt
--- old/lttoolbox-3.7.1/CMakeLists.txt 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,149 +0,0 @@
-cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
-cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
-project(lttoolbox
- VERSION 3.7.0
- LANGUAGES CXX C
- )
-set(VERSION ${PROJECT_VERSION})
-set(VERSION_ABI 3)
-set(PACKAGE_BUGREPORT "apertium-stuff(a)lists.sourceforge.net")
-
-add_definitions("-DPACKAGE_VERSION=\"${PROJECT_VERSION}\"")
-
-set(MASTER_PROJECT OFF)
-if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
- set(MASTER_PROJECT ON)
-endif ()
-
-# Release or Debug
-if(MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release")
-endif()
-
-set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
-set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-set(CMAKE_MACOSX_RPATH ON)
-
-include(GNUInstallDirs)
-
-option(BUILD_SHARED_LIBS "Set to OFF to use static library" ON)
-option(BUILD_TESTING "Set to OFF to disable tests" ON)
-option(ENABLE_PYTHON_BINDINGS "Set to ON to build the Python wrapper" OFF)
-
-if(MSVC)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8 /std:c++latest /Zc:__cplusplus /permissive- /W4 /MP")
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2")
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
- set(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS})
- set(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
-else()
- set(_FLAGS_COMMON "-Wall -Wextra -Wno-missing-field-initializers -Wno-deprecated -Wno-unused-parameter -fPIC")
-
- include(CheckCCompilerFlag)
- include(CheckCXXCompilerFlag)
-
- foreach(flag "-Wno-unused-result" "-flto")
- string(REGEX REPLACE "[^A-Za-z0-9]" "-" _flag ${flag})
- CHECK_CXX_COMPILER_FLAG(${flag} COMPILER_SUPPORTS_${_flag})
- if(COMPILER_SUPPORTS_${_flag})
- set(_FLAGS_COMMON "${_FLAGS_COMMON} ${flag}")
- endif()
- endforeach()
- if(COMPILER_SUPPORTS_flto)
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -flto")
- endif()
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FLAGS_COMMON} -fvisibility-inlines-hidden")
-
- # Enable latest possible C standard
- foreach(flag "-std=c2x" "-std=c11" "-std=c1x" "-std=c99")
- string(REGEX REPLACE "[^a-z0-9]" "-" _flag ${flag})
- CHECK_C_COMPILER_FLAG(${flag} COMPILER_SUPPORTS_${_flag})
- if(COMPILER_SUPPORTS_${_flag})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
- break()
- endif()
- endforeach()
-
- # Require latest possible C++ standard
- foreach(flag "-std=c++23" "-std=c++2b" "-std=c++20" "-std=c++2a" "-std=c++17")
- string(REGEX REPLACE "[^a-z0-9]" "-" _flag ${flag})
- CHECK_CXX_COMPILER_FLAG(${flag} COMPILER_SUPPORTS_${_flag})
- if(COMPILER_SUPPORTS_${_flag})
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
- set(_ENABLED_CXX ${flag})
- break()
- endif()
- endforeach()
- if(NOT _ENABLED_CXX)
- message(FATAL_ERROR "Could not enable at least C++17 - upgrade your compiler")
- endif()
-
- # Generate pkg-config file
- set(prefix ${CMAKE_INSTALL_PREFIX})
- set(exec_prefix "\${prefix}")
- set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
- set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
- configure_file(lttoolbox.pc.in lttoolbox.pc @ONLY)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lttoolbox.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
-endif()
-
-try_compile(SIZET_NOT_CSTDINT ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lttoolbox/check-cstdint.cc)
-if(SIZET_NOT_CSTDINT)
- add_definitions(-DSIZET_NOT_CSTDINT)
-endif()
-
-find_package(LibXml2 REQUIRED)
-include_directories(${LIBXML2_INCLUDE_DIR})
-
-if(WIN32)
- add_definitions(-D_SECURE_SCL=0 -D_ITERATOR_DEBUG_LEVEL=0 -D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -DVC_EXTRALEAN -DNOMINMAX)
- add_definitions(-DSTDC_HEADERS -DREGEX_MALLOC)
- include_directories("lttoolbox/win32")
-else()
- add_definitions(-D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE)
-endif()
-
-if(NOT APPLE)
- find_package(Threads REQUIRED)
-endif()
-
-# Unlocked I/O functions
-include(CheckSymbolExists)
-set(CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=200112 -D_GNU_SOURCE)
-foreach(func fread_unlocked fwrite_unlocked fgetc_unlocked fputc_unlocked fputs_unlocked)
- string(TOUPPER ${func} _uc)
- CHECK_SYMBOL_EXISTS(${func} "stdio.h" HAVE_DECL_${_uc})
- if(HAVE_DECL_${_uc})
- add_definitions(-DHAVE_DECL_${_uc})
- endif()
-endforeach()
-unset(CMAKE_REQUIRED_DEFINITIONS)
-
-# getopt
-find_path(GETOPT_INCLUDE getopt.h)
-include_directories(${GETOPT_INCLUDE})
-if(VCPKG_TOOLCHAIN)
- find_library(GETOPT_LIB NAMES getopt)
- add_definitions(-DHAVE_GETOPT_LONG)
-else()
- set(GETOPT_LIB)
-endif()
-
-# ICU
-find_package(ICU COMPONENTS i18n io uc REQUIRED)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-if(BUILD_TESTING)
- enable_testing()
- find_package(PythonInterp 3.5 REQUIRED)
- set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)
- set(CMAKE_CTEST_ARGUMENTS "-VV")
-endif()
-
-add_subdirectory(lttoolbox)
-
-if(ENABLE_PYTHON_BINDINGS)
- add_subdirectory(python)
-endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/cmake.sh new/lttoolbox-3.7.6/cmake.sh
--- old/lttoolbox-3.7.1/cmake.sh 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/cmake.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-set -e
-args=()
-
-while [[ $# > 0 ]];
-do
- case "$1" in
- --prefix)
- args+=("-DCMAKE_INSTALL_PREFIX=$2")
- shift 2
- ;;
- --prefix=*)
- args+=("-DCMAKE_INSTALL_PREFIX=${1#*=}")
- shift
- ;;
- *)
- args+=("$1")
- shift
- ;;
- esac
-done
-
-set -- "${args[@]}"
-
-echo "- rm -rf CMake caches"
-rm -rf install_manifest.txt CMakeCache.txt *.cmake CMakeFiles lttoolbox/CMakeFiles lttoolbox/*.cmake _CPack_Packages Testing
-echo "- cmake " "$@" "."
-cmake "$@" .
-echo "- You may now perform: make -j3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/configure.ac new/lttoolbox-3.7.6/configure.ac
--- old/lttoolbox-3.7.1/configure.ac 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/configure.ac 2023-12-27 21:15:14.000000000 +0100
@@ -2,7 +2,7 @@
m4_define([PKG_VERSION_MAJOR], [3])
m4_define([PKG_VERSION_MINOR], [7])
-m4_define([PKG_VERSION_PATCH], [1])
+m4_define([PKG_VERSION_PATCH], [6])
# Bump if the ABI (not API) changed in a backwards-incompatible manner
m4_define([PKG_VERSION_ABI], [3])
@@ -61,8 +61,7 @@
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
-AC_CHECK_DECLS([fread_unlocked, fwrite_unlocked, fgetc_unlocked, \
-fputc_unlocked, fputs_unlocked])
+AC_CHECK_DECLS([fread_unlocked, fwrite_unlocked, fgetc_unlocked, fputc_unlocked, fputs_unlocked, fmemopen])
AC_CHECK_FUNCS([setlocale strdup getopt_long])
@@ -74,7 +73,7 @@
version_flag="-std=c++${version}"
AX_CHECK_COMPILE_FLAG([${version_flag}], [break], [version_flag=none])
done
-AS_IF([test "$version_flag" == none], [
+AS_IF([test "$version_flag" = none], [
AC_MSG_ERROR([Could not enable at least C++17 - upgrade your compiler])
])
CXXFLAGS="$CXXFLAGS ${version_flag}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/CMakeLists.txt new/lttoolbox-3.7.6/lttoolbox/CMakeLists.txt
--- old/lttoolbox-3.7.1/lttoolbox/CMakeLists.txt 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,128 +0,0 @@
-set(LIBLTTOOLBOX_HEADERS
- acx.h
- alphabet.h
- att_compiler.h
- buffer.h
- cli.h
- compiler.h
- compression.h
- deserialiser.h
- entry_token.h
- exception.h
- expander.h
- file_utils.h
- fst_processor.h
- input_file.h
- lt_locale.h
- match_exe.h
- match_node.h
- match_state.h
- my_stdio.h
- node.h
- pattern_list.h
- regexp_compiler.h
- serialiser.h
- sorted_vector.h
- sorted_vector.hpp
- state.h
- string_utils.h
- tmx_compiler.h
- transducer.h
- trans_exe.h
- ustring.h
- xml_parse_util.h
- xml_walk_util.h
- )
-set(LIBLTTOOLBOX_SOURCES
- acx.cc
- alphabet.cc
- att_compiler.cc
- cli.cc
- compiler.cc
- compression.cc
- entry_token.cc
- expander.cc
- file_utils.cc
- fst_processor.cc
- input_file.cc
- lt_locale.cc
- match_exe.cc
- match_node.cc
- match_state.cc
- node.cc
- pattern_list.cc
- regexp_compiler.cc
- sorted_vector.cc
- state.cc
- string_utils.cc
- tmx_compiler.cc
- transducer.cc
- trans_exe.cc
- ustring.cc
- xml_parse_util.cc
- xml_walk_util.cc
- ${LIBLTTOOLBOX_HEADERS}
- )
-if(WIN32)
- set(LIBLTTOOLBOX_SOURCES
- win32/libgen.c
- win32/libgen.h
- win32/regex.c
- win32/regex.h
- win32/unistd.h
- ${LIBLTTOOLBOX_SOURCES}
- )
- if(NOT VCPKG_TOOLCHAIN)
- set(LIBLTTOOLBOX_SOURCES
- win32/getopt.c
- win32/getopt.h
- ${LIBLTTOOLBOX_SOURCES}
- )
- endif()
-else()
- set(GETOPT)
-endif()
-
-add_library(lttoolbox ${LIBLTTOOLBOX_SOURCES})
-target_compile_definitions(lttoolbox PRIVATE LTTOOLBOX_EXPORTS)
-set_target_properties(lttoolbox PROPERTIES SOVERSION ${VERSION_ABI})
-target_link_libraries(lttoolbox ${LIBXML2_LIBRARIES} ${ICU_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
-
-add_executable(lt-print lt_print.cc)
-target_link_libraries(lt-print lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-trim lt_trim.cc)
-target_link_libraries(lt-trim lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-comp lt_comp.cc)
-target_link_libraries(lt-comp lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-proc lt_proc.cc)
-target_link_libraries(lt-proc lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-expand lt_expand.cc)
-target_link_libraries(lt-expand lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-tmxcomp lt_tmxcomp.cc)
-target_link_libraries(lt-tmxcomp lttoolbox ${GETOPT_LIB})
-
-add_executable(lt-tmxproc lt_tmxproc.cc)
-target_link_libraries(lt-tmxproc lttoolbox ${GETOPT_LIB})
-
-if(BUILD_TESTING)
- add_test(NAME tests COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/tests/run_tests.py" $<TARGET_FILE_DIR:lt-comp>)
- set_tests_properties(tests PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
-endif()
-
-install(TARGETS lttoolbox
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-install(FILES ${LIBLTTOOLBOX_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lttoolbox)
-install(TARGETS lt-print lt-trim lt-comp lt-proc lt-expand lt-tmxcomp lt-tmxproc
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-
-install(FILES dix.dtd dix.rng dix.rnc acx.rng xsd/dix.xsd xsd/acx.xsd
- DESTINATION ${CMAKE_INSTALL_DATADIR}/lttoolbox)
-
-install(FILES lt-comp.1 lt-expand.1 lt-proc.1 lt-tmxcomp.1 lt-tmxproc.1 lt-print.1 lt-trim.1
- DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/Makefile.am new/lttoolbox-3.7.6/lttoolbox/Makefile.am
--- old/lttoolbox-3.7.1/lttoolbox/Makefile.am 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/Makefile.am 2023-12-27 21:15:14.000000000 +0100
@@ -2,13 +2,13 @@
h_sources = acx.h alphabet.h att_compiler.h buffer.h cli.h compiler.h compression.h \
deserialiser.h entry_token.h expander.h file_utils.h fst_processor.h input_file.h lt_locale.h \
match_exe.h match_node.h match_state.h my_stdio.h node.h \
- pattern_list.h regexp_compiler.h serialiser.h sorted_vector.h state.h string_utils.h \
+ pattern_list.h regexp_compiler.h serialiser.h sorted_vector.h state.h string_utils.h symbol_iter.h \
transducer.h trans_exe.h xml_parse_util.h xml_walk_util.h exception.h tmx_compiler.h \
ustring.h sorted_vector.hpp
cc_sources = acx.cc alphabet.cc att_compiler.cc cli.cc compiler.cc compression.cc entry_token.cc \
expander.cc file_utils.cc fst_processor.cc input_file.cc lt_locale.cc match_exe.cc \
match_node.cc match_state.cc node.cc pattern_list.cc \
- regexp_compiler.cc sorted_vector.cc state.cc string_utils.cc transducer.cc \
+ regexp_compiler.cc sorted_vector.cc state.cc string_utils.cc symbol_iter.cc transducer.cc \
trans_exe.cc xml_parse_util.cc xml_walk_util.cc tmx_compiler.cc ustring.cc
library_includedir = $(includedir)/$(PACKAGE_NAME)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/acx.h new/lttoolbox-3.7.6/lttoolbox/acx.h
--- old/lttoolbox-3.7.1/lttoolbox/acx.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/acx.h 2023-12-27 21:15:14.000000000 +0100
@@ -18,6 +18,7 @@
#define _ACXPARSEUTIL_
#include <lttoolbox/sorted_vector.hpp>
+#include <cstdint>
#include <map>
std::map<int32_t, sorted_vector<int32_t>> readACX(const char* file);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/alphabet.cc new/lttoolbox-3.7.6/lttoolbox/alphabet.cc
--- old/lttoolbox-3.7.1/lttoolbox/alphabet.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/alphabet.cc 2023-12-27 21:15:14.000000000 +0100
@@ -19,6 +19,7 @@
#include <lttoolbox/my_stdio.h>
#include <lttoolbox/serialiser.h>
#include <lttoolbox/deserialiser.h>
+#include <lttoolbox/symbol_iter.h>
#include <cctype>
#include <cstdlib>
@@ -311,24 +312,9 @@
Alphabet::tokenize(UStringView str) const
{
std::vector<int32_t> ret;
- size_t end = str.size();
- size_t i = 0;
- UChar32 c;
- while (i < end) {
- U16_NEXT(str.data(), i, end, c);
- if (c == '\\') {
- } else if (c == '<') {
- size_t j = i;
- while (c != '>' && j < end) {
- U16_NEXT(str.data(), j, end, c);
- }
- if (c == '>') {
- ret.push_back(operator()(str.substr(i-1, j-i+1)));
- i = j;
- }
- } else {
- ret.push_back(static_cast<int32_t>(c));
- }
+ for (auto sym : symbol_iter(str)) {
+ if (sym.size() > 1) ret.push_back(operator()(sym));
+ else ret.push_back(static_cast<int32_t>(sym[0]));
}
return ret;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/cli.cc new/lttoolbox-3.7.6/lttoolbox/cli.cc
--- old/lttoolbox-3.7.1/lttoolbox/cli.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/cli.cc 2023-12-27 21:15:14.000000000 +0100
@@ -63,15 +63,15 @@
epilog = e;
}
-void CLI::print_usage()
+void CLI::print_usage(std::ostream& out)
{
if (!prog_name.empty()) {
- std::cout << prog_name;
+ out << prog_name;
if (!version.empty()) {
- std::cout << " v" << version;
+ out << " v" << version;
}
- std::cout << ": " << description << std::endl;
- std::cout << "USAGE: " << prog_name;
+ out << ": " << description << std::endl;
+ out << "USAGE: " << prog_name;
std::string bargs;
std::string sargs;
for (auto& it : options) {
@@ -86,34 +86,34 @@
}
}
if (!bargs.empty()) {
- std::cout << " [-" << bargs << "]";
+ out << " [-" << bargs << "]";
}
- std::cout << sargs;
+ out << sargs;
int depth = 0;
for (auto& it : file_args) {
- std::cout << ' ';
+ out << ' ';
if (it.second) {
- std::cout << '[';
+ out << '[';
depth += 1;
}
- std::cout << it.first;
+ out << it.first;
}
- while (depth-- > 0) std::cout << "]";
- std::cout << std::endl;
+ while (depth-- > 0) out << "]";
+ out << std::endl;
for (auto& it : options) {
- std::cout << " -" << it.short_opt;
+ out << " -" << it.short_opt;
#if HAVE_GETOPT_LONG
- std::cout << ", --" << it.long_opt << ':';
+ out << ", --" << it.long_opt << ':';
for (size_t i = it.long_opt.size(); i < 20; i++) {
- std::cout << ' ';
+ out << ' ';
}
#else
- std::cout << ": ";
+ out << ": ";
#endif
- std::cout << it.desc << std::endl;
+ out << it.desc << std::endl;
}
if (!epilog.empty()) {
- std::cout << epilog << std::endl;
+ out << epilog << std::endl;
}
}
exit(EXIT_FAILURE);
@@ -162,8 +162,11 @@
break;
}
}
- if (!found || cnt == 'h') {
- print_usage();
+ if (!found) {
+ print_usage(std::cerr);
+ }
+ else if (cnt == 'h') {
+ print_usage(std::cout);
}
}
while (optind < argc) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/cli.h new/lttoolbox-3.7.6/lttoolbox/cli.h
--- old/lttoolbox-3.7.1/lttoolbox/cli.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/cli.h 2023-12-27 21:15:14.000000000 +0100
@@ -18,6 +18,7 @@
#include <string>
#include <vector>
#include <map>
+#include <iostream>
class CLI {
private:
@@ -52,7 +53,7 @@
void add_bool_arg(char short_flag, std::string long_flag, std::string desc);
void add_file_arg(std::string name, bool optional = true);
void set_epilog(std::string e);
- void print_usage();
+ void print_usage(std::ostream& out = std::cerr);
void parse_args(int argc, char* argv[]);
std::map<std::string, std::vector<std::string>>& get_strs();
std::map<std::string, bool>& get_bools();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/fst_processor.cc new/lttoolbox-3.7.6/lttoolbox/fst_processor.cc
--- old/lttoolbox-3.7.1/lttoolbox/fst_processor.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/fst_processor.cc 2023-12-27 21:15:14.000000000 +0100
@@ -20,6 +20,7 @@
#include <lttoolbox/xml_parse_util.h>
#include <lttoolbox/file_utils.h>
#include <lttoolbox/string_utils.h>
+#include <lttoolbox/symbol_iter.h>
#include <iostream>
#include <cerrno>
@@ -1806,10 +1807,38 @@
}
}
+bool
+FSTProcessor::step_biltrans(UStringView word, UString& result, UString& queue,
+ bool delim, bool mark)
+{
+ State current_state = initial_state;
+ bool firstupper = u_isupper(word[0]);
+ bool uppercase = firstupper && u_isupper(word[1]);
+ for (auto symbol : symbol_iter(word)) {
+ int32_t val = (symbol.size() == 1 ? symbol[0] : alphabet(symbol));
+ if (current_state.size() != 0) {
+ current_state.step(val, beCaseSensitive(current_state));
+ }
+ if (current_state.isFinal(all_finals)) {
+ result.clear();
+ if (delim) result += '^';
+ if (mark) result += '=';
+ result += current_state.filterFinals(all_finals, alphabet,
+ escaped_chars,
+ displayWeightsMode, maxAnalyses, maxWeightClasses,
+ uppercase, firstupper, 0).substr(1);
+ }
+ if (current_state.size() == 0) {
+ if (!result.empty()) queue.append(symbol);
+ else return false;
+ }
+ }
+ return !result.empty();
+}
+
UString
FSTProcessor::biltransfull(UStringView input_word, bool with_delim)
{
- State current_state = initial_state;
UString result;
unsigned int start_point = 1;
unsigned int end_point = input_word.size()-2;
@@ -1833,83 +1862,11 @@
mark = true;
}
- bool firstupper = u_isupper(input_word[start_point]);
- bool uppercase = firstupper && u_isupper(input_word[start_point+1]);
-
- for(unsigned int i = start_point; i <= end_point; i++)
- {
- int val;
- UString symbol;
-
- if(input_word[i] == '\\')
- {
- i++;
- val = static_cast<int32_t>(input_word[i]);
- }
- else if(input_word[i] == '<')
- {
- symbol = '<';
- for(unsigned int j = i + 1; j <= end_point; j++)
- {
- symbol += input_word[j];
- if(input_word[j] == '>')
- {
- i = j;
- break;
- }
- }
- val = alphabet(symbol);
- }
- else
- {
- val = static_cast<int32_t>(input_word[i]);
- }
- if(current_state.size() != 0)
- {
- if(!alphabet.isTag(val) && u_isupper(val) && !beCaseSensitive(current_state))
- {
- current_state.step(val, u_tolower(val));
- }
- else
- {
- current_state.step(val);
- }
- }
- if(current_state.isFinal(all_finals))
- {
- result.clear();
- if(with_delim) {
- result += '^';
- }
- if(mark) {
- result += '=';
- }
- result += current_state.filterFinals(all_finals, alphabet,
- escaped_chars,
- displayWeightsMode, maxAnalyses, maxWeightClasses,
- uppercase, firstupper, 0).substr(1);
- }
-
- if(current_state.size() == 0)
- {
- if(!symbol.empty() && !result.empty())
- {
- queue.append(symbol);
- }
- else
- {
- // word is not present
- if(with_delim)
- {
- result = "^@"_u + US(input_word.substr(1));
- }
- else
- {
- result = "@"_u + US(input_word);
- }
- return result;
- }
- }
+ auto word = input_word.substr(start_point, end_point-start_point);
+ bool exists = step_biltrans(word, result, queue, with_delim, mark);
+ if (!exists) {
+ if (with_delim) return "^@"_u + US(input_word.substr(1));
+ else return "@"_u + US(input_word);
}
if(start_point < (end_point - 3))
@@ -1920,27 +1877,7 @@
if(!queue.empty())
{
- UString result_with_queue;
- for(unsigned int i = 0, limit = result.size(); i != limit; i++)
- {
- switch(result[i])
- {
- case '\\':
- result_with_queue += '\\';
- i++;
- break;
-
- case '/':
- result_with_queue.append(queue);
- break;
-
- default:
- break;
- }
- result_with_queue += result[i];
- }
- result_with_queue.append(queue);
-
+ UString result_with_queue = compose(result, queue);
if(with_delim)
{
result_with_queue += '$';
@@ -1986,110 +1923,18 @@
mark = true;
}
- bool firstupper = u_isupper(input_word[start_point]);
- bool uppercase = firstupper && u_isupper(input_word[start_point+1]);
-
- for(unsigned int i = start_point; i <= end_point; i++)
- {
- int val;
- UString symbol;
-
- if(input_word[i] == '\\')
- {
- i++;
- val = static_cast<int32_t>(input_word[i]);
- }
- else if(input_word[i] == '<')
- {
- symbol = '<';
- for(unsigned int j = i + 1; j <= end_point; j++)
- {
- symbol += input_word[j];
- if(input_word[j] == '>')
- {
- i = j;
- break;
- }
- }
- val = alphabet(symbol);
- }
- else
- {
- val = static_cast<int32_t>(input_word[i]);
- }
- if(current_state.size() != 0)
- {
- if(!alphabet.isTag(val) && u_isupper(val) && !beCaseSensitive(current_state))
- {
- current_state.step(val, u_tolower(val));
- }
- else
- {
- current_state.step(val);
- }
- }
- if(current_state.isFinal(all_finals))
- {
- result.clear();
- if (with_delim) {
- result += '^';
- }
- if (mark) {
- result += '=';
- }
- result += current_state.filterFinals(all_finals, alphabet,
- escaped_chars,
- displayWeightsMode, maxAnalyses, maxWeightClasses,
- uppercase, firstupper, 0).substr(1);
- }
-
- if(current_state.size() == 0)
- {
- if(!symbol.empty() && !result.empty())
- {
- queue.append(symbol);
- }
- else
- {
- // word is not present
- if(with_delim)
- {
- result = "^@"_u + US(input_word.substr(1));
- }
- else
- {
- result = "@"_u + US(input_word);
- }
- return result;
- }
- }
+ UStringView word = input_word.substr(start_point, end_point-start_point);
+ bool exists = step_biltrans(word, result, queue, with_delim, mark);
+ if (!exists) {
+ if (with_delim) return "^@"_u + US(input_word.substr(1));
+ else return "@"_u + US(input_word);
}
// attach unmatched queue automatically
if(!queue.empty())
{
- UString result_with_queue;
- for(unsigned int i = 0, limit = result.size(); i != limit; i++)
- {
- switch(result[i])
- {
- case '\\':
- result_with_queue += '\\';
- i++;
- break;
-
- case '/':
- result_with_queue.append(queue);
- break;
-
- default:
- break;
- }
- result_with_queue += result[i];
- }
- result_with_queue.append(queue);
-
+ UString result_with_queue = compose(result, queue);
if(with_delim)
{
result_with_queue += '$';
@@ -2345,45 +2190,18 @@
bool firstupper = u_isupper(input_word[start_point]);
bool uppercase = firstupper && u_isupper(input_word[start_point+1]);
- for(unsigned int i = start_point; i <= end_point; i++)
- {
- int val = 0;
- UString symbol;
-
- if(input_word[i] == '\\')
- {
- i++;
- val = input_word[i];
- }
- else if(input_word[i] == '<')
- {
- seentags = true;
- symbol = '<';
- for(unsigned int j = i + 1; j <= end_point; j++)
- {
- symbol += input_word[j];
- if(input_word[j] == '>')
- {
- i = j;
- break;
- }
- }
+ UStringView word = input_word.substr(start_point, end_point-start_point);
+ for (auto symbol : symbol_iter(word)) {
+ int32_t val;
+ if (symbol.size() == 1) {
+ val = symbol[0];
+ } else {
val = alphabet(symbol);
- }
- else
- {
- val = input_word[i];
+ seentags = true;
}
if(current_state.size() != 0)
{
- if(!alphabet.isTag(val) && u_isupper(val) && !beCaseSensitive(current_state))
- {
- current_state.step(val, u_tolower(val));
- }
- else
- {
- current_state.step(val);
- }
+ current_state.step_case(val, beCaseSensitive(current_state));
}
if(current_state.isFinal(all_finals))
{
@@ -2445,27 +2263,7 @@
if(!queue.empty())
{
- UString result_with_queue;
- for(unsigned int i = 0, limit = result.size(); i != limit; i++)
- {
- switch(result[i])
- {
- case '\\':
- result_with_queue += '\\';
- i++;
- break;
-
- case '/':
- result_with_queue.append(queue);
- break;
-
- default:
- break;
- }
- result_with_queue += result[i];
- }
- result_with_queue.append(queue);
-
+ UString result_with_queue = compose(result, queue);
if(with_delim)
{
result_with_queue += '$';
@@ -2508,79 +2306,12 @@
mark = true;
}
- bool firstupper = u_isupper(input_word[start_point]);
- bool uppercase = firstupper && u_isupper(input_word[start_point+1]);
-
- for(unsigned int i = start_point; i <= end_point; i++)
- {
- int val;
- UString symbol;
-
- if(input_word[i] == '\\')
- {
- i++;
- val = static_cast<int32_t>(input_word[i]);
- }
- else if(input_word[i] == '<')
- {
- symbol = '<';
- for(unsigned int j = i + 1; j <= end_point; j++)
- {
- symbol += input_word[j];
- if(input_word[j] == '>')
- {
- i = j;
- break;
- }
- }
- val = alphabet(symbol);
- }
- else
- {
- val = static_cast<int32_t>(input_word[i]);
- }
- if(current_state.size() != 0)
- {
- if(!alphabet.isTag(val) && u_isupper(val) && !beCaseSensitive(current_state))
- {
- current_state.step(val, u_tolower(val));
- }
- else
- {
- current_state.step(val);
- }
- }
- if(current_state.isFinal(all_finals))
- {
- result.clear();
- if (with_delim) {
- result += '^';
- }
- if (mark) {
- result += '=';
- }
- result += current_state.filterFinals(all_finals, alphabet,
- escaped_chars,
- displayWeightsMode, maxAnalyses, maxWeightClasses,
- uppercase, firstupper, 0).substr(1);
- }
-
- if(current_state.size() == 0)
- {
- if(symbol.empty())
- {
- // word is not present
- if(with_delim)
- {
- result = "^@"_u + US(input_word.substr(1));
- }
- else
- {
- result = "@"_u + US(input_word);
- }
- return result;
- }
- }
+ auto word = input_word.substr(start_point, end_point-start_point);
+ UString queue;
+ bool exists = step_biltrans(word, result, queue, with_delim, mark);
+ if (!exists || !queue.empty()) {
+ if (with_delim) return "^@"_u + US(input_word.substr(1));
+ else return "@"_u + US(input_word);
}
if(with_delim)
@@ -2896,6 +2627,12 @@
maxWeightClasses = value;
}
+void
+FSTProcessor::setCompoundMaxElements(int value)
+{
+ compound_max_elements = value;
+}
+
bool
FSTProcessor::getDecompoundingMode()
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/fst_processor.h new/lttoolbox-3.7.6/lttoolbox/fst_processor.h
--- old/lttoolbox-3.7.1/lttoolbox/fst_processor.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/fst_processor.h 2023-12-27 21:15:14.000000000 +0100
@@ -430,6 +430,8 @@
void generation_wrapper_null_flush(InputFile& input, UFILE *output,
GenerationMode mode);
UString compose(UStringView lexforms, UStringView queue) const;
+ bool step_biltrans(UStringView word, UString& result, UString& queue,
+ bool delim, bool mark);
void procNodeICX();
void procNodeRCX();
@@ -440,6 +442,7 @@
xmlTextReaderPtr reader;
static constexpr size_t max_case_insensitive_state_size = 65536;
+ bool max_case_insensitive_state_size_warned = false;
/*
* Including lowercased versions for every character can potentially create very large states
* (See https://github.com/apertium/lttoolbox/issues/167 ). As a sanity-check we don't do
@@ -448,7 +451,20 @@
* @return running with --case-sensitive or state size exceeds max
*/
bool beCaseSensitive(const State& state) {
- return caseSensitive || state.size() >= max_case_insensitive_state_size;
+ if(caseSensitive) {
+ return true;
+ }
+ else if(state.size() < max_case_insensitive_state_size) {
+ return false; // ie. do case-folding
+ }
+ else {
+ if(!max_case_insensitive_state_size_warned) {
+ max_case_insensitive_state_size_warned = true; // only warn once
+ UFILE* err_out = u_finit(stderr, NULL, NULL);
+ u_fprintf(err_out, "Warning: matching case-sensitively since processor state size >= %d\n", max_case_insensitive_state_size);
+ }
+ return true;
+ }
}
public:
@@ -505,6 +521,7 @@
void setDisplayWeightsMode(bool value);
void setMaxAnalysesValue(int value);
void setMaxWeightClassesValue(int value);
+ void setCompoundMaxElements(int value);
bool getNullFlush();
bool getDecompoundingMode();
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/input_file.cc new/lttoolbox-3.7.6/lttoolbox/input_file.cc
--- old/lttoolbox-3.7.1/lttoolbox/input_file.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/input_file.cc 2023-12-27 21:15:14.000000000 +0100
@@ -44,6 +44,16 @@
return (infile != nullptr);
}
+#if HAVE_DECL_FMEMOPEN
+bool
+InputFile::open_in_memory(char *input_buffer)
+{
+ close();
+ infile = fmemopen(input_buffer, strlen(input_buffer), "rb");
+ return (infile != nullptr);
+}
+#endif
+
void
InputFile::open_or_exit(const char* fname)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/input_file.h new/lttoolbox-3.7.6/lttoolbox/input_file.h
--- old/lttoolbox-3.7.1/lttoolbox/input_file.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/input_file.h 2023-12-27 21:15:14.000000000 +0100
@@ -34,6 +34,9 @@
InputFile();
~InputFile();
bool open(const char* fname = nullptr);
+#if HAVE_DECL_FMEMOPEN
+ bool open_in_memory(char* input_buffer);
+#endif
void open_or_exit(const char* fname = nullptr);
void close();
void wrap(FILE* newinfile);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/lt_comp.cc new/lttoolbox-3.7.6/lttoolbox/lt_comp.cc
--- old/lttoolbox-3.7.1/lttoolbox/lt_comp.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/lt_comp.cc 2023-12-27 21:15:14.000000000 +0100
@@ -125,7 +125,7 @@
if(opc == "lr")
{
if (have_vl) {
- std::cout << "Error: -l specified, but mode is lr" << std::endl;
+ std::cerr << "Error: -l specified, but mode is lr" << std::endl;
cli.print_usage();
}
if(ttype == 'a')
@@ -144,7 +144,7 @@
else if(opc == "rl")
{
if (have_vr) {
- std::cout << "Error: -r specified, but mode is rl" << std::endl;
+ std::cerr << "Error: -r specified, but mode is rl" << std::endl;
cli.print_usage();
}
if(ttype == 'a')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/lt_paradigm.cc new/lttoolbox-3.7.6/lttoolbox/lt_paradigm.cc
--- old/lttoolbox-3.7.1/lttoolbox/lt_paradigm.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/lt_paradigm.cc 2023-12-27 21:15:14.000000000 +0100
@@ -21,6 +21,8 @@
#include <lttoolbox/state.h>
#include <lttoolbox/trans_exe.h>
#include <lttoolbox/cli.h>
+#include <lttoolbox/symbol_iter.h>
+#include <lttoolbox/string_utils.h>
#include <queue>
@@ -55,17 +57,33 @@
}
}
+sorted_vector<int32_t> split_tag(UStringView sym, Alphabet& alpha, int prefix,
+ UChar32 sep)
+{
+ sorted_vector<int32_t> ret;
+ auto names = StringUtils::split_escaped(sym.substr(prefix+1, sym.size()-prefix-2), sep);
+ for (auto& tg : names) {
+ UString tag;
+ tag += '<';
+ tag += tg;
+ tag += '>';
+ ret.insert(alpha(tag));
+ }
+ return ret;
+}
+
void process(UStringView pattern, std::map<UString, Transducer>& trans,
Alphabet& alpha,
- const std::set<UChar32>& letters, const std::set<int32_t>& tags,
+ const std::set<UChar32>& letters,
+ const sorted_vector<int32_t>& tags,
UFILE* output, bool sort)
{
int32_t any_char = static_cast<int32_t>('*');
int32_t any_tag = alpha(u"<*>");
- std::vector<int32_t> pat = alpha.tokenize(pattern);
Transducer other;
int state = other.getInitial();
- for (auto& it : pat) {
+ for (auto sym : symbol_iter(pattern)) {
+ int32_t it = (sym.size() == 1 ? sym[0] : alpha(sym));
if (it == any_char) {
state = other.insertNewSingleTransduction(0, state);
for (auto& sym : letters) {
@@ -76,6 +94,30 @@
for (auto& sym : tags) {
other.linkStates(state, state, alpha(sym, sym));
}
+ } else if (it == 0 && StringUtils::startswith(sym, "<*|"_u)) {
+ auto or_tags = split_tag(sym, alpha, 2, '|');
+ state = other.insertNewSingleTransduction(0, state);
+ for (auto& t : or_tags) {
+ other.linkStates(state, state, alpha(t, t));
+ }
+ } else if (it == 0 && StringUtils::startswith(sym, "<*"_u)) {
+ auto del_tags = split_tag(sym, alpha, 1, '-');
+ state = other.insertNewSingleTransduction(0, state);
+ for (auto& t : tags) {
+ if (del_tags.find(t) == del_tags.end()) {
+ other.linkStates(state, state, alpha(t, t));
+ }
+ }
+ } else if (it == 0 && StringUtils::startswith(sym, "<|"_u)) {
+ auto or_tags = split_tag(sym, alpha, 1, '|');
+ auto old_state = state;
+ for (auto& t : or_tags) {
+ if (old_state == state) {
+ state = other.insertNewSingleTransduction(alpha(t, t), state);
+ } else {
+ other.linkStates(old_state, state, alpha(t, t));
+ }
+ }
} else {
state = other.insertNewSingleTransduction(alpha(it, it), state);
}
@@ -128,7 +170,7 @@
fclose(fst);
alpha.includeSymbol(u"<*>");
- std::set<int32_t> tags;
+ sorted_vector<int32_t> tags;
for (int32_t i = 1; i <= alpha.size(); i++) {
if (!skip_tags.empty()) {
UString t;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/lt_proc.cc new/lttoolbox-3.7.6/lttoolbox/lt_proc.cc
--- old/lttoolbox-3.7.1/lttoolbox/lt_proc.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/lt_proc.cc 2023-12-27 21:15:14.000000000 +0100
@@ -59,6 +59,7 @@
cli.add_bool_arg('W', "show-weights", "Print final analysis weights (if any)");
cli.add_str_arg('N', "analyses", "Output no more than N analyses (if the transducer is weighted, the N best analyses)", "N");
cli.add_str_arg('L', "weight-classes", "Output no more than N best weight classes (where analyses with equal weight constitute a class)", "N");
+ cli.add_str_arg('M', "compound-max-elements", "Set compound max elements", "N");
cli.add_bool_arg('h', "help", "show this help");
cli.parse_args(argc, argv);
@@ -157,6 +158,14 @@
}
fstp.setMaxWeightClassesValue(n);
}
+ if (strs.find("compound-max-elements") != strs.end()) { // Test
+ int n = atoi(strs["compound-max-elements"].back().c_str());
+ if (n < 1) {
+ std::cerr << "Invalid or no argument for compound max elements" << std::endl;
+ exit(EXIT_FAILURE);
+ }
+ fstp.setCompoundMaxElements(n);
+ }
FILE* in = openInBinFile(cli.get_files()[0]);
fstp.load(in);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/sorted_vector.hpp new/lttoolbox-3.7.6/lttoolbox/sorted_vector.hpp
--- old/lttoolbox-3.7.1/lttoolbox/sorted_vector.hpp 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/sorted_vector.hpp 2023-12-27 21:15:14.000000000 +0100
@@ -22,6 +22,7 @@
#include <vector>
#include <algorithm>
#include <functional>
+#include <iterator>
namespace detail {
template<typename ForwardIt, typename Comp>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/state.cc new/lttoolbox-3.7.6/lttoolbox/state.cc
--- old/lttoolbox-3.7.1/lttoolbox/state.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/state.cc 2023-12-27 21:15:14.000000000 +0100
@@ -431,6 +431,19 @@
}
}
+void
+State::step_optional(UChar32 val)
+{
+ if (val == 0) return;
+ std::vector<TNodeState> new_state;
+ for (size_t i = 0; i < state.size(); i++) {
+ apply_into(&new_state, val, i, false);
+ }
+ new_state.swap(state);
+ epsilonClosure();
+ new_state.swap(state);
+ state.insert(state.end(), new_state.begin(), new_state.end());
+}
bool
State::isFinal(std::map<Node *, double> const &finals) const
@@ -946,3 +959,14 @@
retval += ']';
return retval;
}
+
+void
+State::merge(const State& other)
+{
+ for (auto& it : other.state) {
+ std::vector<std::pair<int, double>>* tmp = new std::vector<std::pair<int, double>>();
+ *tmp = *(it.sequence);
+ TNodeState ns(it.where, tmp, it.dirty);
+ this->state.push_back(std::move(ns));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/state.h new/lttoolbox-3.7.6/lttoolbox/state.h
--- old/lttoolbox-3.7.1/lttoolbox/state.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/state.h 2023-12-27 21:15:14.000000000 +0100
@@ -201,6 +201,10 @@
void step_case_override(const int val, const bool caseSensitive);
+ void step_optional(UChar32 val);
+
+ void closure(const sorted_vector<int32_t>& symbols);
+
/**
* Init the state with the initial node and empty output
* @param initial the initial node of the transducer
@@ -223,6 +227,12 @@
void pruneStatesWithForbiddenSymbol(int forbiddenSymbol);
/**
+ * Remove states not containing a particular symbol
+ * @param symbol the symbol that is required
+ */
+ void requireSymbol(int32_t symbol);
+
+ /**
* Whether any of the analyses contains a certain symbol
* @param requiredSymbol the symbol we're looking for
*/
@@ -343,6 +353,11 @@
std::queue<UString> &blanks,
std::vector<UString> &numbers) const;
+ /**
+ * Add all paths in other to self
+ */
+ void merge(const State& other);
+
};
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/string_utils.cc new/lttoolbox-3.7.6/lttoolbox/string_utils.cc
--- old/lttoolbox-3.7.1/lttoolbox/string_utils.cc 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/string_utils.cc 2023-12-27 21:15:14.000000000 +0100
@@ -67,6 +67,29 @@
return result;
}
+std::vector<UString>
+StringUtils::split_escaped(UStringView str, UChar delim)
+{
+ std::vector<UString> result;
+ size_t start = 0;
+ for (size_t i = 0; i < str.size(); i++) {
+ if (str[i] == '\\') {
+ i++;
+ continue;
+ }
+ if (str[i] == delim) {
+ if (i > start) {
+ result.push_back(US(str.substr(start, i-start)));
+ }
+ start = i+1;
+ }
+ }
+ if (start < str.size()) {
+ result.push_back(US(str.substr(start)));
+ }
+ return result;
+}
+
UString
StringUtils::join(const std::vector<UString>& vec, UStringView delim)
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/string_utils.h new/lttoolbox-3.7.6/lttoolbox/string_utils.h
--- old/lttoolbox-3.7.1/lttoolbox/string_utils.h 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/string_utils.h 2023-12-27 21:15:14.000000000 +0100
@@ -12,6 +12,9 @@
// split string on delimiter
static std::vector<UString> split(UStringView str, UStringView delim=u" ");
+ // split but respect \ escapes
+ static std::vector<UString> split_escaped(UStringView str, UChar delim);
+
// inverse of split
static UString join(const std::vector<UString>& vec, UStringView delim);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/symbol_iter.cc new/lttoolbox-3.7.6/lttoolbox/symbol_iter.cc
--- old/lttoolbox-3.7.1/lttoolbox/symbol_iter.cc 1970-01-01 01:00:00.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/symbol_iter.cc 2023-12-27 21:15:14.000000000 +0100
@@ -0,0 +1,58 @@
+#include <lttoolbox/symbol_iter.h>
+#include <unicode/uchar.h>
+
+symbol_iter::iterator::iterator(UStringView s) : str(s)
+{
+ ++*this;
+}
+
+symbol_iter::iterator::iterator(const symbol_iter::iterator& other)
+ : str(other.str), sloc(other.sloc), eloc(other.eloc) {}
+
+symbol_iter::iterator::~iterator() {}
+
+UStringView symbol_iter::iterator::operator*() const {
+ return str.substr(sloc, eloc-sloc);
+}
+
+symbol_iter::iterator& symbol_iter::iterator::operator++()
+{
+ if (sloc < str.size()) {
+ sloc = eloc;
+ UChar32 c;
+ U16_NEXT(str.data(), eloc, str.size(), c);
+ if (c == '\\') {
+ sloc++;
+ U16_NEXT(str.data(), eloc, str.size(), c);
+ } else if (c == '<') {
+ auto i = eloc;
+ while (c != '>' && i < str.size()) U16_NEXT(str.data(), i, str.size(), c);
+ if (c == '>') eloc = i;
+ }
+ if (eloc > str.size()) eloc = str.size();
+ }
+ return *this;
+}
+
+bool symbol_iter::iterator::operator!=(const symbol_iter::iterator& o) const
+{
+ return str != o.str || sloc != o.sloc || eloc != o.eloc;
+}
+
+bool symbol_iter::iterator::operator==(const symbol_iter::iterator& o) const
+{
+ return str == o.str && sloc == o.sloc && eloc == o.eloc;
+}
+
+symbol_iter::iterator symbol_iter::begin() const
+{
+ return symbol_iter::iterator(str);
+}
+
+symbol_iter::iterator symbol_iter::end() const
+{
+ symbol_iter::iterator ret(str);
+ ret.sloc = str.size();
+ ret.eloc = str.size();
+ return ret;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/lttoolbox/symbol_iter.h new/lttoolbox-3.7.6/lttoolbox/symbol_iter.h
--- old/lttoolbox-3.7.1/lttoolbox/symbol_iter.h 1970-01-01 01:00:00.000000000 +0100
+++ new/lttoolbox-3.7.6/lttoolbox/symbol_iter.h 2023-12-27 21:15:14.000000000 +0100
@@ -0,0 +1,33 @@
+#ifndef __LT_SYMBOL_ITER_H__
+#define __LT_SYMBOL_ITER_H__
+
+#include <ustring.h>
+
+class symbol_iter
+{
+private:
+ UStringView str;
+public:
+ symbol_iter(UStringView s) : str(s) {}
+ ~symbol_iter() {}
+ class iterator
+ {
+ friend symbol_iter;
+ private:
+ UStringView str;
+ UStringView::size_type sloc = 0;
+ UStringView::size_type eloc = 0;
+ public:
+ iterator(UStringView s);
+ iterator(const iterator& other);
+ ~iterator();
+ UStringView operator*() const;
+ iterator& operator++();
+ bool operator!=(const symbol_iter::iterator& other) const;
+ bool operator==(const symbol_iter::iterator& other) const;
+ };
+ iterator begin() const;
+ iterator end() const;
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/python/CMakeLists.txt new/lttoolbox-3.7.6/python/CMakeLists.txt
--- old/lttoolbox-3.7.1/python/CMakeLists.txt 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/python/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-find_package(SWIG 3.0 REQUIRED)
-find_package(PythonInterp 3.5 REQUIRED)
-
-get_directory_property(_defs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
-string(REPLACE ";" " -D" defs "-D${_defs}")
-
-set(PYTHON_FILE "lttoolbox.py")
-set(CPP_WRAP_FILE "lttoolbox_wrap.cpp")
-set(top_srcdir ${CMAKE_SOURCE_DIR})
-set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${defs}")
-set(PACKAGE ${PROJECT_NAME})
-set(PACKAGE_NAME ${PROJECT_NAME})
-set(PACKAGE_VERSION ${PROJECT_VERSION})
-
-configure_file(lttoolbox.i.in lttoolbox.i @ONLY)
-configure_file(setup.py.in setup.py @ONLY)
-
-add_custom_command(OUTPUT ${CPP_WRAP_FILE} ${PYTHON_FILE}
- COMMAND ${PYTHON_EXECUTABLE} setup.py build
- COMMENT "Building ${PYTHON_FILE}"
-)
-
-add_custom_target(wrapper ALL
- DEPENDS ${CPP_WRAP_FILE} ${PYTHON_FILE}
- VERBATIM
-)
-
-if(NOT PYTHON_INSTALL_PARAMS)
- set(PYTHON_INSTALL_PARAMS "--prefix=${CMAKE_INSTALL_PREFIX} --root=\$ENV{DESTDIR}/")
-endif()
-
-set(INSTALL_WRAPPER "${PYTHON_EXECUTABLE} setup.py install ${PYTHON_INSTALL_PARAMS}")
-install(CODE "execute_process(COMMAND ${INSTALL_WRAPPER} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lttoolbox-3.7.1/tests/lt_paradigm/__init__.py new/lttoolbox-3.7.6/tests/lt_paradigm/__init__.py
--- old/lttoolbox-3.7.1/tests/lt_paradigm/__init__.py 2022-11-01 09:36:47.000000000 +0100
+++ new/lttoolbox-3.7.6/tests/lt_paradigm/__init__.py 2023-12-27 21:15:14.000000000 +0100
@@ -37,3 +37,34 @@
inputs = ['*<n><*>']
expectedOutputs = ['ab<n><def>:abc\nab<n><ind>:ab\nn<n><ind>:n\ny<n><ind>:y']
sortoutput = False
+
+class ExcludeSingleTest(ParadigmTest):
+ procdix = 'data/unbalanced-epsilons-mono.dix'
+ inputs = ['*<vblex><*>', '*<vblex><*-pres>', '*<vblex><*-inf-pret>']
+ expectedOutputs = [
+ 're<vblex><inf>:re\nre<vblex><pres>:rer\nre<vblex><pres>:res\nre<vblex><pret>:ret',
+ 're<vblex><inf>:re\nre<vblex><pret>:ret',
+ 're<vblex><pres>:rer\nre<vblex><pres>:res'
+ ]
+
+class OrTagTest(ParadigmTest):
+ procdix = 'data/unbalanced-epsilons-mono.dix'
+ inputs = ['re<vblex><|pres|pret>', 're<vblex><|inf>', 're<vblex><|xqz>']
+ expectedOutputs = [
+ 're<vblex><pres>:rer\nre<vblex><pres>:res\nre<vblex><pret>:ret',
+ 're<vblex><inf>:re\nre<vblex><pret>:ret',
+ ''
+ ]
+
+class OrTagRepeatTest(ParadigmTest):
+ procdix = 'data/unbalanced-epsilons-mono.dix'
+ inputs = [
+ 're<*|vblex|pres|pret>',
+ 're<*|inf|vblex>',
+ 're<*|n|adj|vblex|inf>'
+ ]
+ expectedOutputs = [
+ 're<vblex><pres>:rer\nre<vblex><pres>:res\nre<vblex><pret>:ret',
+ 're<vblex><inf>:re\nre<vblex><pret>:ret',
+ 're<vblex><inf>:re\nre<vblex><pret>:ret',
+ ]
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-unicode-collation for openSUSE:Factory checked in at 2023-12-28 23:03:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-unicode-collation (Old)
and /work/SRC/openSUSE:Factory/.ghc-unicode-collation.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-unicode-collation"
Thu Dec 28 23:03:06 2023 rev:7 rq:1135402 version:0.1.3.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-unicode-collation/ghc-unicode-collation.changes 2023-09-04 22:54:43.334185363 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-unicode-collation.new.28375/ghc-unicode-collation.changes 2023-12-28 23:04:50.765860210 +0100
@@ -1,0 +2,9 @@
+Wed Dec 20 19:13:59 UTC 2023 - Peter Simons <psimons(a)suse.com>
+
+- Update unicode-collation to version 0.1.3.6.
+ Upstream has edited the change log file since the last release in
+ a non-trivial way, i.e. they did more than just add a new entry
+ at the top. You can review the file at:
+ http://hackage.haskell.org/package/unicode-collation-0.1.3.6/src/CHANGELOG.…
+
+-------------------------------------------------------------------
Old:
----
unicode-collation-0.1.3.5.tar.gz
New:
----
unicode-collation-0.1.3.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-unicode-collation.spec ++++++
--- /var/tmp/diff_new_pack.ZIeqpL/_old 2023-12-28 23:04:51.245877754 +0100
+++ /var/tmp/diff_new_pack.ZIeqpL/_new 2023-12-28 23:04:51.249877900 +0100
@@ -20,7 +20,7 @@
%global pkgver %{pkg_name}-%{version}
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.1.3.5
+Version: 0.1.3.6
Release: 0
Summary: Haskell implementation of the Unicode Collation Algorithm
License: BSD-2-Clause
++++++ unicode-collation-0.1.3.5.tar.gz -> unicode-collation-0.1.3.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unicode-collation-0.1.3.5/CHANGELOG.md new/unicode-collation-0.1.3.6/CHANGELOG.md
--- old/unicode-collation-0.1.3.5/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
+++ new/unicode-collation-0.1.3.6/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200
@@ -2,17 +2,21 @@
`unicode-collation` uses [PVP Versioning](https://pvp.haskell.org).
+## 0.1.3.6
+
+ * Update to build with GHC 9.8 (Laurent P. René de Cotret).
+
## 0.1.3.5
- + Allow text 2.1.
+ * Allow text 2.1.
## 0.1.3.4
- + Allow base 4.18.
+ * Allow base 4.18.
## 0.1.3.3
- + Allow base 4.17. Closes #12.
+ * Allow base 4.17. Closes #12.
## 0.1.3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unicode-collation-0.1.3.5/test/unit.hs new/unicode-collation-0.1.3.6/test/unit.hs
--- old/unicode-collation-0.1.3.5/test/unit.hs 2001-09-09 03:46:40.000000000 +0200
+++ new/unicode-collation-0.1.3.6/test/unit.hs 2001-09-09 03:46:40.000000000 +0200
@@ -171,7 +171,7 @@
[] -> return ()
es -> assertFailure (unlines es))
$ map (conformanceTestWith coll)
- (zip3 (map fst xs) (map snd xs) (tail (map snd xs)))
+ (zip3 (map fst xs) (map snd xs) (drop 1 (map snd xs)))
conformanceTestWith :: Collator -> (Int, Text, Text) -> Either String ()
conformanceTestWith coll (lineNo, txt1, txt2) =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unicode-collation-0.1.3.5/unicode-collation.cabal new/unicode-collation-0.1.3.6/unicode-collation.cabal
--- old/unicode-collation-0.1.3.5/unicode-collation.cabal 2001-09-09 03:46:40.000000000 +0200
+++ new/unicode-collation-0.1.3.6/unicode-collation.cabal 2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: unicode-collation
-version: 0.1.3.5
+version: 0.1.3.6
synopsis: Haskell implementation of the Unicode Collation Algorithm
description: This library provides a pure Haskell implementation of
the Unicode Collation Algorithm described at
@@ -33,6 +33,8 @@
GHC == 9.0.1
GHC == 9.2.2
GHC == 9.4.2
+ GHC == 9.6.3
+ GHC == 9.8.1
source-repository head
type: git
@@ -48,7 +50,7 @@
Default: False
common common-options
- build-depends: base >= 4.11 && < 4.19
+ build-depends: base >= 4.11 && < 4.20
ghc-options: -Wall
-Wcompat
@@ -144,7 +146,7 @@
build-depends: tasty-bench
, unicode-collation
, text
- , text-icu
+ , text-icu >= 0.8
, quickcheck-instances
, QuickCheck
ghc-options: -rtsopts -with-rtsopts=-A8m
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package openfortivpn for openSUSE:Factory checked in at 2023-12-28 23:03:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openfortivpn (Old)
and /work/SRC/openSUSE:Factory/.openfortivpn.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openfortivpn"
Thu Dec 28 23:03:04 2023 rev:26 rq:1135396 version:1.21.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/openfortivpn/openfortivpn.changes 2023-09-15 22:09:46.538360948 +0200
+++ /work/SRC/openSUSE:Factory/.openfortivpn.new.28375/openfortivpn.changes 2023-12-28 23:04:49.469812844 +0100
@@ -1,0 +2,8 @@
+Thu Dec 14 20:53:26 UTC 2023 - Martin Hauke <mardnh(a)gmx.de>
+
+- Update to version 1.21.0
+ * fix "Peer refused to agree to his IP address" message, again.
+ * deprecate option --plugin.
+ * better masking of password in logs.
+
+-------------------------------------------------------------------
Old:
----
openfortivpn-1.20.5.tar.gz
New:
----
openfortivpn-1.21.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openfortivpn.spec ++++++
--- /var/tmp/diff_new_pack.M97N7H/_old 2023-12-28 23:04:49.877827755 +0100
+++ /var/tmp/diff_new_pack.M97N7H/_new 2023-12-28 23:04:49.881827901 +0100
@@ -17,7 +17,7 @@
Name: openfortivpn
-Version: 1.20.5
+Version: 1.21.0
Release: 0
Summary: Client for PPP+SSL VPN tunnel services
License: GPL-3.0-or-later
++++++ openfortivpn-1.20.5.tar.gz -> openfortivpn-1.21.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/.github/workflows/codeql-analysis.yml new/openfortivpn-1.21.0/.github/workflows/codeql-analysis.yml
--- old/openfortivpn-1.20.5/.github/workflows/codeql-analysis.yml 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/.github/workflows/codeql-analysis.yml 2023-11-08 07:42:39.000000000 +0100
@@ -33,7 +33,7 @@
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/.github/workflows/codespell.yml new/openfortivpn-1.21.0/.github/workflows/codespell.yml
--- old/openfortivpn-1.20.5/.github/workflows/codespell.yml 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/.github/workflows/codespell.yml 2023-11-08 07:42:39.000000000 +0100
@@ -14,7 +14,7 @@
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
skip: .git,checkpatch.pl,spelling.txt,LICENSE.OpenSSL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/.github/workflows/coverity-scan.yml new/openfortivpn-1.21.0/.github/workflows/coverity-scan.yml
--- old/openfortivpn-1.20.5/.github/workflows/coverity-scan.yml 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/.github/workflows/coverity-scan.yml 2023-11-08 07:42:39.000000000 +0100
@@ -12,7 +12,7 @@
steps:
- name: Checkout Code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Download the Coverity Scan Build Tool
run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/.github/workflows/openfortivpn.yml new/openfortivpn-1.21.0/.github/workflows/openfortivpn.yml
--- old/openfortivpn-1.20.5/.github/workflows/openfortivpn.yml 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/.github/workflows/openfortivpn.yml 2023-11-08 07:42:39.000000000 +0100
@@ -18,7 +18,7 @@
steps:
- name: Checkout Code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get install -y astyle
@@ -41,7 +41,7 @@
steps:
- name: Checkout Code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Install Dependencies
run: |
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/CHANGELOG.md new/openfortivpn-1.21.0/CHANGELOG.md
--- old/openfortivpn-1.20.5/CHANGELOG.md 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/CHANGELOG.md 2023-11-08 07:42:39.000000000 +0100
@@ -14,6 +14,13 @@
This high level changelog is usually updated when a release is tagged.
On the master branch there may be changes that are not (yet) described here.
+### 1.21.0
+
+* [~] fix "Peer refused to agree to his IP address" message, again
+* [~] deprecate option --plugin
+* [-] better masking of password in logs
+* [-] break on reading 0 from ppp pty, for non-Linux systems
+
### 1.20.5
* [-] revert previous fix from 1.20.4, make it optional
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/README.md new/openfortivpn-1.21.0/README.md
--- old/openfortivpn-1.20.5/README.md 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/README.md 2023-11-08 07:42:39.000000000 +0100
@@ -101,7 +101,7 @@
* [openSUSE / SLE](https://software.opensuse.org/package/openfortivpn)
* [Gentoo](https://packages.gentoo.org/packages/net-vpn/openfortivpn)
* [NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/networking/o…
-* [Arch Linux](https://www.archlinux.org/packages/community/x86_64/openfortivpn)
+* [Arch Linux](https://archlinux.org/packages/extra/x86_64/openfortivpn)
* [Debian](https://packages.debian.org/stable/openfortivpn)
* [Ubuntu](https://packages.ubuntu.com/search?keywords=openfortivpn)
* [Solus](https://dev.getsol.us/source/openfortivpn/)
@@ -168,6 +168,16 @@
make
sudo make install
```
+
+ If targeting platforms with pppd < 2.5.0 such as current version of macOS,
+ we suggest you configure with option --enable-legacy-pppd:
+
+ ```shell
+ ./autogen.sh
+ ./configure --prefix=/usr/local --sysconfdir=/etc --enable-legacy-pppd
+ make
+ sudo make install
+ ```
If you need to specify the openssl location you can set the `$PKG_CONFIG_PATH`
environment variable. For fine-tuning check the available configure arguments
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/configure.ac new/openfortivpn-1.21.0/configure.ac
--- old/openfortivpn-1.20.5/configure.ac 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/configure.ac 2023-11-08 07:42:39.000000000 +0100
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
-AC_INIT([openfortivpn], [1.20.5])
+AC_INIT([openfortivpn], [1.21.0])
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([foreign subdir-objects])
@@ -215,7 +215,7 @@
# prepare possibility to override default locations
AC_ARG_WITH([netstat],
AS_HELP_STRING([--with-netstat],
- [set the path to the netstat executable on MacOSX or FreeBSD]),
+ [set the path to the netstat executable on MacOS or FreeBSD]),
NETSTAT_PATH="$withval"
)
# this is for the pppd daemon executable
@@ -228,7 +228,11 @@
with_ppp="no"
])
)
-# and this is for the ppp user space client on FreeBSD
+# support pppd < 2.5.0 by default instead of pppd >= 2.5.0
+AC_ARG_ENABLE([legacy_pppd],
+ AS_HELP_STRING([--enable-legacy-pppd],
+ [support pppd < 2.5.0 by default instead of pppd >= 2.5.0]))
+# this is for the ppp user space client on FreeBSD
AC_ARG_WITH([ppp],
AS_HELP_STRING([--with-ppp],
[set the path to the ppp userspace client on FreeBSD]),
@@ -324,6 +328,13 @@
AC_DEFINE(HAVE_USR_SBIN_PPPD, 0)
AC_MSG_NOTICE([HAVE_USR_SBIN_PPPD... 0])
])
+AS_IF([test "x$enable_legacy_pppd" = "xyes"], [
+ AC_DEFINE(LEGACY_PPPD, 1)
+ AC_MSG_NOTICE([LEGACY_PPPD... 1])
+],[
+ AC_DEFINE(LEGACY_PPPD, 0)
+ AC_MSG_NOTICE([LEGACY_PPPD... 0])
+])
AS_IF([test "x$enable_proc" = "xyes"], [
AC_DEFINE(HAVE_PROC_NET_ROUTE, 1)
AC_MSG_NOTICE([HAVE_PROC_NET_ROUTE... 1])
@@ -346,10 +357,9 @@
# allow override at configure time
AC_ARG_WITH([resolvconf],
AS_HELP_STRING([--with-resolvconf],
- [Set the path to the resolvconf executable. \
- Set this to "DISABLED" to fully disable resolvconf support. \
- In that case it will not be compiled in and therefore be \
- unavailable at runtime.]),
+ [set the path to the resolvconf executable, \
+ with special value "DISABLED" fully disabling \
+ resolvconf support at build-time]),
RESOLVCONF_PATH="$withval"
)
@@ -368,10 +378,10 @@
# the default for the --use-resolvconf runtime command line option
AC_ARG_ENABLE([resolvconf],
AS_HELP_STRING([--enable-resolvconf],
- [Enable usage of resolvconf at runtime by default. \
- Use --disable-resolvconf for the opposite, note that \
- resolvconf support will still be compilled in, but \
- disabled if not explicitly enabled at runtime.]))
+ [enable usage of resolvconf at runtime by default \
+ (please note that resolvconf support will still \
+ be compiled in with --disable-resolvconf but \
+ disabled unless explicitly enabled at runtime)]))
# Determine how resolvconf works at build-time if it is installed:
# * openresolv supports option -l that lists active configurations and returns 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/doc/openfortivpn.1.in new/openfortivpn-1.21.0/doc/openfortivpn.1.in
--- old/openfortivpn-1.20.5/doc/openfortivpn.1.in 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/doc/openfortivpn.1.in 2023-11-08 07:42:39.000000000 +0100
@@ -17,11 +17,11 @@
[\fB\-\-no\-ftm\-push\fR]
[\fB\-\-realm=\fI<realm>\fR]
[\fB\-\-ifname=\fI<interface>\fR]
-[\fB\-\-set\-routes=<bool>\fR]
+[\fB\-\-set\-routes=\fI<bool>\fR]
[\fB\-\-no\-routes\fR]
-[\fB\-\-set\-dns=<bool>\fR]
+[\fB\-\-set\-dns=\fI<bool>\fR]
[\fB\-\-no\-dns\fR]
-[\fB\-\-half\-internet\-routes=<bool>\fR]
+[\fB\-\-half\-internet\-routes=\fI<bool>\fR]
[\fB\-\-ca\-file=\fI<file>\fR]
[\fB\-\-user\-cert=\fI<file>\fR]
[\fB\-\-user-cert=\fIpkcs11:\fR]
@@ -32,13 +32,14 @@
[\fB\-\-cipher\-list=\fI<ciphers>\fR]
[\fB\-\-min\-tls=\fI<version>\fR]
[\fB\-\-seclevel\-1\fR]
-[\fB\-\-pppd\-use\-peerdns=<bool>\fR]
+[\fB\-\-pppd\-use\-peerdns=\fI<bool>\fR]
[\fB\-\-pppd\-no\-peerdns\fR]
[\fB\-\-pppd\-log=\fI<file>\fR]
[\fB\-\-pppd\-plugin=\fI<file>\fR]
[\fB\-\-pppd\-ipparam=\fI<string>\fR]
[\fB\-\-pppd\-ifname=\fI<string>\fR]
[\fB\-\-pppd\-call=\fI<name>\fR]
+[\fB\-\-pppd\-accept\-remote=\fI<bool>\fR]
[\fB\-\-ppp\-system=\fI<string>\fR]
[\fB\-\-use\-resolvconf=\fI<bool>\fR]
[\fB\-\-persistent=\fI<interval>\fR]
@@ -227,6 +228,10 @@
group `dip' can invoke `pppd call <name>' to make pppd read and apply
options from /etc/ppp/peers/<name> (including privileged ones).
.TP
+\fB\-\-pppd\-accept\-remote=\fI<bool>\fR
+Whether to invoke pppd with `ipcp-accept-remote'. Enabling this option breaks
+pppd < 2.5.0 but is required by newer pppd versions.
+.TP
\fB\-\-ppp\-system=\fI<string>\fR
Only available if compiled for ppp user space client (e.g. on FreeBSD).
Connect to the specified system as defined in /etc/ppp/ppp.conf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/etc/ppp/ip-down.local.example new/openfortivpn-1.21.0/etc/ppp/ip-down.local.example
--- old/openfortivpn-1.20.5/etc/ppp/ip-down.local.example 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/etc/ppp/ip-down.local.example 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case "$PPP_IPPARAM" in
openfortivpn*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/etc/ppp/ip-up.local.example new/openfortivpn-1.21.0/etc/ppp/ip-up.local.example
--- old/openfortivpn-1.20.5/etc/ppp/ip-up.local.example 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/etc/ppp/ip-up.local.example 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
case "$PPP_IPPARAM" in
openfortivpn*)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/config.c new/openfortivpn-1.21.0/src/config.c
--- old/openfortivpn-1.20.5/src/config.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/config.c 2023-11-08 07:42:39.000000000 +0100
@@ -350,6 +350,15 @@
} else if (strcmp(key, "pppd-call") == 0) {
free(cfg->pppd_call);
cfg->pppd_call = strdup(val);
+ } else if (strcmp(key, "pppd-accept-remote") == 0) {
+ int pppd_accept_remote = strtob(val);
+
+ if (pppd_accept_remote < 0) {
+ log_warn("Bad pppd-accept-remote in configuration file: \"%s\".\n",
+ val);
+ continue;
+ }
+ cfg->pppd_accept_remote = pppd_accept_remote;
#else
} else if (strcmp(key, "pppd") == 0) {
log_warn("Ignoring pppd option \"%s\" in the config file.\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/http.c new/openfortivpn-1.21.0/src/http.c
--- old/openfortivpn-1.20.5/src/http.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/http.c 2023-11-08 07:42:39.000000000 +0100
@@ -90,13 +90,12 @@
char password[3 * PASSWORD_SIZE + 1];
url_encode(password, tunnel->config->password);
- pwstart = strstr(logbuffer, password);
- if (pwstart != NULL) {
+ while ((pwstart = strstr(logbuffer, password))) {
int pos, pwlen, i;
pos = pwstart - logbuffer;
- pwlen = strlen(tunnel->config->password);
+ pwlen = strlen(password);
for (i = pos; i < pos + pwlen; i++)
logbuffer[i] = '*';
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/io.c new/openfortivpn-1.21.0/src/io.c
--- old/openfortivpn-1.20.5/src/io.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/io.c 2023-11-08 07:42:39.000000000 +0100
@@ -104,6 +104,7 @@
for (i = 0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&lockarray[i]);
OPENSSL_free(lockarray);
+ lockarray = NULL;
}
#else
static void init_ssl_locks(void)
@@ -212,7 +213,7 @@
break;
} else if (n == 0) {
log_warn("read returned %ld\n", n);
- continue;
+ break;
} else if (first_time) {
// pppd did talk, now we can write to it if we want
SEM_POST(&sem_pppd_ready);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/ipv4.c new/openfortivpn-1.21.0/src/ipv4.c
--- old/openfortivpn-1.20.5/src/ipv4.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/ipv4.c 2023-11-08 07:42:39.000000000 +0100
@@ -116,7 +116,7 @@
static int ipv4_get_route(struct rtentry *route)
{
size_t buffer_size = IPV4_GET_ROUTE_BUFFER_CHUNK_SIZE;
- char *buffer = malloc(buffer_size);
+ char *buffer;
char *realloc_buffer;
int err = 0;
char *start, *line;
@@ -124,11 +124,6 @@
uint32_t rtdest, rtmask, rtgtw;
int rtfound = 0;
- if (!buffer) {
- err = ERR_IPV4_SEE_ERRNO;
- goto end;
- }
-
/*
* initialize the buffer with zeroes, aiming to address the
* coverity issue "TAINTED_SCALAR passed to a tainted sink"
@@ -148,7 +143,12 @@
* that there is a delimiting '\0' character by proper
* initialization. We ensure this also when growing the buffer.
*/
- memset(buffer, '\0', IPV4_GET_ROUTE_BUFFER_CHUNK_SIZE);
+ buffer = calloc(1, buffer_size);
+ if (!buffer) {
+ err = ERR_IPV4_SEE_ERRNO;
+ goto end;
+ }
+
log_debug("ip route show %s\n", ipv4_show_route(route));
// store what we are looking for
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/main.c new/openfortivpn-1.21.0/src/main.c
--- old/openfortivpn-1.20.5/src/main.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/main.c 2023-11-08 07:42:39.000000000 +0100
@@ -37,8 +37,7 @@
" [--pppd-use-peerdns=<0|1>] [--pppd-log=<file>]\n" \
" [--pppd-ifname=<string>] [--pppd-ipparam=<string>]\n" \
" [--pppd-call=<name>] [--pppd-plugin=<file>]\n" \
-" [--pppd-accept-remote]\n"
-
+" [--pppd-accept-remote=<0|1>]\n"
#define PPPD_HELP \
" --pppd-use-peerdns=[01] Whether to ask peer ppp server for DNS server\n" \
" addresses and make pppd rewrite /etc/resolv.conf.\n" \
@@ -54,8 +53,8 @@
" --pppd-call=<name> Move most pppd options from pppd cmdline to\n" \
" /etc/ppp/peers/<name> and invoke pppd with\n" \
" 'call <name>'.\n" \
-" --pppd-accept-remote Invoke pppd with option 'ipcp-accept-remote'." \
-" It might help avoid errors with PPP 2.5.0.\n"
+" --pppd-accept-remote=[01] Whether to invoke pppd with 'ipcp-accept-remote'.\n" \
+" Disable for pppd < 2.5.0.\n"
#elif HAVE_USR_SBIN_PPP
#define PPPD_USAGE \
" [--ppp-system=<system>]\n"
@@ -246,7 +245,11 @@
.pppd_ipparam = NULL,
.pppd_ifname = NULL,
.pppd_call = NULL,
+#if LEGACY_PPPD
.pppd_accept_remote = 0,
+#else
+ .pppd_accept_remote = 1,
+#endif
#endif
#if HAVE_USR_SBIN_PPP
.ppp_system = NULL,
@@ -309,14 +312,14 @@
{"pppd-ipparam", required_argument, NULL, 0},
{"pppd-ifname", required_argument, NULL, 0},
{"pppd-call", required_argument, NULL, 0},
- {"pppd-accept-remote", no_argument, &cli_cfg.pppd_accept_remote, 1},
+ {"pppd-accept-remote", optional_argument, NULL, 0},
{"plugin", required_argument, NULL, 0}, // deprecated
#endif
#if HAVE_USR_SBIN_PPP
- {"ppp-system", required_argument, NULL, 0},
+ {"ppp-system", required_argument, NULL, 0},
#endif
#if HAVE_RESOLVCONF
- {"use-resolvconf", required_argument, NULL, 0},
+ {"use-resolvconf", required_argument, NULL, 0},
#endif
{NULL, 0, NULL, 0}
};
@@ -390,10 +393,28 @@
cli_cfg.pppd_call = strdup(optarg);
break;
}
+ if (strcmp(long_options[option_index].name,
+ "pppd-accept-remote") == 0) {
+ if (optarg) {
+ int pppd_accept_remote = strtob(optarg);
+
+ if (pppd_accept_remote < 0) {
+ log_warn("Bad pppd-accept-remote option: \"%s\"\n",
+ optarg);
+ break;
+ }
+ cli_cfg.pppd_accept_remote = pppd_accept_remote;
+ } else {
+ cli_cfg.pppd_accept_remote = 1;
+ }
+ break;
+ }
// --plugin is deprecated, use --pppd-plugin
if (cli_cfg.pppd_plugin == NULL &&
strcmp(long_options[option_index].name,
"plugin") == 0) {
+ log_warn("Option --%s is deprecated, use --pppd-plugin\n",
+ long_options[option_index].name);
free(cli_cfg.pppd_plugin);
cli_cfg.pppd_plugin = strdup(optarg);
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/src/tunnel.c new/openfortivpn-1.21.0/src/tunnel.c
--- old/openfortivpn-1.20.5/src/tunnel.c 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/src/tunnel.c 2023-11-08 07:42:39.000000000 +0100
@@ -270,11 +270,13 @@
* of our local IP address, even if the local IP address
* was specified in an option.
*
- * This option attempts to fix this:
+ * pppd < 2.5.0 requires this option to avoid this error:
* Peer refused to agree to our IP address
- *
- * Yet, this doesn't make sense: we do not specify
- * a local IP address, and we use noipdefault.
+ * This doesn't make sense to me. I feel it should be the
+ * default because:
+ * 1. we do not specify a local IP address,
+ * 2. we use option noipdefault to specifically ask the
+ * peer to supply the local IP address.
*/
"ipcp-accept-local",
"noaccomp",
@@ -293,6 +295,23 @@
return 1;
}
}
+ if (tunnel->config->pppd_accept_remote)
+ /*
+ * With this option, pppd will accept the peer's idea of its
+ * (remote) IP address, even if the remote IP address was
+ * specified in an option.
+ *
+ * pppd ≥ 2.5.0 requires this option to avoid this error:
+ * Peer refused to agree to his IP address
+ * This makes sense.
+ *
+ * Unfortunately, pppd < 2.5.0 does not like this option.
+ * Again, this doesn't make sense to me.
+ */
+ if (ofv_append_varr(&pppd_args, "ipcp-accept-remote")) {
+ free(pppd_args.data);
+ return 1;
+ }
if (tunnel->config->pppd_use_peerdns)
if (ofv_append_varr(&pppd_args, "usepeerdns")) {
free(pppd_args.data);
@@ -355,25 +374,6 @@
return 1;
}
}
- if (tunnel->config->pppd_accept_remote)
- /*
- * With this option, pppd will accept the peer's idea of
- * its (remote) IP address, even if the remote IP address
- * was specified in an option.
- *
- * This option attempts to fix this with PPP 2.5.0:
- * Peer refused to agree to his IP address
- *
- * Currently (always?) breaks on macOS with:
- * Could not get current default route
- * (Parsing /proc/net/route failed).
- * Protecting tunnel route has failed.
- * But this can be working except for some cases.
- */
- if (ofv_append_varr(&pppd_args, "ipcp-accept-remote")) {
- free(pppd_args.data);
- return 1;
- }
#endif
#if HAVE_USR_SBIN_PPP
if (tunnel->config->ppp_system) {
@@ -808,7 +808,7 @@
log_debug("server_addr: %s\n", inet_ntoa(server.sin_addr));
log_debug("server_port: %u\n", ntohs(server.sin_port));
server.sin_family = AF_INET;
- memset(&(server.sin_zero), '\0', 8);
+ memset(&(server.sin_zero), 0, sizeof(server.sin_zero));
log_debug("gateway_ip: %s\n", inet_ntoa(tunnel->config->gateway_ip));
log_debug("gateway_port: %u\n", tunnel->config->gateway_port);
@@ -840,7 +840,7 @@
// be careful not to fetch too many bytes at once
const char *response = NULL;
- memset(&(request), '\0', sizeof(request));
+ memset(&(request), 0, sizeof(request));
for (int j = 0; response == NULL; j++) {
if (j >= ARRAY_SIZE(request) - 1) {
log_error("Proxy response is unexpectedly large and cannot fit in the %lu-bytes buffer.\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/ci/checkpatch/checkpatch.pl new/openfortivpn-1.21.0/tests/ci/checkpatch/checkpatch.pl
--- old/openfortivpn-1.20.5/tests/ci/checkpatch/checkpatch.pl 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/ci/checkpatch/checkpatch.pl 2023-11-08 07:42:39.000000000 +0100
@@ -74,6 +74,8 @@
my $tabsize = 8;
my ${CONFIG_} = "CONFIG_";
+my %maybe_linker_symbol; # for externs in c exceptions, when seen in *vmlinux.lds.h
+
sub help {
my ($exitcode) = @_;
@@ -3270,7 +3272,7 @@
# A Fixes:, link or signature tag line
$commit_log_possible_stack_dump)) {
WARN("COMMIT_LOG_LONG_LINE",
- "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
+ "Prefer a maximum 75 chars per line (possible unwrapped commit description?)\n" . $herecurr);
$commit_log_long_line = 1;
}
@@ -5046,7 +5048,7 @@
if|for|while|switch|return|case|
volatile|__volatile__|
__attribute__|format|__extension__|
- asm|__asm__)$/x)
+ asm|__asm__|scoped_guard)$/x)
{
# cpp #define statements have non-optional spaces, ie
# if there is a space between the name and the open
@@ -6051,6 +6053,9 @@
# check for line continuations outside of #defines, preprocessor #, and asm
+ } elsif ($realfile =~ m@/vmlinux.lds.h$@) {
+ $line =~ s/(\w+)/$maybe_linker_symbol{$1}++/ge;
+ #print "REAL: $realfile\nln: $line\nkeys:", sort keys %maybe_linker_symbol;
} else {
if ($prevline !~ /^..*\\$/ &&
$line !~ /^\+\s*\#.*\\$/ && # preprocessor
@@ -6997,10 +7002,22 @@
# }
# }
+# strcpy uses that should likely be strscpy
+ if ($line =~ /\bstrcpy\s*\(/) {
+ WARN("STRCPY",
+ "Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88\n" . $herecurr);
+ }
+
# strlcpy uses that should likely be strscpy
if ($line =~ /\bstrlcpy\s*\(/) {
WARN("STRLCPY",
- "Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmk…" . $herecurr);
+ "Prefer strscpy over strlcpy - see: https://github.com/KSPP/linux/issues/89\n" . $herecurr);
+ }
+
+# strncpy uses that should likely be strscpy or strscpy_pad
+ if ($line =~ /\bstrncpy\s*\(/) {
+ WARN("STRNCPY",
+ "Prefer strscpy, strscpy_pad, or __nonstring over strncpy - see: https://github.com/KSPP/linux/issues/90\n" . $herecurr);
}
# typecasts on min/max could be min_t/max_t
@@ -7108,6 +7125,21 @@
}
} elsif ($realfile =~ /\.c$/ && defined $stat &&
+ $stat =~ /^\+extern struct\s+(\w+)\s+(\w+)\[\];/)
+ {
+ my ($st_type, $st_name) = ($1, $2);
+
+ for my $s (keys %maybe_linker_symbol) {
+ #print "Linker symbol? $st_name : $s\n";
+ goto LIKELY_LINKER_SYMBOL
+ if $st_name =~ /$s/;
+ }
+ WARN("AVOID_EXTERNS",
+ "found a file-scoped extern type:$st_type name:$st_name in .c file\n"
+ . "is this a linker symbol ?\n" . $herecurr);
+ LIKELY_LINKER_SYMBOL:
+
+ } elsif ($realfile =~ /\.c$/ && defined $stat &&
$stat =~ /^.\s*extern\s+/)
{
WARN("AVOID_EXTERNS",
@@ -7418,6 +7450,16 @@
}
}
+# check for array definition/declarations that should use flexible arrays instead
+ if ($sline =~ /^[\+ ]\s*\}(?:\s*__packed)?\s*;\s*$/ &&
+ $prevline =~ /^\+\s*(?:\}(?:\s*__packed\s*)?|$Type)\s*$Ident\s*\[\s*(0|1)\s*\]\s*;\s*$/) {
+ if (ERROR("FLEXIBLE_ARRAY",
+ "Use C99 flexible arrays - see https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element…" . $hereprev) &&
+ $1 == '0' && $fix) {
+ $fixed[$fixlinenr - 1] =~ s/\[\s*0\s*\]/[]/;
+ }
+ }
+
# nested likely/unlikely calls
if ($line =~ /\b(?:(?:un)?likely)\s*\(\s*!?\s*(IS_ERR(?:_OR_NULL|_VALUE)?|WARN)/) {
WARN("LIKELY_MISUSE",
@@ -7435,6 +7477,30 @@
}
}
+# Complain about RCU Tasks Trace used outside of BPF (and of course, RCU).
+ our $rcu_trace_funcs = qr{(?x:
+ rcu_read_lock_trace |
+ rcu_read_lock_trace_held |
+ rcu_read_unlock_trace |
+ call_rcu_tasks_trace |
+ synchronize_rcu_tasks_trace |
+ rcu_barrier_tasks_trace |
+ rcu_request_urgent_qs_task
+ )};
+ our $rcu_trace_paths = qr{(?x:
+ kernel/bpf/ |
+ include/linux/bpf |
+ net/bpf/ |
+ kernel/rcu/ |
+ include/linux/rcu
+ )};
+ if ($line =~ /\b($rcu_trace_funcs)\s*\(/) {
+ if ($realfile !~ m{^$rcu_trace_paths}) {
+ WARN("RCU_TASKS_TRACE",
+ "use of RCU tasks trace is incorrect outside BPF or core RCU code\n" . $herecurr);
+ }
+ }
+
# check for lockdep_set_novalidate_class
if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ ||
$line =~ /__lockdep_no_validate__\s*\)/ ) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/ci/checkpatch/spelling.txt new/openfortivpn-1.21.0/tests/ci/checkpatch/spelling.txt
--- old/openfortivpn-1.20.5/tests/ci/checkpatch/spelling.txt 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/ci/checkpatch/spelling.txt 2023-11-08 07:42:39.000000000 +0100
@@ -155,6 +155,7 @@
aquisition||acquisition
arbitary||arbitrary
architechture||architecture
+archtecture||architecture
arguement||argument
arguements||arguments
arithmatic||arithmetic
@@ -279,6 +280,7 @@
canot||cannot
cann't||can't
cannnot||cannot
+capabiity||capability
capabilites||capabilities
capabilties||capabilities
capabilty||capability
@@ -426,6 +428,7 @@
cound||could
couter||counter
coutner||counter
+creationg||creating
cryptocraphic||cryptographic
cummulative||cumulative
cunter||counter
@@ -492,6 +495,7 @@
destroied||destroyed
detabase||database
deteced||detected
+detecion||detection
detectt||detect
detroyed||destroyed
develope||develop
@@ -513,6 +517,7 @@
differrence||difference
diffrent||different
differenciate||differentiate
+diffreential||differential
diffrentiate||differentiate
difinition||definition
digial||digital
@@ -617,6 +622,7 @@
evalutes||evaluates
evalution||evaluation
excecutable||executable
+excceed||exceed
exceded||exceeded
exceds||exceeds
exceeed||exceed
@@ -632,6 +638,7 @@
exixt||exist
exsits||exists
exlcude||exclude
+exlcuding||excluding
exlcusive||exclusive
exlusive||exclusive
exmaple||example
@@ -726,6 +733,8 @@
genereate||generate
genereted||generated
genric||generic
+gerenal||general
+geting||getting
globel||global
grabing||grabbing
grahical||graphical
@@ -899,6 +908,7 @@
iternations||iterations
itertation||iteration
itslef||itself
+ivalid||invalid
jave||java
jeffies||jiffies
jumpimng||jumping
@@ -977,6 +987,7 @@
migrateable||migratable
millenium||millennium
milliseonds||milliseconds
+minimim||minimum
minium||minimum
minimam||minimum
minimun||minimum
@@ -1042,6 +1053,7 @@
notity||notify
nubmer||number
numebr||number
+numer||number
numner||number
nunber||number
obtaion||obtain
@@ -1061,6 +1073,7 @@
offlaod||offload
offloded||offloaded
offseting||offsetting
+oflload||offload
omited||omitted
omiting||omitting
omitt||omit
@@ -1105,6 +1118,7 @@
paket||packet
pallette||palette
paln||plan
+palne||plane
paramameters||parameters
paramaters||parameters
paramater||parameter
@@ -1181,12 +1195,14 @@
primative||primitive
princliple||principle
priorty||priority
+priting||printing
privilaged||privileged
privilage||privilege
priviledge||privilege
priviledges||privileges
privleges||privileges
probaly||probably
+probabalistic||probabilistic
procceed||proceed
proccesors||processors
procesed||processed
@@ -1460,6 +1476,7 @@
submition||submission
succeded||succeeded
suceed||succeed
+succesfuly||successfully
succesfully||successfully
succesful||successful
successed||succeeded
@@ -1503,6 +1520,7 @@
synax||syntax
synchonized||synchronized
sychronization||synchronization
+sychronously||synchronously
synchronuously||synchronously
syncronize||synchronize
syncronized||synchronized
@@ -1523,7 +1541,6 @@
temorary||temporary
temproarily||temporarily
temperture||temperature
-thead||thread
theads||threads
therfore||therefore
thier||their
@@ -1532,6 +1549,7 @@
threshhold||threshold
thresold||threshold
throught||through
+tansition||transition
trackling||tracking
troughput||throughput
trys||tries
@@ -1611,6 +1629,7 @@
unnecesary||unnecessary
unneedingly||unnecessarily
unnsupported||unsupported
+unuspported||unsupported
unmached||unmatched
unprecise||imprecise
unpriviledged||unprivileged
@@ -1657,6 +1676,7 @@
veriosn||version
verisons||versions
verison||version
+veritical||vertical
verson||version
vicefersa||vice-versa
virtal||virtual
@@ -1677,6 +1697,7 @@
wheter||whether
whe||when
wierd||weird
+wihout||without
wiil||will
wirte||write
withing||within
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/lint/astyle.sh new/openfortivpn-1.21.0/tests/lint/astyle.sh
--- old/openfortivpn-1.20.5/tests/lint/astyle.sh 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/lint/astyle.sh 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2015 Adrien Vergé
# Check that astyle is installed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/lint/checkpatch.sh new/openfortivpn-1.21.0/tests/lint/checkpatch.sh
--- old/openfortivpn-1.20.5/tests/lint/checkpatch.sh 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/lint/checkpatch.sh 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2020 Dimitri Papadopoulos
# Path to checkpatch.pl
@@ -11,7 +11,7 @@
tmp=$(mktemp)
"$checkpatch_path" --no-tree --terse \
- --ignore LEADING_SPACE,SPDX_LICENSE_TAG,CODE_INDENT,NAKED_SSCANF,VOLATILE,NEW_TYPEDEFS,LONG_LINE,LONG_LINE_STRING,QUOTED_WHITESPACE_BEFORE_NEWLINE,STRLCPY \
+ --ignore LEADING_SPACE,SPDX_LICENSE_TAG,CODE_INDENT,NAKED_SSCANF,VOLATILE,NEW_TYPEDEFS,LONG_LINE,LONG_LINE_STRING,QUOTED_WHITESPACE_BEFORE_NEWLINE,STRCPY,STRLCPY,STRNCPY \
-f "$file" | tee "$tmp"
if [ -s "$tmp" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/lint/eol-at-eof.sh new/openfortivpn-1.21.0/tests/lint/eol-at-eof.sh
--- old/openfortivpn-1.20.5/tests/lint/eol-at-eof.sh 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/lint/eol-at-eof.sh 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2015 Adrien Vergé
rc=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/lint/line_length.py new/openfortivpn-1.21.0/tests/lint/line_length.py
--- old/openfortivpn-1.20.5/tests/lint/line_length.py 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/lint/line_length.py 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
# Copyright (c) 2015 Adrien Vergé
"""Enforce maximum line length in openfortivpn C source code.
@@ -38,12 +38,11 @@
True if line ends with string, False otherwise.
"""
- return any(line.endswith(end)
- for end in ('"', '",', '");', '";', '" \\', '];'))
+ return any(line.endswith(end) for end in ('"', '",', '");', '";', '" \\', '];'))
def main():
- """Check each file provided as a command line parameter
+ """Check each file provided as a command line parameter.
Returns
-------
@@ -55,7 +54,7 @@
for arg in sys.argv[1:]:
with open(arg, "r") as source_file:
- for i, line in enumerate(source_file):
+ for i, line in enumerate(source_file, start=1):
line = line.rstrip()
# Lines that end with a string are exempted
if endswithstring(line):
@@ -64,7 +63,10 @@
line = line.replace("\t", " ")
# Lines longer than MAX are reported as an error
if len(line) > MAX:
- print(f"{arg}: {i}: line too long ({len(line)} characters)")
+ print(
+ f"{arg}: {i}: line too long ({len(line)} characters)",
+ file=sys.stderr,
+ )
exit_status = 1
sys.exit(exit_status)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openfortivpn-1.20.5/tests/lint/run.sh new/openfortivpn-1.21.0/tests/lint/run.sh
--- old/openfortivpn-1.20.5/tests/lint/run.sh 2023-06-23 08:20:36.000000000 +0200
+++ new/openfortivpn-1.21.0/tests/lint/run.sh 2023-11-08 07:42:39.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (c) 2015 Adrien Vergé
rc=0
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package tai-heritage-pro-fonts for openSUSE:Factory checked in at 2023-12-28 23:02:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tai-heritage-pro-fonts (Old)
and /work/SRC/openSUSE:Factory/.tai-heritage-pro-fonts.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tai-heritage-pro-fonts"
Thu Dec 28 23:02:59 2023 rev:3 rq:1135393 version:2.600
Changes:
--------
--- /work/SRC/openSUSE:Factory/tai-heritage-pro-fonts/tai-heritage-pro-fonts.changes 2013-12-17 07:30:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.tai-heritage-pro-fonts.new.28375/tai-heritage-pro-fonts.changes 2023-12-28 23:04:44.061615187 +0100
@@ -1,0 +2,12 @@
+Wed Dec 27 21:07:59 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 2.600:
+ * Fixed several bugs in the OpenType code. The fonts should now
+ work in OpenType applications that use the Universal Shaping
+ Engine on Windows 10.
+ * Eliminated minor discrepancies between Graphite and OpenType in
+ how combining marks are positioned in the Regular weight.
+ * Added WOFF versions of the fonts to the distribution, for the
+ benefit of web developers.
+
+-------------------------------------------------------------------
Old:
----
TaiHeritagePro2_500developer.zip
New:
----
TaiHeritagePro-2.600.zip
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ tai-heritage-pro-fonts.spec ++++++
--- /var/tmp/diff_new_pack.bPAx3Y/_old 2023-12-28 23:04:44.457629660 +0100
+++ /var/tmp/diff_new_pack.bPAx3Y/_new 2023-12-28 23:04:44.461629806 +0100
@@ -1,7 +1,7 @@
#
# spec file for package tai-heritage-pro-fonts
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,25 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
-%define fontname TaiHeritagePro
Name: tai-heritage-pro-fonts
-Version: 2.500
+Version: 2.600
Release: 0
Summary: Tai Viet Font
License: OFL-1.1
Group: System/X11/Fonts
-Url: http://www.sil.org/resources/software_fonts/tai-heritage-pro
-Source0: TaiHeritagePro2_500developer.zip
+URL: https://software.sil.org/taiheritage/
+Source0: https://software.sil.org/downloads/r/taiheritage/TaiHeritagePro-%{version}.…
BuildRequires: dos2unix
BuildRequires: fontpackages-devel
BuildRequires: unzip
-%reconfigure_fonts_prereq
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
+%reconfigure_fonts_prereq
%description
The Tai Heritage Pro font is a Unicode-encoded font designed to reflect the
@@ -39,10 +37,10 @@
surrounding areas.
%prep
-%setup -q -n %{fontname}-%{version}-developer
+%setup -q -n TaiHeritagePro-%{version}
%build
-dos2unix OFL*.txt FONTLOG.txt documentation/README.txt documentation/DOCUMENTATION.txt
+dos2unix OFL*.txt FONTLOG.txt README.txt documentation/DOCUMENTATION.txt
%install
mkdir -p %{buildroot}%{_ttfontsdir}
@@ -51,7 +49,6 @@
%reconfigure_fonts_scriptlets
%files
-%defattr(-,root,root)
-%doc OFL*.txt FONTLOG.txt documentation
+%doc OFL*.txt FONTLOG.txt README.txt documentation
%{_ttfontsdir}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package google-anonymouspro-fonts for openSUSE:Factory checked in at 2023-12-28 23:02:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-anonymouspro-fonts (Old)
and /work/SRC/openSUSE:Factory/.google-anonymouspro-fonts.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "google-anonymouspro-fonts"
Thu Dec 28 23:02:56 2023 rev:8 rq:1135391 version:1.002
Changes:
--------
--- /work/SRC/openSUSE:Factory/google-anonymouspro-fonts/google-anonymouspro-fonts.changes 2012-09-14 12:23:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.google-anonymouspro-fonts.new.28375/google-anonymouspro-fonts.changes 2023-12-28 23:04:40.197473962 +0100
@@ -1,0 +2,5 @@
+Wed Dec 27 21:46:24 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- spec file cleaning to include upstream url
+
+-------------------------------------------------------------------
Old:
----
anonymouspro.tar.bz2
New:
----
AnonymousPro-1_002.zip
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ google-anonymouspro-fonts.spec ++++++
--- /var/tmp/diff_new_pack.rJ9XwD/_old 2023-12-28 23:04:41.685528348 +0100
+++ /var/tmp/diff_new_pack.rJ9XwD/_new 2023-12-28 23:04:41.697528786 +0100
@@ -1,7 +1,7 @@
#
# spec file for package google-anonymouspro-fonts
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,25 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
-%define fontname anonymouspro
-
Name: google-anonymouspro-fonts
Version: 1.002
Release: 0
Summary: A Free Monospace Font
License: OFL-1.1
Group: System/X11/Fonts
-Url: http://www.ms-studio.com/FontSales/anonymouspro.html
-Source0: %{fontname}.tar.bz2
+URL: https://www.marksimonson.com/fonts/view/anonymous-pro
+Source0: https://www.marksimonson.com/assets/content/fonts/AnonymousPro-1_002.zip
BuildRequires: dos2unix
BuildRequires: fontpackages-devel
-%reconfigure_fonts_prereq
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
+BuildRequires: unzip
BuildArch: noarch
+%reconfigure_fonts_prereq
%description
Anonymous Pro is a family of four fixed-width fonts designed especially
@@ -46,7 +44,7 @@
Designer: Mark Simonson
%prep
-%setup -n %{fontname}
+%setup -q -n AnonymousPro-%{version}.001
chmod 644 *.ttf
%build
@@ -60,7 +58,6 @@
%reconfigure_fonts_scriptlets
%files
-%defattr(-, root,root)
%doc README.txt FONTLOG.txt OFL.txt
%dir %{_ttfontsdir}/
%{_ttfontsdir}/*
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package proftpd for openSUSE:Factory checked in at 2023-12-28 23:02:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/proftpd (Old)
and /work/SRC/openSUSE:Factory/.proftpd.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "proftpd"
Thu Dec 28 23:02:54 2023 rev:49 rq:1135389 version:1.3.8b
Changes:
--------
--- /work/SRC/openSUSE:Factory/proftpd/proftpd.changes 2023-11-03 22:21:55.999996754 +0100
+++ /work/SRC/openSUSE:Factory/.proftpd.new.28375/proftpd.changes 2023-12-28 23:04:38.793422647 +0100
@@ -1,0 +2,9 @@
+Wed Dec 27 21:52:11 UTC 2023 - chris(a)computersalat.de
+
+- 1.3.8a - Released 19-Dec-2023
+ * http://proftpd.org/docs/NEWS-1.3.8b
+ * Implemented mitigations for "Terrapin" SSH attack (CVE-2023-48795).
+- rebase patch
+ * proftpd-no_BuildDate.patch
+
+-------------------------------------------------------------------
Old:
----
proftpd-1.3.8a.tar.gz
proftpd-1.3.8a.tar.gz.asc
New:
----
proftpd-1.3.8b.tar.gz
proftpd-1.3.8b.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ proftpd.spec ++++++
--- /var/tmp/diff_new_pack.8zn6Hu/_old 2023-12-28 23:04:39.773458465 +0100
+++ /var/tmp/diff_new_pack.8zn6Hu/_new 2023-12-28 23:04:39.773458465 +0100
@@ -33,7 +33,7 @@
# We only accept updates for "STABLE" Versions
License: GPL-2.0-or-later
Group: Productivity/Networking/Ftp/Servers
-Version: 1.3.8a
+Version: 1.3.8b
Release: 0
URL: http://www.proftpd.org/
Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz
++++++ proftpd-1.3.8a.tar.gz -> proftpd-1.3.8b.tar.gz ++++++
/work/SRC/openSUSE:Factory/proftpd/proftpd-1.3.8a.tar.gz /work/SRC/openSUSE:Factory/.proftpd.new.28375/proftpd-1.3.8b.tar.gz differ: char 13, line 1
++++++ proftpd-no_BuildDate.patch ++++++
--- /var/tmp/diff_new_pack.8zn6Hu/_old 2023-12-28 23:04:39.853461389 +0100
+++ /var/tmp/diff_new_pack.8zn6Hu/_new 2023-12-28 23:04:39.857461535 +0100
@@ -99,6 +99,6 @@
-#include "buildstamp.h"
-
/* Application version (in various forms) */
- #define PROFTPD_VERSION_NUMBER 0x0001030806
- #define PROFTPD_VERSION_TEXT "1.3.8a"
+ #define PROFTPD_VERSION_NUMBER 0x0001030807
+ #define PROFTPD_VERSION_TEXT "1.3.8b"
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package go-containerregistry for openSUSE:Factory checked in at 2023-12-28 23:02:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/go-containerregistry (Old)
and /work/SRC/openSUSE:Factory/.go-containerregistry.new.28375 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "go-containerregistry"
Thu Dec 28 23:02:52 2023 rev:5 rq:1135385 version:0.17.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/go-containerregistry/go-containerregistry.changes 2023-11-26 19:38:09.612048008 +0100
+++ /work/SRC/openSUSE:Factory/.go-containerregistry.new.28375/go-containerregistry.changes 2023-12-28 23:04:36.673345163 +0100
@@ -1,0 +2,13 @@
+Wed Dec 27 21:21:47 UTC 2023 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 0.17.0:
+ * Validate index architectures match children
+ * Set Content-Length for blob uploads
+ * Don't wrap DefaultKeychain with refreshes
+ * Build releases with Go 1.21
+ * fix: mimic oci-layout in diskblobhandler
+ * tag: add command explanation to the long help
+ * feat: implement gc command
+ * feat: allow port and disk path to be overriden
+
+-------------------------------------------------------------------
Old:
----
go-containerregistry-0.16.1.tar.gz
New:
----
go-containerregistry-0.17.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ go-containerregistry.spec ++++++
--- /var/tmp/diff_new_pack.ajCo6G/_old 2023-12-28 23:04:37.421372502 +0100
+++ /var/tmp/diff_new_pack.ajCo6G/_new 2023-12-28 23:04:37.425372648 +0100
@@ -17,9 +17,8 @@
# nodebuginfo
-%global goipath github.com/google/go-containerregistry
Name: go-containerregistry
-Version: 0.16.1
+Version: 0.17.0
Release: 0
Summary: Container Library and tools for working with container registries
License: Apache-2.0
@@ -28,7 +27,7 @@
Source: https://github.com/google/go-containerregistry/archive/refs/tags/v%{version…
Source1: vendor.tar.gz
BuildRequires: golang-packaging
-BuildRequires: golang(API) = 1.20
+BuildRequires: golang(API) = 1.21
Conflicts: distribution-registry
%description
@@ -71,17 +70,18 @@
%autopatch -p1
%build
-%{goprep} %{goipath}
-
-export CGO_ENABLED=0
-
-%{gobuild} -mod vendor ./...
+for i in crane gcrane registry; do
+ go build -mod=vendor -buildmode=pie -trimpath ./cmd/$i
+done
%install
-%{goinstall}
+find -name crane
+for bin in crane gcrane registry; do
+ install $bin -D %{buildroot}/%{_bindir}/$bin
+done
# "only one tool per thing" SLE15 policy conflicts
%if 0%{?suse_version} && %{?suse_version} < 1550
-rm -v %{buildroot}/%{_bindir}/{registry,help}
+rm -v %{buildroot}/%{_bindir}/registry
%endif
%if %{?suse_version} > 1500
@@ -89,7 +89,6 @@
%license LICENSE
%doc README.md
%{_bindir}/registry
-%exclude %{_bindir}/help
%endif
%files -n crane
++++++ go-containerregistry-0.16.1.tar.gz -> go-containerregistry-0.17.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/.gitattributes new/go-containerregistry-0.17.0/.gitattributes
--- old/go-containerregistry-0.16.1/.gitattributes 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/.gitattributes 2023-11-29 22:32:21.000000000 +0100
@@ -5,3 +5,4 @@
**/zz_deepcopy_generated.go linguist-generated=true
cmd/crane/doc/crane*.md linguist-generated=true
go.sum linguist-generated=true
+**/testdata/** ignore-lint=true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/.github/workflows/release.yml new/go-containerregistry-0.17.0/.github/workflows/release.yml
--- old/go-containerregistry-0.16.1/.github/workflows/release.yml 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/.github/workflows/release.yml 2023-11-29 22:32:21.000000000 +0100
@@ -15,7 +15,7 @@
run: git fetch --prune --unshallow
- uses: actions/setup-go@v4
with:
- go-version: 1.18
+ go-version: 1.21
check-latest: true
- uses: goreleaser/goreleaser-action(a)v4.2.0
id: run-goreleaser
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/cmd/gc.go new/go-containerregistry-0.17.0/cmd/crane/cmd/gc.go
--- old/go-containerregistry-0.16.1/cmd/crane/cmd/gc.go 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/cmd/crane/cmd/gc.go 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,66 @@
+// Copyright 2018 Google LLC All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package cmd
+
+import (
+ "fmt"
+ "os"
+
+ "github.com/google/go-containerregistry/pkg/v1/layout"
+ "github.com/spf13/cobra"
+)
+
+func NewCmdLayout() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "layout",
+ }
+ cmd.AddCommand(newCmdGc())
+ return cmd
+}
+
+// NewCmdGc creates a new cobra.Command for the pull subcommand.
+func newCmdGc() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "gc OCI-LAYOUT",
+ Short: "Garbage collect unreferenced blobs in a local oci-layout",
+ Args: cobra.ExactArgs(1),
+ Hidden: true, // TODO: promote to public once theres some milage
+ RunE: func(_ *cobra.Command, args []string) error {
+ path := args[0]
+
+ p, err := layout.FromPath(path)
+
+ if err != nil {
+ return err
+ }
+
+ blobs, err := p.GarbageCollect()
+ if err != nil {
+ return err
+ }
+
+ for _, blob := range blobs {
+ if err := p.RemoveBlob(blob); err != nil {
+ return err
+ }
+ fmt.Fprintf(os.Stderr, "garbage collecting: %s\n", blob.String())
+ }
+
+ return nil
+ },
+ }
+
+ return cmd
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/cmd/root.go new/go-containerregistry-0.17.0/cmd/crane/cmd/root.go
--- old/go-containerregistry-0.16.1/cmd/crane/cmd/root.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/cmd/root.go 2023-11-29 22:32:21.000000000 +0100
@@ -129,7 +129,8 @@
NewCmdTag(&options),
NewCmdValidate(&options),
NewCmdVersion(),
- newCmdRegistry(),
+ NewCmdRegistry(),
+ NewCmdLayout(),
)
root.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enable debug logs")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/cmd/serve.go new/go-containerregistry-0.17.0/cmd/crane/cmd/serve.go
--- old/go-containerregistry-0.16.1/cmd/crane/cmd/serve.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/cmd/serve.go 2023-11-29 22:32:21.000000000 +0100
@@ -28,7 +28,7 @@
"github.com/google/go-containerregistry/pkg/registry"
)
-func newCmdRegistry() *cobra.Command {
+func NewCmdRegistry() *cobra.Command {
cmd := &cobra.Command{
Use: "registry",
}
@@ -37,15 +37,16 @@
}
func newCmdServe() *cobra.Command {
- var disk bool
+ var address, disk string
+ var blobsToDisk bool
cmd := &cobra.Command{
Use: "serve",
- Short: "Serve an in-memory registry implementation",
- Long: `This sub-command serves an in-memory registry implementation on an automatically chosen port (or $PORT)
+ Short: "Serve a registry implementation",
+ Long: `This sub-command serves a registry implementation on an automatically chosen port (:0), $PORT or --address
The command blocks while the server accepts pushes and pulls.
-Contents are only stored in memory, and when the process exits, pushed data is lost.`,
+Contents are can be stored in memory (when the process exits, pushed data is lost.), and disk (--disk).`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
ctx := cmd.Context()
@@ -54,7 +55,12 @@
if port == "" {
port = "0"
}
- listener, err := net.Listen("tcp", ":"+port)
+ listenOn := ":" + port
+ if address != "" {
+ listenOn = address
+ }
+
+ listener, err := net.Listen("tcp", listenOn)
if err != nil {
log.Fatalln(err)
}
@@ -62,10 +68,21 @@
port = fmt.Sprintf("%d", porti)
bh := registry.NewInMemoryBlobHandler()
- if disk {
- tmp := os.TempDir()
- log.Printf("storing blobs in %s", tmp)
- bh = registry.NewDiskBlobHandler(tmp)
+
+ diskp := disk
+ if cmd.Flags().Changed("blobs-to-disk") {
+ if disk != "" {
+ return fmt.Errorf("--disk and --blobs-to-disk can't be used together")
+ }
+ diskp, err = os.MkdirTemp(os.TempDir(), "craneregistry*")
+ if err != nil {
+ return err
+ }
+ }
+
+ if diskp != "" {
+ log.Printf("storing blobs in %s", diskp)
+ bh = registry.NewDiskBlobHandler(diskp)
}
s := &http.Server{
@@ -89,7 +106,12 @@
return nil
},
}
- cmd.Flags().BoolVar(&disk, "blobs-to-disk", false, "Store blobs on disk")
+ // TODO: remove --blobs-to-disk in a future release.
+ cmd.Flags().BoolVarP(&blobsToDisk, "blobs-to-disk", "", false, "Store blobs on disk on tmpdir")
cmd.Flags().MarkHidden("blobs-to-disk")
+ cmd.Flags().MarkDeprecated("blobs-to-disk", "and will stop working in a future release. use --disk=$(mktemp -d) instead.")
+ cmd.Flags().StringVarP(&disk, "disk", "", "", "Path to a directory where blobs will be stored")
+ cmd.Flags().StringVar(&address, "address", "", "Address to listen on")
+
return cmd
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/cmd/tag.go new/go-containerregistry-0.17.0/cmd/crane/cmd/tag.go
--- old/go-containerregistry-0.16.1/cmd/crane/cmd/tag.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/cmd/tag.go 2023-11-29 22:32:21.000000000 +0100
@@ -24,7 +24,9 @@
return &cobra.Command{
Use: "tag IMG TAG",
Short: "Efficiently tag a remote image",
- Long: `This differs slightly from the "copy" command in a couple subtle ways:
+ Long: `Tag remote image without downloading it.
+
+This differs slightly from the "copy" command in a couple subtle ways:
1. You don't have to specify the entire repository for the tag you're adding. For example, these two commands are functionally equivalent:
` + "```" + `
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/cmd/validate.go new/go-containerregistry-0.17.0/cmd/crane/cmd/validate.go
--- old/go-containerregistry-0.16.1/cmd/crane/cmd/validate.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/cmd/validate.go 2023-11-29 22:32:21.000000000 +0100
@@ -18,7 +18,6 @@
"fmt"
"github.com/google/go-containerregistry/pkg/crane"
- v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/google/go-containerregistry/pkg/v1/validate"
"github.com/spf13/cobra"
@@ -36,28 +35,56 @@
Short: "Validate that an image is well-formed",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
- for flag, maker := range map[string]func(string, ...crane.Option) (v1.Image, error){
- tarballPath: makeTarball,
- remoteRef: crane.Pull,
- } {
- if flag == "" {
- continue
- }
- img, err := maker(flag, *options...)
+ if tarballPath != "" {
+ img, err := tarball.ImageFromPath(tarballPath, nil)
if err != nil {
- return fmt.Errorf("failed to read image %s: %w", flag, err)
+ return fmt.Errorf("failed to read image %s: %w", tarballPath, err)
}
-
opt := []validate.Option{}
if fast {
opt = append(opt, validate.Fast)
}
if err := validate.Image(img, opt...); err != nil {
- fmt.Fprintf(cmd.OutOrStdout(), "FAIL: %s: %v\n", flag, err)
+ fmt.Fprintf(cmd.OutOrStdout(), "FAIL: %s: %v\n", tarballPath, err)
return err
}
- fmt.Fprintf(cmd.OutOrStdout(), "PASS: %s\n", flag)
+ fmt.Fprintf(cmd.OutOrStdout(), "PASS: %s\n", tarballPath)
+ }
+
+ if remoteRef != "" {
+ rmt, err := crane.Get(remoteRef, *options...)
+ if err != nil {
+ return fmt.Errorf("failed to read image %s: %w", remoteRef, err)
+ }
+
+ o := crane.GetOptions(*options...)
+
+ opt := []validate.Option{}
+ if fast {
+ opt = append(opt, validate.Fast)
+ }
+ if rmt.MediaType.IsIndex() && o.Platform == nil {
+ idx, err := rmt.ImageIndex()
+ if err != nil {
+ return fmt.Errorf("reading index: %w", err)
+ }
+ if err := validate.Index(idx, opt...); err != nil {
+ fmt.Fprintf(cmd.OutOrStdout(), "FAIL: %s: %v\n", remoteRef, err)
+ return err
+ }
+ } else {
+ img, err := rmt.Image()
+ if err != nil {
+ return fmt.Errorf("reading image: %w", err)
+ }
+ if err := validate.Image(img, opt...); err != nil {
+ fmt.Fprintf(cmd.OutOrStdout(), "FAIL: %s: %v\n", remoteRef, err)
+ return err
+ }
+ }
+ fmt.Fprintf(cmd.OutOrStdout(), "PASS: %s\n", remoteRef)
}
+
return nil
},
}
@@ -67,7 +94,3 @@
return validateCmd
}
-
-func makeTarball(path string, _ ...crane.Option) (v1.Image, error) {
- return tarball.ImageFromPath(path, nil)
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/doc/crane_registry.md new/go-containerregistry-0.17.0/cmd/crane/doc/crane_registry.md
--- old/go-containerregistry-0.16.1/cmd/crane/doc/crane_registry.md 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/doc/crane_registry.md 2023-11-29 22:32:21.000000000 +0100
@@ -20,5 +20,5 @@
### SEE ALSO
* [crane](crane.md) - Crane is a tool for managing container images
-* [crane registry serve](crane_registry_serve.md) - Serve an in-memory registry implementation
+* [crane registry serve](crane_registry_serve.md) - Serve a registry implementation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/doc/crane_registry_serve.md new/go-containerregistry-0.17.0/cmd/crane/doc/crane_registry_serve.md
--- old/go-containerregistry-0.16.1/cmd/crane/doc/crane_registry_serve.md 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/doc/crane_registry_serve.md 2023-11-29 22:32:21.000000000 +0100
@@ -1,14 +1,14 @@
## crane registry serve
-Serve an in-memory registry implementation
+Serve a registry implementation
### Synopsis
-This sub-command serves an in-memory registry implementation on an automatically chosen port (or $PORT)
+This sub-command serves a registry implementation on an automatically chosen port (:0), $PORT or --address
The command blocks while the server accepts pushes and pulls.
-Contents are only stored in memory, and when the process exits, pushed data is lost.
+Contents are can be stored in memory (when the process exits, pushed data is lost.), and disk (--disk).
```
crane registry serve [flags]
@@ -17,7 +17,9 @@
### Options
```
- -h, --help help for serve
+ --address string Address to listen on
+ --disk string Path to a directory where blobs will be stored
+ -h, --help help for serve
```
### Options inherited from parent commands
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/cmd/crane/doc/crane_tag.md new/go-containerregistry-0.17.0/cmd/crane/doc/crane_tag.md
--- old/go-containerregistry-0.16.1/cmd/crane/doc/crane_tag.md 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/cmd/crane/doc/crane_tag.md 2023-11-29 22:32:21.000000000 +0100
@@ -4,6 +4,8 @@
### Synopsis
+Tag remote image without downloading it.
+
This differs slightly from the "copy" command in a couple subtle ways:
1. You don't have to specify the entire repository for the tag you're adding. For example, these two commands are functionally equivalent:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/authn/keychain.go new/go-containerregistry-0.17.0/pkg/authn/keychain.go
--- old/go-containerregistry-0.16.1/pkg/authn/keychain.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/pkg/authn/keychain.go 2023-11-29 22:32:21.000000000 +0100
@@ -53,7 +53,7 @@
var (
// DefaultKeychain implements Keychain by interpreting the docker config file.
- DefaultKeychain = RefreshingKeychain(&defaultKeychain{}, 5*time.Minute)
+ DefaultKeychain = &defaultKeychain{}
)
const (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/registry/blobs_disk.go new/go-containerregistry-0.17.0/pkg/registry/blobs_disk.go
--- old/go-containerregistry-0.16.1/pkg/registry/blobs_disk.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/pkg/registry/blobs_disk.go 2023-11-29 22:32:21.000000000 +0100
@@ -30,8 +30,12 @@
func NewDiskBlobHandler(dir string) BlobHandler { return &diskHandler{dir: dir} }
+func (m *diskHandler) blobHashPath(h v1.Hash) string {
+ return filepath.Join(m.dir, h.Algorithm, h.Hex)
+}
+
func (m *diskHandler) Stat(_ context.Context, _ string, h v1.Hash) (int64, error) {
- fi, err := os.Stat(filepath.Join(m.dir, h.String()))
+ fi, err := os.Stat(m.blobHashPath(h))
if errors.Is(err, os.ErrNotExist) {
return 0, errNotFound
} else if err != nil {
@@ -40,7 +44,7 @@
return fi.Size(), nil
}
func (m *diskHandler) Get(_ context.Context, _ string, h v1.Hash) (io.ReadCloser, error) {
- return os.Open(filepath.Join(m.dir, h.String()))
+ return os.Open(m.blobHashPath(h))
}
func (m *diskHandler) Put(_ context.Context, _ string, h v1.Hash, rc io.ReadCloser) error {
// Put the temp file in the same directory to avoid cross-device problems
@@ -57,9 +61,11 @@
}(); err != nil {
return err
}
-
- return os.Rename(f.Name(), filepath.Join(m.dir, h.String()))
+ if err := os.MkdirAll(filepath.Join(m.dir, h.Algorithm), os.ModePerm); err != nil {
+ return err
+ }
+ return os.Rename(f.Name(), m.blobHashPath(h))
}
func (m *diskHandler) Delete(_ context.Context, _ string, h v1.Hash) error {
- return os.Remove(filepath.Join(m.dir, h.String()))
+ return os.Remove(m.blobHashPath(h))
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/registry/blobs_disk_test.go new/go-containerregistry-0.17.0/pkg/registry/blobs_disk_test.go
--- old/go-containerregistry-0.16.1/pkg/registry/blobs_disk_test.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/pkg/registry/blobs_disk_test.go 2023-11-29 22:32:21.000000000 +0100
@@ -15,6 +15,7 @@
package registry_test
import (
+ "fmt"
"net/http/httptest"
"os"
"path/filepath"
@@ -59,7 +60,7 @@
if h, err := img.ConfigName(); err != nil {
t.Fatal(err)
} else {
- want[h.String()] = true
+ want[fmt.Sprintf("%s/%s", h.Algorithm, h.Hex)] = true
}
ls, err := img.Layers()
if err != nil {
@@ -69,7 +70,7 @@
if h, err := l.Digest(); err != nil {
t.Fatal(err)
} else {
- want[h.String()] = true
+ want[fmt.Sprintf("%s/%s", h.Algorithm, h.Hex)] = true
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/gc.go new/go-containerregistry-0.17.0/pkg/v1/layout/gc.go
--- old/go-containerregistry-0.16.1/pkg/v1/layout/gc.go 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/gc.go 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,137 @@
+// Copyright 2018 Google LLC All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This is an EXPERIMENTAL package, and may change in arbitrary ways without notice.
+package layout
+
+import (
+ "fmt"
+ "io/fs"
+ "path/filepath"
+ "strings"
+
+ v1 "github.com/google/go-containerregistry/pkg/v1"
+)
+
+// GarbageCollect removes unreferenced blobs from the oci-layout
+//
+// This is an experimental api, and not subject to any stability guarantees
+// We may abandon it at any time, without prior notice.
+// Deprecated: Use it at your own risk!
+func (l Path) GarbageCollect() ([]v1.Hash, error) {
+ idx, err := l.ImageIndex()
+ if err != nil {
+ return nil, err
+ }
+ blobsToKeep := map[string]bool{}
+ if err := l.garbageCollectImageIndex(idx, blobsToKeep); err != nil {
+ return nil, err
+ }
+ blobsDir := l.path("blobs")
+ removedBlobs := []v1.Hash{}
+
+ err = filepath.WalkDir(blobsDir, func(path string, d fs.DirEntry, err error) error {
+ if err != nil {
+ return err
+ }
+
+ if d.IsDir() {
+ return nil
+ }
+
+ rel, err := filepath.Rel(blobsDir, path)
+ if err != nil {
+ return err
+ }
+ hashString := strings.Replace(rel, "/", ":", 1)
+ if present := blobsToKeep[hashString]; !present {
+ h, err := v1.NewHash(hashString)
+ if err != nil {
+ return err
+ }
+ removedBlobs = append(removedBlobs, h)
+ }
+ return nil
+ })
+
+ if err != nil {
+ return nil, err
+ }
+
+ return removedBlobs, nil
+}
+
+func (l Path) garbageCollectImageIndex(index v1.ImageIndex, blobsToKeep map[string]bool) error {
+ idxm, err := index.IndexManifest()
+ if err != nil {
+ return err
+ }
+
+ h, err := index.Digest()
+ if err != nil {
+ return err
+ }
+
+ blobsToKeep[h.String()] = true
+
+ for _, descriptor := range idxm.Manifests {
+ if descriptor.MediaType.IsImage() {
+ img, err := index.Image(descriptor.Digest)
+ if err != nil {
+ return err
+ }
+ if err := l.garbageCollectImage(img, blobsToKeep); err != nil {
+ return err
+ }
+ } else if descriptor.MediaType.IsIndex() {
+ idx, err := index.ImageIndex(descriptor.Digest)
+ if err != nil {
+ return err
+ }
+ if err := l.garbageCollectImageIndex(idx, blobsToKeep); err != nil {
+ return err
+ }
+ } else {
+ return fmt.Errorf("gc: unknown media type: %s", descriptor.MediaType)
+ }
+ }
+ return nil
+}
+
+func (l Path) garbageCollectImage(image v1.Image, blobsToKeep map[string]bool) error {
+ h, err := image.Digest()
+ if err != nil {
+ return err
+ }
+ blobsToKeep[h.String()] = true
+
+ h, err = image.ConfigName()
+ if err != nil {
+ return err
+ }
+ blobsToKeep[h.String()] = true
+
+ ls, err := image.Layers()
+ if err != nil {
+ return err
+ }
+ for _, l := range ls {
+ h, err := l.Digest()
+ if err != nil {
+ return err
+ }
+ blobsToKeep[h.String()] = true
+ }
+ return nil
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/gc_test.go new/go-containerregistry-0.17.0/pkg/v1/layout/gc_test.go
--- old/go-containerregistry-0.16.1/pkg/v1/layout/gc_test.go 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/gc_test.go 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,96 @@
+// Copyright 2018 Google LLC All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package layout
+
+import (
+ "path/filepath"
+ "testing"
+)
+
+var (
+ gcIndexPath = filepath.Join("testdata", "test_gc_index")
+ gcIndexBlobHash = "sha256:492b89b9dd3cda4596f94916d17f6901455fb8bd7f4c5a2a90df8d39c90f48a0"
+ gcUnknownMediaTypePath = filepath.Join("testdata", "test_gc_image_unknown_mediatype")
+ gcUnknownMediaTypeErr = "gc: unknown media type: application/vnd.oci.descriptor.v1+json"
+ gcTestOneImagePath = filepath.Join("testdata", "test_index_one_image")
+ gcTestIndexMediaTypePath = filepath.Join("testdata", "test_index_media_type")
+)
+
+func TestGcIndex(t *testing.T) {
+ lp, err := FromPath(gcIndexPath)
+ if err != nil {
+ t.Fatalf("FromPath() = %v", err)
+ }
+
+ removed, err := lp.GarbageCollect()
+ if err != nil {
+ t.Fatalf("GarbageCollect() = %v", err)
+ }
+
+ if len(removed) != 1 {
+ t.Fatalf("expected to have only one gc-able blob")
+ }
+ if removed[0].String() != gcIndexBlobHash {
+ t.Fatalf("wrong blob is gc-ed: expected '%s', got '%s'", gcIndexBlobHash, removed[0].String())
+ }
+}
+
+func TestGcOneImage(t *testing.T) {
+ lp, err := FromPath(gcTestOneImagePath)
+ if err != nil {
+ t.Fatalf("FromPath() = %v", err)
+ }
+
+ removed, err := lp.GarbageCollect()
+ if err != nil {
+ t.Fatalf("GarbageCollect() = %v", err)
+ }
+
+ if len(removed) != 0 {
+ t.Fatalf("expected to have to gc-able blobs")
+ }
+}
+
+func TestGcIndexMediaType(t *testing.T) {
+ lp, err := FromPath(gcTestIndexMediaTypePath)
+ if err != nil {
+ t.Fatalf("FromPath() = %v", err)
+ }
+
+ removed, err := lp.GarbageCollect()
+ if err != nil {
+ t.Fatalf("GarbageCollect() = %v", err)
+ }
+
+ if len(removed) != 0 {
+ t.Fatalf("expected to have to gc-able blobs")
+ }
+}
+
+func TestGcUnknownMediaType(t *testing.T) {
+ lp, err := FromPath(gcUnknownMediaTypePath)
+ if err != nil {
+ t.Fatalf("FromPath() = %v", err)
+ }
+
+ _, err = lp.GarbageCollect()
+ if err == nil {
+ t.Fatalf("expected GarbageCollect to return err but did not")
+ }
+
+ if err.Error() != gcUnknownMediaTypeErr {
+ t.Fatalf("expected error '%s', got '%s'", gcUnknownMediaTypeErr, err.Error())
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/index.json new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/index.json
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/index.json 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/index.json 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,10 @@
+{
+ "schemaVersion": 2,
+ "manifests": [
+ {
+ "mediaType": "application/vnd.oci.descriptor.v1+json",
+ "size": 423,
+ "digest": "sha256:32589985702551b6c56033bb3334432a0a513bf9d6aceda0f67c42b003850720"
+ }
+ ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/oci-layout new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/oci-layout
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/oci-layout 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_image_unknown_mediatype/oci-layout 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,3 @@
+{
+ "imageLayoutVersion": "1.0.0"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5 new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,13 @@
+{
+ "schemaVersion": 2,
+ "manifests": [
+ {
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
+ "size": 423,
+ "digest": "sha256:eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650",
+ "annotations": {
+ "org.opencontainers.image.ref.name": "1"
+ }
+ }
+ ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/2b29a2b8dea3af91ea7d0154be1da0c92d55ddd098540930fc8d3db7de377fdb new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/2b29a2b8dea3af91ea7d0154be1da0c92d55ddd098540930fc8d3db7de377fdb
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/2b29a2b8dea3af91ea7d0154be1da0c92d55ddd098540930fc8d3db7de377fdb 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/2b29a2b8dea3af91ea7d0154be1da0c92d55ddd098540930fc8d3db7de377fdb 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,13 @@
+{
+ "schemaVersion": 2,
+ "manifests": [
+ {
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
+ "size": 423,
+ "digest": "sha256:eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650",
+ "annotations": {
+ "org.opencontainers.image.ref.name": "4"
+ }
+ }
+ ]
+}
Binary files old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/492b89b9dd3cda4596f94916d17f6901455fb8bd7f4c5a2a90df8d39c90f48a0 and new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/492b89b9dd3cda4596f94916d17f6901455fb8bd7f4c5a2a90df8d39c90f48a0 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1 @@
+{"architecture": "amd64", "author": "Bazel", "config": {}, "created": "1970-01-01T00:00:00Z", "history": [{"author": "Bazel", "created": "1970-01-01T00:00:00Z", "created_by": "bazel build ..."}], "os": "linux", "rootfs": {"diff_ids": ["sha256:8897395fd26dc44ad0e2a834335b33198cb41ac4d98dfddf58eced3853fa7b17"], "type": "layers"}}
Binary files old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/dc52c6e48a1d51a96047b059f16889bc889c4b4c28f3b36b3f93187f62fc0b2b and new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/dc52c6e48a1d51a96047b059f16889bc889c4b4c28f3b36b3f93187f62fc0b2b differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650 new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/blobs/sha256/eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1 @@
+{"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"mediaType":"application/vnd.docker.container.image.v1+json","size":330,"digest":"sha256:6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e"},"layers":[{"mediaType":"application/vnd.docker.image.rootfs.diff.tar.gzip","size":167,"digest":"sha256:dc52c6e48a1d51a96047b059f16889bc889c4b4c28f3b36b3f93187f62fc0b2b"}]}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/index.json new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/index.json
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/index.json 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/index.json 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,29 @@
+{
+ "schemaVersion": 2,
+ "manifests": [
+ {
+ "mediaType": "application/vnd.oci.image.manifest.v1+json",
+ "size": 423,
+ "digest": "sha256:eebff607b1628d67459b0596643fc07de70d702eccf030f0bc7bb6fc2b278650",
+ "annotations": {
+ "org.opencontainers.image.ref.name": "1"
+ }
+ },
+ {
+ "mediaType": "application/vnd.oci.image.index.v1+json",
+ "size": 314,
+ "digest": "sha256:05f95b26ed10668b7183c1e2da98610e91372fa9f510046d4ce5812addad86b5",
+ "annotations": {
+ "org.opencontainers.image.ref.name": "3"
+ }
+ },
+ {
+ "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
+ "size": 314,
+ "digest": "sha256:2b29a2b8dea3af91ea7d0154be1da0c92d55ddd098540930fc8d3db7de377fdb",
+ "annotations": {
+ "org.opencontainers.image.ref.name": "4"
+ }
+ }
+ ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/oci-layout new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/oci-layout
--- old/go-containerregistry-0.16.1/pkg/v1/layout/testdata/test_gc_index/oci-layout 1970-01-01 01:00:00.000000000 +0100
+++ new/go-containerregistry-0.17.0/pkg/v1/layout/testdata/test_gc_index/oci-layout 2023-11-29 22:32:21.000000000 +0100
@@ -0,0 +1,3 @@
+{
+ "imageLayoutVersion": "1.0.0"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/remote/write.go new/go-containerregistry-0.17.0/pkg/v1/remote/write.go
--- old/go-containerregistry-0.16.1/pkg/v1/remote/write.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/pkg/v1/remote/write.go 2023-11-29 22:32:21.000000000 +0100
@@ -280,6 +280,11 @@
if _, ok := layer.(*stream.Layer); !ok {
// We can't retry streaming layers.
req.GetBody = getBody
+
+ // If we know the size, set it.
+ if size, err := layer.Size(); err == nil {
+ req.ContentLength = size
+ }
}
req.Header.Set("Content-Type", "application/octet-stream")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/go-containerregistry-0.16.1/pkg/v1/validate/index.go new/go-containerregistry-0.17.0/pkg/v1/validate/index.go
--- old/go-containerregistry-0.16.1/pkg/v1/validate/index.go 2023-08-02 22:59:06.000000000 +0200
+++ new/go-containerregistry-0.17.0/pkg/v1/validate/index.go 2023-11-29 22:32:21.000000000 +0100
@@ -79,6 +79,9 @@
if err := validateMediaType(img, desc.MediaType); err != nil {
errs = append(errs, fmt.Sprintf("failed to validate image MediaType[%d](%s): %v", i, desc.Digest, err))
}
+ if err := validatePlatform(img, desc.Platform); err != nil {
+ errs = append(errs, fmt.Sprintf("failed to validate image platform[%d](%s): %v", i, desc.Digest, err))
+ }
default:
// Workaround for #819.
if wl, ok := idx.(withLayer); ok {
@@ -173,3 +176,54 @@
return nil
}
+
+func validatePlatform(img v1.Image, want *v1.Platform) error {
+ if want == nil {
+ return nil
+ }
+
+ cf, err := img.ConfigFile()
+ if err != nil {
+ return err
+ }
+
+ got := cf.Platform()
+
+ if got == nil {
+ return fmt.Errorf("config file missing platform fields")
+ }
+
+ if got.Equals(*want) {
+ return nil
+ }
+
+ errs := []string{}
+
+ if got.OS != want.OS {
+ errs = append(errs, fmt.Sprintf("mismatched OS: %s != %s", got.OS, want.OS))
+ }
+
+ if got.Architecture != want.Architecture {
+ errs = append(errs, fmt.Sprintf("mismatched Architecture: %s != %s", got.Architecture, want.Architecture))
+ }
+
+ if got.OSVersion != want.OSVersion {
+ errs = append(errs, fmt.Sprintf("mismatched OSVersion: %s != %s", got.OSVersion, want.OSVersion))
+ }
+
+ if got.OSVersion != want.OSVersion {
+ errs = append(errs, fmt.Sprintf("mismatched OSVersion: %s != %s", got.OSVersion, want.OSVersion))
+ }
+
+ if len(errs) == 0 {
+ // If we got here, some features might be mismatched. Just add those...
+ if len(got.Features) != 0 || len(want.Features) != 0 {
+ errs = append(errs, fmt.Sprintf("mismatched Features: %v, %v", got.Features, want.Features))
+ }
+ if len(got.OSFeatures) != 0 || len(want.OSFeatures) != 0 {
+ errs = append(errs, fmt.Sprintf("mismatched OSFeatures: %v, %v", got.OSFeatures, want.OSFeatures))
+ }
+ }
+
+ return errors.New(strings.Join(errs, "\n"))
+}
++++++ vendor.tar.gz ++++++
1
0