openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- 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
January 2025
- 1 participants
- 414 discussions
09 Jan '25
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-azure-appconfiguration-provider for openSUSE:Factory checked in at 2025-01-09 15:10:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-appconfiguration-provider (Old)
and /work/SRC/openSUSE:Factory/.python-azure-appconfiguration-provider.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-azure-appconfiguration-provider"
Thu Jan 9 15:10:52 2025 rev:5 rq:1235928 version:2.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-azure-appconfiguration-provider/python-azure-appconfiguration-provider.changes 2024-09-10 21:15:57.396844941 +0200
+++ /work/SRC/openSUSE:Factory/.python-azure-appconfiguration-provider.new.1881/python-azure-appconfiguration-provider.changes 2025-01-09 15:11:39.818818891 +0100
@@ -1,0 +2,8 @@
+Wed Jan 8 08:34:36 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- New upstream release
+ + Version 2.0.0
+ + For detailed information about changes see the
+ CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------
Old:
----
azure_appconfiguration_provider-1.3.0.tar.gz
New:
----
azure_appconfiguration_provider-2.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-azure-appconfiguration-provider.spec ++++++
--- /var/tmp/diff_new_pack.BlPwUr/_old 2025-01-09 15:11:40.358841261 +0100
+++ /var/tmp/diff_new_pack.BlPwUr/_new 2025-01-09 15:11:40.362841426 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-azure-appconfiguration-provider
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-azure-appconfiguration-provider
-Version: 1.3.0
+Version: 2.0.0
Release: 0
Summary: Microsoft App Configuration Provider Library for Python
License: MIT
++++++ azure_appconfiguration_provider-1.3.0.tar.gz -> azure_appconfiguration_provider-2.0.0.tar.gz ++++++
++++ 3477 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-Kivy for openSUSE:Factory checked in at 2025-01-09 15:10:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Kivy (Old)
and /work/SRC/openSUSE:Factory/.python-Kivy.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Kivy"
Thu Jan 9 15:10:46 2025 rev:15 rq:1235933 version:2.3.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Kivy/python-Kivy.changes 2024-01-15 22:17:04.846114873 +0100
+++ /work/SRC/openSUSE:Factory/.python-Kivy.new.1881/python-Kivy.changes 2025-01-09 15:11:38.954783100 +0100
@@ -1,0 +2,23 @@
+Wed Jan 8 11:11:39 UTC 2025 - Nico Krapp <nico.krapp(a)suse.com>
+
+- Update to 2.3.1:
+ * Fix `ConfigParser.write` error with when `--save` is supplied
+ as an argument
+ * Fix dropped motion events in mtdev provider.Update `monitor`
+ module to use `dp`
+ * Rename `CaptureDelegate` to `KivyCaptureDelegate` in
+ `AVFoundationCamera` to avoid duplicated symbols
+ * `avplayer` audio provider: Fixes `seek` and `state` on iOS and macOS
+ * Fix numpy float/int error when using `CameraAndroid.decode_frame`
+ * Use `filetype` as `imghdr` built-in module is deprecated and slated
+ for removal in Python 3.13
+ * Updated ES vkeyboard layout to resemble a real ES keyboard layout
+ * Fix `xsel` import when clipboard is empty, and add timeout failsafe
+ * Fix `SDL_EventFilter` definitions to match SDL definitions
+ (fixes build on GCC 14)
+ * Revert #8415 and align `glShaderSource` `typedef` in `common_subset.h`
+ with Khronos Headers
+ * Fix dropped motion events in mtdev provider.
+ Full changelog: https://github.com/kivy/kivy/releases/tag/2.3.1
+
+-------------------------------------------------------------------
Old:
----
kivy-2.3.0.tar.gz
New:
----
kivy-2.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Kivy.spec ++++++
--- /var/tmp/diff_new_pack.EJbflJ/_old 2025-01-09 15:11:39.638811435 +0100
+++ /var/tmp/diff_new_pack.EJbflJ/_new 2025-01-09 15:11:39.638811435 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-Kivy
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
%endif
%define plainpython python
Name: python-Kivy
-Version: 2.3.0
+Version: 2.3.1
Release: 0
Summary: Hardware-accelerated multitouch application library
License: Apache-2.0 AND MIT AND LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-3.0-only AND BSD-3-Clause
@@ -64,6 +64,7 @@
Requires: mtdev
Requires: python-Pygments
Requires: python-docutils
+Requires: python-filetype
Requires: xclip
# Not listed in setup.cfg but imported in core/spelling/spelling_enchant.py
Requires: python-pyenchant
@@ -73,6 +74,7 @@
# /SECTION
# SECTION test
BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module filetype}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xvfb}
++++++ kivy-2.3.0.tar.gz -> kivy-2.3.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-Kivy/kivy-2.3.0.tar.gz /work/SRC/openSUSE:Factory/.python-Kivy.new.1881/kivy-2.3.1.tar.gz differ: char 12, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-util-http for openSUSE:Factory checked in at 2025-01-09 15:10:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-util-http (Old)
and /work/SRC/openSUSE:Factory/.python-opentelemetry-util-http.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-util-http"
Thu Jan 9 15:10:25 2025 rev:2 rq:1235925 version:0.50b0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-opentelemetry-util-http/python-opentelemetry-util-http.changes 2024-09-23 15:21:03.798558803 +0200
+++ /work/SRC/openSUSE:Factory/.python-opentelemetry-util-http.new.1881/python-opentelemetry-util-http.changes 2025-01-09 15:11:35.078622540 +0100
@@ -1,0 +2,50 @@
+Wed Jan 8 11:50:54 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to version 0.50b0
+ * `opentelemetry-instrumentation-starlette` Add type hints to the instrumentation
+ * `opentelemetry-distro` default to OTLP log exporter.
+ * `opentelemetry-instrumentation-sqlalchemy` Update unit tests to run with SQLALchemy 2
+ * Add `opentelemetry-instrumentation-openai-v2` to `opentelemetry-bootstrap`
+ * `opentelemetry-instrumentation-sqlalchemy` Add sqlcomment to `db.statement` attribute
+ * `opentelemetry-instrumentation-dbapi` Add sqlcomment to `db.statement` attribute
+ * `opentelemetry-instrumentation-dbapi` instrument_connection accepts optional connect_module
+ * `opentelemetry-instrumentation-mysqlclient` Add sqlcommenter support
+ * `opentelemetry-instrumentation-pymysql` Add sqlcommenter support
+ * `opentelemetry-instrumentation-click`: new instrumentation to trace click commands
+ * `opentelemetry-instrumentation-starlette`: Retrieve `meter_provider` key instead of
+ `_meter_provider` on `_instrument`
+ * `opentelemetry-instrumentation-httpx`: instrument_client is a static method again
+ * `opentelemetry-instrumentation-system_metrics`: fix callbacks reading wrong config
+ * `opentelemetry-instrumentation-httpx`: Check if mount transport is none before wrap it
+ * Replace all instrumentor unit test `assertEqualSpanInstrumentationInfo` calls with
+ `assertEqualSpanInstrumentationScope` calls
+ * `opentelemetry-instrumentation-sqlalchemy` Fixes engines from `sqlalchemy.engine_from_config`
+ not being fully instrumented
+ * `opentelemetry-instrumentation-sqlalchemy`: Fix a remaining memory leak in EngineTracer
+ * `opentelemetry-instrumentation-sqlite3`: Update documentation on explicit cursor support of tracing
+ * `opentelemetry-instrumentation-sqlalchemy` teach instruments version
+ * Drop `opentelemetry-instrumentation-test` package from default instrumentation list
+ * `opentelemetry-instrumentation-httpx`: remove private unused `_InstrumentedClient`
+ and `_InstrumentedAsyncClient` classes
+- from version 0.49b0
+ * `opentelemetry-instrumentation-openai-v2` Instrumentation for OpenAI >= 0.27.0
+ * `opentelemetry-instrumentation-fastapi` Add autoinstrumentation mechanism tests.
+ * `opentelemetry-instrumentation-aiokafka` Add instrumentor and auto instrumentation
+ support for aiokafka
+ * `opentelemetry-instrumentation-redis` Add additional attributes for methods create_index
+ and search, rename those spans
+ * `opentelemetry-instrumentation` Add support for string based dotted module paths in unwrap
+ * `opentelemetry-instrumentation-aiokafka` Wrap `AIOKafkaConsumer.getone()` instead of `AIOKafkaConsumer.__anext__`
+ * `opentelemetry-instrumentation-confluent-kafka` Fix to allow `topic` to be extracted from `kwargs` in `produce()`
+ * `opentelemetry-instrumentation-system-metrics` Update metric units to conform to UCUM conventions.
+ * `opentelemetry-instrumentation-celery` Don't detach context without a None token
+ * `opentelemetry-exporter-prometheus-remote-write`: sort labels before exporting
+ * `opentelemetry-instrumentation-dbapi` sqlcommenter key values created from PostgreSQL, MySQL systems
+ * `opentelemetry-instrumentation-system-metrics`: don't report open file descriptors on Windows
+ * Deprecation of pkg_resource in favor of importlib.metadata
+ * `opentelemetry-instrumentation` Don't fail distro loading if instrumentor raises ImportError, instead skip them
+ * `opentelemetry-instrumentation-httpx` Rewrote instrumentation to use wrapt instead of subclassing
+- Update BuildRequires and Requires from pyproject.toml
+- Use %{version} in BuildRequires and Requires for dependencies
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_util_http-0.48b0.tar.gz
New:
----
opentelemetry_util_http-0.50b0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-util-http.spec ++++++
--- /var/tmp/diff_new_pack.HoRXtY/_old 2025-01-09 15:11:36.682688985 +0100
+++ /var/tmp/diff_new_pack.HoRXtY/_new 2025-01-09 15:11:36.682688985 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-opentelemetry-util-http
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-util-http
-Version: 0.48b0
+Version: 0.50b0
Release: 0
Summary: Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python
License: Apache-2.0
@@ -30,19 +30,19 @@
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-opentelemetry-api = 1.27.0
-Requires: python-opentelemetry-instrumentation = 0.48b0
-Requires: python-opentelemetry-sdk = 1.27.0
-Requires: python-opentelemetry-semantic-conventions = 0.48b0
+Requires: python-opentelemetry-api = 1.29.0
+Requires: python-opentelemetry-instrumentation == %{version}
+Requires: python-opentelemetry-sdk = 1.29.0
+Requires: python-opentelemetry-semantic-conventions == %{version}
Requires: python-wrapt >= 1.0.0
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module hatchling}
-BuildRequires: %{python_module opentelemetry-api = 1.27.0}
-BuildRequires: %{python_module opentelemetry-instrumentation = 0.48b0}
-BuildRequires: %{python_module opentelemetry-sdk = 1.27.0}
-BuildRequires: %{python_module opentelemetry-semantic-conventions = 0.48b0}
-BuildRequires: %{python_module opentelemetry-test-utils = 0.48b0}
+BuildRequires: %{python_module opentelemetry-api = 1.29.0}
+BuildRequires: %{python_module opentelemetry-instrumentation == %{version}}
+BuildRequires: %{python_module opentelemetry-sdk = 1.29.0}
+BuildRequires: %{python_module opentelemetry-semantic-conventions == %{version}}
+BuildRequires: %{python_module opentelemetry-test-utils == %{version}}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wrapt >= 1.0.0}
# /SECTION
++++++ opentelemetry_util_http-0.48b0.tar.gz -> opentelemetry_util_http-0.50b0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_util_http-0.48b0/PKG-INFO new/opentelemetry_util_http-0.50b0/PKG-INFO
--- old/opentelemetry_util_http-0.48b0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_util_http-0.50b0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,10 +1,10 @@
Metadata-Version: 2.3
Name: opentelemetry-util-http
-Version: 0.48b0
+Version: 0.50b0
Summary: Web util for OpenTelemetry
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/ut…
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors(a)lists.cncf.io>
-License-Expression: Apache-2.0
+License: Apache-2.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_util_http-0.48b0/src/opentelemetry/util/http/version.py new/opentelemetry_util_http-0.50b0/src/opentelemetry/util/http/version.py
--- old/opentelemetry_util_http-0.48b0/src/opentelemetry/util/http/version.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_util_http-0.50b0/src/opentelemetry/util/http/version.py 2020-02-02 01:00:00.000000000 +0100
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0"
+__version__ = "0.50b0"
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-proto for openSUSE:Factory checked in at 2025-01-09 15:10:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-proto (Old)
and /work/SRC/openSUSE:Factory/.python-opentelemetry-proto.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-proto"
Thu Jan 9 15:10:15 2025 rev:6 rq:1235922 version:1.29.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-opentelemetry-proto/python-opentelemetry-proto.changes 2024-09-05 15:48:17.658828504 +0200
+++ /work/SRC/openSUSE:Factory/.python-opentelemetry-proto.new.1881/python-opentelemetry-proto.changes 2025-01-09 15:11:33.806569848 +0100
@@ -1,0 +2,32 @@
+Wed Jan 8 10:49:59 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 1.29.0
+ * Fix crash exporting a log record with None body
+ * Fix metrics export with exemplar and no context and filtering observable instruments
+ * Fix recursion error with sdk disabled and handler added to root logger
+ * sdk: setup EventLogger when OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set
+ * api: fix logging of duplicate EventLogger setup warning
+ * sdk: fix setting of process owner in ProcessResourceDetector
+ * sdk: fix serialization of logs severity_number field to int
+ * Remove `TestBase.assertEqualSpanInstrumentationInfo` method,
+ use `assertEqualSpanInstrumentationScope` instead
+ * sdk: instantiate lazily `ExemplarBucket`s in `ExemplarReservoir`s
+ * semantic-conventions: Bump to 1.29.0
+- from version 1.28.0
+ * Removed superfluous py.typed markers and added them where they were missing
+ * Include metric info in encoding exceptions
+ * sdk: Add support for log formatting
+ * sdk: Add Host resource detector
+ * sdk: Implementation of exemplars
+ * Implement events sdk
+ * Update semantic conventions to version 1.28.0
+ * Add support to protobuf 5+ and drop support to protobuf 3 and 4
+ * Update environment variable descriptions to match signal
+ * Record logger name as the instrumentation scope name
+ * Fix memory leak in exporter and reader
+ * Drop `OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION` environment variable
+ * Improve compatibility with other logging libraries that override
+ `LogRecord.getMessage()` in order to customize message formatting
+- Update BuildRequires and Requires from pyproject.toml
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_proto-1.27.0.tar.gz
New:
----
opentelemetry_proto-1.29.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-proto.spec ++++++
--- /var/tmp/diff_new_pack.Hwavwb/_old 2025-01-09 15:11:34.906615414 +0100
+++ /var/tmp/diff_new_pack.Hwavwb/_new 2025-01-09 15:11:34.906615414 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-opentelemetry-proto
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-proto
-Version: 1.27.0
+Version: 1.29.0
Release: 0
Summary: OpenTelemetry Python Proto
License: Apache-2.0
@@ -29,11 +29,11 @@
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
# SECTION test requirements
-BuildRequires: %{python_module protobuf >= 3.19}
+BuildRequires: %{python_module protobuf >= 5.0}
BuildRequires: %{python_module pytest}
# /SECTION
BuildRequires: fdupes
-Requires: python-protobuf >= 3.19
+Requires: python-protobuf >= 5.0
BuildArch: noarch
%python_subpackages
++++++ opentelemetry_proto-1.27.0.tar.gz -> opentelemetry_proto-1.29.0.tar.gz ++++++
++++ 5610 lines of diff (skipped)
1
0
09 Jan '25
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-exporter-otlp-proto-http for openSUSE:Factory checked in at 2025-01-09 15:10:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-http (Old)
and /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-http.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-exporter-otlp-proto-http"
Thu Jan 9 15:10:01 2025 rev:6 rq:1235919 version:1.29.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-http/python-opentelemetry-exporter-otlp-proto-http.changes 2024-09-11 16:56:27.396697506 +0200
+++ /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-http.new.1881/python-opentelemetry-exporter-otlp-proto-http.changes 2025-01-09 15:11:31.458472583 +0100
@@ -1,0 +2,31 @@
+Wed Jan 8 10:44:43 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 1.29.0
+ * Fix crash exporting a log record with None body
+ * Fix metrics export with exemplar and no context and filtering observable instruments
+ * Fix recursion error with sdk disabled and handler added to root logger
+ * sdk: setup EventLogger when OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set
+ * api: fix logging of duplicate EventLogger setup warning
+ * sdk: fix setting of process owner in ProcessResourceDetector
+ * sdk: fix serialization of logs severity_number field to int
+ * Remove `TestBase.assertEqualSpanInstrumentationInfo` method,
+ use `assertEqualSpanInstrumentationScope` instead
+ * sdk: instantiate lazily `ExemplarBucket`s in `ExemplarReservoir`s
+ * semantic-conventions: Bump to 1.29.0
+- from version 1.28.0
+ * Removed superfluous py.typed markers and added them where they were missing
+ * Include metric info in encoding exceptions
+ * sdk: Add support for log formatting
+ * sdk: Add Host resource detector
+ * sdk: Implementation of exemplars
+ * Implement events sdk
+ * Update semantic conventions to version 1.28.0
+ * Add support to protobuf 5+ and drop support to protobuf 3 and 4
+ * Update environment variable descriptions to match signal
+ * Record logger name as the instrumentation scope name
+ * Fix memory leak in exporter and reader
+ * Drop `OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION` environment variable
+ * Improve compatibility with other logging libraries that override
+ `LogRecord.getMessage()` in order to customize message formatting
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_exporter_otlp_proto_http-1.27.0.tar.gz
New:
----
opentelemetry_exporter_otlp_proto_http-1.29.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-exporter-otlp-proto-http.spec ++++++
--- /var/tmp/diff_new_pack.Ph3Ugf/_old 2025-01-09 15:11:31.878489980 +0100
+++ /var/tmp/diff_new_pack.Ph3Ugf/_new 2025-01-09 15:11:31.878489980 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-opentelemetry-exporter-otlp-proto-http
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-opentelemetry-exporter-otlp-proto-http
-Version: 1.27.0
+Version: 1.29.0
Release: 0
Summary: OpenTelemetry Collector Protobuf over HTTP Exporter
License: Apache-2.0
++++++ opentelemetry_exporter_otlp_proto_http-1.27.0.tar.gz -> opentelemetry_exporter_otlp_proto_http-1.29.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/PKG-INFO new/opentelemetry_exporter_otlp_proto_http-1.29.0/PKG-INFO
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,11 +1,10 @@
Metadata-Version: 2.3
Name: opentelemetry-exporter-otlp-proto-http
-Version: 1.27.0
+Version: 1.29.0
Summary: OpenTelemetry Collector Protobuf over HTTP Exporter
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors(a)lists.cncf.io>
License: Apache-2.0
-License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: OpenTelemetry
Classifier: Framework :: OpenTelemetry :: Exporters
@@ -22,9 +21,9 @@
Requires-Dist: deprecated>=1.2.6
Requires-Dist: googleapis-common-protos~=1.52
Requires-Dist: opentelemetry-api~=1.15
-Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.27.0
-Requires-Dist: opentelemetry-proto==1.27.0
-Requires-Dist: opentelemetry-sdk~=1.27.0
+Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.29.0
+Requires-Dist: opentelemetry-proto==1.29.0
+Requires-Dist: opentelemetry-sdk~=1.29.0
Requires-Dist: requests~=2.7
Description-Content-Type: text/x-rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/pyproject.toml new/opentelemetry_exporter_otlp_proto_http-1.29.0/pyproject.toml
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
@@ -30,9 +30,9 @@
"Deprecated >= 1.2.6",
"googleapis-common-protos ~= 1.52",
"opentelemetry-api ~= 1.15",
- "opentelemetry-proto == 1.27.0",
- "opentelemetry-sdk ~= 1.27.0",
- "opentelemetry-exporter-otlp-proto-common == 1.27.0",
+ "opentelemetry-proto == 1.29.0",
+ "opentelemetry-sdk ~= 1.29.0",
+ "opentelemetry-exporter-otlp-proto-common == 1.29.0",
"requests ~= 2.7",
]
@@ -49,7 +49,7 @@
Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…"
[tool.hatch.version]
-path = "src/opentelemetry/exporter/otlp/proto/http/version.py"
+path = "src/opentelemetry/exporter/otlp/proto/http/version/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -69,11 +69,11 @@
API
---
"""
+
import enum
from .version import __version__
-
_OTLP_HTTP_HEADERS = {
"Content-Type": "application/x-protobuf",
"User-Agent": "OTel-OTLP-Exporter-Python/" + __version__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -17,8 +17,8 @@
import zlib
from io import BytesIO
from os import environ
-from typing import Dict, Optional, Sequence
from time import sleep
+from typing import Dict, Optional, Sequence
import requests
@@ -26,6 +26,15 @@
_create_exp_backoff_generator,
)
from opentelemetry.exporter.otlp.proto.common._log_encoder import encode_logs
+from opentelemetry.exporter.otlp.proto.http import (
+ _OTLP_HTTP_HEADERS,
+ Compression,
+)
+from opentelemetry.sdk._logs import LogData
+from opentelemetry.sdk._logs.export import (
+ LogExporter,
+ LogExportResult,
+)
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE,
@@ -33,27 +42,17 @@
OTEL_EXPORTER_OTLP_COMPRESSION,
OTEL_EXPORTER_OTLP_ENDPOINT,
OTEL_EXPORTER_OTLP_HEADERS,
- OTEL_EXPORTER_OTLP_TIMEOUT,
- OTEL_EXPORTER_OTLP_LOGS_ENDPOINT,
OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE,
OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY,
+ OTEL_EXPORTER_OTLP_LOGS_COMPRESSION,
+ OTEL_EXPORTER_OTLP_LOGS_ENDPOINT,
OTEL_EXPORTER_OTLP_LOGS_HEADERS,
OTEL_EXPORTER_OTLP_LOGS_TIMEOUT,
- OTEL_EXPORTER_OTLP_LOGS_COMPRESSION,
-)
-from opentelemetry.sdk._logs import LogData
-from opentelemetry.sdk._logs.export import (
- LogExporter,
- LogExportResult,
-)
-from opentelemetry.exporter.otlp.proto.http import (
- _OTLP_HTTP_HEADERS,
- Compression,
+ OTEL_EXPORTER_OTLP_TIMEOUT,
)
from opentelemetry.util.re import parse_env_headers
-
_logger = logging.getLogger(__name__)
@@ -64,7 +63,6 @@
class OTLPLogExporter(LogExporter):
-
_MAX_RETRY_TIMEOUT = 64
def __init__(
@@ -163,7 +161,6 @@
for delay in _create_exp_backoff_generator(
max_value=self._MAX_RETRY_TIMEOUT
):
-
if delay == self._MAX_RETRY_TIMEOUT:
return LogExportResult.FAILURE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -14,17 +14,25 @@
import gzip
import logging
import zlib
-from os import environ
-from typing import Dict, Optional, Any, Callable, List
-from typing import Sequence, Mapping # noqa: F401
-
from io import BytesIO
+from os import environ
from time import sleep
+from typing import ( # noqa: F401
+ Any,
+ Callable,
+ Dict,
+ List,
+ Mapping,
+ Optional,
+ Sequence,
+)
+
+import requests
from deprecated import deprecated
from opentelemetry.exporter.otlp.proto.common._internal import (
- _get_resource_data,
_create_exp_backoff_generator,
+ _get_resource_data,
)
from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
OTLPMetricExporterMixin,
@@ -33,56 +41,52 @@
encode_metrics,
)
from opentelemetry.exporter.otlp.proto.http import Compression
-from opentelemetry.sdk.metrics._internal.aggregation import Aggregation
from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( # noqa: F401
ExportMetricsServiceRequest,
)
-from opentelemetry.proto.common.v1.common_pb2 import ( # noqa: F401
+from opentelemetry.proto.common.v1.common_pb2 import ( # noqa: F401 # noqa: F401
AnyValue,
ArrayValue,
+ InstrumentationScope,
KeyValue,
KeyValueList,
)
-from opentelemetry.proto.common.v1.common_pb2 import ( # noqa: F401
- InstrumentationScope,
-)
-from opentelemetry.proto.resource.v1.resource_pb2 import Resource # noqa: F401
from opentelemetry.proto.metrics.v1 import metrics_pb2 as pb2 # noqa: F401
+from opentelemetry.proto.resource.v1.resource_pb2 import Resource # noqa: F401
+from opentelemetry.proto.resource.v1.resource_pb2 import (
+ Resource as PB2Resource,
+)
from opentelemetry.sdk.environment_variables import (
- OTEL_EXPORTER_OTLP_ENDPOINT,
OTEL_EXPORTER_OTLP_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_KEY,
- OTEL_EXPORTER_OTLP_HEADERS,
- OTEL_EXPORTER_OTLP_TIMEOUT,
OTEL_EXPORTER_OTLP_COMPRESSION,
- OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,
+ OTEL_EXPORTER_OTLP_ENDPOINT,
+ OTEL_EXPORTER_OTLP_HEADERS,
OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE,
OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY,
+ OTEL_EXPORTER_OTLP_METRICS_COMPRESSION,
+ OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,
OTEL_EXPORTER_OTLP_METRICS_HEADERS,
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT,
- OTEL_EXPORTER_OTLP_METRICS_COMPRESSION,
+ OTEL_EXPORTER_OTLP_TIMEOUT,
)
-from opentelemetry.sdk.metrics.export import (
+from opentelemetry.sdk.metrics._internal.aggregation import Aggregation
+from opentelemetry.sdk.metrics.export import ( # noqa: F401
AggregationTemporality,
+ Gauge,
MetricExporter,
MetricExportResult,
MetricsData,
+ Sum,
)
from opentelemetry.sdk.metrics.export import ( # noqa: F401
- Gauge,
Histogram as HistogramType,
- Sum,
)
from opentelemetry.sdk.resources import Resource as SDKResource
from opentelemetry.util.re import parse_env_headers
-import requests
-from opentelemetry.proto.resource.v1.resource_pb2 import (
- Resource as PB2Resource,
-)
-
_logger = logging.getLogger(__name__)
@@ -93,7 +97,6 @@
class OTLPMetricExporter(MetricExporter, OTLPMetricExporterMixin):
-
_MAX_RETRY_TIMEOUT = 64
def __init__(
@@ -196,7 +199,6 @@
for delay in _create_exp_backoff_generator(
max_value=self._MAX_RETRY_TIMEOUT
):
-
if delay == self._MAX_RETRY_TIMEOUT:
return MetricExportResult.FAILURE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -17,8 +17,8 @@
import zlib
from io import BytesIO
from os import environ
-from typing import Dict, Optional
from time import sleep
+from typing import Dict, Optional
import requests
@@ -28,30 +28,29 @@
from opentelemetry.exporter.otlp.proto.common.trace_encoder import (
encode_spans,
)
+from opentelemetry.exporter.otlp.proto.http import (
+ _OTLP_HTTP_HEADERS,
+ Compression,
+)
from opentelemetry.sdk.environment_variables import (
- OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE,
- OTEL_EXPORTER_OTLP_TRACES_COMPRESSION,
- OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE,
- OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY,
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
- OTEL_EXPORTER_OTLP_TRACES_HEADERS,
- OTEL_EXPORTER_OTLP_TRACES_TIMEOUT,
OTEL_EXPORTER_OTLP_CERTIFICATE,
- OTEL_EXPORTER_OTLP_COMPRESSION,
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_KEY,
+ OTEL_EXPORTER_OTLP_COMPRESSION,
OTEL_EXPORTER_OTLP_ENDPOINT,
OTEL_EXPORTER_OTLP_HEADERS,
OTEL_EXPORTER_OTLP_TIMEOUT,
+ OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE,
+ OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE,
+ OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY,
+ OTEL_EXPORTER_OTLP_TRACES_COMPRESSION,
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS,
+ OTEL_EXPORTER_OTLP_TRACES_TIMEOUT,
)
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
-from opentelemetry.exporter.otlp.proto.http import (
- _OTLP_HTTP_HEADERS,
- Compression,
-)
from opentelemetry.util.re import parse_env_headers
-
_logger = logging.getLogger(__name__)
@@ -62,7 +61,6 @@
class OTLPSpanExporter(SpanExporter):
-
_MAX_RETRY_TIMEOUT = 64
def __init__(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/encoder/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/encoder/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -35,10 +35,10 @@
Resource as PB2Resource,
)
from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
- ScopeSpans as PB2ScopeSpans,
+ ResourceSpans as PB2ResourceSpans,
)
from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
- ResourceSpans as PB2ResourceSpans,
+ ScopeSpans as PB2ScopeSpans,
)
from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
Span as PB2SPan,
@@ -46,17 +46,21 @@
from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
Status as PB2Status,
)
-from opentelemetry.sdk.trace import Event # noqa: F401
+from opentelemetry.sdk.trace import (
+ Event, # noqa: F401
+ Resource, # noqa: F401
+)
+from opentelemetry.sdk.trace import Span as SDKSpan # noqa: F401
from opentelemetry.sdk.util.instrumentation import ( # noqa: F401
InstrumentationScope,
)
-from opentelemetry.sdk.trace import Resource # noqa: F401
-from opentelemetry.sdk.trace import Span as SDKSpan # noqa: F401
-from opentelemetry.trace import Link # noqa: F401
-from opentelemetry.trace import SpanKind # noqa: F401
+from opentelemetry.trace import (
+ Link, # noqa: F401
+ SpanKind, # noqa: F401
+)
from opentelemetry.trace.span import ( # noqa: F401
SpanContext,
- TraceState,
Status,
+ TraceState,
)
from opentelemetry.util.types import Attributes # noqa: F401
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/version/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,15 @@
+# Copyright The OpenTelemetry Authors
+#
+# 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.
+
+__version__ = "1.29.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/version.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/version.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/src/opentelemetry/exporter/otlp/proto/http/version.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/src/opentelemetry/exporter/otlp/proto/http/version.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-# Copyright The OpenTelemetry Authors
-#
-# 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.
-
-__version__ = "1.27.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/metrics/test_otlp_metrics_exporter.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/metrics/test_otlp_metrics_exporter.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/metrics/test_otlp_metrics_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/metrics/test_otlp_metrics_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -86,7 +86,6 @@
# pylint: disable=protected-access
class TestOTLPMetricExporter(TestCase):
def setUp(self):
-
self.metrics = {
"sum_int": MetricsData(
resource_metrics=[
@@ -113,7 +112,6 @@
}
def test_constructor_default(self):
-
exporter = OTLPMetricExporter()
self.assertEqual(
@@ -218,7 +216,6 @@
},
)
def test_exporter_env(self):
-
exporter = OTLPMetricExporter()
self.assertEqual(exporter._certificate_file, OS_ENV_CERTIFICATE)
@@ -237,7 +234,6 @@
{OTEL_EXPORTER_OTLP_ENDPOINT: OS_ENV_ENDPOINT},
)
def test_exporter_env_endpoint_without_slash(self):
-
exporter = OTLPMetricExporter()
self.assertEqual(
@@ -250,7 +246,6 @@
{OTEL_EXPORTER_OTLP_ENDPOINT: OS_ENV_ENDPOINT + "/"},
)
def test_exporter_env_endpoint_with_slash(self):
-
exporter = OTLPMetricExporter()
self.assertEqual(
@@ -265,7 +260,6 @@
},
)
def test_headers_parse_from_env(self):
-
with self.assertLogs(level="WARNING") as cm:
_ = OTLPMetricExporter()
@@ -307,7 +301,6 @@
@patch.object(Session, "post")
def test_serialization(self, mock_post):
-
resp = Response()
resp.status_code = 200
mock_post.return_value = resp
@@ -350,7 +343,6 @@
)
def test_aggregation_temporality(self):
-
otlp_metric_exporter = OTLPMetricExporter()
for (
@@ -362,7 +354,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "CUMULATIVE"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
for (
@@ -375,7 +366,6 @@
with patch.dict(
environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"}
):
-
with self.assertLogs(level=WARNING):
otlp_metric_exporter = OTLPMetricExporter()
@@ -390,7 +380,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "DELTA"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
self.assertEqual(
@@ -424,7 +413,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "LOWMEMORY"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
self.assertEqual(
@@ -455,7 +443,6 @@
)
def test_exponential_explicit_bucket_histogram(self):
-
self.assertIsInstance(
OTLPMetricExporter()._preferred_aggregation[Histogram],
ExplicitBucketHistogramAggregation,
@@ -513,7 +500,6 @@
)
def test_preferred_aggregation_override(self):
-
histogram_aggregation = ExplicitBucketHistogramAggregation(
boundaries=[0.05, 0.1, 0.5, 1, 5, 10],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/test_proto_log_exporter.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/test_proto_log_exporter.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/test_proto_log_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/test_proto_log_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -68,7 +68,6 @@
class TestOTLPHTTPLogExporter(unittest.TestCase):
def test_constructor_default(self):
-
exporter = OTLPLogExporter()
self.assertEqual(
@@ -181,7 +180,6 @@
},
)
def test_exporter_env(self):
-
exporter = OTLPLogExporter()
self.assertEqual(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/test_proto_span_exporter.py new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/test_proto_span_exporter.py
--- old/opentelemetry_exporter_otlp_proto_http-1.27.0/tests/test_proto_span_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_http-1.29.0/tests/test_proto_span_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -57,7 +57,6 @@
# pylint: disable=protected-access
class TestOTLPSpanExporter(unittest.TestCase):
def test_constructor_default(self):
-
exporter = OTLPSpanExporter()
self.assertEqual(
@@ -171,7 +170,6 @@
},
)
def test_exporter_env(self):
-
exporter = OTLPSpanExporter()
self.assertEqual(exporter._certificate_file, OS_ENV_CERTIFICATE)
@@ -190,7 +188,6 @@
{OTEL_EXPORTER_OTLP_ENDPOINT: OS_ENV_ENDPOINT},
)
def test_exporter_env_endpoint_without_slash(self):
-
exporter = OTLPSpanExporter()
self.assertEqual(
@@ -203,7 +200,6 @@
{OTEL_EXPORTER_OTLP_ENDPOINT: OS_ENV_ENDPOINT + "/"},
)
def test_exporter_env_endpoint_with_slash(self):
-
exporter = OTLPSpanExporter()
self.assertEqual(
@@ -218,7 +214,6 @@
},
)
def test_headers_parse_from_env(self):
-
with self.assertLogs(level="WARNING") as cm:
_ = OTLPSpanExporter()
1
0
09 Jan '25
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-exporter-otlp-proto-grpc for openSUSE:Factory checked in at 2025-01-09 15:09:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-grpc (Old)
and /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-grpc.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-exporter-otlp-proto-grpc"
Thu Jan 9 15:09:55 2025 rev:6 rq:1235918 version:1.29.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-grpc/python-opentelemetry-exporter-otlp-proto-grpc.changes 2024-09-06 17:18:31.255831378 +0200
+++ /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-grpc.new.1881/python-opentelemetry-exporter-otlp-proto-grpc.changes 2025-01-09 15:11:30.706441432 +0100
@@ -1,0 +2,31 @@
+Wed Jan 8 10:34:48 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 1.29.0
+ * Fix crash exporting a log record with None body
+ * Fix metrics export with exemplar and no context and filtering observable instruments
+ * Fix recursion error with sdk disabled and handler added to root logger
+ * sdk: setup EventLogger when OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set
+ * api: fix logging of duplicate EventLogger setup warning
+ * sdk: fix setting of process owner in ProcessResourceDetector
+ * sdk: fix serialization of logs severity_number field to int
+ * Remove `TestBase.assertEqualSpanInstrumentationInfo` method,
+ use `assertEqualSpanInstrumentationScope` instead
+ * sdk: instantiate lazily `ExemplarBucket`s in `ExemplarReservoir`s
+ * semantic-conventions: Bump to 1.29.0
+- from version 1.28.0
+ * Removed superfluous py.typed markers and added them where they were missing
+ * Include metric info in encoding exceptions
+ * sdk: Add support for log formatting
+ * sdk: Add Host resource detector
+ * sdk: Implementation of exemplars
+ * Implement events sdk
+ * Update semantic conventions to version 1.28.0
+ * Add support to protobuf 5+ and drop support to protobuf 3 and 4
+ * Update environment variable descriptions to match signal
+ * Record logger name as the instrumentation scope name
+ * Fix memory leak in exporter and reader
+ * Drop `OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION` environment variable
+ * Improve compatibility with other logging libraries that override
+ `LogRecord.getMessage()` in order to customize message formatting
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_exporter_otlp_proto_grpc-1.27.0.tar.gz
New:
----
opentelemetry_exporter_otlp_proto_grpc-1.29.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-exporter-otlp-proto-grpc.spec ++++++
--- /var/tmp/diff_new_pack.VpHKko/_old 2025-01-09 15:11:31.290465624 +0100
+++ /var/tmp/diff_new_pack.VpHKko/_new 2025-01-09 15:11:31.290465624 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-opentelemetry-exporter-otlp-proto-grpc
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-exporter-otlp-proto-grpc
-Version: 1.27.0
+Version: 1.29.0
Release: 0
Summary: OpenTelemetry Collector Protobuf over gRPC Exporter
License: Apache-2.0
@@ -34,7 +34,7 @@
BuildRequires: %{python_module opentelemetry-api >= 1.15}
BuildRequires: %{python_module opentelemetry-exporter-otlp-proto-common = %{version}}
BuildRequires: %{python_module opentelemetry-proto = %{version}}
-BuildRequires: %{python_module opentelemetry-sdk >= 1.27.0}
+BuildRequires: %{python_module opentelemetry-sdk >= %{version}}
BuildRequires: %{python_module opentelemetry-test-utils}
BuildRequires: %{python_module pytest-grpc}
BuildRequires: %{python_module requests}
++++++ opentelemetry_exporter_otlp_proto_grpc-1.27.0.tar.gz -> opentelemetry_exporter_otlp_proto_grpc-1.29.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/PKG-INFO new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/PKG-INFO
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,11 +1,10 @@
Metadata-Version: 2.3
Name: opentelemetry-exporter-otlp-proto-grpc
-Version: 1.27.0
+Version: 1.29.0
Summary: OpenTelemetry Collector Protobuf over gRPC Exporter
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors(a)lists.cncf.io>
License: Apache-2.0
-License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: OpenTelemetry
Classifier: Framework :: OpenTelemetry :: Exporters
@@ -21,11 +20,11 @@
Requires-Python: >=3.8
Requires-Dist: deprecated>=1.2.6
Requires-Dist: googleapis-common-protos~=1.52
-Requires-Dist: grpcio<2.0.0,>=1.0.0
+Requires-Dist: grpcio<2.0.0,>=1.63.2
Requires-Dist: opentelemetry-api~=1.15
-Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.27.0
-Requires-Dist: opentelemetry-proto==1.27.0
-Requires-Dist: opentelemetry-sdk~=1.27.0
+Requires-Dist: opentelemetry-exporter-otlp-proto-common==1.29.0
+Requires-Dist: opentelemetry-proto==1.29.0
+Requires-Dist: opentelemetry-sdk~=1.29.0
Description-Content-Type: text/x-rst
OpenTelemetry Collector Protobuf over gRPC Exporter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/pyproject.toml new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/pyproject.toml
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
@@ -29,11 +29,11 @@
dependencies = [
"Deprecated >= 1.2.6",
"googleapis-common-protos ~= 1.52",
- "grpcio >= 1.0.0, < 2.0.0",
+ "grpcio >= 1.63.2, < 2.0.0",
"opentelemetry-api ~= 1.15",
- "opentelemetry-proto == 1.27.0",
- "opentelemetry-sdk ~= 1.27.0",
- "opentelemetry-exporter-otlp-proto-common == 1.27.0",
+ "opentelemetry-proto == 1.29.0",
+ "opentelemetry-sdk ~= 1.29.0",
+ "opentelemetry-exporter-otlp-proto-common == 1.29.0",
]
[project.entry-points.opentelemetry_logs_exporter]
@@ -49,7 +49,7 @@
Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…"
[tool.hatch.version]
-path = "src/opentelemetry/exporter/otlp/proto/grpc/version.py"
+path = "src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -69,6 +69,7 @@
API
---
"""
+
from .version import __version__
_USER_AGENT_HEADER_VALUE = "OTel-OTLP-Exporter-Python/" + __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -12,10 +12,10 @@
# limitations under the License.
from os import environ
-from typing import Dict, Optional, Tuple, Union, Sequence
+from typing import Dict, Optional, Sequence, Tuple, Union
from typing import Sequence as TypingSequence
-from grpc import ChannelCredentials, Compression
+from grpc import ChannelCredentials, Compression
from opentelemetry.exporter.otlp.proto.common._log_encoder import encode_logs
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
OTLPExporterMixin,
@@ -28,10 +28,9 @@
from opentelemetry.proto.collector.logs.v1.logs_service_pb2_grpc import (
LogsServiceStub,
)
-from opentelemetry.sdk._logs import LogRecord as SDKLogRecord
from opentelemetry.sdk._logs import LogData
+from opentelemetry.sdk._logs import LogRecord as SDKLogRecord
from opentelemetry.sdk._logs.export import LogExporter, LogExportResult
-
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE,
OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE,
@@ -48,7 +47,6 @@
LogExporter,
OTLPExporterMixin[SDKLogRecord, ExportLogsServiceRequest, LogExportResult],
):
-
_result = LogExportResult
_stub = LogsServiceStub
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -28,19 +28,15 @@
List,
Optional,
Tuple,
+ TypeVar,
Union,
)
from typing import Sequence as TypingSequence
-from typing import TypeVar
from urllib.parse import urlparse
from deprecated import deprecated
-
-from opentelemetry.exporter.otlp.proto.common._internal import (
- _get_resource_data,
- _create_exp_backoff_generator,
-)
from google.rpc.error_details_pb2 import RetryInfo
+
from grpc import (
ChannelCredentials,
Compression,
@@ -50,7 +46,10 @@
secure_channel,
ssl_channel_credentials,
)
-
+from opentelemetry.exporter.otlp.proto.common._internal import (
+ _create_exp_backoff_generator,
+ _get_resource_data,
+)
from opentelemetry.exporter.otlp.proto.grpc import (
_OTLP_GRPC_HEADERS,
)
@@ -61,9 +60,9 @@
)
from opentelemetry.proto.resource.v1.resource_pb2 import Resource # noqa: F401
from opentelemetry.sdk.environment_variables import (
+ OTEL_EXPORTER_OTLP_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_CLIENT_KEY,
- OTEL_EXPORTER_OTLP_CERTIFICATE,
OTEL_EXPORTER_OTLP_COMPRESSION,
OTEL_EXPORTER_OTLP_ENDPOINT,
OTEL_EXPORTER_OTLP_HEADERS,
@@ -306,7 +305,6 @@
return self._result.SUCCESS
except RpcError as error:
-
if error.code() in [
StatusCode.CANCELLED,
StatusCode.DEADLINE_EXCEEDED,
@@ -316,7 +314,6 @@
StatusCode.UNAVAILABLE,
StatusCode.DATA_LOSS,
]:
-
retry_info_bin = dict(error.trailing_metadata()).get(
"google.rpc.retryinfo-bin"
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -16,18 +16,18 @@
from os import environ
from typing import Dict, Iterable, List, Optional, Tuple, Union
from typing import Sequence as TypingSequence
-from grpc import ChannelCredentials, Compression
+from grpc import ChannelCredentials, Compression
+from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
+ OTLPMetricExporterMixin,
+)
from opentelemetry.exporter.otlp.proto.common.metrics_encoder import (
encode_metrics,
)
-from opentelemetry.sdk.metrics._internal.aggregation import Aggregation
-from opentelemetry.exporter.otlp.proto.grpc.exporter import (
+from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
OTLPExporterMixin,
_get_credentials,
environ_to_compression,
-)
-from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
get_resource_data,
)
from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import (
@@ -50,24 +50,24 @@
OTEL_EXPORTER_OTLP_METRICS_INSECURE,
OTEL_EXPORTER_OTLP_METRICS_TIMEOUT,
)
-from opentelemetry.sdk.metrics.export import (
+from opentelemetry.sdk.metrics._internal.aggregation import Aggregation
+from opentelemetry.sdk.metrics.export import ( # noqa: F401
AggregationTemporality,
DataPointT,
+ Gauge,
Metric,
MetricExporter,
MetricExportResult,
MetricsData,
ResourceMetrics,
ScopeMetrics,
+ Sum,
)
from opentelemetry.sdk.metrics.export import ( # noqa: F401
- Gauge,
- Histogram as HistogramType,
- Sum,
ExponentialHistogram as ExponentialHistogramType,
)
-from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
- OTLPMetricExporterMixin,
+from opentelemetry.sdk.metrics.export import ( # noqa: F401
+ Histogram as HistogramType,
)
_logger = getLogger(__name__)
@@ -104,7 +104,6 @@
preferred_aggregation: Dict[type, Aggregation] = None,
max_export_batch_size: Optional[int] = None,
):
-
if insecure is None:
insecure = environ.get(OTEL_EXPORTER_OTLP_METRICS_INSECURE)
if insecure is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -18,18 +18,14 @@
from typing import Dict, Optional, Sequence, Tuple, Union
from typing import Sequence as TypingSequence
-
from grpc import ChannelCredentials, Compression
-
from opentelemetry.exporter.otlp.proto.common.trace_encoder import (
encode_spans,
)
-from opentelemetry.exporter.otlp.proto.grpc.exporter import (
+from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
OTLPExporterMixin,
_get_credentials,
environ_to_compression,
-)
-from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
get_resource_data,
)
from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import (
@@ -42,15 +38,17 @@
InstrumentationScope,
)
from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
- ScopeSpans,
ResourceSpans,
+ ScopeSpans,
+ Status,
+)
+from opentelemetry.proto.trace.v1.trace_pb2 import ( # noqa: F401
Span as CollectorSpan,
)
-from opentelemetry.proto.trace.v1.trace_pb2 import Status # noqa: F401
from opentelemetry.sdk.environment_variables import (
+ OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE,
OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE,
OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY,
- OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE,
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION,
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
OTEL_EXPORTER_OTLP_TRACES_HEADERS,
@@ -96,7 +94,6 @@
timeout: Optional[int] = None,
compression: Optional[Compression] = None,
):
-
if insecure is None:
insecure = environ.get(OTEL_EXPORTER_OTLP_TRACES_INSECURE)
if insecure is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/version/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,15 @@
+# Copyright The OpenTelemetry Authors
+#
+# 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.
+
+__version__ = "1.29.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/version.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/version.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/src/opentelemetry/exporter/otlp/proto/grpc/version.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/src/opentelemetry/exporter/otlp/proto/grpc/version.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-# Copyright The OpenTelemetry Authors
-#
-# 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.
-
-__version__ = "1.27.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/logs/test_otlp_logs_exporter.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/logs/test_otlp_logs_exporter.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/logs/test_otlp_logs_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/logs/test_otlp_logs_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -24,7 +24,9 @@
Duration,
)
from google.protobuf.json_format import MessageToDict
-from google.rpc.error_details_pb2 import RetryInfo
+from google.rpc.error_details_pb2 import ( # pylint: disable=no-name-in-module
+ RetryInfo,
+)
from grpc import ChannelCredentials, Compression, StatusCode, server
from opentelemetry._logs import SeverityNumber
@@ -41,11 +43,10 @@
LogsServiceServicer,
add_LogsServiceServicer_to_server,
)
-from opentelemetry.proto.common.v1.common_pb2 import AnyValue
+from opentelemetry.proto.common.v1.common_pb2 import AnyValue, KeyValue
from opentelemetry.proto.common.v1.common_pb2 import (
InstrumentationScope as PB2InstrumentationScope,
)
-from opentelemetry.proto.common.v1.common_pb2 import KeyValue
from opentelemetry.proto.logs.v1.logs_pb2 import LogRecord as PB2LogRecord
from opentelemetry.proto.logs.v1.logs_pb2 import ResourceLogs, ScopeLogs
from opentelemetry.proto.resource.v1.resource_pb2 import (
@@ -393,7 +394,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [0.01]})
add_LogsServiceServicer_to_server(
@@ -409,7 +409,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable_delay(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [1]})
add_LogsServiceServicer_to_server(
@@ -474,7 +473,6 @@
self.fail("No log records found")
def test_translate_log_data(self):
-
expected = ExportLogsServiceRequest(
resource_logs=[
ResourceLogs(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_exporter_mixin.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_exporter_mixin.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_exporter_mixin.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_exporter_mixin.py 2020-02-02 01:00:00.000000000 +0100
@@ -23,7 +23,9 @@
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
-from google.rpc.error_details_pb2 import RetryInfo
+from google.rpc.error_details_pb2 import ( # pylint: disable=no-name-in-module
+ RetryInfo,
+)
from grpc import Compression
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_metrics_exporter.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_metrics_exporter.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_metrics_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_metrics_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -29,7 +29,9 @@
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
-from google.rpc.error_details_pb2 import RetryInfo
+from google.rpc.error_details_pb2 import ( # pylint: disable=no-name-in-module
+ RetryInfo,
+)
from grpc import ChannelCredentials, Compression, StatusCode, server
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
@@ -146,7 +148,6 @@
# pylint: disable=too-many-public-methods
def setUp(self):
-
self.exporter = OTLPMetricExporter()
self.server = server(ThreadPoolExecutor(max_workers=10))
@@ -485,7 +486,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [0.01]})
add_MetricsServiceServicer_to_server(
@@ -502,7 +502,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable_delay(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [1]})
add_MetricsServiceServicer_to_server(
@@ -520,7 +519,6 @@
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.logger.error")
def test_unknown_logs(self, mock_logger_error, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [1]})
add_MetricsServiceServicer_to_server(
@@ -890,7 +888,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "CUMULATIVE"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
for (
@@ -903,7 +900,6 @@
with patch.dict(
environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"}
):
-
with self.assertLogs(level=WARNING):
otlp_metric_exporter = OTLPMetricExporter()
@@ -918,7 +914,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "DELTA"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
self.assertEqual(
@@ -952,7 +947,6 @@
environ,
{OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "LOWMEMORY"},
):
-
otlp_metric_exporter = OTLPMetricExporter()
self.assertEqual(
@@ -983,7 +977,6 @@
)
def test_exponential_explicit_bucket_histogram(self):
-
self.assertIsInstance(
# pylint: disable=protected-access
OTLPMetricExporter()._preferred_aggregation[Histogram],
@@ -1034,7 +1027,6 @@
)
def test_preferred_aggregation_override(self):
-
histogram_aggregation = ExplicitBucketHistogramAggregation(
boundaries=[0.05, 0.1, 0.5, 1, 5, 10],
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_trace_exporter.py new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_trace_exporter.py
--- old/opentelemetry_exporter_otlp_proto_grpc-1.27.0/tests/test_otlp_trace_exporter.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_grpc-1.29.0/tests/test_otlp_trace_exporter.py 2020-02-02 01:00:00.000000000 +0100
@@ -25,7 +25,9 @@
from google.protobuf.duration_pb2 import ( # pylint: disable=no-name-in-module
Duration,
)
-from google.rpc.error_details_pb2 import RetryInfo
+from google.rpc.error_details_pb2 import ( # pylint: disable=no-name-in-module
+ RetryInfo,
+)
from grpc import ChannelCredentials, Compression, StatusCode, server
from opentelemetry.attributes import BoundedAttributes
@@ -44,17 +46,23 @@
TraceServiceServicer,
add_TraceServiceServicer_to_server,
)
-from opentelemetry.proto.common.v1.common_pb2 import AnyValue, ArrayValue
+from opentelemetry.proto.common.v1.common_pb2 import (
+ AnyValue,
+ ArrayValue,
+ KeyValue,
+)
from opentelemetry.proto.common.v1.common_pb2 import (
InstrumentationScope as PB2InstrumentationScope,
)
-from opentelemetry.proto.common.v1.common_pb2 import KeyValue
from opentelemetry.proto.resource.v1.resource_pb2 import (
Resource as OTLPResource,
)
-from opentelemetry.proto.trace.v1.trace_pb2 import ResourceSpans, ScopeSpans
+from opentelemetry.proto.trace.v1.trace_pb2 import (
+ ResourceSpans,
+ ScopeSpans,
+ Status,
+)
from opentelemetry.proto.trace.v1.trace_pb2 import Span as OTLPSpan
-from opentelemetry.proto.trace.v1.trace_pb2 import Status
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_OTLP_COMPRESSION,
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE,
@@ -526,7 +534,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [0.01]})
add_TraceServiceServicer_to_server(
@@ -541,7 +548,6 @@
)
@patch("opentelemetry.exporter.otlp.proto.grpc.exporter.sleep")
def test_unavailable_delay(self, mock_sleep, mock_expo):
-
mock_expo.configure_mock(**{"return_value": [1]})
add_TraceServiceServicer_to_server(
@@ -569,7 +575,6 @@
)
def test_translate_spans(self):
-
expected = ExportTraceServiceRequest(
resource_spans=[
ResourceSpans(
1
0
commit python-opentelemetry-exporter-otlp-proto-common for openSUSE:Factory
by Source-Sync 09 Jan '25
by Source-Sync 09 Jan '25
09 Jan '25
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-exporter-otlp-proto-common for openSUSE:Factory checked in at 2025-01-09 15:09:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common (Old)
and /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-exporter-otlp-proto-common"
Thu Jan 9 15:09:51 2025 rev:8 rq:1235917 version:1.29.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-opentelemetry-exporter-otlp-proto-common/python-opentelemetry-exporter-otlp-proto-common.changes 2024-09-05 15:48:18.470862227 +0200
+++ /work/SRC/openSUSE:Factory/.python-opentelemetry-exporter-otlp-proto-common.new.1881/python-opentelemetry-exporter-otlp-proto-common.changes 2025-01-09 15:11:30.070415085 +0100
@@ -1,0 +2,31 @@
+Wed Jan 8 10:15:49 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 1.29.0
+ * Fix crash exporting a log record with None body
+ * Fix metrics export with exemplar and no context and filtering observable instruments
+ * Fix recursion error with sdk disabled and handler added to root logger
+ * sdk: setup EventLogger when OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set
+ * api: fix logging of duplicate EventLogger setup warning
+ * sdk: fix setting of process owner in ProcessResourceDetector
+ * sdk: fix serialization of logs severity_number field to int
+ * Remove `TestBase.assertEqualSpanInstrumentationInfo` method,
+ use `assertEqualSpanInstrumentationScope` instead
+ * sdk: instantiate lazily `ExemplarBucket`s in `ExemplarReservoir`s
+ * semantic-conventions: Bump to 1.29.0
+- from version 1.28.0
+ * Removed superfluous py.typed markers and added them where they were missing
+ * Include metric info in encoding exceptions
+ * sdk: Add support for log formatting
+ * sdk: Add Host resource detector
+ * sdk: Implementation of exemplars
+ * Implement events sdk
+ * Update semantic conventions to version 1.28.0
+ * Add support to protobuf 5+ and drop support to protobuf 3 and 4
+ * Update environment variable descriptions to match signal
+ * Record logger name as the instrumentation scope name
+ * Fix memory leak in exporter and reader
+ * Drop `OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION` environment variable
+ * Improve compatibility with other logging libraries that override
+ `LogRecord.getMessage()` in order to customize message formatting
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_exporter_otlp_proto_common-1.27.0.tar.gz
New:
----
opentelemetry_exporter_otlp_proto_common-1.29.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-exporter-otlp-proto-common.spec ++++++
--- /var/tmp/diff_new_pack.Fycx1L/_old 2025-01-09 15:11:30.530434141 +0100
+++ /var/tmp/diff_new_pack.Fycx1L/_new 2025-01-09 15:11:30.530434141 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-opentelemetry-exporter-otlp-proto-common
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-exporter-otlp-proto-common
-Version: 1.27.0
+Version: 1.29.0
Release: 0
Summary: OpenTelemetry Protobuf encoding
License: Apache-2.0
++++++ opentelemetry_exporter_otlp_proto_common-1.27.0.tar.gz -> opentelemetry_exporter_otlp_proto_common-1.29.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/PKG-INFO new/opentelemetry_exporter_otlp_proto_common-1.29.0/PKG-INFO
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,11 +1,10 @@
Metadata-Version: 2.3
Name: opentelemetry-exporter-otlp-proto-common
-Version: 1.27.0
+Version: 1.29.0
Summary: OpenTelemetry Protobuf encoding
Project-URL: Homepage, https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…
Author-email: OpenTelemetry Authors <cncf-opentelemetry-contributors(a)lists.cncf.io>
License: Apache-2.0
-License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: OpenTelemetry
Classifier: Framework :: OpenTelemetry :: Exporters
@@ -19,7 +18,7 @@
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
-Requires-Dist: opentelemetry-proto==1.27.0
+Requires-Dist: opentelemetry-proto==1.29.0
Description-Content-Type: text/x-rst
OpenTelemetry Protobuf Encoding
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/pyproject.toml new/opentelemetry_exporter_otlp_proto_common-1.29.0/pyproject.toml
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/pyproject.toml 2020-02-02 01:00:00.000000000 +0100
@@ -27,14 +27,14 @@
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-proto == 1.27.0",
+ "opentelemetry-proto == 1.29.0",
]
[project.urls]
Homepage = "https://github.com/open-telemetry/opentelemetry-python/tree/main/exporter/o…"
[tool.hatch.version]
-path = "src/opentelemetry/exporter/otlp/proto/common/version.py"
+path = "src/opentelemetry/exporter/otlp/proto/common/version/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -18,31 +18,31 @@
from itertools import count
from typing import (
Any,
- Mapping,
- Optional,
- List,
Callable,
- TypeVar,
Dict,
Iterator,
+ List,
+ Mapping,
+ Optional,
+ TypeVar,
)
-from opentelemetry.sdk.util.instrumentation import InstrumentationScope
+from opentelemetry.proto.common.v1.common_pb2 import AnyValue as PB2AnyValue
from opentelemetry.proto.common.v1.common_pb2 import (
- InstrumentationScope as PB2InstrumentationScope,
+ ArrayValue as PB2ArrayValue,
)
-from opentelemetry.proto.resource.v1.resource_pb2 import (
- Resource as PB2Resource,
+from opentelemetry.proto.common.v1.common_pb2 import (
+ InstrumentationScope as PB2InstrumentationScope,
)
-from opentelemetry.proto.common.v1.common_pb2 import AnyValue as PB2AnyValue
from opentelemetry.proto.common.v1.common_pb2 import KeyValue as PB2KeyValue
from opentelemetry.proto.common.v1.common_pb2 import (
KeyValueList as PB2KeyValueList,
)
-from opentelemetry.proto.common.v1.common_pb2 import (
- ArrayValue as PB2ArrayValue,
+from opentelemetry.proto.resource.v1.resource_pb2 import (
+ Resource as PB2Resource,
)
from opentelemetry.sdk.trace import Resource
+from opentelemetry.sdk.util.instrumentation import InstrumentationScope
from opentelemetry.util.types import Attributes
_logger = logging.getLogger(__name__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -12,25 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from collections import defaultdict
-from typing import Sequence, List
+from typing import List, Sequence
from opentelemetry.exporter.otlp.proto.common._internal import (
+ _encode_attributes,
_encode_instrumentation_scope,
_encode_resource,
_encode_span_id,
_encode_trace_id,
_encode_value,
- _encode_attributes,
)
from opentelemetry.proto.collector.logs.v1.logs_service_pb2 import (
ExportLogsServiceRequest,
)
+from opentelemetry.proto.logs.v1.logs_pb2 import LogRecord as PB2LogRecord
from opentelemetry.proto.logs.v1.logs_pb2 import (
- ScopeLogs,
ResourceLogs,
+ ScopeLogs,
)
-from opentelemetry.proto.logs.v1.logs_pb2 import LogRecord as PB2LogRecord
-
from opentelemetry.sdk._logs import LogData
@@ -49,13 +48,14 @@
if log_data.log_record.trace_id == 0
else _encode_trace_id(log_data.log_record.trace_id)
)
+ body = log_data.log_record.body
return PB2LogRecord(
time_unix_nano=log_data.log_record.timestamp,
observed_time_unix_nano=log_data.log_record.observed_timestamp,
span_id=span_id,
trace_id=trace_id,
flags=int(log_data.log_record.trace_flags),
- body=_encode_value(log_data.log_record.body),
+ body=_encode_value(body) if body is not None else None,
severity_text=log_data.log_record.severity_text,
attributes=_encode_attributes(log_data.log_record.attributes),
dropped_attributes_count=log_data.log_record.dropped_attributes,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -12,51 +12,52 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
+from os import environ
+from typing import Dict, List
-from opentelemetry.sdk.metrics.export import (
- MetricExporter,
+from opentelemetry.exporter.otlp.proto.common._internal import (
+ _encode_attributes,
+ _encode_span_id,
+ _encode_trace_id,
+)
+from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import (
+ ExportMetricsServiceRequest,
+)
+from opentelemetry.proto.common.v1.common_pb2 import InstrumentationScope
+from opentelemetry.proto.metrics.v1 import metrics_pb2 as pb2
+from opentelemetry.proto.resource.v1.resource_pb2 import (
+ Resource as PB2Resource,
+)
+from opentelemetry.sdk.environment_variables import (
+ OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
+ OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE,
)
-from opentelemetry.sdk.metrics.view import Aggregation
-from os import environ
from opentelemetry.sdk.metrics import (
Counter,
+ Exemplar,
Histogram,
ObservableCounter,
ObservableGauge,
ObservableUpDownCounter,
UpDownCounter,
)
-from opentelemetry.exporter.otlp.proto.common._internal import (
- _encode_attributes,
-)
-from opentelemetry.sdk.environment_variables import (
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE,
-)
from opentelemetry.sdk.metrics.export import (
AggregationTemporality,
-)
-from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import (
- ExportMetricsServiceRequest,
-)
-from opentelemetry.proto.common.v1.common_pb2 import InstrumentationScope
-from opentelemetry.proto.metrics.v1 import metrics_pb2 as pb2
-from opentelemetry.sdk.metrics.export import (
- MetricsData,
Gauge,
- Histogram as HistogramType,
+ MetricExporter,
+ MetricsData,
Sum,
- ExponentialHistogram as ExponentialHistogramType,
)
-from typing import Dict
-from opentelemetry.proto.resource.v1.resource_pb2 import (
- Resource as PB2Resource,
+from opentelemetry.sdk.metrics.export import (
+ ExponentialHistogram as ExponentialHistogramType,
)
-from opentelemetry.sdk.environment_variables import (
- OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
+from opentelemetry.sdk.metrics.export import (
+ Histogram as HistogramType,
)
from opentelemetry.sdk.metrics.view import (
- ExponentialBucketHistogramAggregation,
+ Aggregation,
ExplicitBucketHistogramAggregation,
+ ExponentialBucketHistogramAggregation,
)
_logger = logging.getLogger(__name__)
@@ -68,7 +69,6 @@
preferred_temporality: Dict[type, AggregationTemporality] = None,
preferred_aggregation: Dict[type, Aggregation] = None,
) -> None:
-
MetricExporter.__init__(
self,
preferred_temporality=self._get_temporality(preferred_temporality),
@@ -78,7 +78,6 @@
def _get_temporality(
self, preferred_temporality: Dict[type, AggregationTemporality]
) -> Dict[type, AggregationTemporality]:
-
otel_exporter_otlp_metrics_temporality_preference = (
environ.get(
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE,
@@ -135,7 +134,6 @@
self,
preferred_aggregation: Dict[type, Aggregation],
) -> Dict[type, Aggregation]:
-
otel_exporter_otlp_metrics_default_histogram_aggregation = environ.get(
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,
"explicit_bucket_histogram",
@@ -144,17 +142,14 @@
if otel_exporter_otlp_metrics_default_histogram_aggregation == (
"base2_exponential_bucket_histogram"
):
-
instrument_class_aggregation = {
Histogram: ExponentialBucketHistogramAggregation(),
}
else:
-
if otel_exporter_otlp_metrics_default_histogram_aggregation != (
"explicit_bucket_histogram"
):
-
_logger.warning(
(
"Invalid value for %s: %s, using explicit bucket "
@@ -173,152 +168,26 @@
return instrument_class_aggregation
-def encode_metrics(data: MetricsData) -> ExportMetricsServiceRequest:
- resource_metrics_dict = {}
-
- for resource_metrics in data.resource_metrics:
-
- resource = resource_metrics.resource
-
- # It is safe to assume that each entry in data.resource_metrics is
- # associated with an unique resource.
- scope_metrics_dict = {}
-
- resource_metrics_dict[resource] = scope_metrics_dict
-
- for scope_metrics in resource_metrics.scope_metrics:
-
- instrumentation_scope = scope_metrics.scope
-
- # The SDK groups metrics in instrumentation scopes already so
- # there is no need to check for existing instrumentation scopes
- # here.
- pb2_scope_metrics = pb2.ScopeMetrics(
- scope=InstrumentationScope(
- name=instrumentation_scope.name,
- version=instrumentation_scope.version,
- )
- )
+class EncodingException(Exception):
+ """
+ Raised by encode_metrics() when an exception is caught during encoding. Contains the problematic metric so
+ the misbehaving metric name and details can be logged during exception handling.
+ """
+
+ def __init__(self, original_exception, metric):
+ super().__init__()
+ self.original_exception = original_exception
+ self.metric = metric
- scope_metrics_dict[instrumentation_scope] = pb2_scope_metrics
+ def __str__(self):
+ return f"{self.metric}\n{self.original_exception}"
- for metric in scope_metrics.metrics:
- pb2_metric = pb2.Metric(
- name=metric.name,
- description=metric.description,
- unit=metric.unit,
- )
- if isinstance(metric.data, Gauge):
- for data_point in metric.data.data_points:
- pt = pb2.NumberDataPoint(
- attributes=_encode_attributes(
- data_point.attributes
- ),
- time_unix_nano=data_point.time_unix_nano,
- )
- if isinstance(data_point.value, int):
- pt.as_int = data_point.value
- else:
- pt.as_double = data_point.value
- pb2_metric.gauge.data_points.append(pt)
-
- elif isinstance(metric.data, HistogramType):
- for data_point in metric.data.data_points:
- pt = pb2.HistogramDataPoint(
- attributes=_encode_attributes(
- data_point.attributes
- ),
- time_unix_nano=data_point.time_unix_nano,
- start_time_unix_nano=(
- data_point.start_time_unix_nano
- ),
- count=data_point.count,
- sum=data_point.sum,
- bucket_counts=data_point.bucket_counts,
- explicit_bounds=data_point.explicit_bounds,
- max=data_point.max,
- min=data_point.min,
- )
- pb2_metric.histogram.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
- pb2_metric.histogram.data_points.append(pt)
-
- elif isinstance(metric.data, Sum):
- for data_point in metric.data.data_points:
- pt = pb2.NumberDataPoint(
- attributes=_encode_attributes(
- data_point.attributes
- ),
- start_time_unix_nano=(
- data_point.start_time_unix_nano
- ),
- time_unix_nano=data_point.time_unix_nano,
- )
- if isinstance(data_point.value, int):
- pt.as_int = data_point.value
- else:
- pt.as_double = data_point.value
- # note that because sum is a message type, the
- # fields must be set individually rather than
- # instantiating a pb2.Sum and setting it once
- pb2_metric.sum.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
- pb2_metric.sum.is_monotonic = metric.data.is_monotonic
- pb2_metric.sum.data_points.append(pt)
-
- elif isinstance(metric.data, ExponentialHistogramType):
- for data_point in metric.data.data_points:
-
- if data_point.positive.bucket_counts:
- positive = pb2.ExponentialHistogramDataPoint.Buckets(
- offset=data_point.positive.offset,
- bucket_counts=data_point.positive.bucket_counts,
- )
- else:
- positive = None
-
- if data_point.negative.bucket_counts:
- negative = pb2.ExponentialHistogramDataPoint.Buckets(
- offset=data_point.negative.offset,
- bucket_counts=data_point.negative.bucket_counts,
- )
- else:
- negative = None
-
- pt = pb2.ExponentialHistogramDataPoint(
- attributes=_encode_attributes(
- data_point.attributes
- ),
- time_unix_nano=data_point.time_unix_nano,
- start_time_unix_nano=(
- data_point.start_time_unix_nano
- ),
- count=data_point.count,
- sum=data_point.sum,
- scale=data_point.scale,
- zero_count=data_point.zero_count,
- positive=positive,
- negative=negative,
- flags=data_point.flags,
- max=data_point.max,
- min=data_point.min,
- )
- pb2_metric.exponential_histogram.aggregation_temporality = (
- metric.data.aggregation_temporality
- )
- pb2_metric.exponential_histogram.data_points.append(pt)
-
- else:
- _logger.warning(
- "unsupported data type %s",
- metric.data.__class__.__name__,
- )
- continue
+def encode_metrics(data: MetricsData) -> ExportMetricsServiceRequest:
+ resource_metrics_dict = {}
- pb2_scope_metrics.metrics.append(pb2_metric)
+ for resource_metrics in data.resource_metrics:
+ _encode_resource_metrics(resource_metrics, resource_metrics_dict)
resource_data = []
for (
@@ -334,5 +203,184 @@
schema_url=sdk_resource.schema_url,
)
)
- resource_metrics = resource_data
- return ExportMetricsServiceRequest(resource_metrics=resource_metrics)
+ return ExportMetricsServiceRequest(resource_metrics=resource_data)
+
+
+def _encode_resource_metrics(resource_metrics, resource_metrics_dict):
+ resource = resource_metrics.resource
+ # It is safe to assume that each entry in data.resource_metrics is
+ # associated with an unique resource.
+ scope_metrics_dict = {}
+ resource_metrics_dict[resource] = scope_metrics_dict
+ for scope_metrics in resource_metrics.scope_metrics:
+ instrumentation_scope = scope_metrics.scope
+
+ # The SDK groups metrics in instrumentation scopes already so
+ # there is no need to check for existing instrumentation scopes
+ # here.
+ pb2_scope_metrics = pb2.ScopeMetrics(
+ scope=InstrumentationScope(
+ name=instrumentation_scope.name,
+ version=instrumentation_scope.version,
+ )
+ )
+
+ scope_metrics_dict[instrumentation_scope] = pb2_scope_metrics
+
+ for metric in scope_metrics.metrics:
+ pb2_metric = pb2.Metric(
+ name=metric.name,
+ description=metric.description,
+ unit=metric.unit,
+ )
+
+ try:
+ _encode_metric(metric, pb2_metric)
+ except Exception as ex:
+ # `from None` so we don't get "During handling of the above exception, another exception occurred:"
+ raise EncodingException(ex, metric) from None
+
+ pb2_scope_metrics.metrics.append(pb2_metric)
+
+
+def _encode_metric(metric, pb2_metric):
+ if isinstance(metric.data, Gauge):
+ for data_point in metric.data.data_points:
+ pt = pb2.NumberDataPoint(
+ attributes=_encode_attributes(data_point.attributes),
+ time_unix_nano=data_point.time_unix_nano,
+ exemplars=_encode_exemplars(data_point.exemplars),
+ )
+ if isinstance(data_point.value, int):
+ pt.as_int = data_point.value
+ else:
+ pt.as_double = data_point.value
+ pb2_metric.gauge.data_points.append(pt)
+
+ elif isinstance(metric.data, HistogramType):
+ for data_point in metric.data.data_points:
+ pt = pb2.HistogramDataPoint(
+ attributes=_encode_attributes(data_point.attributes),
+ time_unix_nano=data_point.time_unix_nano,
+ start_time_unix_nano=data_point.start_time_unix_nano,
+ exemplars=_encode_exemplars(data_point.exemplars),
+ count=data_point.count,
+ sum=data_point.sum,
+ bucket_counts=data_point.bucket_counts,
+ explicit_bounds=data_point.explicit_bounds,
+ max=data_point.max,
+ min=data_point.min,
+ )
+ pb2_metric.histogram.aggregation_temporality = (
+ metric.data.aggregation_temporality
+ )
+ pb2_metric.histogram.data_points.append(pt)
+
+ elif isinstance(metric.data, Sum):
+ for data_point in metric.data.data_points:
+ pt = pb2.NumberDataPoint(
+ attributes=_encode_attributes(data_point.attributes),
+ start_time_unix_nano=data_point.start_time_unix_nano,
+ time_unix_nano=data_point.time_unix_nano,
+ exemplars=_encode_exemplars(data_point.exemplars),
+ )
+ if isinstance(data_point.value, int):
+ pt.as_int = data_point.value
+ else:
+ pt.as_double = data_point.value
+ # note that because sum is a message type, the
+ # fields must be set individually rather than
+ # instantiating a pb2.Sum and setting it once
+ pb2_metric.sum.aggregation_temporality = (
+ metric.data.aggregation_temporality
+ )
+ pb2_metric.sum.is_monotonic = metric.data.is_monotonic
+ pb2_metric.sum.data_points.append(pt)
+
+ elif isinstance(metric.data, ExponentialHistogramType):
+ for data_point in metric.data.data_points:
+ if data_point.positive.bucket_counts:
+ positive = pb2.ExponentialHistogramDataPoint.Buckets(
+ offset=data_point.positive.offset,
+ bucket_counts=data_point.positive.bucket_counts,
+ )
+ else:
+ positive = None
+
+ if data_point.negative.bucket_counts:
+ negative = pb2.ExponentialHistogramDataPoint.Buckets(
+ offset=data_point.negative.offset,
+ bucket_counts=data_point.negative.bucket_counts,
+ )
+ else:
+ negative = None
+
+ pt = pb2.ExponentialHistogramDataPoint(
+ attributes=_encode_attributes(data_point.attributes),
+ time_unix_nano=data_point.time_unix_nano,
+ start_time_unix_nano=data_point.start_time_unix_nano,
+ exemplars=_encode_exemplars(data_point.exemplars),
+ count=data_point.count,
+ sum=data_point.sum,
+ scale=data_point.scale,
+ zero_count=data_point.zero_count,
+ positive=positive,
+ negative=negative,
+ flags=data_point.flags,
+ max=data_point.max,
+ min=data_point.min,
+ )
+ pb2_metric.exponential_histogram.aggregation_temporality = (
+ metric.data.aggregation_temporality
+ )
+ pb2_metric.exponential_histogram.data_points.append(pt)
+
+ else:
+ _logger.warning(
+ "unsupported data type %s",
+ metric.data.__class__.__name__,
+ )
+
+
+def _encode_exemplars(sdk_exemplars: List[Exemplar]) -> List[pb2.Exemplar]:
+ """
+ Converts a list of SDK Exemplars into a list of protobuf Exemplars.
+
+ Args:
+ sdk_exemplars (list): The list of exemplars from the OpenTelemetry SDK.
+
+ Returns:
+ list: A list of protobuf exemplars.
+ """
+ pb_exemplars = []
+ for sdk_exemplar in sdk_exemplars:
+ if (
+ sdk_exemplar.span_id is not None
+ and sdk_exemplar.trace_id is not None
+ ):
+ pb_exemplar = pb2.Exemplar(
+ time_unix_nano=sdk_exemplar.time_unix_nano,
+ span_id=_encode_span_id(sdk_exemplar.span_id),
+ trace_id=_encode_trace_id(sdk_exemplar.trace_id),
+ filtered_attributes=_encode_attributes(
+ sdk_exemplar.filtered_attributes
+ ),
+ )
+ else:
+ pb_exemplar = pb2.Exemplar(
+ time_unix_nano=sdk_exemplar.time_unix_nano,
+ filtered_attributes=_encode_attributes(
+ sdk_exemplar.filtered_attributes
+ ),
+ )
+
+ # Assign the value based on its type in the SDK exemplar
+ if isinstance(sdk_exemplar.value, float):
+ pb_exemplar.as_double = sdk_exemplar.value
+ elif isinstance(sdk_exemplar.value, int):
+ pb_exemplar.as_int = sdk_exemplar.value
+ else:
+ raise ValueError("Exemplar value must be an int or float")
+ pb_exemplars.append(pb_exemplar)
+
+ return pb_exemplars
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/version/__init__.py 2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,15 @@
+# Copyright The OpenTelemetry Authors
+#
+# 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.
+
+__version__ = "1.29.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/version.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/version.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/src/opentelemetry/exporter/otlp/proto/common/version.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/src/opentelemetry/exporter/otlp/proto/common/version.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-# Copyright The OpenTelemetry Authors
-#
-# 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.
-
-__version__ = "1.27.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/tests/test_log_encoder.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/tests/test_log_encoder.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/tests/test_log_encoder.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/tests/test_log_encoder.py 2020-02-02 01:00:00.000000000 +0100
@@ -51,6 +51,18 @@
sdk_logs, expected_encoding = self.get_test_logs()
self.assertEqual(encode_logs(sdk_logs), expected_encoding)
+ def test_encode_no_body(self):
+ sdk_logs, expected_encoding = self.get_test_logs()
+ for log in sdk_logs:
+ log.log_record.body = None
+
+ for resource_log in expected_encoding.resource_logs:
+ for scope_log in resource_log.scope_logs:
+ for log_record in scope_log.log_records:
+ log_record.ClearField("body")
+
+ self.assertEqual(encode_logs(sdk_logs), expected_encoding)
+
def test_dropped_attributes_count(self):
sdk_logs = self._get_test_logs_dropped_attributes()
encoded_logs = encode_logs(sdk_logs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/opentelemetry_exporter_otlp_proto_common-1.27.0/tests/test_metrics_encoder.py new/opentelemetry_exporter_otlp_proto_common-1.29.0/tests/test_metrics_encoder.py
--- old/opentelemetry_exporter_otlp_proto_common-1.27.0/tests/test_metrics_encoder.py 2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_exporter_otlp_proto_common-1.29.0/tests/test_metrics_encoder.py 2020-02-02 01:00:00.000000000 +0100
@@ -12,9 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# pylint: disable=protected-access
+# pylint: disable=protected-access,too-many-lines
import unittest
+from opentelemetry.exporter.otlp.proto.common._internal.metrics_encoder import (
+ EncodingException,
+)
from opentelemetry.exporter.otlp.proto.common.metrics_encoder import (
encode_metrics,
)
@@ -30,19 +33,21 @@
from opentelemetry.proto.resource.v1.resource_pb2 import (
Resource as OTLPResource,
)
-from opentelemetry.sdk.metrics.export import AggregationTemporality, Buckets
-from opentelemetry.sdk.metrics.export import (
- ExponentialHistogram as ExponentialHistogramType,
-)
-from opentelemetry.sdk.metrics.export import ExponentialHistogramDataPoint
-from opentelemetry.sdk.metrics.export import Histogram as HistogramType
+from opentelemetry.sdk.metrics import Exemplar
from opentelemetry.sdk.metrics.export import (
+ AggregationTemporality,
+ Buckets,
+ ExponentialHistogramDataPoint,
HistogramDataPoint,
Metric,
MetricsData,
ResourceMetrics,
ScopeMetrics,
)
+from opentelemetry.sdk.metrics.export import (
+ ExponentialHistogram as ExponentialHistogramType,
+)
+from opentelemetry.sdk.metrics.export import Histogram as HistogramType
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.util.instrumentation import (
InstrumentationScope as SDKInstrumentationScope,
@@ -51,6 +56,9 @@
class TestOTLPMetricsEncoder(unittest.TestCase):
+ span_id = int("6e0c63257de34c92", 16)
+ trace_id = int("d4cda95b652f4a1592b449d5929fda1b", 16)
+
histogram = Metric(
name="histogram",
description="foo",
@@ -61,6 +69,22 @@
attributes={"a": 1, "b": True},
start_time_unix_nano=1641946016139533244,
time_unix_nano=1641946016139533244,
+ exemplars=[
+ Exemplar(
+ {"filtered": "banana"},
+ 298.0,
+ 1641946016139533400,
+ span_id,
+ trace_id,
+ ),
+ Exemplar(
+ {"filtered": "banana"},
+ 298.0,
+ 1641946016139533400,
+ None,
+ None,
+ ),
+ ],
count=5,
sum=67,
bucket_counts=[1, 4],
@@ -456,7 +480,34 @@
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
- exemplars=[],
+ exemplars=[
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ span_id=b"n\x0cc%}\xe3L\x92",
+ trace_id=b"\xd4\xcd\xa9[e/J\x15\x92\xb4I\xd5\x92\x9f\xda\x1b",
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ ],
max=18.0,
min=8.0,
)
@@ -559,7 +610,34 @@
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
- exemplars=[],
+ exemplars=[
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ span_id=b"n\x0cc%}\xe3L\x92",
+ trace_id=b"\xd4\xcd\xa9[e/J\x15\x92\xb4I\xd5\x92\x9f\xda\x1b",
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ ],
max=18.0,
min=8.0,
)
@@ -594,7 +672,34 @@
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
- exemplars=[],
+ exemplars=[
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ span_id=b"n\x0cc%}\xe3L\x92",
+ trace_id=b"\xd4\xcd\xa9[e/J\x15\x92\xb4I\xd5\x92\x9f\xda\x1b",
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ ],
max=18.0,
min=8.0,
)
@@ -636,7 +741,34 @@
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
- exemplars=[],
+ exemplars=[
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ span_id=b"n\x0cc%}\xe3L\x92",
+ trace_id=b"\xd4\xcd\xa9[e/J\x15\x92\xb4I\xd5\x92\x9f\xda\x1b",
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ ],
max=18.0,
min=8.0,
)
@@ -678,7 +810,34 @@
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
- exemplars=[],
+ exemplars=[
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ span_id=b"n\x0cc%}\xe3L\x92",
+ trace_id=b"\xd4\xcd\xa9[e/J\x15\x92\xb4I\xd5\x92\x9f\xda\x1b",
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ pb2.Exemplar(
+ time_unix_nano=1641946016139533400,
+ as_double=298,
+ filtered_attributes=[
+ KeyValue(
+ key="filtered",
+ value=AnyValue(
+ string_value="banana"
+ ),
+ )
+ ],
+ ),
+ ],
max=18.0,
min=8.0,
)
@@ -814,3 +973,35 @@
# pylint: disable=protected-access
actual = encode_metrics(metrics_data)
self.assertEqual(expected, actual)
+
+ def test_encoding_exception_reraise(self):
+ # this number is too big to fit in a signed 64-bit proto field and causes a ValueError
+ big_number = 2**63
+ metrics_data = MetricsData(
+ resource_metrics=[
+ ResourceMetrics(
+ resource=Resource(
+ attributes={},
+ schema_url="resource_schema_url",
+ ),
+ scope_metrics=[
+ ScopeMetrics(
+ scope=SDKInstrumentationScope(
+ name="first_name",
+ version="first_version",
+ schema_url="insrumentation_scope_schema_url",
+ ),
+ metrics=[_generate_sum("sum_double", big_number)],
+ schema_url="instrumentation_scope_schema_url",
+ )
+ ],
+ schema_url="resource_schema_url",
+ )
+ ]
+ )
+ with self.assertRaises(EncodingException) as context:
+ encode_metrics(metrics_data)
+
+ # assert that the EncodingException wraps the metric and original exception
+ assert isinstance(context.exception.metric, Metric)
+ assert isinstance(context.exception.original_exception, ValueError)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package bpftrace for openSUSE:Factory checked in at 2025-01-09 15:09:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bpftrace (Old)
and /work/SRC/openSUSE:Factory/.bpftrace.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bpftrace"
Thu Jan 9 15:09:41 2025 rev:32 rq:1235891 version:0.21.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/bpftrace/bpftrace.changes 2024-12-19 21:41:09.794006079 +0100
+++ /work/SRC/openSUSE:Factory/.bpftrace.new.1881/bpftrace.changes 2025-01-09 15:11:28.058331740 +0100
@@ -1,0 +2,9 @@
+Thu Dec 26 12:57:46 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu(a)suse.com>
+
+- Support building with LLVM 19
+ * add 0002-Drop-support-for-LLVM-12-and-below.patch
+ * add 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
+ * add 0004-Bump-max-LLVM-version-to-19-3433.patch
+- Default to LLVM 19 in Factory and SLE15-SP7
+
+-------------------------------------------------------------------
@@ -7,0 +17 @@
+
@@ -93,0 +104,5 @@
+
+-------------------------------------------------------------------
+Mon Jan 22 13:39:02 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu(a)suse.com>
+
+- Switch to gcc for compilation (bsc#1219008)
New:
----
0002-Drop-support-for-LLVM-12-and-below.patch
0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
0004-Bump-max-LLVM-version-to-19-3433.patch
BETA DEBUG BEGIN:
New:- Support building with LLVM 19
* add 0002-Drop-support-for-LLVM-12-and-below.patch
* add 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
New: * add 0002-Drop-support-for-LLVM-12-and-below.patch
* add 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
* add 0004-Bump-max-LLVM-version-to-19-3433.patch
New: * add 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
* add 0004-Bump-max-LLVM-version-to-19-3433.patch
- Default to LLVM 19 in Factory and SLE15-SP7
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bpftrace.spec ++++++
--- /var/tmp/diff_new_pack.v1Yfdr/_old 2025-01-09 15:11:28.534351457 +0100
+++ /var/tmp/diff_new_pack.v1Yfdr/_new 2025-01-09 15:11:28.538351623 +0100
@@ -18,8 +18,8 @@
# Use default LLVM unless it is not yet supported
%if 0%{?suse_version} >= 1600
- %if 0%{?product_libs_llvm_ver} > 18
- %define llvm_major_version 18
+ %if 0%{?product_libs_llvm_ver} > 19
+ %define llvm_major_version 19
%else
%define llvm_major_version %{nil}
%endif
@@ -28,6 +28,9 @@
%define xx_binary clang++
%else
# Hard-code latest LLVM for SLES, the default version is too old
+ %if 0%{?sle_version} == 150700
+ %define llvm_major_version 19
+ %else
%if 0%{?sle_version} == 150600
%define llvm_major_version 17
%else
@@ -39,6 +42,7 @@
%endif
%endif
%endif
+ %endif
%define cc_package gcc13-c++
%define cc_binary gcc-13
%define xx_binary g++-13
@@ -54,6 +58,10 @@
Source: https://github.com/iovisor/bpftrace/archive/v%{version}.tar.gz#/%{name}-%{v…
# PATCH-FIX-UPSTREAM 0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch bsc#1232536
Patch0: 0001-tools-bashreadline-fix-probe-for-dynamically-linked-.patch
+Patch1: 0002-Drop-support-for-LLVM-12-and-below.patch
+Patch2: 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch
+# PATCH-FIX-UPSTREAM 0004-Bump-max-LLVM-version-to-19-3433.patch bpftrace/bpftrace##3433
+Patch3: 0004-Bump-max-LLVM-version-to-19-3433.patch
BuildRequires: %cc_package
BuildRequires: binutils
BuildRequires: binutils-devel
++++++ 0002-Drop-support-for-LLVM-12-and-below.patch ++++++
From 08a7d5c48bc36c4876e7de62323a8860e886f7a8 Mon Sep 17 00:00:00 2001
From: Alastair Robertson <ajor(a)meta.com>
Date: Wed, 17 Jul 2024 08:03:30 -0700
Subject: [PATCH 1/3] Drop support for LLVM 12 and below
LLVM 11 and below have been untested for a while.
Dropping LLVM 12 allows us to upgrade to C++ 20.
---
.github/workflows/ci.yml | 5 --
CHANGELOG.md | 2 +
CMakeLists.txt | 2 +-
flake.nix | 2 -
src/ast/irbuilderbpf.cpp | 18 +-----
src/ast/irbuilderbpf.h | 19 -------
src/ast/passes/codegen_llvm.cpp | 4 +-
src/clang_parser.cpp | 99 +--------------------------------
tests/clang_parser.cpp | 5 --
tests/data/CMakeLists.txt | 8 +--
tests/testprogs/CMakeLists.txt | 5 --
11 files changed, 8 insertions(+), 161 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6b87ea3c..a37b7bdc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,11 +28,6 @@ jobs:
strategy:
matrix:
env:
- - NAME: LLVM 12 Release
- CMAKE_BUILD_TYPE: Release
- NIX_TARGET: .#bpftrace-llvm12
- TOOLS_TEST_OLDVERSION: tcpdrop.bt
- TOOLS_TEST_DISABLE: biosnoop.bt
- NAME: LLVM 13 Release
CMAKE_BUILD_TYPE: Release
NIX_TARGET: .#bpftrace-llvm13
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7fa1fe14..c223b4e5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project adheres to
#### Changed
#### Deprecated
#### Removed
+- Drop support for LLVM 12 and below
+ - [#3325](https://github.com/bpftrace/bpftrace/pull/3325)
#### Fixed
#### Security
#### Docs
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e03ca7d..05ca8dcc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,7 +148,7 @@ else()
find_package(LLVM REQUIRED)
endif()
-set(MIN_LLVM_MAJOR 6)
+set(MIN_LLVM_MAJOR 13)
set(MAX_LLVM_MAJOR 18)
if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR}))
diff --git a/flake.nix b/flake.nix
index 6202e372..9931a2a5 100644
--- a/flake.nix
+++ b/flake.nix
@@ -145,7 +145,6 @@
bpftrace-llvm15 = mkBpftrace pkgs.llvmPackages_15;
bpftrace-llvm14 = mkBpftrace pkgs.llvmPackages_14;
bpftrace-llvm13 = mkBpftrace pkgs.llvmPackages_13;
- bpftrace-llvm12 = mkBpftrace pkgs.llvmPackages_12;
# Self-contained static binary with all dependencies
appimage = nix-appimage.mkappimage.${system} {
@@ -192,7 +191,6 @@
bpftrace-llvm15 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm15;
bpftrace-llvm14 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm14;
bpftrace-llvm13 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm13;
- bpftrace-llvm12 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm12;
};
});
}
diff --git a/src/ast/irbuilderbpf.cpp b/src/ast/irbuilderbpf.cpp
index deccf4a8..89434075 100644
--- a/src/ast/irbuilderbpf.cpp
+++ b/src/ast/irbuilderbpf.cpp
@@ -15,14 +15,6 @@
#include "log.h"
#include "utils.h"
-#if LLVM_VERSION_MAJOR >= 10
-#define CREATE_MEMSET(ptr, val, size, align) \
- CreateMemSet((ptr), (val), (size), MaybeAlign((align)))
-#else
-#define CREATE_MEMSET(ptr, val, size, align) \
- CreateMemSet((ptr), (val), (size), (align))
-#endif
-
namespace libbpf {
#include "libbpf/bpf.h"
} // namespace libbpf
@@ -247,7 +239,7 @@ void IRBuilderBPF::CreateMemsetBPF(Value *ptr, Value *val, uint32_t size)
// So only use helper based memset when we really need it. And that's when
// we're memset()ing off-stack. We know it's off stack b/c 512 is program
// stack limit.
- CREATE_MEMSET(ptr, val, getInt64(size), 1);
+ CreateMemSet(ptr, val, getInt64(size), MaybeAlign(1));
}
}
@@ -347,11 +339,7 @@ CallInst *IRBuilderBPF::createCall(FunctionType *callee_type,
ArrayRef<Value *> args,
const Twine &Name)
{
-#if LLVM_VERSION_MAJOR >= 11
return CreateCall(callee_type, callee, args, Name);
-#else
- return CreateCall(callee, args, Name);
-#endif
}
Value *IRBuilderBPF::GetMapVar(const std::string &map_name)
@@ -2445,11 +2433,7 @@ StoreInst *IRBuilderBPF::createAlignedStore(Value *val,
Value *ptr,
unsigned int align)
{
-#if LLVM_VERSION_MAJOR < 10
- return CreateAlignedStore(val, ptr, align);
-#else
return CreateAlignedStore(val, ptr, MaybeAlign(align));
-#endif
}
void IRBuilderBPF::CreateProbeRead(Value *ctx,
diff --git a/src/ast/irbuilderbpf.h b/src/ast/irbuilderbpf.h
index 6a42c003..e9b3b124 100644
--- a/src/ast/irbuilderbpf.h
+++ b/src/ast/irbuilderbpf.h
@@ -11,32 +11,13 @@
#include "bpftrace.h"
#include "types.h"
-#if LLVM_VERSION_MAJOR >= 5 && LLVM_VERSION_MAJOR < 7
-#define CREATE_MEMCPY(dst, src, size, algn) \
- CreateMemCpy((dst), (src), (size), (algn))
-#define CREATE_MEMCPY_VOLATILE(dst, src, size, algn) \
- CreateMemCpy((dst), (src), (size), (algn), true)
-#elif LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 10
-#define CREATE_MEMCPY(dst, src, size, algn) \
- CreateMemCpy((dst), (algn), (src), (algn), (size))
-#define CREATE_MEMCPY_VOLATILE(dst, src, size, algn) \
- CreateMemCpy((dst), (algn), (src), (algn), (size), true)
-#elif LLVM_VERSION_MAJOR >= 10
#define CREATE_MEMCPY(dst, src, size, algn) \
CreateMemCpy((dst), MaybeAlign(algn), (src), MaybeAlign(algn), (size))
#define CREATE_MEMCPY_VOLATILE(dst, src, size, algn) \
CreateMemCpy((dst), MaybeAlign(algn), (src), MaybeAlign(algn), (size), true)
-#else
-#error Unsupported LLVM version
-#endif
-#if LLVM_VERSION_MAJOR >= 13
#define CREATE_ATOMIC_RMW(op, ptr, val, align, order) \
CreateAtomicRMW((op), (ptr), (val), MaybeAlign((align)), (order))
-#else
-#define CREATE_ATOMIC_RMW(op, ptr, val, align, order) \
- CreateAtomicRMW((op), (ptr), (val), (order))
-#endif
#if LLVM_VERSION_MAJOR >= 15
#define GET_PTR_TY() getPtrTy()
diff --git a/src/ast/passes/codegen_llvm.cpp b/src/ast/passes/codegen_llvm.cpp
index 562ec65f..f4314023 100644
--- a/src/ast/passes/codegen_llvm.cpp
+++ b/src/ast/passes/codegen_llvm.cpp
@@ -3727,10 +3727,8 @@ void CodegenLLVM::emit(raw_pwrite_stream &stream)
#if LLVM_VERSION_MAJOR >= 18
auto type = CodeGenFileType::ObjectFile;
-#elif LLVM_VERSION_MAJOR >= 10
- auto type = llvm::CGFT_ObjectFile;
#else
- auto type = llvm::TargetMachine::CGFT_ObjectFile;
+ auto type = llvm::CGFT_ObjectFile;
#endif
if (target_machine_->addPassesToEmitFile(PM, stream, nullptr, type))
diff --git a/src/clang_parser.cpp b/src/clang_parser.cpp
index 8d79f076..52bb8786 100644
--- a/src/clang_parser.cpp
+++ b/src/clang_parser.cpp
@@ -86,102 +86,6 @@ static std::string get_clang_string(CXString string)
return str;
}
-/*
- * is_anonymous
- *
- * Determine whether the provided cursor points to an anonymous struct.
- *
- * This union is anonymous:
- * struct { int i; };
- * This is not, although it is marked as such in LLVM 8:
- * struct { int i; } obj;
- * This is not, and does not actually declare an instance of a struct:
- * struct X { int i; };
- *
- * The libclang API was changed in LLVM 8 and restored under a different
- * function in LLVM 9. For LLVM 8 there is no way to properly tell if
- * a record declaration is anonymous, so we do some hacks here.
- *
- * LLVM version differences:
- * https://reviews.llvm.org/D54996
- * https://reviews.llvm.org/D61232
- */
-static bool is_anonymous(CXCursor c)
-{
-#if LLVM_VERSION_MAJOR <= 7
- return clang_Cursor_isAnonymous(c);
-#elif LLVM_VERSION_MAJOR >= 9
- return clang_Cursor_isAnonymousRecordDecl(c);
-#else // LLVM 8
- if (!clang_Cursor_isAnonymous(c))
- return false;
-
- // In LLVM 8, some structs which the above function says are anonymous
- // are actually not. We iterate through the siblings of our struct
- // definition to see if there is a field giving it a name.
- //
- // struct Parent struct Parent
- // { {
- // struct struct
- // { {
- // ... ...
- // } name; };
- // int sibling; int sibling;
- // }; };
- //
- // Children of parent: Children of parent:
- // Struct: (cursor c) Struct: (cursor c)
- // Field: (Record)name Field: (int)sibling
- // Field: (int)sibling
- //
- // Record field found after No record field found after
- // cursor - not anonymous cursor - anonymous
-
- auto parent = clang_getCursorSemanticParent(c);
- if (clang_Cursor_isNull(parent))
- return false;
-
- struct AnonFinderState {
- CXCursor struct_to_check;
- bool is_anon;
- bool prev_was_definition;
- } state;
-
- state.struct_to_check = c;
- state.is_anon = true;
- state.prev_was_definition = false;
-
- clang_visitChildren(
- parent,
- [](CXCursor c2, CXCursor, CXClientData client_data) {
- auto state = static_cast<struct AnonFinderState *>(client_data);
- if (state->prev_was_definition) {
- // This is the next child after the definition of the struct we're
- // interested in. If it is a field containing a record, we assume
- // that it must be the field for our struct, so our struct is not
- // anonymous.
- state->prev_was_definition = false;
- auto kind = clang_getCursorKind(c2);
- auto type = clang_getCanonicalType(clang_getCursorType(c2));
- if (kind == CXCursor_FieldDecl && type.kind == CXType_Record) {
- state->is_anon = false;
- return CXChildVisit_Break;
- }
- }
-
- // We've found the definition of the struct we're interested in
- if (memcmp(c2.data,
- state->struct_to_check.data,
- 3 * sizeof(uintptr_t)) == 0)
- state->prev_was_definition = true;
- return CXChildVisit_Continue;
- },
- &state);
-
- return state.is_anon;
-#endif
-}
-
/*
* get_named_parent
*
@@ -192,7 +96,8 @@ static CXCursor get_named_parent(CXCursor c)
{
CXCursor parent = clang_getCursorSemanticParent(c);
- while (!clang_Cursor_isNull(parent) && is_anonymous(parent)) {
+ while (!clang_Cursor_isNull(parent) &&
+ clang_Cursor_isAnonymousRecordDecl(parent)) {
parent = clang_getCursorSemanticParent(parent);
}
diff --git a/tests/clang_parser.cpp b/tests/clang_parser.cpp
index acf07b19..db099fb4 100644
--- a/tests/clang_parser.cpp
+++ b/tests/clang_parser.cpp
@@ -208,13 +208,8 @@ TEST(clang_parser, nested_struct_no_type)
parse("struct Foo { struct { int x; } bar; union { int y; } baz; }",
bpftrace);
-#if LLVM_VERSION_MAJOR >= 13
std::string bar_name = "struct Foo::(unnamed at definitions.h:2:14)";
std::string baz_name = "union Foo::(unnamed at definitions.h:2:37)";
-#else
- std::string bar_name = "struct Foo::(anonymous at definitions.h:2:14)";
- std::string baz_name = "union Foo::(anonymous at definitions.h:2:37)";
-#endif
ASSERT_TRUE(bpftrace.structs.Has("struct Foo"));
ASSERT_TRUE(bpftrace.structs.Has(bar_name));
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
index 7eaded22..caa4b397 100644
--- a/tests/data/CMakeLists.txt
+++ b/tests/data/CMakeLists.txt
@@ -11,17 +11,11 @@ find_program(AWK awk REQUIRED)
find_program(STRIP strip REQUIRED)
# Build data_source.o and inject BTF into it
-set(DATA_SOURCE_CFLAGS -g)
-if(LLVM_VERSION_MAJOR VERSION_LESS 13)
- # CI's GCC compile the testprogs using DWARF version 5
- # LLDB doesn't support DWARF5 before version 13, so we force DWARF4
- set(DATA_SOURCE_CFLAGS ${DATA_SOURCE_CFLAGS} -gdwarf-4)
-endif()
set(DATA_SOURCE_C ${CMAKE_CURRENT_SOURCE_DIR}/data_source.c)
set(DATA_SOURCE_O ${CMAKE_CURRENT_BINARY_DIR}/data_source.o)
add_custom_command(
OUTPUT ${DATA_SOURCE_O}
- COMMAND gcc ${DATA_SOURCE_CFLAGS} -o ${DATA_SOURCE_O} ${DATA_SOURCE_C}
+ COMMAND gcc -g -o ${DATA_SOURCE_O} ${DATA_SOURCE_C}
# pahole uses LLVM_OBJCOPY env var.
# We must hack it like this b/c cmake does not support setting env vars at build time
COMMAND bash -c "LLVM_OBJCOPY=${LLVM_OBJCOPY} pahole -J ${DATA_SOURCE_O}"
diff --git a/tests/testprogs/CMakeLists.txt b/tests/testprogs/CMakeLists.txt
index 58c17f7a..8f93658c 100644
--- a/tests/testprogs/CMakeLists.txt
+++ b/tests/testprogs/CMakeLists.txt
@@ -1,9 +1,4 @@
set(testprog_cflags "-g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer")
-if(LLVM_VERSION_MAJOR VERSION_LESS 13)
- # CI's GCC compile the testprogs using DWARF version 5
- # LLDB doesn't support DWARF5 before version 13, so we force DWARF4
- set(testprog_cflags "${testprog_cflags} -gdwarf-4")
-endif()
file(GLOB testprog_sources CONFIGURE_DEPENDS *.c)
set(testprogtargets "")
--
2.47.1
++++++ 0003-cmake-Allow-any-LLVM-release-for-debug-builds.patch ++++++
From 4e96768dd8f710ae727caa38397f3edb73faf156 Mon Sep 17 00:00:00 2001
From: Daniel Xu <dxu(a)dxuuu.xyz>
Date: Thu, 19 Sep 2024 11:17:25 +0200
Subject: [PATCH 2/3] cmake: Allow any LLVM release for debug builds
---
CMakeLists.txt | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05ca8dcc..025ff321 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,15 @@ else()
endif()
set(MIN_LLVM_MAJOR 13)
-set(MAX_LLVM_MAJOR 18)
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ # We assume bpftrace is not being packaged when CMAKE_BUILD_TYPE=Debug.
+ # So allow building with any LLVM version. This is purely for developers.
+ # Packagers are highly discouraged from shipping bpftrace with untested LLVM
+ # releases.
+ set(MAX_LLVM_MAJOR 999)
+else()
+ set(MAX_LLVM_MAJOR 18)
+endif()
if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR}))
message(SEND_ERROR "Unsupported LLVM version found via ${LLVM_INCLUDE_DIRS}: ${LLVM_VERSION_MAJOR}")
--
2.47.1
++++++ 0004-Bump-max-LLVM-version-to-19-3433.patch ++++++
From 63811ea6ccaf2b6315d55b219921eb872a38042c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem(a)gmail.com>
Date: Wed, 11 Dec 2024 23:14:10 -0800
Subject: [PATCH 3/3] Bump max LLVM version to 19 (#3433)
* cmake: Bump max LLVM version to 19
* Add CI job for clang/llvm 19
* flake.nix: Add LLVM 19 support
---
.github/workflows/ci.yml | 27 +++++++++++++++------------
CHANGELOG.md | 2 ++
CMakeLists.txt | 2 +-
flake.nix | 5 +++++
4 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a37b7bdc..ce28320f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -53,31 +53,34 @@ jobs:
NIX_TARGET: .#bpftrace-llvm17
TOOLS_TEST_OLDVERSION: tcpdrop.bt
TOOLS_TEST_DISABLE: biosnoop.bt
- - NAME: LLVM 18 Release
+ - NAME: LLVM 18
+ CMAKE_BUILD_TYPE: Debug
+ NIX_TARGET: .#bpftrace-llvm18
+ TOOLS_TEST_OLDVERSION: tcpdrop.bt
+ TOOLS_TEST_DISABLE: biosnoop.bt
+ - NAME: LLVM 19 Release
CMAKE_BUILD_TYPE: Release
- NIX_TARGET: .#bpftrace-llvm18
- TOOLS_TEST_OLDVERSION: tcpdrop.bt
+ NIX_TARGET: .#bpftrace-llvm19
TOOLS_TEST_DISABLE: biosnoop.bt
- - NAME: LLVM 18 Debug
+ - NAME: LLVM 19 Debug
CMAKE_BUILD_TYPE: Debug
- NIX_TARGET: .#bpftrace-llvm18
- TOOLS_TEST_OLDVERSION: tcpdrop.bt
+ NIX_TARGET: .#bpftrace-llvm19
TOOLS_TEST_DISABLE: biosnoop.bt
- - NAME: LLVM 18 Clang Debug
+ - NAME: LLVM 19 Clang Debug
CMAKE_BUILD_TYPE: Debug
- NIX_TARGET: .#bpftrace-llvm18
+ NIX_TARGET: .#bpftrace-llvm19
CC: clang
CXX: clang++
TOOLS_TEST_OLDVERSION: tcpdrop.bt
TOOLS_TEST_DISABLE: biosnoop.bt
- - NAME: Memleak test (LLVM 18 Debug)
+ - NAME: Memleak test (LLVM 19 Debug)
CMAKE_BUILD_TYPE: Debug
- NIX_TARGET: .#bpftrace-llvm18
+ NIX_TARGET: .#bpftrace-llvm19
RUN_MEMLEAK_TEST: 1
RUN_TESTS: 0
- - NAME: Memleak test (LLVM 18 Release)
+ - NAME: Memleak test (LLVM 19 Release)
CMAKE_BUILD_TYPE: Release
- NIX_TARGET: .#bpftrace-llvm18
+ NIX_TARGET: .#bpftrace-llvm19
RUN_MEMLEAK_TEST: 1
RUN_TESTS: 0
steps:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c223b4e5..e326548a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ and this project adheres to
## Unreleased
#### Added
+= Bump max supported LLVM version to 19
+ - [#3433](https://github.com/bpftrace/bpftrace/pull/3433)
#### Changed
#### Deprecated
#### Removed
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 025ff321..a3ba009a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,7 +156,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# releases.
set(MAX_LLVM_MAJOR 999)
else()
- set(MAX_LLVM_MAJOR 18)
+ set(MAX_LLVM_MAJOR 19)
endif()
if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR}))
diff --git a/flake.nix b/flake.nix
index 9931a2a5..e589f989 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,6 +21,9 @@
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ]
(system:
let
+ # The default LLVM version is the latest supported release
+ defaultLlvmVersion = 19;
+
# Overlay to specify build should use the specific libbpf we want
libbpfVersion = "1.4.2";
libbpfOverlay =
@@ -139,6 +142,7 @@
default = bpftrace-llvm18;
# Support matrix of llvm versions
+ bpftrace-llvm19 = mkBpftrace pkgs.llvmPackages_19;
bpftrace-llvm18 = mkBpftrace pkgs.llvmPackages_18;
bpftrace-llvm17 = mkBpftrace pkgs.llvmPackages_17;
bpftrace-llvm16 = mkBpftrace pkgs.llvmPackages_16;
@@ -185,6 +189,7 @@
devShells = rec {
default = bpftrace-llvm18;
+ bpftrace-llvm19 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm19;
bpftrace-llvm18 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm18;
bpftrace-llvm17 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm17;
bpftrace-llvm16 = mkBpftraceDevShell self.packages.${system}.bpftrace-llvm16;
--
2.47.1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package drbd-utils for openSUSE:Factory checked in at 2025-01-09 15:09:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd-utils (Old)
and /work/SRC/openSUSE:Factory/.drbd-utils.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drbd-utils"
Thu Jan 9 15:09:37 2025 rev:62 rq:1235883 version:9.29.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd-utils/drbd-utils.changes 2024-11-12 19:26:08.071298541 +0100
+++ /work/SRC/openSUSE:Factory/.drbd-utils.new.1881/drbd-utils.changes 2025-01-09 15:11:26.566269933 +0100
@@ -1,0 +2,91 @@
+Wed Jan 8 07:42:00 UTC 2025 - Heming Zhao <heming.zhao(a)suse.com>
+
+- Update drbd-utils from 9.25.0 to 9.29.0
+
+ * Changelog from Linbit:
+
+ 9.29.0
+ -----------
+ * drbdmeta: fix initialization for external md
+ * build: allow disbling keyutils
+ * tests: export sanitized environment
+ * drbdmon: various improvements
+ * build: add cyclonedx
+ * drbsetup,v9: fix multiple paths drbdsetup show --json
+ strictly spreaking breaking change, but maily used internally
+ * events2: expose if device is open
+ * drbdadm: fix undefined behavior that triggered on amd64
+ * shared: fix out-of-bounds access in parsing
+ * drbsetup,v9: event consistency with peer devices
+ * drbdadm: fix parsing of v8.4 configs for compatibility
+ * drbdmeta: fix segfault for check-resize on intentionally diskless
+ * drbd-promote@.service: check if ExecCondition is available
+
+ 9.28.0
+ -----------
+ * events2: set may_promote:no promotion_score:0 while
+ force-io-failure:yes
+ * drbdsetup,v9: show TLS in connection status
+ * drbdsetup,v9: add udev command
+ * 8.3: remove
+ * crm-fence-peer.9.sh: fixes for pacemaker 2.1.7
+ * events2: improved out of order message handling
+
+ 9.27.0
+ -----------
+ * adjust,v9: retry for diskless primaries
+ * tests: sanitize env (e.g., TZ)
+ * drbdmeta: dump and restore the members field
+
+ 9.26.0
+ -----------
+ * config,v9: new config option load-balance-paths
+ * config,v9: new config options rdma-ctrls-(snd|rcv)buf-size
+ * drbdadm,v9: fix segfault if proxy has no path
+ * drbd: increase maximum CPU mask size
+ * systemd: introduce drbd-graceful-shutdown.service
+ * drbdmeta,v9: fix regression, allow attach after offline resize
+ * drbdsetup,v9: add path established information to JSON status
+ * events2: terminate on module unload even under --poll
+ * events2: specif exit code if module unload
+ * docs: add spdx license file
+ * drbdmon: various smaller improvements
+ * drbdsetup,v9: support for TLS/kTLS
+
+ * remove patches which are already included in upstream code:
+ 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch
+ 0002-user-drbrdmon-add-missing-stdint.h-includes.patch
+ 0003-Introduce-default_types.h-header.patch
+ bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
+ bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
+ bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
+ usrmerge_move_lib_to_prefix_lib.patch
+
+ * add upstream patches to align commit 0a014f290802:
+ 0001-drbd-verify.py-relax-host-key-checking.patch
+ 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
+ 0003-DRBDmon-Integrate-global-local-command-delegation.patch
+ 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
+ 0005-DRBDmon-Add-drbd-events-log-supplier.patch
+ 0006-DRBDmon-Adjust-Makefile.patch
+ 0007-DRBDmon-Version-V1R4M1.patch
+ 0008-drbdadm-add-proxy-options-to-add-connection-command.patch
+ 0009-Do-not-hardcode-paths-in-services-and-scripts.patch
+ 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
+ 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
+ 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch
+
+ * update patches according to source code changes:
+ bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch
+ fence-after-pacemaker-down.patch
+
+ * modify upstream patch for passing build:
+ 0009-Do-not-hardcode-paths-in-services-and-scripts.patch
+
+ * add new service:
+ drbd-graceful-shutdown.service
+
+ * add new binrary:
+ drbd-events-log-supplier
+
+-------------------------------------------------------------------
Old:
----
0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch
0002-user-drbrdmon-add-missing-stdint.h-includes.patch
0003-Introduce-default_types.h-header.patch
bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
drbd-utils-9.25.0.tar.gz
usrmerge_move_lib_to_prefix_lib.patch
New:
----
0001-drbd-verify.py-relax-host-key-checking.patch
0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
0003-DRBDmon-Integrate-global-local-command-delegation.patch
0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
0005-DRBDmon-Add-drbd-events-log-supplier.patch
0006-DRBDmon-Adjust-Makefile.patch
0007-DRBDmon-Version-V1R4M1.patch
0008-drbdadm-add-proxy-options-to-add-connection-command.patch
0009-Do-not-hardcode-paths-in-services-and-scripts.patch
0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch
drbd-utils-9.29.0.tar.gz
BETA DEBUG BEGIN:
Old: * remove patches which are already included in upstream code:
0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch
0002-user-drbrdmon-add-missing-stdint.h-includes.patch
Old: 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch
0002-user-drbrdmon-add-missing-stdint.h-includes.patch
0003-Introduce-default_types.h-header.patch
Old: 0002-user-drbrdmon-add-missing-stdint.h-includes.patch
0003-Introduce-default_types.h-header.patch
bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
Old: 0003-Introduce-default_types.h-header.patch
bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
Old: bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
Old: bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
usrmerge_move_lib_to_prefix_lib.patch
Old: bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
usrmerge_move_lib_to_prefix_lib.patch
BETA DEBUG END:
BETA DEBUG BEGIN:
New: * add upstream patches to align commit 0a014f290802:
0001-drbd-verify.py-relax-host-key-checking.patch
0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
New: 0001-drbd-verify.py-relax-host-key-checking.patch
0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
0003-DRBDmon-Integrate-global-local-command-delegation.patch
New: 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
0003-DRBDmon-Integrate-global-local-command-delegation.patch
0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
New: 0003-DRBDmon-Integrate-global-local-command-delegation.patch
0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
0005-DRBDmon-Add-drbd-events-log-supplier.patch
New: 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
0005-DRBDmon-Add-drbd-events-log-supplier.patch
0006-DRBDmon-Adjust-Makefile.patch
New: 0005-DRBDmon-Add-drbd-events-log-supplier.patch
0006-DRBDmon-Adjust-Makefile.patch
0007-DRBDmon-Version-V1R4M1.patch
New: 0006-DRBDmon-Adjust-Makefile.patch
0007-DRBDmon-Version-V1R4M1.patch
0008-drbdadm-add-proxy-options-to-add-connection-command.patch
New: 0007-DRBDmon-Version-V1R4M1.patch
0008-drbdadm-add-proxy-options-to-add-connection-command.patch
0009-Do-not-hardcode-paths-in-services-and-scripts.patch
New: 0008-drbdadm-add-proxy-options-to-add-connection-command.patch
0009-Do-not-hardcode-paths-in-services-and-scripts.patch
0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
New: 0009-Do-not-hardcode-paths-in-services-and-scripts.patch
0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
New: 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch
New: 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ drbd-utils.spec ++++++
--- /var/tmp/diff_new_pack.PK99bZ/_old 2025-01-09 15:11:27.350302410 +0100
+++ /var/tmp/diff_new_pack.PK99bZ/_new 2025-01-09 15:11:27.354302577 +0100
@@ -1,7 +1,7 @@
#
# spec file for package drbd-utils
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
#
-%define services drbd.service drbd-lvchange@.service drbd-promote@.service drbd-demote-or-escalate@.service drbd-reconfigure-suspend-or-error@.service drbd-services@.target drbd-wait-promotable@.service drbd@.service drbd@.target ocf.ra@.service
+%define services drbd.service drbd-graceful-shutdown.service drbd-lvchange@.service drbd-promote@.service drbd-demote-or-escalate@.service drbd-reconfigure-suspend-or-error@.service drbd-services@.target drbd-wait-promotable@.service drbd@.service drbd@.target ocf.ra@.service
%if 0%{?suse_version} < 1550
# for SLEs
%define sbindir /sbin
@@ -32,7 +32,7 @@
# Only need po4a to build man from git source code
%bcond_without prebuiltman
Name: drbd-utils
-Version: 9.25.0
+Version: 9.29.0
Release: 0
Summary: Distributed Replicated Block Device
License: GPL-2.0-or-later
@@ -43,23 +43,28 @@
#############################################
# Upstream patches
-Patch0001: 0001-drbdadm-v9-do-not-segfault-when-re-configuring-proxy.patch
-Patch0002: 0002-user-drbrdmon-add-missing-stdint.h-includes.patch
-Patch0003: 0003-Introduce-default_types.h-header.patch
+Patch0001: 0001-drbd-verify.py-relax-host-key-checking.patch
+Patch0002: 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch
+Patch0003: 0003-DRBDmon-Integrate-global-local-command-delegation.patch
+Patch0004: 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch
+Patch0005: 0005-DRBDmon-Add-drbd-events-log-supplier.patch
+Patch0006: 0006-DRBDmon-Adjust-Makefile.patch
+Patch0007: 0007-DRBDmon-Version-V1R4M1.patch
+Patch0008: 0008-drbdadm-add-proxy-options-to-add-connection-command.patch
+Patch0009: 0009-Do-not-hardcode-paths-in-services-and-scripts.patch
+Patch0010: 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch
+Patch0011: 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch
+Patch0012: 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch
# SUSE specific patches
Patch1001: init-script-fixes.diff
-Patch1002: usrmerge_move_lib_to_prefix_lib.patch
-Patch1003: fence-after-pacemaker-down.patch
-Patch1004: bsc-1032142_Disable-quorum-in-default-configuration.patch
-Patch1005: move_fencing_from_disk_to_net_in_example.patch
-Patch1006: pie-fix.patch
-Patch1007: bsc-1219263_crm-fence-peer.9.sh-fix-parsing-in_ccm-crmd-fields-o.patch
-Patch1008: bsc-1219263_crm-fence-peer.9.sh-use-join-of-node_state-to-judge-.patch
-Patch1009: bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch
-Patch1010: bsc-1233273_drbd.ocf-update-regex-of-sed-for-new-output-from-crm.patch
-Patch1011: bsc-1233273_drbd.ocf-update-for-OCF-1.1.patch
-Patch1099: rpmlint-build-error.patch
+Patch1002: fence-after-pacemaker-down.patch
+Patch1003: bsc-1032142_Disable-quorum-in-default-configuration.patch
+Patch1004: move_fencing_from_disk_to_net_in_example.patch
+Patch1005: pie-fix.patch
+Patch1006: bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch
+Patch1007: bsc-1233273_drbd.ocf-update-for-OCF-1.1.patch
+Patch1008: rpmlint-build-error.patch
#############################################
Provides: drbd-bash-completion = %{version}
@@ -214,6 +219,7 @@
%{sbindir}/drbdmeta
%if %{with drbdmon}
%{sbindir}/drbdmon
+%{sbindir}/drbd-events-log-supplier
%endif
%ifarch %{ix86} x86_64
%dir %attr(700,root,root) %{_sysconfdir}/xen
@@ -225,6 +231,7 @@
%{_prefix}/lib/ocf/resource.d/linbit/drbd.shellfuncs.sh
%{_udevrulesdir}/65-drbd.rules
%{_unitdir}/drbd.service
+%{_unitdir}/drbd-graceful-shutdown.service
%{_unitdir}/drbd-lvchange@.service
%{_unitdir}/drbd-promote@.service
%{_unitdir}/drbd-demote-or-escalate@.service
++++++ 0001-drbd-verify.py-relax-host-key-checking.patch ++++++
From c72edcfbb0ec0ea587dd75be7c8fa5a407380ab4 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner(a)linbit.com>
Date: Mon, 4 Nov 2024 18:03:22 +0100
Subject: [PATCH 01/12] drbd-verify.py: relax host key checking
---
scripts/drbd-verify.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/drbd-verify.py b/scripts/drbd-verify.py
index 3699a1687fa4..4232cd911ecc 100755
--- a/scripts/drbd-verify.py
+++ b/scripts/drbd-verify.py
@@ -8,6 +8,7 @@ import sys
import re
import os
+ssh_opts = ['-oStrictHostKeyChecking=no']
events_re = re.compile(r'change peer-device name:(\S+) peer-node-id:(\d+) conn-name:(\S+) volume:0 replication:(\w+)->(\w+)')
progress_re = re.compile(r'change peer-device name:(\S+) peer-node-id:(\d+) conn-name:(\S+) volume:0 done:(\d+\.\d+)')
@@ -103,7 +104,7 @@ def verify_res(res_json, peers, mbr_only: bool, level2:bool):
if len(diskful_peers) >= 1:
for i, peer_json in enumerate(diskful_peers):
peer_name = peer_json['name']
- args = ['ssh', peer_name, '/tmp/' + this_prog_name, '--json']
+ args = ['ssh'] + ssh_opts + [peer_name, '/tmp/' + this_prog_name, '--json']
args += ['--resource', res_name, '--level2']
peers = [p['name'] for j, p in enumerate(diskful_peers) if j > i]
if peers:
@@ -114,7 +115,7 @@ def verify_res(res_json, peers, mbr_only: bool, level2:bool):
if level2:
continue
args.append('--mbr-only')
- subprocess.run(['scp', '-q', this_prog_path, '{}:/tmp/'.format(peer_name)])
+ subprocess.run(['scp'] + ssh_opts + ['-q', this_prog_path, '{}:/tmp/'.format(peer_name)])
with subprocess.Popen(args, stdout=subprocess.PIPE) as p:
peer_result = json.load(p.stdout)
result_json['oos'].update(peer_result[res_name]['oos'])
--
2.43.0
++++++ 0002-DRBDmon-Disabled-DRBD-commands-warning-only-for-actu.patch ++++++
From b37e33525eeff89d03cd6b98862d15f90aee7e15 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Fri, 26 Jul 2024 08:35:09 +0200
Subject: [PATCH 02/12] DRBDmon: Disabled DRBD commands warning only for actual
DRBD commands
---
user/drbdmon/terminal/DrbdCommandsImpl.cpp | 26 ++++++++++++----------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/user/drbdmon/terminal/DrbdCommandsImpl.cpp b/user/drbdmon/terminal/DrbdCommandsImpl.cpp
index 8b75a2aae8a7..006234f70df6 100644
--- a/user/drbdmon/terminal/DrbdCommandsImpl.cpp
+++ b/user/drbdmon/terminal/DrbdCommandsImpl.cpp
@@ -83,10 +83,10 @@ DrbdCommandsImpl::~DrbdCommandsImpl() noexcept
bool DrbdCommandsImpl::execute_command(const std::string& command, StringTokenizer& tokenizer)
{
bool processed = false;
- if (dsp_comp_hub.enable_drbd_actions)
+ Entry* const cmd_entry = cmd_map->get(&command);
+ if (cmd_entry != nullptr)
{
- Entry* const cmd_entry = cmd_map->get(&command);
- if (cmd_entry != nullptr)
+ if (dsp_comp_hub.enable_drbd_actions)
{
cmd_func_type cmd_func = cmd_entry->cmd_func;
try
@@ -109,16 +109,18 @@ bool DrbdCommandsImpl::execute_command(const std::string& command, StringTokeniz
);
}
}
+ else
+ {
+ const uint64_t msg_id = dsp_comp_hub.log->add_entry(
+ MessageLog::log_level::WARN,
+ "DRBD commands are currently disabled"
+ );
+ dsp_comp_hub.dsp_shared->message_id = msg_id;
+ dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::MSG_VIEWER);
+ }
+
}
- else
- {
- const uint64_t msg_id = dsp_comp_hub.log->add_entry(
- MessageLog::log_level::WARN,
- "DRBD commands are currently disabled"
- );
- dsp_comp_hub.dsp_shared->message_id = msg_id;
- dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::MSG_VIEWER);
- }
+
return processed;
}
--
2.43.0
++++++ 0003-DRBDmon-Integrate-global-local-command-delegation.patch ++++++
From 1053b3344c85646bbfbc59233a3d502183c3ea65 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Fri, 26 Jul 2024 08:37:09 +0200
Subject: [PATCH 03/12] DRBDmon: Integrate global/local command delegation
---
user/drbdmon/terminal/DisplayCommon.h | 12 +++++-----
user/drbdmon/terminal/DisplayCommonImpl.cpp | 20 ++++++++++-------
user/drbdmon/terminal/DisplayCommonImpl.h | 8 +++++--
user/drbdmon/terminal/MDspBase.cpp | 25 +++------------------
4 files changed, 28 insertions(+), 37 deletions(-)
diff --git a/user/drbdmon/terminal/DisplayCommon.h b/user/drbdmon/terminal/DisplayCommon.h
index 9160c3ddb215..b1b94e43e51f 100644
--- a/user/drbdmon/terminal/DisplayCommon.h
+++ b/user/drbdmon/terminal/DisplayCommon.h
@@ -2,6 +2,7 @@
#define DISPLAYCOMMON_H
#include <default_types.h>
+#include <terminal/ModularDisplay.h>
class DisplayCommon
{
@@ -16,9 +17,7 @@ class DisplayCommon
enum command_state_type : uint8_t
{
INPUT = 0,
- CANCEL = 1,
- CMD_LOCAL = 2,
- CMD_GLOBAL = 3
+ CANCEL = 1
};
virtual ~DisplayCommon() noexcept
@@ -47,9 +46,12 @@ class DisplayCommon
virtual void display_problem_mode_label(const bool using_problem_mode) const = 0;
virtual problem_mode_type get_problem_mode() const noexcept = 0;
virtual void toggle_problem_mode() noexcept = 0;
- virtual command_state_type command_line_key_pressed(const uint32_t key) const = 0;
+ virtual command_state_type command_line_key_pressed(
+ const uint32_t key,
+ ModularDisplay& display
+ ) const = 0;
virtual void activate_command_line() const = 0;
- virtual bool global_command() const = 0;
+ virtual bool execute_command(ModularDisplay& display) const = 0;
virtual void application_idle() const = 0;
virtual void application_working() const = 0;
};
diff --git a/user/drbdmon/terminal/DisplayCommonImpl.cpp b/user/drbdmon/terminal/DisplayCommonImpl.cpp
index 8427b2fc46a0..f3ceed782e02 100644
--- a/user/drbdmon/terminal/DisplayCommonImpl.cpp
+++ b/user/drbdmon/terminal/DisplayCommonImpl.cpp
@@ -706,7 +706,10 @@ void DisplayCommonImpl::toggle_problem_mode() noexcept
}
}
-DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed(const uint32_t key) const
+DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed(
+ const uint32_t key,
+ ModularDisplay& display
+) const
{
DisplayCommon::command_state_type state = DisplayCommon::command_state_type::INPUT;
if (key == KeyCodes::FUNC_12)
@@ -717,11 +720,8 @@ DisplayCommon::command_state_type DisplayCommonImpl::command_line_key_pressed(co
else
if (key == KeyCodes::ENTER)
{
- state = DisplayCommon::command_state_type::CMD_LOCAL;
- if (global_command())
- {
- state = DisplayCommon::command_state_type::CMD_GLOBAL;
- }
+ const bool processed = execute_command(display);
+ state = processed ? DisplayCommon::command_state_type::CANCEL : DisplayCommon::command_state_type::INPUT;
}
else
{
@@ -834,7 +834,7 @@ void DisplayCommonImpl::activate_command_line() const
}
}
-bool DisplayCommonImpl::global_command() const
+bool DisplayCommonImpl::execute_command(ModularDisplay& display) const
{
bool processed = false;
const std::string& command = dsp_comp_hub.command_line->get_text();
@@ -859,7 +859,11 @@ bool DisplayCommonImpl::global_command() const
processed = dsp_comp_hub.global_cmd_exec->execute_command(upper_keyword, tokenizer);
if (!processed)
{
- processed = dsp_comp_hub.drbd_cmd_exec->execute_command(upper_keyword, tokenizer);
+ processed = display.execute_command(upper_keyword, tokenizer);
+ if (!processed)
+ {
+ processed = dsp_comp_hub.drbd_cmd_exec->execute_command(upper_keyword, tokenizer);
+ }
}
}
}
diff --git a/user/drbdmon/terminal/DisplayCommonImpl.h b/user/drbdmon/terminal/DisplayCommonImpl.h
index 1ac7fafa6f96..8e09bfbe1eb7 100644
--- a/user/drbdmon/terminal/DisplayCommonImpl.h
+++ b/user/drbdmon/terminal/DisplayCommonImpl.h
@@ -3,6 +3,7 @@
#include <default_types.h>
#include <terminal/DisplayCommon.h>
+#include <terminal/ModularDisplay.h>
#include <terminal/DisplayIo.h>
#include <terminal/ComponentsHub.h>
#include <string>
@@ -35,9 +36,12 @@ class DisplayCommonImpl : public DisplayCommon
virtual void display_problem_mode_label(const bool using_problem_mode) const override;
virtual problem_mode_type get_problem_mode() const noexcept;
virtual void toggle_problem_mode() noexcept;
- virtual DisplayCommon::command_state_type command_line_key_pressed(const uint32_t key) const;
+ virtual command_state_type command_line_key_pressed(
+ const uint32_t key,
+ ModularDisplay& display
+ ) const override;
virtual void activate_command_line() const;
- virtual bool global_command() const override;
+ virtual bool execute_command(ModularDisplay& display) const override;
virtual void application_idle() const override;
virtual void application_working() const override;
diff --git a/user/drbdmon/terminal/MDspBase.cpp b/user/drbdmon/terminal/MDspBase.cpp
index 77bc86af6160..f95d3a21ac7f 100644
--- a/user/drbdmon/terminal/MDspBase.cpp
+++ b/user/drbdmon/terminal/MDspBase.cpp
@@ -176,29 +176,10 @@ bool MDspBase::key_pressed(const uint32_t key)
else
if (base_input_mode == base_input_mode_type::COMMAND)
{
- const DisplayCommon::command_state_type state = dsp_comp_hub.dsp_common->command_line_key_pressed(key);
- bool exit_cmd_mode = false;
- if (state == DisplayCommon::command_state_type::CMD_LOCAL)
- {
- StringTokenizer tokenizer(dsp_comp_hub.command_line->get_text(), DisplayConsts::CMD_TOKEN_DELIMITER);
- if (tokenizer.has_next())
- {
- std::string keyword(tokenizer.next());
- if (keyword.length() >= 2)
- {
- keyword.erase(0, 1);
- std::string upper_keyword = string_transformations::uppercase_copy_of(keyword);
- exit_cmd_mode = execute_command(upper_keyword, tokenizer);
- }
- }
- }
- else
+ const DisplayCommon::command_state_type state = dsp_comp_hub.dsp_common->command_line_key_pressed(
+ key, *this
+ );
if (state != DisplayCommon::command_state_type::INPUT)
- {
- exit_cmd_mode = true;
- }
-
- if (exit_cmd_mode)
{
base_input_mode = base_input_mode_type::GLOBAL_KEYS;
dsp_comp_hub.dsp_io->write_text(dsp_comp_hub.ansi_ctl->ANSI_CURSOR_OFF.c_str());
--
2.43.0
++++++ 0004-DRBDmon-Adjust-events-log-supplier-program-name.patch ++++++
From 4ecb776ed6b75d326624281b50f0a11adeca2e58 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Wed, 20 Nov 2024 18:44:19 +0100
Subject: [PATCH 04/12] DRBDmon: Adjust events log supplier program name
---
user/drbdmon/subprocess/EventsSourceSpawner.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/user/drbdmon/subprocess/EventsSourceSpawner.cpp b/user/drbdmon/subprocess/EventsSourceSpawner.cpp
index 20fa13bec0d8..1b50aa23b6d6 100644
--- a/user/drbdmon/subprocess/EventsSourceSpawner.cpp
+++ b/user/drbdmon/subprocess/EventsSourceSpawner.cpp
@@ -21,7 +21,7 @@ const char* const EventsSourceSpawner::EVENTS_PROGRAM_ARGS[] =
"all",
nullptr
};
-const char* const EventsSourceSpawner::SAVED_EVENTS_PROGRAM = "eventsfeeder";
+const char* const EventsSourceSpawner::SAVED_EVENTS_PROGRAM = "drbd-events-log-supplier";
EventsSourceSpawner::EventsSourceSpawner(MessageLog& logRef):
log(logRef)
--
2.43.0
++++++ 0005-DRBDmon-Add-drbd-events-log-supplier.patch ++++++
From 60c3ed545e1c36de25545656f5c6c586e548b852 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Wed, 20 Nov 2024 18:44:41 +0100
Subject: [PATCH 05/12] DRBDmon: Add drbd-events-log-supplier
---
user/drbdmon/drbd-events-log-supplier.cpp | 147 ++++++++++++++++++++++
1 file changed, 147 insertions(+)
create mode 100644 user/drbdmon/drbd-events-log-supplier.cpp
diff --git a/user/drbdmon/drbd-events-log-supplier.cpp b/user/drbdmon/drbd-events-log-supplier.cpp
new file mode 100644
index 000000000000..9fe48f0ccd71
--- /dev/null
+++ b/user/drbdmon/drbd-events-log-supplier.cpp
@@ -0,0 +1,147 @@
+#include <cstddef>
+#include <iostream>
+#include <fstream>
+#include <string>
+
+extern "C"
+{
+ #include <unistd.h>
+}
+
+constexpr int ERR_OUT_OF_MEMORY = 2;
+constexpr int ERR_IO = 3;
+
+const std::string INIT_STATE_SEPA("exists -");
+const size_t INIT_STATE_SEPA_LENGTH = INIT_STATE_SEPA.length();
+
+int process_events(const std::string& path);
+bool is_init_state_sepa(const std::string& event_line);
+
+/**
+ * DRBD events log file supplier for DRBDmon
+ */
+int main(int argc, char* argv[])
+{
+ int exit_code = EXIT_FAILURE;
+
+ try
+ {
+ if (argc == 2)
+ {
+ std::string path(argv[1]);
+ exit_code = process_events(path);
+ }
+ else
+ {
+ std::cerr << "DRBD Events Log File Supplier | Arguments:\n" <<
+ " path .......... Path to a file containing DBRD event lines\n";
+ }
+ }
+ catch (std::bad_alloc&)
+ {
+ std::cerr << "Out of memory" << std::endl;
+ exit_code = ERR_OUT_OF_MEMORY;
+ }
+
+ std::cout << std::flush;
+ std::cerr << std::flush;
+
+ return exit_code;
+}
+
+/**
+ * Emits event lines from an events log file and appends the initial state separator
+ * if it is absent from the file. The output is stdout, which DRBDmon pipes to itself.
+ *
+ * DRBDmon recovers its events source process by respawning it if it exits for any reason.
+ * Therefore, this method does not return if successful, instead, it will
+ * suspend indefinitely. DRBDmon will terminate this process when the user exits DRBDmon.
+ */
+int process_events(const std::string& path)
+{
+ int rc = ERR_IO;
+
+ // Internal pipe used for suspending execution
+ int pipe_fd[2];
+ int pipe_rc = pipe(pipe_fd);
+ if (pipe_rc == 0)
+ {
+ std::ifstream in_file(path);
+ if (in_file.good())
+ {
+ bool have_init_state_sepa = false;
+
+ // Emit events from the file to DRBDmon
+ std::string event_line;
+ while (in_file.good())
+ {
+ std::getline(in_file, event_line);
+ if (event_line.length() > 0)
+ {
+ std::cout << event_line << '\n';
+ }
+ if (is_init_state_sepa(event_line))
+ {
+ have_init_state_sepa = true;
+ }
+
+ event_line.clear();
+ }
+
+ if (in_file.eof())
+ {
+ // If there was no initial state separator in the events log file,
+ // emit one to DRBDmon
+ if (!have_init_state_sepa)
+ {
+ std::cout << INIT_STATE_SEPA << '\n';
+ }
+ std::cout << std::flush;
+
+ rc = EXIT_SUCCESS;
+
+ // Suspend execution indefinitely. DRBDmon will terminate this process when it exits.
+ char in_char = 0;
+ const ssize_t read_count = read(pipe_fd[0], &in_char, 1);
+ // Nothing to do with that result...
+ static_cast<void> (read_count);
+ }
+ else
+ {
+ // I/O failed before the entire file was processed, I/O error.
+ std::cerr << "I/O error while reading DRBD events file \"" << path << "\"\n";
+ }
+ }
+ else
+ {
+ // Cannot open/read the file. Typically a non-existent path/file or permissions problem.
+ std::cerr << "I/O error, cannot read DRBD events file \"" << path << "\"\n";
+ }
+ }
+ else
+ {
+ // Cannot create the pipe used for suspending.
+ // Typically a resource exhaustion problem, e.g. the OS being out of memory.
+ std::cerr << "I/O error, pipe creation failed\n";
+ }
+
+ return rc;
+}
+
+/**
+ * Checks whether an events line is the initial state separator
+ */
+bool is_init_state_sepa(const std::string& event_line)
+{
+ bool result = false;
+ if (event_line.length() >= INIT_STATE_SEPA_LENGTH)
+ {
+ size_t idx = 0;
+ while (idx < INIT_STATE_SEPA_LENGTH && event_line[idx] == INIT_STATE_SEPA[idx])
+ {
+ ++idx;
+ }
+ result = idx == INIT_STATE_SEPA_LENGTH;
+ }
+ return result;
+}
--
2.43.0
++++++ 0006-DRBDmon-Adjust-Makefile.patch ++++++
From 5611462e6e157e23e9571bfd364cb22ec17b91b6 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Wed, 20 Nov 2024 18:45:11 +0100
Subject: [PATCH 06/12] DRBDmon: Adjust Makefile
---
drbd.spec.in | 1 +
user/drbdmon/Makefile.in | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drbd.spec.in b/drbd.spec.in
index 0205776f2618..9559e2950e13 100644
--- a/drbd.spec.in
+++ b/drbd.spec.in
@@ -155,6 +155,7 @@ This packages includes the DRBD administration tools.
%endif
%if %{with drbdmon}
%{_sbindir}/drbdmon
+%{_sbindir}/drbd-events-log-supplier
%endif
%if "%{initscripttype}" == "sysv"
%{_initddir}/drbd
diff --git a/user/drbdmon/Makefile.in b/user/drbdmon/Makefile.in
index 36673b19c857..9c5427e9b22a 100644
--- a/user/drbdmon/Makefile.in
+++ b/user/drbdmon/Makefile.in
@@ -16,7 +16,7 @@ else
DESTDIR ?= /
endif
-binaries := drbdmon
+binaries := drbdmon drbd-events-log-supplier
ifeq ($(WITH_DRBDMON),yes)
all: $(binaries)
@@ -28,6 +28,7 @@ PHONY := all
dsaext-obj := cppdsaext/src/dsaext.o
integerparse-obj := cppdsaext/src/integerparse.o
+supplier-obj := drbd-events-log-supplier.o
l-obj := DrbdMon.o DrbdMonConsts.o MessageLog.o IntervalTimer.o SubProcessNotification.o
l-obj += MessageLogNotification.o
@@ -77,6 +78,9 @@ $(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerpar
drbdmon: $(ls-obj)
$(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS)
+drbd-events-log-supplier: $(supplier-obj)
+ $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^
+
# do not try to rebuild Makefile itself
Makefile: ;
@@ -89,16 +93,18 @@ Makefile: ;
install:
ifeq ($(WITH_DRBDMON),yes)
install -m 755 drbdmon $(DESTDIR)$(sbindir)
+ install -m 755 drbd-events-log-supplier $(DESTDIR)$(sbindir)
endif
uninstall:
ifeq ($(WITH_DRBDMON),yes)
rm -f $(DESTDIR)$(sbindir)/drbdmon
+ rm -r $(DESTDIR)$(sbindir)/drbd-events-log-supplier
endif
PHONY += clean distclean
clean:
- rm -f $(local-obj) $(dsaext-obj) $(integerparse-obj) $(binaries)
+ rm -f $(local-obj) $(dsaext-obj) $(integerparse-obj) $(supplier-obj) $(binaries)
distclean: clean
rm -f $(local-dep)
--
2.43.0
++++++ 0007-DRBDmon-Version-V1R4M1.patch ++++++
From 17c3bc04145900b0039a686b4e2cc28f9d5f3859 Mon Sep 17 00:00:00 2001
From: Robert Altnoeder <robert.altnoeder(a)linbit.com>
Date: Mon, 4 Nov 2024 19:13:46 +0100
Subject: [PATCH 07/12] DRBDmon: Version V1R4M1
---
user/drbdmon/DrbdMonConsts.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/user/drbdmon/DrbdMonConsts.cpp b/user/drbdmon/DrbdMonConsts.cpp
index 6b130db93156..5135d636bd2a 100644
--- a/user/drbdmon/DrbdMonConsts.cpp
+++ b/user/drbdmon/DrbdMonConsts.cpp
@@ -7,6 +7,6 @@ extern "C"
}
const std::string DrbdMonConsts::PROGRAM_NAME = "DRBDmon";
-const std::string DrbdMonConsts::PROJECT_VERSION = "V1R4M0";
+const std::string DrbdMonConsts::PROJECT_VERSION = "V1R4M1";
const std::string DrbdMonConsts::UTILS_VERSION = PACKAGE_VERSION;
const std::string DrbdMonConsts::BUILD_HASH = GITHASH;
--
2.43.0
++++++ 0008-drbdadm-add-proxy-options-to-add-connection-command.patch ++++++
From 9dab78b5822d59a13e767ef20fdffab46f79cb25 Mon Sep 17 00:00:00 2001
From: Joel Colledge <joel.colledge(a)linbit.com>
Date: Thu, 21 Nov 2024 09:55:26 +0100
Subject: [PATCH 08/12] drbdadm: add proxy options to 'add connection' command
Some options such as rcvbuf-size must be set before attempting to
connect. Proxy v3 used ugly hacks to allow time for the options to
arrive before connecting. Proxy v4 does not use this approach. Instead
it requires the options to be set on the command line for 'add
connection'.
The additional options are ignored by Proxy v3 with a "trailing garbage"
warning.
We continue to set the properties using 'set' commands as well to retain
compatibility with Proxy v3. Proxy v4 ignores 'set' commands which do
not change the value of the option.
So this is compatible with Proxy v3 and v4.
---
user/v9/drbdadm_main.c | 38 ++++++++++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
index 74cf60365a6d..a983a9463fb8 100644
--- a/user/v9/drbdadm_main.c
+++ b/user/v9/drbdadm_main.c
@@ -2043,19 +2043,33 @@ char *_proxy_connection_name(char *conn_name, const struct d_resource *res, cons
return conn_name;
}
+#define ADD_CONNECTION_MAX_LEN 4096
+
static int do_proxy_conn_up(const struct cfg_ctx *ctx)
{
const char *argv[4] = { drbd_proxy_ctl, "-c", NULL, NULL };
struct connection *conn = ctx->conn;
struct path *path = STAILQ_FIRST(&conn->paths); /* multiple paths via proxy, later! */
char *conn_name;
+ char *buffer;
+ char *buffer_pos;
+ int buffer_remaining;
+ int n;
+ struct d_option *opt;
+ int rv = -1;
if (!path->my_proxy || !path->peer_proxy)
return 0;
conn_name = proxy_connection_name(ctx->res, conn);
- argv[2] = ssprintf(
+ buffer_remaining = ADD_CONNECTION_MAX_LEN;
+ buffer = checked_malloc(buffer_remaining);
+ buffer_pos = buffer;
+
+ n = snprintf(
+ buffer_pos,
+ buffer_remaining,
"add connection %s %s:%s %s:%s %s:%s %s:%s",
conn_name,
path->my_proxy->inside.addr,
@@ -2066,8 +2080,28 @@ static int do_proxy_conn_up(const struct cfg_ctx *ctx)
path->my_proxy->outside.port,
path->my_address->addr,
path->my_address->port);
+ if (n < 0 || n >= buffer_remaining)
+ goto out;
+ buffer_pos += n;
+ buffer_remaining -= n;
- return m_system_ex(argv, SLEEPS_SHORT, ctx->res->name);
+ STAILQ_FOREACH(opt, &path->my_proxy->options, link) {
+ n = snprintf(
+ buffer_pos,
+ buffer_remaining,
+ " --%s=%s",
+ opt->name, opt->value);
+ if (n < 0 || n >= buffer_remaining)
+ goto out;
+ buffer_pos += n;
+ buffer_remaining -= n;
+ }
+
+ argv[2] = buffer;
+ rv = m_system_ex(argv, SLEEPS_SHORT, ctx->res->name);
+out:
+ free(buffer);
+ return rv;
}
static int do_proxy_conn_plugins(const struct cfg_ctx *ctx)
--
2.43.0
++++++ 0009-Do-not-hardcode-paths-in-services-and-scripts.patch ++++++
by heming.zhao(a)suse.com
remove the patch of scripts/.gitignore for following complain msg:
```
+ /usr/lib/rpm/rpmuncompress /usr/src/packages/SOURCES/0009-Do-not-hardcode-paths-in-services-and-scripts.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
The text leading up to this was:
--------------------------
|diff --git a/scripts/.gitignore b/scripts/.gitignore
|index a307904047f8..ba121127c341 100644
|--- a/scripts/.gitignore
|+++ b/scripts/.gitignore
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
```
From 080e93bd9bcf546cd3a9870ae1add2469a2a4e24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20Wanzenb=C3=B6ck?= <moritz.wanzenboeck(a)linbit.com>
Date: Fri, 20 Sep 2024 10:30:24 +0200
Subject: [PATCH 09/12] Do not hardcode paths in services and scripts
This fixes issues when drbd-utils get installed to non-standard locations.
Since the autoconf generated Makefile should still allow override on install,
we have to use a new target to do our own expansion. The implementation is
lifted from the autconf manual:
info autoconf "Installation Directory Variables"
# Conflicts:
# scripts/.gitignore
# scripts/Makefile.in
---
configure.ac | 2 +-
scripts/.gitignore | 8 +++++++
scripts/Makefile.in | 23 +++++++++++++++----
...ce => drbd-demote-or-escalate@.service.in} | 2 +-
...vice => drbd-graceful-shutdown.service.in} | 2 +-
scripts/drbd-promote@.service.in | 4 ++--
...-reconfigure-suspend-or-error@.service.in} | 4 ++--
...ervice-shim.sh => drbd-service-shim.sh.in} | 18 +++++++--------
...rvice => drbd-wait-promotable@.service.in} | 2 +-
scripts/{drbd.service => drbd.service.in} | 6 ++---
scripts/{drbd@.service => drbd@.service.in} | 6 ++---
.../{ocf.ra@.service => ocf.ra@.service.in} | 4 ++--
12 files changed, 51 insertions(+), 30 deletions(-)
rename scripts/{drbd-demote-or-escalate@.service => drbd-demote-or-escalate@.service.in} (92%)
rename scripts/{drbd-graceful-shutdown.service => drbd-graceful-shutdown.service.in} (88%)
rename scripts/{drbd-reconfigure-suspend-or-error@.service => drbd-reconfigure-suspend-or-error@.service.in} (71%)
rename scripts/{drbd-service-shim.sh => drbd-service-shim.sh.in} (81%)
rename scripts/{drbd-wait-promotable@.service => drbd-wait-promotable@.service.in} (84%)
rename scripts/{drbd.service => drbd.service.in} (80%)
rename scripts/{drbd@.service => drbd@.service.in} (87%)
rename scripts/{ocf.ra@.service => ocf.ra@.service.in} (85%)
diff --git a/configure.ac b/configure.ac
index cd166bbafbc0..630163cee103 100644
--- a/configure.ac
+++ b/configure.ac
@@ -525,7 +525,7 @@ fi
dnl The configuration files we create (from their .in template)
if test -z $SPECMODE; then
- AC_CONFIG_FILES(Makefile user/shared/Makefile user/v9/Makefile user/v84/Makefile scripts/Makefile scripts/drbd.rules user/windrbd/Makefile user/drbdmon/Makefile documentation/common/Makefile_v84_com documentation/common/Makefile_v9_com)
+ AC_CONFIG_FILES(Makefile user/shared/Makefile user/v9/Makefile user/v84/Makefile scripts/Makefile user/windrbd/Makefile user/drbdmon/Makefile documentation/common/Makefile_v84_com documentation/common/Makefile_v9_com)
AC_CONFIG_HEADERS(user/shared/config.h)
else
AC_CONFIG_FILES(drbd.spec)
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 7652ee872500..001d08da54e4 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -67,9 +67,20 @@ SYSTEMD_TEMPLATES += drbd-wait-promotable@.service
SYSTEMD_UNITS = drbd.service
SYSTEMD_UNITS += drbd-graceful-shutdown.service
-SERVICE_TEMPLATES = drbd-promote@.service
+UDEV_TEMPLATES = drbd.rules
-TEMPLATES := $(SERVICE_TEMPLATES)
+SERVICE_TEMPLATES = drbd.service
+SERVICE_TEMPLATES += drbd@.service
+SERVICE_TEMPLATES += drbd-demote-or-escalate@.service
+SERVICE_TEMPLATES += drbd-graceful-shutdown.service
+SERVICE_TEMPLATES += drbd-promote@.service
+SERVICE_TEMPLATES += drbd-reconfigure-suspend-or-error@.service
+SERVICE_TEMPLATES += drbd-wait-promotable@.service
+SERVICE_TEMPLATES += ocf.ra@.service
+
+SCRIPT_TEMPLATES = drbd-service-shim.sh
+
+TEMPLATES := $(SCRIPT_TEMPLATES) $(SERVICE_TEMPLATES) $(UDEV_TEMPLATES)
# variables meant to be overridden from the make command line
ifeq ($(WITH_WINDRBD),yes)
@@ -82,7 +93,7 @@ all: $(TEMPLATES)
install: install-utils install-udev install-xen install-heartbeat install-pacemaker install-rgmanager install-bashcompletion
-install-utils: $(SERVICE_TEMPLATES)
+install-utils: $(SERVICE_TEMPLATES) $(SCRIPT_TEMPLATES)
install -d $(DESTDIR)$(LIBDIR)
# "sysv" or "both"
ifeq ($(subst both,sysv,$(initscripttype)),sysv)
@@ -172,7 +183,7 @@ ifeq ($(WITH_XEN),yes)
install -m 755 block-drbd $(DESTDIR)$(sysconfdir)/xen/scripts
endif
-install-udev:
+install-udev: $(UDEV_TEMPLATES)
ifeq ($(WITH_UDEV),yes)
mkdir -p $(DESTDIR)$(udevrulesdir)
install -m 644 drbd.rules $(DESTDIR)$(udevrulesdir)/65-drbd.rules$(UDEV_RULE_SUFFIX)
@@ -214,7 +225,9 @@ Makefile.in: ;
Makefile: Makefile.in ../config.status
cd .. && ./config.status scripts/Makefile
-edit = sed -e ''
+edit = sed -e '' \
+ -e 's|@sbindir[@]|$(sbindir)|g' \
+ -e 's|@libdir[@]|$(LIBDIR)|g' \
ifeq ($(SYSTEMD_EXEC_CONDITION),no)
edit += -e 's|^ExecCondition=|ExecStart=|'
diff --git a/scripts/drbd-demote-or-escalate@.service b/scripts/drbd-demote-or-escalate@.service.in
similarity index 92%
rename from scripts/drbd-demote-or-escalate@.service
rename to scripts/drbd-demote-or-escalate@.service.in
index 2093223847b4..f5e123199323 100644
--- a/scripts/drbd-demote-or-escalate@.service
+++ b/scripts/drbd-demote-or-escalate@.service.in
@@ -28,5 +28,5 @@ TimeoutSec=60
# "Type=forking" would be an option to have it retry a number of times,
# and then only escalate to FailureAction if that did not help.
Type=oneshot
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I
+ExecStart=@libdir@/scripts/drbd-service-shim.sh secondary-or-escalate %I
ExecStopPost=-/bin/journalctl --sync
diff --git a/scripts/drbd-graceful-shutdown.service b/scripts/drbd-graceful-shutdown.service.in
similarity index 88%
rename from scripts/drbd-graceful-shutdown.service
rename to scripts/drbd-graceful-shutdown.service.in
index b6e8a149d051..6118d880d8fb 100644
--- a/scripts/drbd-graceful-shutdown.service
+++ b/scripts/drbd-graceful-shutdown.service.in
@@ -13,4 +13,4 @@ Before=drbd.service drbd@.service
Type=oneshot
RemainAfterExit=yes
-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh down all
+ExecStop=@libdir@/scripts/drbd-service-shim.sh down all
diff --git a/scripts/drbd-promote@.service.in b/scripts/drbd-promote@.service.in
index 71345d9b723d..23e74c282250 100644
--- a/scripts/drbd-promote@.service.in
+++ b/scripts/drbd-promote@.service.in
@@ -24,5 +24,5 @@ RemainAfterExit=yes
# (ab)using systemd features
# if we cannot configure and promote, that's a condition, not a failure
# See the comment above wrt. FailureAction vs OnFailure
-ExecCondition=/lib/drbd/scripts/drbd-service-shim.sh primary %I
-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh secondary %I
+ExecCondition=@libdir@/scripts/drbd-service-shim.sh primary %I
+ExecStop=@libdir@/scripts/drbd-service-shim.sh secondary %I
diff --git a/scripts/drbd-reconfigure-suspend-or-error@.service b/scripts/drbd-reconfigure-suspend-or-error@.service.in
similarity index 71%
rename from scripts/drbd-reconfigure-suspend-or-error@.service
rename to scripts/drbd-reconfigure-suspend-or-error@.service.in
index c0e59e5e72d3..6a0a2584e3a6 100644
--- a/scripts/drbd-reconfigure-suspend-or-error@.service
+++ b/scripts/drbd-reconfigure-suspend-or-error@.service.in
@@ -10,5 +10,5 @@ RefuseManualStop=yes
SyslogIdentifier=drbd-%I
Type=oneshot
RemainAfterExit=yes
-ExecStop=-/usr/sbin/drbdsetup resource-options --on-no-quorum io-error --on-no-data io-error %I
-ExecStart=-/usr/sbin/drbdsetup resource-options --on-no-quorum suspend-io --on-no-data suspend-io %I
+ExecStop=-@sbindir@/drbdsetup resource-options --on-no-quorum io-error --on-no-data io-error %I
+ExecStart=-@sbindir@/drbdsetup resource-options --on-no-quorum suspend-io --on-no-data suspend-io %I
diff --git a/scripts/drbd-service-shim.sh b/scripts/drbd-service-shim.sh.in
similarity index 81%
rename from scripts/drbd-service-shim.sh
rename to scripts/drbd-service-shim.sh.in
index 786387463891..56029bdcebe2 100755
--- a/scripts/drbd-service-shim.sh
+++ b/scripts/drbd-service-shim.sh.in
@@ -14,7 +14,7 @@ secondary_check() {
local ex_secondary current_state opts
opts="$1"
- /usr/sbin/drbdsetup secondary $opts "$res"
+ @sbindir@/drbdsetup secondary $opts "$res"
ex_secondary=$?
case $ex_secondary in
0)
@@ -26,7 +26,7 @@ secondary_check() {
# any other special treatment for special exit codes?
*)
# double check for "resource does not exist"
- current_state=$(/usr/sbin/drbdsetup events2 --now "$res")
+ current_state=$(@sbindir@/drbdsetup events2 --now "$res")
if [[ $current_state = "exists -" ]]; then
echo >&2 "<7>not even configured"
return 0
@@ -40,23 +40,23 @@ secondary_check() {
case "$cmd" in
adjust)
- exec /usr/sbin/drbdadm adjust "$res"
+ exec @sbindir@/drbdadm adjust "$res"
;;
down)
- exec /usr/sbin/drbdsetup down "$res"
+ exec @sbindir@/drbdsetup down "$res"
;;
primary)
- exec /usr/sbin/drbdsetup primary "$res"
+ exec @sbindir@/drbdsetup primary "$res"
;;
secondary)
- exec /usr/sbin/drbdsetup secondary "$res"
+ exec @sbindir@/drbdsetup secondary "$res"
;;
secondary-force)
- exec /usr/sbin/drbdsetup secondary --force=yes "$res"
+ exec @sbindir@/drbdsetup secondary --force=yes "$res"
;;
secondary-secondary-force)
- /usr/sbin/drbdsetup secondary "$res" && exit 0
- exec /usr/sbin/drbdsetup secondary --force=yes "$res"
+ @sbindir@/drbdsetup secondary "$res" && exit 0
+ exec @sbindir@/drbdsetup secondary --force=yes "$res"
;;
secondary*-or-escalate)
# Log something and try to get journald to flush its logs
diff --git a/scripts/drbd-wait-promotable@.service b/scripts/drbd-wait-promotable@.service.in
similarity index 84%
rename from scripts/drbd-wait-promotable@.service
rename to scripts/drbd-wait-promotable@.service.in
index 81c3789f5a4c..f416274839e9 100644
--- a/scripts/drbd-wait-promotable@.service
+++ b/scripts/drbd-wait-promotable@.service.in
@@ -10,7 +10,7 @@ Type=oneshot
# on first start, wait for access to "good data"
# let systemd handle timeouts
-ExecStart=/lib/drbd/scripts/drbd-wait-promotable.sh %I
+ExecStart=@libdir@/scripts/drbd-wait-promotable.sh %I
RemainAfterExit=yes
[Install]
diff --git a/scripts/drbd.service b/scripts/drbd.service.in
similarity index 80%
rename from scripts/drbd.service
rename to scripts/drbd.service.in
index 96c599e75042..8bfeb17cb91d 100644
--- a/scripts/drbd.service
+++ b/scripts/drbd.service.in
@@ -12,11 +12,11 @@ RemainAfterExit=yes
# A check for INIT_VERSION already exists, just set it to something.
Environment=INIT_VERSION=systemd
-ExecStart=/lib/drbd/scripts/drbd start
-ExecStop=/lib/drbd/scripts/drbd stop
+ExecStart=@libdir@/scripts/drbd start
+ExecStop=@libdir@/scripts/drbd stop
# Re-adjust everything on reload
-ExecReload=/lib/drbd/scripts/drbd reload
+ExecReload=@libdir@/scripts/drbd reload
[Install]
WantedBy=multi-user.target
diff --git a/scripts/drbd@.service b/scripts/drbd@.service.in
similarity index 87%
rename from scripts/drbd@.service
rename to scripts/drbd@.service.in
index 0fad10be237e..ab1c044cdeb1 100644
--- a/scripts/drbd@.service
+++ b/scripts/drbd@.service.in
@@ -35,8 +35,8 @@ RemainAfterExit=yes
# depends... do we want this as ExecCondition or as ExecStart
# failed start is "failed", failed condition is just "not startable yet"
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
-ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
+ExecStart=@libdir@/scripts/drbd-service-shim.sh adjust %I
+ExecReload=@libdir@/scripts/drbd-service-shim.sh adjust %I
# can only succeed, if you first stop all depending services
-ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I
+ExecStopPost=@libdir@/scripts/drbd-service-shim.sh down %I
diff --git a/scripts/ocf.ra@.service b/scripts/ocf.ra@.service.in
similarity index 85%
rename from scripts/ocf.ra@.service
rename to scripts/ocf.ra@.service.in
index 9c2268a615a7..4779706a8853 100644
--- a/scripts/ocf.ra@.service
+++ b/scripts/ocf.ra@.service.in
@@ -22,5 +22,5 @@ Environment=monitor_inverval=30
# Only the first argument is used by the wrapper,
# the %n is just to identify which is which in the process list.
# All parameterization is done via Environment= in per instance override.conf
-ExecStart=/lib/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n
-ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n
+ExecStart=@libdir@/scripts/ocf.ra.wrapper.sh start-and-monitor %n
+ExecStopPost=@libdir@/scripts/ocf.ra.wrapper.sh stop %n
--
2.43.0
++++++ 0010-Fix-typo-in-warning-there-is-no-po4a-translage-comma.patch ++++++
From ee3ab4a67f15fadff72995e45defcbf1e944c9bd Mon Sep 17 00:00:00 2001
From: Ulf 'Tiggi' Tigerstedt <ulf.tigerstedt(a)csc.fi>
Date: Mon, 16 Dec 2024 15:54:37 +0200
Subject: [PATCH 10/12] Fix typo in warning, there is no po4a-translage command
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 630163cee103..4377f3c24a08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,7 +332,7 @@ else
fi
if test -z $PO4A_TRANSLATE; then
- AC_MSG_WARN([Cannot build man pages without po4a-translage. You may safely ignore this warning when building from a tarball.])
+ AC_MSG_WARN([Cannot build man pages without po4a-translate. You may safely ignore this warning when building from a tarball.])
dnl default to some sane value at least,
dnl so the error message about command not found makes sense
PO4A_TRANSLATE=po4a-translate
--
2.43.0
++++++ 0011-drbd.ocf-explicitly-timeout-crm_master-IPC-early.patch ++++++
From 077a313e9fcacf0b12a35e8094bfdba6ac8aa0d4 Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg(a)linbit.com>
Date: Fri, 6 Dec 2024 15:31:01 +0100
Subject: [PATCH 11/12] drbd.ocf: explicitly timeout crm_master IPC early
Some environments are notorious for timing out in crm_master
one out of ten thousand times. You don't want to know the details.
That would then cause a timeout on the monitor action,
and pacemaker would feel the need to "recover" from "resource failure",
spuriously restarting everything that depends on the DRBD resources.
If we fail to update the "master score" in time,
we can still report the operation result.
The next monitor action will happen,
and we get an other attempt at updating the master score.
If that update was relevant, worst case it is now delayed.
Better than the previous worst case, operation timeout
interpreted as resource failure.
---
scripts/drbd.ocf | 44 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index 1d051baa550d..c31858343ba4 100755
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -53,6 +53,7 @@
# OCF_RESKEY_CRM_meta_master_max
# OCF_RESKEY_CRM_meta_master_node_max
#
+# OCF_RESKEY_CRM_meta_timeout
# OCF_RESKEY_CRM_meta_interval
#
# OCF_RESKEY_CRM_meta_notify
@@ -515,22 +516,55 @@ if $USE_DEBUG_LOG ; then
fi
do_cmd_success_log_level=""
-do_cmd() {
+do_cmd() { __do_cmd_with_timeout "" "$@"; }
+do_cmd_CRM_meta_timeout()
+{
+ local timeout=$(( ($OCF_RESKEY_CRM_meta_timeout - 500 - $SECONDS*1000) / 1000 ))
+ # if we are short on time already,
+ # try to get away with whatever time is left
+ (( timeout > 0 )) || timeout=0
+ __do_cmd_with_timeout "$timeout" "$@";
+}
+__do_cmd_with_timeout() {
# Run a command, return its exit code, capture any output, and log
# everything if appropriate.
+ # use coreutils "timeout", if timeout is != 0.
+ local timeout=$1; shift
local cmd="$*" cmd_out cmd_err ret=125
local success_log_level=${do_cmd_success_log_level:-debug}
local failure_log_level=${do_cmd_failure_log_level:-err}
ocf_log debug "$DRBD_RESOURCE: Calling $cmd"
+ if [[ $timeout =~ ^[1-9][0-9]*$ ]]; then
+ timeout="-t $timeout"
+ else
+ timeout=""
+ fi
+
+ local pipe
+ local pipe_pid
+ local result
+
# capture stdout, stderr, and exit code
- eval "$(exec 3>&1;
+ if exec {pipe}< <(exec 3>&1;
printf "cmd_err=%q\n" \
"$( exec 2>&1 1>&3 3>&-; \
out=$( "$@" ); \
ex=$?; \
printf "cmd_out=%q\nret=%q\n" "$out" "$ex" )"
- )"
+ )
+ then
+ pipe_pid=$!
+
+ read -r -d "" -u $pipe $timeout result
+ if (( $? > 128 )) ; then
+ kill -KILL $pipe_pid
+ # wait $pipe_pid
+ fi
+ exec {pipe}<&-
+
+ eval "$result"
+ fi
if [ $ret != 0 ]; then
ocf_log $failure_log_level "$DRBD_RESOURCE: Called $cmd"
@@ -585,13 +619,13 @@ set_master_score() {
if [[ $1 -le 0 ]]; then
remove_master_score
else
- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 &&
+ do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 &&
current_master_score=$1
fi
}
remove_master_score() {
- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
+ do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -l reboot -D
current_master_score=""
}
--
2.43.0
++++++ 0012-drbd.ocf-the-text-output-of-crm_resource-locate-has-.patch ++++++
From 0a014f290802e0221d06bb52a74c2e29f11ef02e Mon Sep 17 00:00:00 2001
From: Lars Ellenberg <lars.ellenberg(a)linbit.com>
Date: Fri, 6 Dec 2024 15:35:58 +0100
Subject: [PATCH 12/12] drbd.ocf: the text output of "crm_resource --locate"
has changed
"Recent" Pacemaker reports "Promoted" instead of "Master" for promoted resources.
Recognize that.
This change was made quite a while ago, but the resource agent parameter
remove_master_score_if_peer_primary=unexpected
is little known and rarely in use, so no-one noticed.
---
scripts/drbd.ocf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf
index c31858343ba4..34d208f22dd5 100755
--- a/scripts/drbd.ocf
+++ b/scripts/drbd.ocf
@@ -1021,7 +1021,7 @@ crm_resource_locate_master()
called_crm_resource_locate=true
DRBD_PRIMARY_PEER_according_to_pcmk=$(
crm_resource --resource "$OCF_RESOURCE_INSTANCE" --locate 2>/dev/null |
- sed -ne 's/^.*is running on: \([^ ]*\) Master.*$/\1/p' |
+ sed -ne 's/^.*is running on: \([^ ]*\) \(Master\|Promoted\).*$/\1/p' |
grep -vix -m1 -e "$HOSTNAME")
}
--
2.43.0
++++++ bsc-1233273_drbd.ocf-replace-crm_master-with-ocf_promotion_score.patch ++++++
--- /var/tmp/diff_new_pack.PK99bZ/_old 2025-01-09 15:11:27.534310033 +0100
+++ /var/tmp/diff_new_pack.PK99bZ/_new 2025-01-09 15:11:27.538310198 +0100
@@ -57,15 +57,15 @@
if [[ $1 -le 0 ]]; then
remove_master_score
else
-- do_cmd ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 &&
-+ do_cmd ocf_promotion_score -Q -v $1 &&
+- do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -Q -l reboot -v $1 &&
++ do_cmd_CRM_meta_timeout ocf_promotion_score -Q -v $1 &&
current_master_score=$1
fi
}
remove_master_score() {
-- do_cmd ${HA_SBIN_DIR}/crm_master -l reboot -D
-+ do_cmd ocf_promotion_score -D
+- do_cmd_CRM_meta_timeout ${HA_SBIN_DIR}/crm_master -l reboot -D
++ do_cmd_CRM_meta_timeout ocf_promotion_score -D
current_master_score=""
}
++++++ drbd-utils-9.25.0.tar.gz -> drbd-utils-9.29.0.tar.gz ++++++
++++ 36828 lines of diff (skipped)
++++++ fence-after-pacemaker-down.patch ++++++
--- /var/tmp/diff_new_pack.PK99bZ/_old 2025-01-09 15:11:27.870323951 +0100
+++ /var/tmp/diff_new_pack.PK99bZ/_new 2025-01-09 15:11:27.870323951 +0100
@@ -2,7 +2,7 @@
--- drbd-utils-8.9.6.orig/scripts/crm-fence-peer.sh 2016-03-14 15:54:38.701360775 +0800
+++ drbd-utils-8.9.6/scripts/crm-fence-peer.sh 2016-03-14 16:00:06.333338664 +0800
@@ -531,6 +531,25 @@
- [[ $crmd = "banned" ]] && will_fence=true
+ [[ $join = "banned" ]] && will_fence=true
if [[ ${expected-down} = "down" && $in_ccm = "false" && $crmd != "online" ]]; then
: "pacemaker considers this as clean down"
+ elif [[ $crmd/$join/$expected = "offline/down/down" ]] ; then
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package nethack for openSUSE:Factory checked in at 2025-01-09 15:09:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nethack (Old)
and /work/SRC/openSUSE:Factory/.nethack.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nethack"
Thu Jan 9 15:09:33 2025 rev:4 rq:1235878 version:3.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/nethack/nethack.changes 2025-01-07 20:54:23.763336227 +0100
+++ /work/SRC/openSUSE:Factory/.nethack.new.1881/nethack.changes 2025-01-09 15:11:21.958079049 +0100
@@ -1,0 +2,56 @@
+Wed Jan 8 09:47:32 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Add nethack-escape-char.patch: Split off from nethack-misc.patch,
+ this patch contains a fix for input handling.
+
+- Add nethack-secure.patch: Improve support for SECURE in recover
+ utility. Does not affect the game binary. Taken from nethack-misc.patch.
+
+- Modify nethack-config.patch: When patching Makefiles, also fix the
+ paths in the documentation to match openSUSE systems.
+
+- Drop nethack-misc.patch: The patch has been split and its content
+ moved to other patch files.
+
+-------------------------------------------------------------------
+Wed Jan 8 09:31:10 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Modify nethack-gzip.patch: Point COMPRESS to /usr/bin/gzip and avoid
+ the symlink /bin. The top-level /bin directory is supposed to go away.
+
+-------------------------------------------------------------------
+Wed Jan 8 09:18:19 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Modify nethack-config.patch: The patch enabled building a number of
+ files for X11, which we don't support. Remove them from the build.
+
+-------------------------------------------------------------------
+Wed Jan 8 09:14:27 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Drop nethack-syscall.patch: The patch only affects builds with GNOME
+ support, which we don't do.
+
+-------------------------------------------------------------------
+Wed Jan 8 08:52:02 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Add nethack-reproducible.patch: Same as reproducible.patch, but
+ follows patch-nameing conventions. There's now also a short patch
+ description in the spec file.
+
+- Drop reproducible.patch: Renamed to nethack-reproducible.patch.
+
+-------------------------------------------------------------------
+Wed Jan 8 08:17:03 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Modify nethack-syscall.patch: Refresh to account for offset changes.
+
+- Modify nethack-gzip.patch: Refresh to account for offset changes.
+
+-------------------------------------------------------------------
+Tue Jan 7 17:04:31 UTC 2025 - Thomas Zimmermann <tzimmermann(a)suse.com>
+
+- Modify nethack-config: Enable panic logging. This records serious
+ errors in the file panic log in the game's state directory. Helps
+ with debugging.
+
+-------------------------------------------------------------------
Old:
----
nethack-misc.patch
nethack-syscall.patch
reproducible.patch
New:
----
nethack-escape-char.patch
nethack-reproducible.patch
nethack-secure.patch
BETA DEBUG BEGIN:
Old:
- Add nethack-escape-char.patch: Split off from nethack-misc.patch,
this patch contains a fix for input handling.
Old:
- Drop nethack-syscall.patch: The patch only affects builds with GNOME
support, which we don't do.
Old:
- Add nethack-reproducible.patch: Same as reproducible.patch, but
follows patch-nameing conventions. There's now also a short patch
BETA DEBUG END:
BETA DEBUG BEGIN:
New:
- Add nethack-escape-char.patch: Split off from nethack-misc.patch,
this patch contains a fix for input handling.
New:
- Add nethack-reproducible.patch: Same as reproducible.patch, but
follows patch-nameing conventions. There's now also a short patch
New:
- Add nethack-secure.patch: Improve support for SECURE in recover
utility. Does not affect the game binary. Taken from nethack-misc.patch.
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nethack.spec ++++++
--- /var/tmp/diff_new_pack.ZzjZzW/_old 2025-01-09 15:11:23.866158088 +0100
+++ /var/tmp/diff_new_pack.ZzjZzW/_new 2025-01-09 15:11:23.890159082 +0100
@@ -24,17 +24,18 @@
Group: Amusements/Games/RPG
URL: http://www.nethack.org/
Source0: nethack-343-src.tar.bz2
-# PATCH-FIX-UPSTREAM nethack-config.patch
+# PATCH-FIX-OPENSUSE nethack-config.patch Adapt build to openSUSE systems
Patch0: nethack-config.patch
-# PATCH-FIX-UPSTREAM nethack-decl.patch
+# PATCH-FIX-OPENSUSE nethack-decl.patch Do not redeclare system interfaces
Patch1: nethack-decl.patch
-# PATCH-FIX-UPSTREAM nethack-misc.patch
-Patch2: nethack-misc.patch
-# PATCH-FIX-UPSTREAM nethack-syscall.patch
-Patch3: nethack-syscall.patch
-# PATCH-FIX-UPSTREAM nethack-gzip.patch
-Patch5: nethack-gzip.patch
-Patch6: reproducible.patch
+# PATCH-FIX-OPENSUSE nethack-escape-char.patch
+Patch2: nethack-escape-char.patch
+# PATCH-FIX-OPENSUSE nethack-secure.patch Handle SECURE in recover utility
+Patch3: nethack-secure.patch
+# PATCH-FIX-OPENSUSE nethack-gzip.patch Use gzip compression
+Patch4: nethack-gzip.patch
+# PATCH-FIX-OPENSUSE nethack-reproducible.patch boo#1047218
+Patch5: nethack-reproducible.patch
BuildRequires: bison
BuildRequires: fdupes
BuildRequires: flex
@@ -57,8 +58,8 @@
%patch -P1
%patch -P2
%patch -P3
-%patch -P5
-%patch -P6 -p1
+%patch -P4
+%patch -P5 -p1
%build
# copy Makefiles and add optimization flags
@@ -94,7 +95,7 @@
# game directory
install -m 775 -d %{buildroot}%{_localstatedir}/games/nethack/
install -m 775 -d %{buildroot}%{_localstatedir}/games/nethack/save/
-for file in logfile perm record ; do
+for file in logfile paniclog perm record ; do
touch %{buildroot}%{_localstatedir}/games/nethack/$file
chmod 0664 %{buildroot}%{_localstatedir}/games/nethack/$file
done
@@ -146,6 +147,7 @@
%dir %attr(0770,games,games) %{_localstatedir}/games/nethack
%dir %attr(0770,games,games) %{_localstatedir}/games/nethack/save
%config(noreplace) %attr(0660,games,games) %{_localstatedir}/games/nethack/logfile
+%config(noreplace) %attr(0660,games,games) %{_localstatedir}/games/nethack/paniclog
%config(noreplace) %attr(0660,games,games) %{_localstatedir}/games/nethack/record
%attr(0660,games,games) %{_localstatedir}/games/nethack/perm
%{_bindir}/nethack
++++++ nethack-config.patch ++++++
--- /var/tmp/diff_new_pack.ZzjZzW/_old 2025-01-09 15:11:24.166170515 +0100
+++ /var/tmp/diff_new_pack.ZzjZzW/_new 2025-01-09 15:11:24.202172006 +0100
@@ -69,20 +69,11 @@
SHELLDIR = $(PREFIX)/games
# per discussion in Install.X11 and Install.Qt
-@@ -48,7 +48,7 @@ VARDATND =
- # for BeOS
- # VARDATND = beostiles
- # for Gnome
--# VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
-+VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
-
- VARDATD = data oracles options quest.dat rumors
- VARDAT = $(VARDATD) $(VARDATND)
Index: include/config.h
===================================================================
--- include/config.h.orig
+++ include/config.h
-@@ -143,16 +143,16 @@
+@@ -143,10 +143,10 @@
#ifndef WIZARD /* allow for compile-time or Makefile changes */
# ifndef KR1ED
@@ -95,13 +86,6 @@
# endif
#endif
- #define LOGFILE "logfile" /* larger file for debugging purposes */
- #define NEWS "news" /* the file containing the latest hack news */
--#define PANICLOG "paniclog" /* log of panic and impossible events */
-+/* #define PANICLOG "paniclog" */ /* log of panic and impossible events */
-
- /*
- * If COMPRESS is defined, it should contain the full path name of your
@@ -185,7 +185,7 @@
* a tar-like file, thus making a neater installation. See *conf.h
* for detailed configuration.
@@ -197,4 +181,26 @@
MAXNROFPLAYERS=4
# Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH
+Index: doc/nethack.6
+===================================================================
+--- doc/nethack.6.orig
++++ doc/nethack.6
+@@ -197,7 +197,7 @@ option, which must be the first argument
+ supplies a directory which is to serve as the playground.
+ It overrides the value from NETHACKDIR, HACKDIR,
+ or the directory specified by the game administrator during compilation
+-(usually /usr/games/lib/nethackdir).
++(usually /usr/share/games/nethack).
+ This option is usually only useful to the game administrator.
+ The playground must contain several auxiliary files such as help files,
+ the list of top scorers, and a subdirectory
+@@ -283,7 +283,7 @@ MAIL Mailbox file.
+ .br
+ MAILREADER Replacement for default reader
+ .br
+- (probably /bin/mail or /usr/ucb/mail).
++ (probably /usr/bin/mail).
+ .br
+ NETHACKDIR Playground.
+ .br
++++++ nethack-escape-char.patch ++++++
Index: src/cmd.c
===================================================================
--- src/cmd.c.orig
+++ src/cmd.c
@@ -2443,6 +2443,16 @@ readchar()
readchar_queue = click_to_cmd(x, y, mod);
sym = *readchar_queue++;
}
+
+ if(sym == 27) { /* ESC (generated by Alt-key) */
+#ifdef REDO
+ sym = in_doagain ? Getchar() : nh_poskey(&x, &y, &mod);
+#else
+ sym = Getchar();
+#endif
+ sym |= 0x80;
+ }
+
return((char) sym);
}
++++++ nethack-gzip.patch ++++++
--- /var/tmp/diff_new_pack.ZzjZzW/_old 2025-01-09 15:11:24.546186257 +0100
+++ /var/tmp/diff_new_pack.ZzjZzW/_new 2025-01-09 15:11:24.574187416 +0100
@@ -1,7 +1,8 @@
-diff -ru nethack-3.4.0.orig/include/config.h nethack-3.4.0/include/config.h
---- include/config.h 2002-03-21 00:42:43.000000000 +0100
-+++ include/config.h 2003-02-27 15:38:23.000000000 +0100
-@@ -163,11 +163,11 @@
+Index: include/config.h
+===================================================================
+--- include/config.h.orig
++++ include/config.h
+@@ -169,11 +169,11 @@
#ifdef UNIX
/* path and file name extension for compression program */
@@ -12,7 +13,7 @@
/* An example of one alternative you might want to use: */
-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */
-+#define COMPRESS "/bin/gzip" /* FSF gzip compression */
++#define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
+#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
#endif
++++++ nethack-reproducible.patch ++++++
Author: Bernhard M. Wiedemann <bwiedemann suse de>
Date; 2019-08-08
Do not add build date into binary
to make package build reproducible
https://bugzilla.opensuse.org/show_bug.cgi?id=1047218
It might be possible to upstream a variant of this patch.
Without this patch, we got such a diff:
/usr/lib/nethack/nethack.tty differs in ELF section .rodata
178a20 556e6978 204e6574 4861636b 20566572 Unix NetHack Ver
178a30 73696f6e 20332e34 2e33202d 206c6173 sion 3.4.3 - las
- 178a40 74206275 696c6420 54687520 41756720 t build Thu Aug
- 178a50 20382030 373a3133 3a323520 32303139 8 07:13:25 2019
+ 178a40 74206275 696c6420 53617420 53657020 t build Sat Sep
+ 178a50 20392032 303a3239 3a343120 32303334 9 20:29:41 2034
178a60 1b293000 1b285500 1b284200 243c3530 .)0..(U..(B.$<50
Index: nethack-3.4.3/util/makedefs.c
===================================================================
--- nethack-3.4.3.orig/util/makedefs.c
+++ nethack-3.4.3/util/makedefs.c
@@ -563,7 +563,7 @@ do_date()
(void) time(&clocktim);
Strcpy(cbuf, ctime(&clocktim));
#else
- (void) time((time_t *)&clocktim);
+ //(void) time((time_t *)&clocktim);
Strcpy(cbuf, ctime((time_t *)&clocktim));
#endif
for (c = cbuf; *c; c++) if (*c == '\n') break;
++++++ nethack-secure.patch ++++++
Index: util/recover.c
===================================================================
--- util/recover.c.orig
+++ util/recover.c
@@ -16,6 +16,12 @@
#include "win32api.h"
#endif
+#ifdef SECURE
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#endif
+
#ifdef VMS
extern int FDECL(vms_creat, (const char *,unsigned));
extern int FDECL(vms_open, (const char *,int,unsigned));
@@ -107,15 +113,23 @@ char *argv[];
}
#if defined(SECURE) && !defined(VMS)
if (dir
-# ifdef HACKDIR
+# ifdef VAR_PLAYGROUND
+ && strcmp(dir, VAR_PLAYGROUND)
+# else
+# ifdef HACKDIR
&& strcmp(dir, HACKDIR)
-# endif
+# endif
+# endif /* VAR_PLAYGROUND */
) {
(void) setgid(getgid());
(void) setuid(getuid());
}
#endif /* SECURE && !VMS */
+#ifdef VAR_PLAYGROUND
+ if (!dir) dir = VAR_PLAYGROUND;
+#endif
+
#ifdef HACKDIR
if (!dir) dir = HACKDIR;
#endif
@@ -158,11 +172,19 @@ int lev;
#endif
}
+#ifdef SECURE
+static uid_t save_uid = -1;
+#endif
+
int
open_levelfile(lev)
int lev;
{
int fd;
+#ifdef SECURE
+ struct stat level_stat;
+ uid_t uid;
+#endif
set_levelfile_name(lev);
#if defined(MICRO) || defined(WIN32) || defined(MSDOS)
@@ -170,6 +192,21 @@ int lev;
#else
fd = open(lock, O_RDONLY, 0);
#endif
+ /* Security check: does the user calling recover own the file? */
+#ifdef SECURE
+ if (fd != -1) {
+ uid = getuid();
+ if (fstat(fd, &level_stat) == -1) {
+ Fprintf(stderr, "No permission to stat level file %s.\n", lock);
+ return -1;
+ }
+ if (uid != 0 && level_stat.st_uid != uid) {
+ Fprintf(stderr, "You are not the owner of level file %s.\n", lock);
+ return -1;
+ }
+ save_uid = level_stat.st_uid;
+ }
+#endif
return fd;
}
@@ -183,6 +220,13 @@ create_savefile()
#else
fd = creat(savename, FCMASK);
#endif
+
+#ifdef SECURE
+ if (fchown(fd, save_uid, -1) == -1) {
+ Fprintf(stderr, "could not chown %s to %i!\n", savename,
+ save_uid);
+ }
+#endif
return fd;
}
1
0