Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
5984203f71 |
256
CVE-2025-4565.patch
Normal file
256
CVE-2025-4565.patch
Normal file
@@ -0,0 +1,256 @@
|
||||
From 1e7f83ea1b1945065ce1b89051cd655e4b8de22d Mon Sep 17 00:00:00 2001
|
||||
From: Protobuf Team Bot <protobuf-github-bot@google.com>
|
||||
Date: Tue, 13 May 2025 14:42:18 -0700
|
||||
Subject: [PATCH 2/2] Add recursion depth limits to pure python
|
||||
|
||||
PiperOrigin-RevId: 758382549
|
||||
---
|
||||
python/google/protobuf/internal/decoder.py | 35 ++++++++++-
|
||||
.../google/protobuf/internal/decoder_test.py | 14 +++++
|
||||
.../google/protobuf/internal/message_test.py | 60 +++++++++++++++++--
|
||||
.../protobuf/internal/self_recursive.proto | 1 +
|
||||
4 files changed, 105 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/python/google/protobuf/internal/decoder.py b/python/google/protobuf/internal/decoder.py
|
||||
index 89d829142..de0bc19a5 100755
|
||||
--- a/python/google/protobuf/internal/decoder.py
|
||||
+++ b/python/google/protobuf/internal/decoder.py
|
||||
@@ -668,7 +668,13 @@ def GroupDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
# Read sub-message.
|
||||
+ current_depth += 1
|
||||
+ if current_depth > _recursion_limit:
|
||||
+ raise _DecodeError(
|
||||
+ 'Error parsing message: too many levels of nesting.'
|
||||
+ )
|
||||
pos = value.add()._InternalParse(buffer, pos, end, current_depth)
|
||||
+ current_depth -= 1
|
||||
# Read end tag.
|
||||
new_pos = pos+end_tag_len
|
||||
if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
|
||||
@@ -687,7 +693,11 @@ def GroupDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
# Read sub-message.
|
||||
+ current_depth += 1
|
||||
+ if current_depth > _recursion_limit:
|
||||
+ raise _DecodeError('Error parsing message: too many levels of nesting.')
|
||||
pos = value._InternalParse(buffer, pos, end, current_depth)
|
||||
+ current_depth -= 1
|
||||
# Read end tag.
|
||||
new_pos = pos+end_tag_len
|
||||
if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
|
||||
@@ -720,6 +730,11 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
# Read sub-message.
|
||||
+ current_depth += 1
|
||||
+ if current_depth > _recursion_limit:
|
||||
+ raise _DecodeError(
|
||||
+ 'Error parsing message: too many levels of nesting.'
|
||||
+ )
|
||||
if (
|
||||
value.add()._InternalParse(buffer, pos, new_pos, current_depth)
|
||||
!= new_pos
|
||||
@@ -727,6 +742,7 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
# The only reason _InternalParse would return early is if it
|
||||
# encountered an end-group tag.
|
||||
raise _DecodeError('Unexpected end-group tag.')
|
||||
+ current_depth -= 1
|
||||
# Predict that the next tag is another copy of the same repeated field.
|
||||
pos = new_pos + tag_len
|
||||
if buffer[new_pos:pos] != tag_bytes or new_pos == end:
|
||||
@@ -746,10 +762,14 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
# Read sub-message.
|
||||
+ current_depth += 1
|
||||
+ if current_depth > _recursion_limit:
|
||||
+ raise _DecodeError('Error parsing message: too many levels of nesting.')
|
||||
if value._InternalParse(buffer, pos, new_pos, current_depth) != new_pos:
|
||||
# The only reason _InternalParse would return early is if it encountered
|
||||
# an end-group tag.
|
||||
raise _DecodeError('Unexpected end-group tag.')
|
||||
+ current_depth -= 1
|
||||
return new_pos
|
||||
|
||||
return DecodeField
|
||||
@@ -984,6 +1004,15 @@ def _SkipGroup(buffer, pos, end):
|
||||
pos = new_pos
|
||||
|
||||
|
||||
+DEFAULT_RECURSION_LIMIT = 100
|
||||
+_recursion_limit = DEFAULT_RECURSION_LIMIT
|
||||
+
|
||||
+
|
||||
+def SetRecursionLimit(new_limit):
|
||||
+ global _recursion_limit
|
||||
+ _recursion_limit = new_limit
|
||||
+
|
||||
+
|
||||
def _DecodeUnknownFieldSet(buffer, pos, end_pos=None, current_depth=0):
|
||||
"""Decode UnknownFieldSet. Returns the UnknownFieldSet and new position."""
|
||||
|
||||
@@ -1017,7 +1046,11 @@ def _DecodeUnknownField(
|
||||
data = buffer[pos:pos+size].tobytes()
|
||||
pos += size
|
||||
elif wire_type == wire_format.WIRETYPE_START_GROUP:
|
||||
- (data, pos) = _DecodeUnknownFieldSet(buffer, pos, None, current_depth)
|
||||
+ current_depth += 1
|
||||
+ if current_depth >= _recursion_limit:
|
||||
+ raise _DecodeError('Error parsing message: too many levels of nesting.')
|
||||
+ data, pos = _DecodeUnknownFieldSet(buffer, pos, None, current_depth)
|
||||
+ current_depth -= 1
|
||||
elif wire_type == wire_format.WIRETYPE_END_GROUP:
|
||||
return (0, -1)
|
||||
else:
|
||||
diff --git a/python/google/protobuf/internal/decoder_test.py b/python/google/protobuf/internal/decoder_test.py
|
||||
index f801b6e76..11e6465b6 100644
|
||||
--- a/python/google/protobuf/internal/decoder_test.py
|
||||
+++ b/python/google/protobuf/internal/decoder_test.py
|
||||
@@ -11,8 +11,10 @@
|
||||
import io
|
||||
import unittest
|
||||
|
||||
+from google.protobuf import message
|
||||
from google.protobuf.internal import decoder
|
||||
from google.protobuf.internal import testing_refleaks
|
||||
+from google.protobuf.internal import wire_format
|
||||
|
||||
|
||||
_INPUT_BYTES = b'\x84r\x12'
|
||||
@@ -52,6 +54,18 @@ class DecoderTest(unittest.TestCase):
|
||||
size = decoder._DecodeVarint(input_io)
|
||||
self.assertEqual(size, None)
|
||||
|
||||
+ def test_decode_unknown_group_field_too_many_levels(self):
|
||||
+ data = memoryview(b'\023' * 5_000_000)
|
||||
+ self.assertRaisesRegex(
|
||||
+ message.DecodeError,
|
||||
+ 'Error parsing message',
|
||||
+ decoder._DecodeUnknownField,
|
||||
+ data,
|
||||
+ 1,
|
||||
+ wire_format.WIRETYPE_START_GROUP,
|
||||
+ 1
|
||||
+ )
|
||||
+
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py
|
||||
index 48e6df806..6facb8135 100755
|
||||
--- a/python/google/protobuf/internal/message_test.py
|
||||
+++ b/python/google/protobuf/internal/message_test.py
|
||||
@@ -36,6 +36,7 @@ from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf.internal import more_extensions_pb2
|
||||
from google.protobuf.internal import more_messages_pb2
|
||||
from google.protobuf.internal import packed_field_test_pb2
|
||||
+from google.protobuf.internal import self_recursive_pb2
|
||||
from google.protobuf.internal import test_proto3_optional_pb2
|
||||
from google.protobuf.internal import test_util
|
||||
from google.protobuf.internal import testing_refleaks
|
||||
@@ -1339,6 +1340,52 @@ class MessageTest(unittest.TestCase):
|
||||
self.assertNotIn('oneof_string', m)
|
||||
|
||||
|
||||
+@testing_refleaks.TestCase
|
||||
+class TestRecursiveGroup(unittest.TestCase):
|
||||
+
|
||||
+ def _MakeRecursiveGroupMessage(self, n):
|
||||
+ msg = self_recursive_pb2.SelfRecursive()
|
||||
+ sub = msg
|
||||
+ for _ in range(n):
|
||||
+ sub = sub.sub_group
|
||||
+ sub.i = 1
|
||||
+ return msg.SerializeToString()
|
||||
+
|
||||
+ def testRecursiveGroups(self):
|
||||
+ recurse_msg = self_recursive_pb2.SelfRecursive()
|
||||
+ data = self._MakeRecursiveGroupMessage(100)
|
||||
+ recurse_msg.ParseFromString(data)
|
||||
+ self.assertTrue(recurse_msg.HasField('sub_group'))
|
||||
+
|
||||
+ def testRecursiveGroupsException(self):
|
||||
+ if api_implementation.Type() != 'python':
|
||||
+ api_implementation._c_module.SetAllowOversizeProtos(False)
|
||||
+ recurse_msg = self_recursive_pb2.SelfRecursive()
|
||||
+ data = self._MakeRecursiveGroupMessage(300)
|
||||
+ with self.assertRaises(message.DecodeError) as context:
|
||||
+ recurse_msg.ParseFromString(data)
|
||||
+ self.assertIn('Error parsing message', str(context.exception))
|
||||
+ if api_implementation.Type() == 'python':
|
||||
+ self.assertIn('too many levels of nesting', str(context.exception))
|
||||
+
|
||||
+ def testRecursiveGroupsUnknownFields(self):
|
||||
+ if api_implementation.Type() != 'python':
|
||||
+ api_implementation._c_module.SetAllowOversizeProtos(False)
|
||||
+ test_msg = unittest_pb2.TestAllTypes()
|
||||
+ data = self._MakeRecursiveGroupMessage(300) # unknown to test_msg
|
||||
+ with self.assertRaises(message.DecodeError) as context:
|
||||
+ test_msg.ParseFromString(data)
|
||||
+ self.assertIn(
|
||||
+ 'Error parsing message',
|
||||
+ str(context.exception),
|
||||
+ )
|
||||
+ if api_implementation.Type() == 'python':
|
||||
+ self.assertIn('too many levels of nesting', str(context.exception))
|
||||
+ decoder.SetRecursionLimit(310)
|
||||
+ test_msg.ParseFromString(data)
|
||||
+ decoder.SetRecursionLimit(decoder.DEFAULT_RECURSION_LIMIT)
|
||||
+
|
||||
+
|
||||
# Class to test proto2-only features (required, extensions, etc.)
|
||||
@testing_refleaks.TestCase
|
||||
class Proto2Test(unittest.TestCase):
|
||||
@@ -2722,8 +2769,6 @@ class PackedFieldTest(unittest.TestCase):
|
||||
self.assertEqual(golden_data, message.SerializeToString())
|
||||
|
||||
|
||||
-@unittest.skipIf(api_implementation.Type() == 'python',
|
||||
- 'explicit tests of the C++ implementation')
|
||||
@testing_refleaks.TestCase
|
||||
class OversizeProtosTest(unittest.TestCase):
|
||||
|
||||
@@ -2740,16 +2785,23 @@ class OversizeProtosTest(unittest.TestCase):
|
||||
msg.ParseFromString(self.GenerateNestedProto(100))
|
||||
|
||||
def testAssertOversizeProto(self):
|
||||
- api_implementation._c_module.SetAllowOversizeProtos(False)
|
||||
+ if api_implementation.Type() != 'python':
|
||||
+ api_implementation._c_module.SetAllowOversizeProtos(False)
|
||||
msg = unittest_pb2.TestRecursiveMessage()
|
||||
with self.assertRaises(message.DecodeError) as context:
|
||||
msg.ParseFromString(self.GenerateNestedProto(101))
|
||||
self.assertIn('Error parsing message', str(context.exception))
|
||||
|
||||
def testSucceedOversizeProto(self):
|
||||
- api_implementation._c_module.SetAllowOversizeProtos(True)
|
||||
+
|
||||
+ if api_implementation.Type() == 'python':
|
||||
+ decoder.SetRecursionLimit(310)
|
||||
+ else:
|
||||
+ api_implementation._c_module.SetAllowOversizeProtos(True)
|
||||
+
|
||||
msg = unittest_pb2.TestRecursiveMessage()
|
||||
msg.ParseFromString(self.GenerateNestedProto(101))
|
||||
+ decoder.SetRecursionLimit(decoder.DEFAULT_RECURSION_LIMIT)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/python/google/protobuf/internal/self_recursive.proto b/python/google/protobuf/internal/self_recursive.proto
|
||||
index 20bc2b4d3..d2a7f004b 100644
|
||||
--- a/python/google/protobuf/internal/self_recursive.proto
|
||||
+++ b/python/google/protobuf/internal/self_recursive.proto
|
||||
@@ -12,6 +12,7 @@ package google.protobuf.python.internal;
|
||||
message SelfRecursive {
|
||||
SelfRecursive sub = 1;
|
||||
int32 i = 2;
|
||||
+ SelfRecursive sub_group = 3 [features.message_encoding = DELIMITED];
|
||||
}
|
||||
|
||||
message IndirectRecursive {
|
||||
--
|
||||
2.51.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
libprotobuf33_3_0
|
||||
libprotoc33_3_0
|
||||
libprotobuf-lite33_3_0
|
||||
libutf8_range-33_3_0
|
||||
libprotobuf28_3_0
|
||||
libprotoc28_3_0
|
||||
libprotobuf-lite28_3_0
|
||||
libutf8_range-28_3_0
|
||||
|
||||
421
internal-pure-python-fixes.patch
Normal file
421
internal-pure-python-fixes.patch
Normal file
@@ -0,0 +1,421 @@
|
||||
From dac2e91e36408087d769be89a72fbafe1ea5039c Mon Sep 17 00:00:00 2001
|
||||
From: Protobuf Team Bot <protobuf-github-bot@google.com>
|
||||
Date: Tue, 4 Mar 2025 13:16:32 -0800
|
||||
Subject: [PATCH 1/2] Internal pure python fixes
|
||||
|
||||
PiperOrigin-RevId: 733441339
|
||||
---
|
||||
python/google/protobuf/internal/decoder.py | 98 ++++++++++++++-----
|
||||
.../google/protobuf/internal/message_test.py | 1 +
|
||||
.../protobuf/internal/python_message.py | 7 +-
|
||||
.../protobuf/internal/self_recursive.proto | 9 +-
|
||||
4 files changed, 86 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/python/google/protobuf/internal/decoder.py b/python/google/protobuf/internal/decoder.py
|
||||
index dcde1d942..89d829142 100755
|
||||
--- a/python/google/protobuf/internal/decoder.py
|
||||
+++ b/python/google/protobuf/internal/decoder.py
|
||||
@@ -184,7 +184,10 @@ def _SimpleDecoder(wire_type, decode_value):
|
||||
clear_if_default=False):
|
||||
if is_packed:
|
||||
local_DecodeVarint = _DecodeVarint
|
||||
- def DecodePackedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodePackedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -199,11 +202,15 @@ def _SimpleDecoder(wire_type, decode_value):
|
||||
del value[-1] # Discard corrupt value.
|
||||
raise _DecodeError('Packed element was truncated.')
|
||||
return pos
|
||||
+
|
||||
return DecodePackedField
|
||||
elif is_repeated:
|
||||
tag_bytes = encoder.TagBytes(field_number, wire_type)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -218,9 +225,12 @@ def _SimpleDecoder(wire_type, decode_value):
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
+ del current_depth # unused
|
||||
(new_value, pos) = decode_value(buffer, pos)
|
||||
if pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
@@ -229,6 +239,7 @@ def _SimpleDecoder(wire_type, decode_value):
|
||||
else:
|
||||
field_dict[key] = new_value
|
||||
return pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
return SpecificDecoder
|
||||
@@ -364,7 +375,9 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
enum_type = key.enum_type
|
||||
if is_packed:
|
||||
local_DecodeVarint = _DecodeVarint
|
||||
- def DecodePackedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodePackedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
"""Decode serialized packed enum to its value and a new position.
|
||||
|
||||
Args:
|
||||
@@ -377,6 +390,7 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
Returns:
|
||||
int, new position in serialized data.
|
||||
"""
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -407,11 +421,14 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
# pylint: enable=protected-access
|
||||
raise _DecodeError('Packed element was truncated.')
|
||||
return pos
|
||||
+
|
||||
return DecodePackedField
|
||||
elif is_repeated:
|
||||
tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_VARINT)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
"""Decode serialized repeated enum to its value and a new position.
|
||||
|
||||
Args:
|
||||
@@ -424,6 +441,7 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
Returns:
|
||||
int, new position in serialized data.
|
||||
"""
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -446,9 +464,11 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
"""Decode serialized repeated enum to its value and a new position.
|
||||
|
||||
Args:
|
||||
@@ -461,6 +481,7 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
Returns:
|
||||
int, new position in serialized data.
|
||||
"""
|
||||
+ del current_depth # unused
|
||||
value_start_pos = pos
|
||||
(enum_value, pos) = _DecodeSignedVarint32(buffer, pos)
|
||||
if pos > end:
|
||||
@@ -480,6 +501,7 @@ def EnumDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
(tag_bytes, buffer[value_start_pos:pos].tobytes()))
|
||||
# pylint: enable=protected-access
|
||||
return pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
|
||||
@@ -538,7 +560,10 @@ def StringDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
tag_bytes = encoder.TagBytes(field_number,
|
||||
wire_format.WIRETYPE_LENGTH_DELIMITED)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -553,9 +578,12 @@ def StringDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
if buffer[new_pos:pos] != tag_bytes or new_pos == end:
|
||||
# Prediction failed. Return.
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
+ del current_depth # unused
|
||||
(size, pos) = local_DecodeVarint(buffer, pos)
|
||||
new_pos = pos + size
|
||||
if new_pos > end:
|
||||
@@ -565,6 +593,7 @@ def StringDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
else:
|
||||
field_dict[key] = _ConvertToUnicode(buffer[pos:new_pos])
|
||||
return new_pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
|
||||
@@ -579,7 +608,10 @@ def BytesDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
tag_bytes = encoder.TagBytes(field_number,
|
||||
wire_format.WIRETYPE_LENGTH_DELIMITED)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
+ del current_depth # unused
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -594,9 +626,12 @@ def BytesDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
if buffer[new_pos:pos] != tag_bytes or new_pos == end:
|
||||
# Prediction failed. Return.
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
+ del current_depth # unused
|
||||
(size, pos) = local_DecodeVarint(buffer, pos)
|
||||
new_pos = pos + size
|
||||
if new_pos > end:
|
||||
@@ -606,6 +641,7 @@ def BytesDecoder(field_number, is_repeated, is_packed, key, new_default,
|
||||
else:
|
||||
field_dict[key] = buffer[pos:new_pos].tobytes()
|
||||
return new_pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
|
||||
@@ -621,7 +657,9 @@ def GroupDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
tag_bytes = encoder.TagBytes(field_number,
|
||||
wire_format.WIRETYPE_START_GROUP)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -630,7 +668,7 @@ def GroupDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
# Read sub-message.
|
||||
- pos = value.add()._InternalParse(buffer, pos, end)
|
||||
+ pos = value.add()._InternalParse(buffer, pos, end, current_depth)
|
||||
# Read end tag.
|
||||
new_pos = pos+end_tag_len
|
||||
if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
|
||||
@@ -640,19 +678,22 @@ def GroupDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if buffer[new_pos:pos] != tag_bytes or new_pos == end:
|
||||
# Prediction failed. Return.
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
# Read sub-message.
|
||||
- pos = value._InternalParse(buffer, pos, end)
|
||||
+ pos = value._InternalParse(buffer, pos, end, current_depth)
|
||||
# Read end tag.
|
||||
new_pos = pos+end_tag_len
|
||||
if buffer[pos:new_pos] != end_tag_bytes or new_pos > end:
|
||||
raise _DecodeError('Missing group end tag.')
|
||||
return new_pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
|
||||
@@ -666,7 +707,9 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
tag_bytes = encoder.TagBytes(field_number,
|
||||
wire_format.WIRETYPE_LENGTH_DELIMITED)
|
||||
tag_len = len(tag_bytes)
|
||||
- def DecodeRepeatedField(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeRepeatedField(
|
||||
+ buffer, pos, end, message, field_dict, current_depth=0
|
||||
+ ):
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -677,7 +720,10 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
# Read sub-message.
|
||||
- if value.add()._InternalParse(buffer, pos, new_pos) != new_pos:
|
||||
+ if (
|
||||
+ value.add()._InternalParse(buffer, pos, new_pos, current_depth)
|
||||
+ != new_pos
|
||||
+ ):
|
||||
# The only reason _InternalParse would return early is if it
|
||||
# encountered an end-group tag.
|
||||
raise _DecodeError('Unexpected end-group tag.')
|
||||
@@ -686,9 +732,11 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if buffer[new_pos:pos] != tag_bytes or new_pos == end:
|
||||
# Prediction failed. Return.
|
||||
return new_pos
|
||||
+
|
||||
return DecodeRepeatedField
|
||||
else:
|
||||
- def DecodeField(buffer, pos, end, message, field_dict):
|
||||
+
|
||||
+ def DecodeField(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
value = field_dict.setdefault(key, new_default(message))
|
||||
@@ -698,11 +746,12 @@ def MessageDecoder(field_number, is_repeated, is_packed, key, new_default):
|
||||
if new_pos > end:
|
||||
raise _DecodeError('Truncated message.')
|
||||
# Read sub-message.
|
||||
- if value._InternalParse(buffer, pos, new_pos) != new_pos:
|
||||
+ if value._InternalParse(buffer, pos, new_pos, current_depth) != new_pos:
|
||||
# The only reason _InternalParse would return early is if it encountered
|
||||
# an end-group tag.
|
||||
raise _DecodeError('Unexpected end-group tag.')
|
||||
return new_pos
|
||||
+
|
||||
return DecodeField
|
||||
|
||||
|
||||
@@ -851,7 +900,8 @@ def MapDecoder(field_descriptor, new_default, is_message_map):
|
||||
# Can't read _concrete_class yet; might not be initialized.
|
||||
message_type = field_descriptor.message_type
|
||||
|
||||
- def DecodeMap(buffer, pos, end, message, field_dict):
|
||||
+ def DecodeMap(buffer, pos, end, message, field_dict, current_depth=0):
|
||||
+ del current_depth # Unused.
|
||||
submsg = message_type._concrete_class()
|
||||
value = field_dict.get(key)
|
||||
if value is None:
|
||||
@@ -934,7 +984,7 @@ def _SkipGroup(buffer, pos, end):
|
||||
pos = new_pos
|
||||
|
||||
|
||||
-def _DecodeUnknownFieldSet(buffer, pos, end_pos=None):
|
||||
+def _DecodeUnknownFieldSet(buffer, pos, end_pos=None, current_depth=0):
|
||||
"""Decode UnknownFieldSet. Returns the UnknownFieldSet and new position."""
|
||||
|
||||
unknown_field_set = containers.UnknownFieldSet()
|
||||
@@ -944,14 +994,16 @@ def _DecodeUnknownFieldSet(buffer, pos, end_pos=None):
|
||||
field_number, wire_type = wire_format.UnpackTag(tag)
|
||||
if wire_type == wire_format.WIRETYPE_END_GROUP:
|
||||
break
|
||||
- (data, pos) = _DecodeUnknownField(buffer, pos, wire_type)
|
||||
+ (data, pos) = _DecodeUnknownField(buffer, pos, wire_type, current_depth)
|
||||
# pylint: disable=protected-access
|
||||
unknown_field_set._add(field_number, wire_type, data)
|
||||
|
||||
return (unknown_field_set, pos)
|
||||
|
||||
|
||||
-def _DecodeUnknownField(buffer, pos, wire_type):
|
||||
+def _DecodeUnknownField(
|
||||
+ buffer, pos, wire_type, current_depth=0
|
||||
+):
|
||||
"""Decode a unknown field. Returns the UnknownField and new position."""
|
||||
|
||||
if wire_type == wire_format.WIRETYPE_VARINT:
|
||||
@@ -965,7 +1017,7 @@ def _DecodeUnknownField(buffer, pos, wire_type):
|
||||
data = buffer[pos:pos+size].tobytes()
|
||||
pos += size
|
||||
elif wire_type == wire_format.WIRETYPE_START_GROUP:
|
||||
- (data, pos) = _DecodeUnknownFieldSet(buffer, pos)
|
||||
+ (data, pos) = _DecodeUnknownFieldSet(buffer, pos, None, current_depth)
|
||||
elif wire_type == wire_format.WIRETYPE_END_GROUP:
|
||||
return (0, -1)
|
||||
else:
|
||||
diff --git a/python/google/protobuf/internal/message_test.py b/python/google/protobuf/internal/message_test.py
|
||||
index 2a723eabb..48e6df806 100755
|
||||
--- a/python/google/protobuf/internal/message_test.py
|
||||
+++ b/python/google/protobuf/internal/message_test.py
|
||||
@@ -30,6 +30,7 @@ import warnings
|
||||
cmp = lambda x, y: (x > y) - (x < y)
|
||||
|
||||
from google.protobuf.internal import api_implementation # pylint: disable=g-import-not-at-top
|
||||
+from google.protobuf.internal import decoder
|
||||
from google.protobuf.internal import encoder
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf.internal import more_extensions_pb2
|
||||
diff --git a/python/google/protobuf/internal/python_message.py b/python/google/protobuf/internal/python_message.py
|
||||
index fabc6aa07..62c059cd2 100755
|
||||
--- a/python/google/protobuf/internal/python_message.py
|
||||
+++ b/python/google/protobuf/internal/python_message.py
|
||||
@@ -1194,7 +1194,7 @@ def _AddMergeFromStringMethod(message_descriptor, cls):
|
||||
fields_by_tag = cls._fields_by_tag
|
||||
message_set_decoders_by_tag = cls._message_set_decoders_by_tag
|
||||
|
||||
- def InternalParse(self, buffer, pos, end):
|
||||
+ def InternalParse(self, buffer, pos, end, current_depth=0):
|
||||
"""Create a message from serialized bytes.
|
||||
|
||||
Args:
|
||||
@@ -1244,10 +1244,13 @@ def _AddMergeFromStringMethod(message_descriptor, cls):
|
||||
else:
|
||||
_MaybeAddDecoder(cls, field_des)
|
||||
field_decoder = field_des._decoders[is_packed]
|
||||
- pos = field_decoder(buffer, new_pos, end, self, field_dict)
|
||||
+ pos = field_decoder(
|
||||
+ buffer, new_pos, end, self, field_dict, current_depth
|
||||
+ )
|
||||
if field_des.containing_oneof:
|
||||
self._UpdateOneofState(field_des)
|
||||
return pos
|
||||
+
|
||||
cls._InternalParse = InternalParse
|
||||
|
||||
|
||||
diff --git a/python/google/protobuf/internal/self_recursive.proto b/python/google/protobuf/internal/self_recursive.proto
|
||||
index dbfcaf971..20bc2b4d3 100644
|
||||
--- a/python/google/protobuf/internal/self_recursive.proto
|
||||
+++ b/python/google/protobuf/internal/self_recursive.proto
|
||||
@@ -5,18 +5,19 @@
|
||||
// license that can be found in the LICENSE file or at
|
||||
// https://developers.google.com/open-source/licenses/bsd
|
||||
|
||||
-syntax = "proto2";
|
||||
+edition = "2023";
|
||||
|
||||
package google.protobuf.python.internal;
|
||||
|
||||
message SelfRecursive {
|
||||
- optional SelfRecursive sub = 1;
|
||||
+ SelfRecursive sub = 1;
|
||||
+ int32 i = 2;
|
||||
}
|
||||
|
||||
message IndirectRecursive {
|
||||
- optional IntermediateRecursive intermediate = 1;
|
||||
+ IntermediateRecursive intermediate = 1;
|
||||
}
|
||||
|
||||
message IntermediateRecursive {
|
||||
- optional IndirectRecursive indirect = 1;
|
||||
+ IndirectRecursive indirect = 1;
|
||||
}
|
||||
--
|
||||
2.51.1
|
||||
|
||||
BIN
protobuf-28.3.tar.gz
LFS
Normal file
BIN
protobuf-28.3.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1c9996fa0466206d5e4b8120b3fceb332369b64248e0649089aad586569d3896
|
||||
size 6889782
|
||||
BIN
protobuf-5.28.3.tar.gz
LFS
Normal file
BIN
protobuf-5.28.3.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8794debeb402963fddff41a595e1f649bcd76616ba56c835645cab4539e810e
|
||||
size 444318
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-parent</artifactId>
|
||||
<version>4.33.3</version>
|
||||
<version>4.28.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-parent</artifactId>
|
||||
<version>4.33.3</version>
|
||||
<version>4.28.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
@@ -16,25 +16,32 @@
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>4.33.3</version>
|
||||
<version>4.28.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.9</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_annotations</artifactId>
|
||||
<version>2.18.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>32.0.1-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.j2objc</groupId>
|
||||
<artifactId>j2objc-annotations</artifactId>
|
||||
<version>2.8</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
Index: protobuf-33.0/java/util/pom.xml
|
||||
===================================================================
|
||||
--- protobuf-33.0.orig/java/util/pom.xml
|
||||
+++ protobuf-33.0/java/util/pom.xml
|
||||
@@ -22,19 +22,16 @@
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<version>3.0.2</version>
|
||||
- <scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.9</version>
|
||||
- <scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.errorprone</groupId>
|
||||
<artifactId>error_prone_annotations</artifactId>
|
||||
<version>2.18.0</version>
|
||||
- <scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -1,251 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 10 11:50:18 UTC 2026 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 33.3, a general maintenance release:
|
||||
* Java: Correctly apply JSON recursion limit when parsing an
|
||||
Any-of-Any
|
||||
* Updates to tests, and developer visible bug fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 7 19:33:12 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 33.2:
|
||||
* Add EDITION_UNSTABLE for new edition development
|
||||
* Python: Add BTI to branch targets when branch protection is
|
||||
enabled
|
||||
* Developer visible fixes, code correctness fixes, tests fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 16 18:41:50 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.1:
|
||||
* C++: Fix Any hasbit consistency issue in OSS
|
||||
* Java: Expose NestedInFileClass naming helpers for Java immutable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 17 16:21:36 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.0:
|
||||
* Compiler: disable symbol visibility enforcement by default in
|
||||
C++ runtime
|
||||
* C++: JSON parser/serializer bug fixes and code-level fixes
|
||||
* Python: Bug fixes: crashes, parser fixes
|
||||
* Java: Restored compatibility of runtime with gencode created
|
||||
with protoc <3.21
|
||||
* Java: Restore ABI compatibility for extension methods which was
|
||||
previously (knowingly) broken with 4.x
|
||||
- drop protobuf-gh23194.patch, included upstream
|
||||
- java: turn protobuf-java-util-removescope.patch from sources into
|
||||
a patch, rebase and fix rpm autopatch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 20 17:11:43 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.1:
|
||||
* Compiler: Ship all option dependencies to plugins along with
|
||||
regular ones
|
||||
* Compiler: Unify plugin and built-in generators to use request/
|
||||
response interface
|
||||
* Disable symbol visibility enforcement by default in C++ runtime
|
||||
* Fix handling of optional dependencies in java generator
|
||||
* Restore Protobuf Java extension modifiers in gencode
|
||||
* Restore ABI compatibility for extension methods
|
||||
* Fix handling of optional dependencies in java generator
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 12 13:01:39 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Add upstream patch to fix build on armv9:
|
||||
* protobuf-gh23194.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 8 20:06:48 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.0, which enables Edition 2024 for all languages with
|
||||
the following changes:
|
||||
* The default for string_type feature changes from STRING to VIEW
|
||||
* New features enforce_naming_style,m default_symbol_visibility,
|
||||
enum_name_uses_string_view (C++), nest_in_file_class (Java),
|
||||
large_enum (Java)
|
||||
* Add support for import option, export / local Keywords,
|
||||
* Weak imports are no longer allowed
|
||||
* ctype field option is no longer allowed
|
||||
* java_multiple_files file option is removed
|
||||
- drop protobuf-fix-google-imports.patch now included upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 21 10:01:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Cherry-pick protobuf-fix-google-imports.patch to fix import issues of
|
||||
reverse-dependency packages within the google namespace (bsc#1244918)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 18 07:25:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 31.1
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Add missing copts attribute (#21982)
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Python pyi print "import datetime" for Duration/Timestamp
|
||||
field
|
||||
* Add recursion depth limits to pure python (#bsc1244663, CVE-2025-4565)
|
||||
* Fix cmake staleness test
|
||||
- from version 31.0
|
||||
* Loosen py_proto_library check to be on the import path instead
|
||||
of full directory (i.e. excluding external/module-name prefix).
|
||||
* Add support for import option for protoc.
|
||||
* Add notices.h with information about our dependencies' licenses
|
||||
and add --notices flag to protoc to print the contents of that file.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Remove fast-path check for non-clang compilers in MessageCreator.
|
||||
* Add missing include.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Add nontemporal software prefetcher to repeated ptr field dtor
|
||||
to improve performance.
|
||||
* Warn on unused RepeatedPtrField.
|
||||
* Add notices.h with information about our dependencies' licenses and
|
||||
add --notices flag to protoc to print the contents of that file.
|
||||
* Fix a bug in handling of implicit-presence string_view fields.
|
||||
* Control bounds checks via BUILD flags.
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Create hardened versions of Get and Mutable for repeated_field.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Use ProtobufToStringOutput to control the output format of
|
||||
AbstractMessage.Builder.toString.
|
||||
* Implement Protobuf Java Immutable API nest_in_file_class feature
|
||||
for Edition 2024.
|
||||
* Introduce a Generated annotation to eventually replace
|
||||
javax.annotation.Generated
|
||||
* Add volatile to featuresResolved
|
||||
* Fix Java concurrency issue in feature resolution for old <=3.25.x
|
||||
gencode using lazy feature resolution.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Split maven dependencies into dev vs local
|
||||
* Improve error messaging when detecting and erroring out on integer
|
||||
overflow of byte count limit variables.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Remove "experimental API" warnings from members in the .NET protobuf runtime.
|
||||
* Improve performace of repeated packed fixedSize fields (#19667)
|
||||
* [ObjC] Deprecate GPBFieldDescriptor.isOptional.
|
||||
* [ObjC] Raise the library version and enable new generated code.
|
||||
* Cherry-pick Rust fix to 31.x (#21617)
|
||||
* Add upb_Map_GetMutable API to upb
|
||||
* See also UPB changes below, which may affect Rust.
|
||||
* Update GetCurrentTime to use datetime.datetime.now
|
||||
* Make Py JSON float_precision apply to both float and double fields.
|
||||
* -Add '+' and '-' annotations for Timestamp and Duration in Python
|
||||
* Bug fix for FieldMask.MergeFrom() with unset fields.
|
||||
* Make python text_format able to skip unknown fields for repeated messages
|
||||
* Fix segment fault for UPB Pyhon 'in' method of empty repeated extensions
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Check with fallback descriptorDB for FindExtensionByNumber()/
|
||||
FindAllExtensions in UPB python pool.
|
||||
* Add clear() method to repeated fields in Python.
|
||||
* Register Scalar/MessageMapContainerTypes as virtual subclasses of
|
||||
* Fix python codegen crash when C++ features are used.
|
||||
* Add more detail to the comment for GetMessageClassesForFiles
|
||||
* Add constructing unpack routine to Python Protobuf Any API.
|
||||
* Implement typing for proto Timestamp/Duration assignments.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* Automated rollback of commit f9863df. (#21355)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* See also UPB changes below, which may affect PHP C-Extension.
|
||||
* Fix silent failure of rb_test rules to run test (#21733)
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Ruby | Support installing the gem via git and some other
|
||||
small build tweaks (#21061)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* [Ruby]Implement #to_hash for message classes (#20866)
|
||||
* Drop Ruby 3.0
|
||||
* Fixes #18726 by backslash escaping descriptor data containing #
|
||||
if the hashmark appears immediately before any of $, {, or @.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* See also UPB changes below, which may affect Ruby C-Extension.
|
||||
* Fixed LTO-only linker error in upb linker arrays.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Add upb_Map_GetMutable API to upb (dd5bf5e)
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Upb: delete functions in map_gencode_util. They're unused
|
||||
after the Map iterator API change.
|
||||
* Upb: Update _upb_map_next signature to return a boolean
|
||||
and remove the _nextmutable Map iterator API.
|
||||
* Change upb C generated map iteration function to not
|
||||
hand out MapEntry pointers.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Expose the upb_ByteSize function to upb clients. Note that the
|
||||
current naive implementation is no more efficient than serializing
|
||||
the message yourself and noting the resulting size.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Tolerate message set extensions encoded as normal deliminited submessages
|
||||
* Automated rollback of commit 6bde8c4.
|
||||
* Fix UPB fast table build.
|
||||
* Patch rules_ruby to apply neverlink = True to the jars
|
||||
rule (#21416) (#21505)
|
||||
* Restore JDK8 compatibility in Bazel for libraries with
|
||||
dependencies from Maven (e.g. //java/util)
|
||||
* Protobuf: add //:go_features_proto Bazel alias (f79be3e)
|
||||
* Fixes -lpthread problem when building with android_arm64 config (#20337)
|
||||
- Bump abseil_min_version to 20250127.0
|
||||
- Bump sover to 31_1_0
|
||||
- Update list of Java sources for lite build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 25 16:38:17 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 30.2:
|
||||
* return types in descriptor (such as full_name) to be
|
||||
absl::string_view. This opens up memory savings in descriptors.
|
||||
* stop exposing the ctype from FieldDescriptor options.
|
||||
* debug API redacts sensitive fields
|
||||
* Remove MutableRepeatedFieldRef<T>::Reserve().
|
||||
* Removal of previously deprecated API, for replacements see
|
||||
https://protobuf.dev/news/v30/#remove-deprecated
|
||||
* C++17 support required
|
||||
* Python 3.8 support dropped
|
||||
* Python deprecated API sremoved, for replacements see
|
||||
https://protobuf.dev/news/v30/#python-remove-apis
|
||||
* compatibility with abseil-cpp: Remove if_constexpr usage
|
||||
- drop versionize-shlibs.patch, related change included upstream
|
||||
- includes changes from 29.4:
|
||||
* Fix Java concurrency issue in feature resolution for old
|
||||
<=3.25.x gencode using lazy feature resolution
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 1 09:05:08 UTC 2025 - Antonello Tartamo <antonello.tartamo@suse.com>
|
||||
|
||||
- update to 29.3
|
||||
* Fix cmake installation location of java and go features.
|
||||
* Add .bazeliskrc for protobuf repo to tell bazelisk to use 7.1.2 by default.
|
||||
* Update artifact actions to v4
|
||||
* Added protobuf-java-util-removescope.patch to avoid Java compilation errors
|
||||
due to dependencies marked as runtime.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
@@ -273,7 +25,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
.com/protocolbuffers/protobuf/commit/3ea568a9b6107ebf0d617c47
|
||||
6f53a31490fd3182)
|
||||
* Mute the minor version warning
|
||||
* fixed (bsc#1230778, CVE-2024-7254)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# spec file for package protobuf-java
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2026 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
%define tarname protobuf
|
||||
Name: protobuf-java
|
||||
Version: 33.3
|
||||
Version: 28.3
|
||||
Release: 0
|
||||
Summary: Java Bindings for Google Protocol Buffers
|
||||
License: BSD-3-Clause
|
||||
@@ -29,7 +29,6 @@ Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%
|
||||
Source1: https://repo1.maven.org/maven2/com/google/protobuf/%{name}/4.%{version}/%{name}-4.%{version}.pom
|
||||
Source2: https://repo1.maven.org/maven2/com/google/protobuf/%{name}lite/4.%{version}/%{name}lite-4.%{version}.pom
|
||||
Source3: https://repo1.maven.org/maven2/com/google/protobuf/%{name}-util/4.%{version}/%{name}-util-4.%{version}.pom
|
||||
Patch0: protobuf-java-util-removescope.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: maven-local
|
||||
@@ -78,14 +77,15 @@ Group: Documentation/HTML
|
||||
This package contains the API documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{tarname}-%{version}
|
||||
cp %{SOURCE1} java/core/pom.xml
|
||||
cp %{SOURCE2} java/lite/pom.xml
|
||||
cp %{SOURCE3} java/util/pom.xml
|
||||
%autopatch -p1
|
||||
%autosetup -p1 -n %{tarname}-%{version}
|
||||
|
||||
# The previous blank line is crucial for older system being able
|
||||
# to use the autosetup macro
|
||||
|
||||
pushd java
|
||||
|
||||
cp %{SOURCE1} core/pom.xml
|
||||
cp %{SOURCE2} lite/pom.xml
|
||||
cp %{SOURCE3} util/pom.xml
|
||||
%pom_disable_module kotlin
|
||||
%pom_disable_module kotlin-lite
|
||||
%pom_remove_plugin :animal-sniffer-maven-plugin
|
||||
@@ -173,7 +173,6 @@ cp \
|
||||
core/src/main/java/com/google/protobuf/FloatArrayList.java \
|
||||
core/src/main/java/com/google/protobuf/GeneratedMessageInfoFactory.java \
|
||||
core/src/main/java/com/google/protobuf/GeneratedMessageLite.java \
|
||||
core/src/main/java/com/google/protobuf/Generated.java \
|
||||
core/src/main/java/com/google/protobuf/InlineMe.java \
|
||||
core/src/main/java/com/google/protobuf/IntArrayList.java \
|
||||
core/src/main/java/com/google/protobuf/Internal.java \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-parent</artifactId>
|
||||
<version>4.33.3</version>
|
||||
<version>4.28.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>protobuf-javalite</artifactId>
|
||||
251
protobuf.changes
251
protobuf.changes
@@ -1,250 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 10 11:50:18 UTC 2026 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
Fri Nov 14 14:32:06 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- update to 33.3, a general maintenance release:
|
||||
* Java: Correctly apply JSON recursion limit when parsing an
|
||||
Any-of-Any
|
||||
* Updates to tests, and developer visible bug fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 7 19:33:12 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 33.2:
|
||||
* Add EDITION_UNSTABLE for new edition development
|
||||
* Python: Add BTI to branch targets when branch protection is
|
||||
enabled
|
||||
* Developer visible fixes, code correctness fixes, tests fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 16 18:41:50 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.1:
|
||||
* C++: Fix Any hasbit consistency issue in OSS
|
||||
* Java: Expose NestedInFileClass naming helpers for Java immutable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 17 16:21:36 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.0:
|
||||
* Compiler: disable symbol visibility enforcement by default in
|
||||
C++ runtime
|
||||
* C++: JSON parser/serializer bug fixes and code-level fixes
|
||||
* Python: Bug fixes: crashes, parser fixes
|
||||
* Java: Restored compatibility of runtime with gencode created
|
||||
with protoc <3.21
|
||||
* Java: Restore ABI compatibility for extension methods which was
|
||||
previously (knowingly) broken with 4.x
|
||||
- drop protobuf-gh23194.patch, included upstream
|
||||
- java: turn protobuf-java-util-removescope.patch from sources into
|
||||
a patch, rebase and fix rpm autopatch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 20 17:11:43 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.1:
|
||||
* Compiler: Ship all option dependencies to plugins along with
|
||||
regular ones
|
||||
* Compiler: Unify plugin and built-in generators to use request/
|
||||
response interface
|
||||
* Disable symbol visibility enforcement by default in C++ runtime
|
||||
* Fix handling of optional dependencies in java generator
|
||||
* Restore Protobuf Java extension modifiers in gencode
|
||||
* Restore ABI compatibility for extension methods
|
||||
* Fix handling of optional dependencies in java generator
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 12 13:01:39 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Add upstream patch to fix build on armv9:
|
||||
* protobuf-gh23194.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 8 20:06:48 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.0, which enables Edition 2024 for all languages with
|
||||
the following changes:
|
||||
* The default for string_type feature changes from STRING to VIEW
|
||||
* New features enforce_naming_style,m default_symbol_visibility,
|
||||
enum_name_uses_string_view (C++), nest_in_file_class (Java),
|
||||
large_enum (Java)
|
||||
* Add support for import option, export / local Keywords,
|
||||
* Weak imports are no longer allowed
|
||||
* ctype field option is no longer allowed
|
||||
* java_multiple_files file option is removed
|
||||
- drop protobuf-fix-google-imports.patch now included upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 21 10:01:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Cherry-pick protobuf-fix-google-imports.patch to fix import issues of
|
||||
reverse-dependency packages within the google namespace (bsc#1244918)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 18 07:25:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 31.1
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Add missing copts attribute (#21982)
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Python pyi print "import datetime" for Duration/Timestamp
|
||||
field
|
||||
* Add recursion depth limits to pure python (#bsc1244663, CVE-2025-4565)
|
||||
* Fix cmake staleness test
|
||||
- from version 31.0
|
||||
* Loosen py_proto_library check to be on the import path instead
|
||||
of full directory (i.e. excluding external/module-name prefix).
|
||||
* Add support for import option for protoc.
|
||||
* Add notices.h with information about our dependencies' licenses
|
||||
and add --notices flag to protoc to print the contents of that file.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Remove fast-path check for non-clang compilers in MessageCreator.
|
||||
* Add missing include.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Add nontemporal software prefetcher to repeated ptr field dtor
|
||||
to improve performance.
|
||||
* Warn on unused RepeatedPtrField.
|
||||
* Add notices.h with information about our dependencies' licenses and
|
||||
add --notices flag to protoc to print the contents of that file.
|
||||
* Fix a bug in handling of implicit-presence string_view fields.
|
||||
* Control bounds checks via BUILD flags.
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Create hardened versions of Get and Mutable for repeated_field.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Use ProtobufToStringOutput to control the output format of
|
||||
AbstractMessage.Builder.toString.
|
||||
* Implement Protobuf Java Immutable API nest_in_file_class feature
|
||||
for Edition 2024.
|
||||
* Introduce a Generated annotation to eventually replace
|
||||
javax.annotation.Generated
|
||||
* Add volatile to featuresResolved
|
||||
* Fix Java concurrency issue in feature resolution for old <=3.25.x
|
||||
gencode using lazy feature resolution.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Split maven dependencies into dev vs local
|
||||
* Improve error messaging when detecting and erroring out on integer
|
||||
overflow of byte count limit variables.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Remove "experimental API" warnings from members in the .NET protobuf runtime.
|
||||
* Improve performace of repeated packed fixedSize fields (#19667)
|
||||
* [ObjC] Deprecate GPBFieldDescriptor.isOptional.
|
||||
* [ObjC] Raise the library version and enable new generated code.
|
||||
* Cherry-pick Rust fix to 31.x (#21617)
|
||||
* Add upb_Map_GetMutable API to upb
|
||||
* See also UPB changes below, which may affect Rust.
|
||||
* Update GetCurrentTime to use datetime.datetime.now
|
||||
* Make Py JSON float_precision apply to both float and double fields.
|
||||
* -Add '+' and '-' annotations for Timestamp and Duration in Python
|
||||
* Bug fix for FieldMask.MergeFrom() with unset fields.
|
||||
* Make python text_format able to skip unknown fields for repeated messages
|
||||
* Fix segment fault for UPB Pyhon 'in' method of empty repeated extensions
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Check with fallback descriptorDB for FindExtensionByNumber()/
|
||||
FindAllExtensions in UPB python pool.
|
||||
* Add clear() method to repeated fields in Python.
|
||||
* Register Scalar/MessageMapContainerTypes as virtual subclasses of
|
||||
* Fix python codegen crash when C++ features are used.
|
||||
* Add more detail to the comment for GetMessageClassesForFiles
|
||||
* Add constructing unpack routine to Python Protobuf Any API.
|
||||
* Implement typing for proto Timestamp/Duration assignments.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* Automated rollback of commit f9863df. (#21355)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* See also UPB changes below, which may affect PHP C-Extension.
|
||||
* Fix silent failure of rb_test rules to run test (#21733)
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Ruby | Support installing the gem via git and some other
|
||||
small build tweaks (#21061)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* [Ruby]Implement #to_hash for message classes (#20866)
|
||||
* Drop Ruby 3.0
|
||||
* Fixes #18726 by backslash escaping descriptor data containing #
|
||||
if the hashmark appears immediately before any of $, {, or @.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* See also UPB changes below, which may affect Ruby C-Extension.
|
||||
* Fixed LTO-only linker error in upb linker arrays.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Add upb_Map_GetMutable API to upb (dd5bf5e)
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Upb: delete functions in map_gencode_util. They're unused
|
||||
after the Map iterator API change.
|
||||
* Upb: Update _upb_map_next signature to return a boolean
|
||||
and remove the _nextmutable Map iterator API.
|
||||
* Change upb C generated map iteration function to not
|
||||
hand out MapEntry pointers.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Expose the upb_ByteSize function to upb clients. Note that the
|
||||
current naive implementation is no more efficient than serializing
|
||||
the message yourself and noting the resulting size.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Tolerate message set extensions encoded as normal deliminited submessages
|
||||
* Automated rollback of commit 6bde8c4.
|
||||
* Fix UPB fast table build.
|
||||
* Patch rules_ruby to apply neverlink = True to the jars
|
||||
rule (#21416) (#21505)
|
||||
* Restore JDK8 compatibility in Bazel for libraries with
|
||||
dependencies from Maven (e.g. //java/util)
|
||||
* Protobuf: add //:go_features_proto Bazel alias (f79be3e)
|
||||
* Fixes -lpthread problem when building with android_arm64 config (#20337)
|
||||
- Bump abseil_min_version to 20250127.0
|
||||
- Bump sover to 31_1_0
|
||||
- Update list of Java sources for lite build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 25 16:38:17 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 30.2:
|
||||
* return types in descriptor (such as full_name) to be
|
||||
absl::string_view. This opens up memory savings in descriptors.
|
||||
* stop exposing the ctype from FieldDescriptor options.
|
||||
* debug API redacts sensitive fields
|
||||
* Remove MutableRepeatedFieldRef<T>::Reserve().
|
||||
* Removal of previously deprecated API, for replacements see
|
||||
https://protobuf.dev/news/v30/#remove-deprecated
|
||||
* C++17 support required
|
||||
* Python 3.8 support dropped
|
||||
* Python deprecated API sremoved, for replacements see
|
||||
https://protobuf.dev/news/v30/#python-remove-apis
|
||||
* compatibility with abseil-cpp: Remove if_constexpr usage
|
||||
- drop versionize-shlibs.patch, related change included upstream
|
||||
- includes changes from 29.4:
|
||||
* Fix Java concurrency issue in feature resolution for old
|
||||
<=3.25.x gencode using lazy feature resolution
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 1 09:05:08 UTC 2025 - Antonello Tartamo <antonello.tartamo@suse.com>
|
||||
|
||||
- update to 29.3
|
||||
* Fix cmake installation location of java and go features.
|
||||
* Add .bazeliskrc for protobuf repo to tell bazelisk to use 7.1.2 by default.
|
||||
* Update artifact actions to v4
|
||||
* Added protobuf-java-util-removescope.patch to avoid Java compilation errors
|
||||
due to dependencies marked as runtime.
|
||||
- Add internal-pure-python-fixes.patch to backport changes required for CVE fix
|
||||
- Add CVE-2025-4565.patch to fix parsing of untrusted Protocol Buffers
|
||||
data containing an arbitrary number of recursive groups or messages
|
||||
can lead to crash due to RecursionError (bsc#1244663, CVE-2025-4565)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
@@ -273,7 +33,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
.com/protocolbuffers/protobuf/commit/3ea568a9b6107ebf0d617c47
|
||||
6f53a31490fd3182)
|
||||
* Mute the minor version warning
|
||||
* fixed (bsc#1230778, CVE-2024-7254)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# spec file for package protobuf
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2026 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
%define tarname protobuf
|
||||
# see cmake/abseil-cpp.cmake and src/google/protobuf/port_def.inc
|
||||
%define abseil_min_version 20250512.1
|
||||
%global sover 33_3_0
|
||||
%define abseil_min_version 20230125.3
|
||||
%global sover 28_3_0
|
||||
%if 0%{?gcc_version} < 11
|
||||
%define with_gcc 11
|
||||
%endif
|
||||
@@ -66,7 +66,7 @@
|
||||
%global protoc_arch sparc_64
|
||||
%endif
|
||||
Name: protobuf
|
||||
Version: 33.3
|
||||
Version: 28.3
|
||||
Release: 0
|
||||
Summary: Protocol Buffers - Google's data interchange format
|
||||
License: BSD-3-Clause
|
||||
@@ -74,6 +74,12 @@ Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/protocolbuffers/protobuf
|
||||
Source0: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}/%{tarname}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Patch1: versionize-shlibs.patch
|
||||
# PATCH-FIX-UPSTREAM - Backport changes from 29.x branch required to apply fix for CVE-2025-4565
|
||||
Patch2: internal-pure-python-fixes.patch
|
||||
# PATCH-FIX-UPSTREAM - Fix parsing of untrusted Protocol Buffers data containing an arbitrary
|
||||
# number of recursive groups or messages can lead to crash due to RecursionError (CVE-2025-4565)
|
||||
Patch3: CVE-2025-4565.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc%{?with_gcc}-c++
|
||||
@@ -99,14 +105,12 @@ BuildRequires: pkgconfig(absl_flat_hash_set) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_function_ref) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_hash) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_layout) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_log_globals) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_log_initialize) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_log_severity) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_memory) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_node_hash_map) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_node_hash_set) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_random_distributions) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_random_random) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_optional) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_span) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_status) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_statusor) >= %{abseil_min_version}
|
||||
@@ -115,6 +119,7 @@ BuildRequires: pkgconfig(absl_synchronization) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_time) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_type_traits) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_utility) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(absl_variant) >= %{abseil_min_version}
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
%if %{with check}
|
||||
BuildRequires: libgmock-devel >= 1.7.0
|
||||
@@ -192,7 +197,7 @@ export CC=gcc-%{with_gcc}
|
||||
%endif
|
||||
%cmake \
|
||||
-Dprotobuf_BUILD_TESTS=OFF \
|
||||
%{nil}
|
||||
-Dprotobuf_ABSL_PROVIDER=package
|
||||
%cmake_build
|
||||
|
||||
%if %{with check}
|
||||
@@ -203,7 +208,9 @@ export CC=gcc-%{with_gcc}
|
||||
%install
|
||||
%cmake_install
|
||||
install -Dm 0644 editors/proto.vim %{buildroot}%{_datadir}/vim/site/syntax/proto.vim
|
||||
install -D java/core/src/main/resources/google/protobuf/java_features.proto %{buildroot}%{_includedir}/java/core/src/main/resources/google/protobuf/java_features.proto
|
||||
# manual ln that we could not manage to get into versionize-shlibs.patch
|
||||
ln -s libutf8_range-%{version}.0.so %{buildroot}/%{_libdir}/libutf8_range.so
|
||||
ln -s libutf8_validity-%{version}.0.so %{buildroot}/%{_libdir}/libutf8_validity.so
|
||||
|
||||
# create maven metadata for the protoc executable
|
||||
install -dm 0755 %{buildroot}%{_datadir}/maven-metadata
|
||||
@@ -255,8 +262,8 @@ __PROTOBUF__
|
||||
|
||||
%files -n libutf8_range-%{sover}
|
||||
%license LICENSE
|
||||
%{_libdir}/libutf8_range.so.%{version}.0
|
||||
%{_libdir}/libutf8_validity.so.%{version}.0
|
||||
%{_libdir}/libutf8_range-%{version}.0.so
|
||||
%{_libdir}/libutf8_validity-%{version}.0.so
|
||||
|
||||
%files devel
|
||||
%license LICENSE
|
||||
@@ -273,6 +280,7 @@ __PROTOBUF__
|
||||
%dir %{_includedir}/java/core/src/main/resources/google/protobuf
|
||||
%{_includedir}/java/core/src/main/resources/google/protobuf/java_features.proto
|
||||
%{_includedir}/upb
|
||||
%{_includedir}/upb_generator
|
||||
%{_includedir}/*.h
|
||||
%{_libdir}/cmake/protobuf
|
||||
%{_libdir}/cmake/utf8_range
|
||||
|
||||
@@ -1,251 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 10 11:50:18 UTC 2026 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 33.3, a general maintenance release:
|
||||
* Java: Correctly apply JSON recursion limit when parsing an
|
||||
Any-of-Any
|
||||
* Updates to tests, and developer visible bug fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 7 19:33:12 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 33.2:
|
||||
* Add EDITION_UNSTABLE for new edition development
|
||||
* Python: Add BTI to branch targets when branch protection is
|
||||
enabled
|
||||
* Developer visible fixes, code correctness fixes, tests fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 16 18:41:50 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.1:
|
||||
* C++: Fix Any hasbit consistency issue in OSS
|
||||
* Java: Expose NestedInFileClass naming helpers for Java immutable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 17 16:21:36 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 33.0:
|
||||
* Compiler: disable symbol visibility enforcement by default in
|
||||
C++ runtime
|
||||
* C++: JSON parser/serializer bug fixes and code-level fixes
|
||||
* Python: Bug fixes: crashes, parser fixes
|
||||
* Java: Restored compatibility of runtime with gencode created
|
||||
with protoc <3.21
|
||||
* Java: Restore ABI compatibility for extension methods which was
|
||||
previously (knowingly) broken with 4.x
|
||||
- drop protobuf-gh23194.patch, included upstream
|
||||
- java: turn protobuf-java-util-removescope.patch from sources into
|
||||
a patch, rebase and fix rpm autopatch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 20 17:11:43 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.1:
|
||||
* Compiler: Ship all option dependencies to plugins along with
|
||||
regular ones
|
||||
* Compiler: Unify plugin and built-in generators to use request/
|
||||
response interface
|
||||
* Disable symbol visibility enforcement by default in C++ runtime
|
||||
* Fix handling of optional dependencies in java generator
|
||||
* Restore Protobuf Java extension modifiers in gencode
|
||||
* Restore ABI compatibility for extension methods
|
||||
* Fix handling of optional dependencies in java generator
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 12 13:01:39 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Add upstream patch to fix build on armv9:
|
||||
* protobuf-gh23194.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 8 20:06:48 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- Update to 32.0, which enables Edition 2024 for all languages with
|
||||
the following changes:
|
||||
* The default for string_type feature changes from STRING to VIEW
|
||||
* New features enforce_naming_style,m default_symbol_visibility,
|
||||
enum_name_uses_string_view (C++), nest_in_file_class (Java),
|
||||
large_enum (Java)
|
||||
* Add support for import option, export / local Keywords,
|
||||
* Weak imports are no longer allowed
|
||||
* ctype field option is no longer allowed
|
||||
* java_multiple_files file option is removed
|
||||
- drop protobuf-fix-google-imports.patch now included upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 21 10:01:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Cherry-pick protobuf-fix-google-imports.patch to fix import issues of
|
||||
reverse-dependency packages within the google namespace (bsc#1244918)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 18 07:25:22 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 31.1
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Add missing copts attribute (#21982)
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Support allowing late injection of language feature set
|
||||
defaults from FeatureSet extensions while getting feature
|
||||
set extension values.
|
||||
* Python pyi print "import datetime" for Duration/Timestamp
|
||||
field
|
||||
* Add recursion depth limits to pure python (#bsc1244663, CVE-2025-4565)
|
||||
* Fix cmake staleness test
|
||||
- from version 31.0
|
||||
* Loosen py_proto_library check to be on the import path instead
|
||||
of full directory (i.e. excluding external/module-name prefix).
|
||||
* Add support for import option for protoc.
|
||||
* Add notices.h with information about our dependencies' licenses
|
||||
and add --notices flag to protoc to print the contents of that file.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Remove fast-path check for non-clang compilers in MessageCreator.
|
||||
* Add missing include.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Add nontemporal software prefetcher to repeated ptr field dtor
|
||||
to improve performance.
|
||||
* Warn on unused RepeatedPtrField.
|
||||
* Add notices.h with information about our dependencies' licenses and
|
||||
add --notices flag to protoc to print the contents of that file.
|
||||
* Fix a bug in handling of implicit-presence string_view fields.
|
||||
* Control bounds checks via BUILD flags.
|
||||
* Upgrade abseil-cpp to 20250127 and use @com_google_absl -> @abseil-cpp
|
||||
and com_google_googletest -> @googletest canonical BCR names.
|
||||
* Create hardened versions of Get and Mutable for repeated_field.
|
||||
* Add weak attribute to GetClassData to speed up clang builds.
|
||||
* Use ProtobufToStringOutput to control the output format of
|
||||
AbstractMessage.Builder.toString.
|
||||
* Implement Protobuf Java Immutable API nest_in_file_class feature
|
||||
for Edition 2024.
|
||||
* Introduce a Generated annotation to eventually replace
|
||||
javax.annotation.Generated
|
||||
* Add volatile to featuresResolved
|
||||
* Fix Java concurrency issue in feature resolution for old <=3.25.x
|
||||
gencode using lazy feature resolution.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Split maven dependencies into dev vs local
|
||||
* Improve error messaging when detecting and erroring out on integer
|
||||
overflow of byte count limit variables.
|
||||
* Remove Java runtime classes from kotlin release.
|
||||
* Remove "experimental API" warnings from members in the .NET protobuf runtime.
|
||||
* Improve performace of repeated packed fixedSize fields (#19667)
|
||||
* [ObjC] Deprecate GPBFieldDescriptor.isOptional.
|
||||
* [ObjC] Raise the library version and enable new generated code.
|
||||
* Cherry-pick Rust fix to 31.x (#21617)
|
||||
* Add upb_Map_GetMutable API to upb
|
||||
* See also UPB changes below, which may affect Rust.
|
||||
* Update GetCurrentTime to use datetime.datetime.now
|
||||
* Make Py JSON float_precision apply to both float and double fields.
|
||||
* -Add '+' and '-' annotations for Timestamp and Duration in Python
|
||||
* Bug fix for FieldMask.MergeFrom() with unset fields.
|
||||
* Make python text_format able to skip unknown fields for repeated messages
|
||||
* Fix segment fault for UPB Pyhon 'in' method of empty repeated extensions
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Check with fallback descriptorDB for FindExtensionByNumber()/
|
||||
FindAllExtensions in UPB python pool.
|
||||
* Add clear() method to repeated fields in Python.
|
||||
* Register Scalar/MessageMapContainerTypes as virtual subclasses of
|
||||
* Fix python codegen crash when C++ features are used.
|
||||
* Add more detail to the comment for GetMessageClassesForFiles
|
||||
* Add constructing unpack routine to Python Protobuf Any API.
|
||||
* Implement typing for proto Timestamp/Duration assignments.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* Automated rollback of commit f9863df. (#21355)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Feat(php): improve return typehint when repeatedfield (#11734)
|
||||
* See also UPB changes below, which may affect PHP C-Extension.
|
||||
* Fix silent failure of rb_test rules to run test (#21733)
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Ruby | Support installing the gem via git and some other
|
||||
small build tweaks (#21061)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* [Ruby]Implement #to_hash for message classes (#20866)
|
||||
* Drop Ruby 3.0
|
||||
* Fixes #18726 by backslash escaping descriptor data containing #
|
||||
if the hashmark appears immediately before any of $, {, or @.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* Ruby | Add support for a protobuf debug build (#21060)
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Ruby: fix bug in Map.hash
|
||||
* See also UPB changes below, which may affect Ruby C-Extension.
|
||||
* Fixed LTO-only linker error in upb linker arrays.
|
||||
* Deprecate Descriptor Label. As an alternative, add helper methods
|
||||
for checking whether a field is required or repeated.
|
||||
* Add upb_Map_GetMutable API to upb (dd5bf5e)
|
||||
* Fix upb to escape DefinitelyNeedsEscape (like " and ') for bytes field
|
||||
* Upb: delete functions in map_gencode_util. They're unused
|
||||
after the Map iterator API change.
|
||||
* Upb: Update _upb_map_next signature to return a boolean
|
||||
and remove the _nextmutable Map iterator API.
|
||||
* Change upb C generated map iteration function to not
|
||||
hand out MapEntry pointers.
|
||||
* Ruby: Allow to get a file descriptor by a file name (#20287)
|
||||
* Expose the upb_ByteSize function to upb clients. Note that the
|
||||
current naive implementation is no more efficient than serializing
|
||||
the message yourself and noting the resulting size.
|
||||
* Move upb minitable code generator into protoc
|
||||
* Tolerate message set extensions encoded as normal deliminited submessages
|
||||
* Automated rollback of commit 6bde8c4.
|
||||
* Fix UPB fast table build.
|
||||
* Patch rules_ruby to apply neverlink = True to the jars
|
||||
rule (#21416) (#21505)
|
||||
* Restore JDK8 compatibility in Bazel for libraries with
|
||||
dependencies from Maven (e.g. //java/util)
|
||||
* Protobuf: add //:go_features_proto Bazel alias (f79be3e)
|
||||
* Fixes -lpthread problem when building with android_arm64 config (#20337)
|
||||
- Bump abseil_min_version to 20250127.0
|
||||
- Bump sover to 31_1_0
|
||||
- Update list of Java sources for lite build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun May 25 16:38:17 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
- update to 30.2:
|
||||
* return types in descriptor (such as full_name) to be
|
||||
absl::string_view. This opens up memory savings in descriptors.
|
||||
* stop exposing the ctype from FieldDescriptor options.
|
||||
* debug API redacts sensitive fields
|
||||
* Remove MutableRepeatedFieldRef<T>::Reserve().
|
||||
* Removal of previously deprecated API, for replacements see
|
||||
https://protobuf.dev/news/v30/#remove-deprecated
|
||||
* C++17 support required
|
||||
* Python 3.8 support dropped
|
||||
* Python deprecated API sremoved, for replacements see
|
||||
https://protobuf.dev/news/v30/#python-remove-apis
|
||||
* compatibility with abseil-cpp: Remove if_constexpr usage
|
||||
- drop versionize-shlibs.patch, related change included upstream
|
||||
- includes changes from 29.4:
|
||||
* Fix Java concurrency issue in feature resolution for old
|
||||
<=3.25.x gencode using lazy feature resolution
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 1 09:05:08 UTC 2025 - Antonello Tartamo <antonello.tartamo@suse.com>
|
||||
|
||||
- update to 29.3
|
||||
* Fix cmake installation location of java and go features.
|
||||
* Add .bazeliskrc for protobuf repo to tell bazelisk to use 7.1.2 by default.
|
||||
* Update artifact actions to v4
|
||||
* Added protobuf-java-util-removescope.patch to avoid Java compilation errors
|
||||
due to dependencies marked as runtime.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 08:20:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
@@ -273,7 +25,6 @@ Fri Oct 25 15:24:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
.com/protocolbuffers/protobuf/commit/3ea568a9b6107ebf0d617c47
|
||||
6f53a31490fd3182)
|
||||
* Mute the minor version warning
|
||||
* fixed (bsc#1230778, CVE-2024-7254)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 24 20:56:51 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# spec file for package python-protobuf
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2026 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,10 +17,10 @@
|
||||
#
|
||||
|
||||
|
||||
%define baseversion 33.3
|
||||
%define baseversion 28.3
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-protobuf
|
||||
Version: 6.%{baseversion}
|
||||
Version: 5.%{baseversion}
|
||||
Release: 0
|
||||
Summary: Python Bindings for Google Protocol Buffers
|
||||
License: BSD-3-Clause
|
||||
@@ -43,7 +43,7 @@ RPC protocols and file formats.
|
||||
This package contains the Python bindings for Google Protocol Buffers.
|
||||
|
||||
%prep
|
||||
%autosetup -p2 -n protobuf-%{version}
|
||||
%autosetup -p1 -n protobuf-%{version}
|
||||
|
||||
# The previous blank line is crucial for older system being able
|
||||
# to use the autosetup macro
|
||||
@@ -65,6 +65,7 @@ sed -i -e '/env python/d' google/protobuf/internal/*.py
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%{python_sitearch}/google
|
||||
%{python_sitearch}/protobuf*nspkg.pth
|
||||
%{python_sitearch}/protobuf-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
32
versionize-shlibs.patch
Normal file
32
versionize-shlibs.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2024-10-28 10:10:20.918922623 +0100
|
||||
References: https://github.com/protocolbuffers/protobuf/pull/19009
|
||||
|
||||
Unversioned libraries are strongly discouraged. Use
|
||||
https://en.opensuse.org/openSUSE:Shared_library_packaging_policy#When_there_is_no_versioning
|
||||
method 1 to remedy. Though utf8_range has a version of its own ("1.0"
|
||||
visible through the .pc file) and gets third_party/-like treatment,
|
||||
protobuf is the authoritative repository for it, using the protobuf
|
||||
version for our SONAME seems acceptable.
|
||||
|
||||
This openSUSE patch follows SLPP's naming provisions and so is
|
||||
slightly different from PR19009 while the PR is unmerged.
|
||||
|
||||
---
|
||||
third_party/utf8_range/CMakeLists.txt | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
Index: protobuf-28.3/third_party/utf8_range/CMakeLists.txt
|
||||
===================================================================
|
||||
--- protobuf-28.3.orig/third_party/utf8_range/CMakeLists.txt
|
||||
+++ protobuf-28.3/third_party/utf8_range/CMakeLists.txt
|
||||
@@ -19,6 +19,9 @@ add_library (utf8_range
|
||||
# A heavier-weight C++ wrapper that supports Abseil.
|
||||
add_library (utf8_validity utf8_validity.cc utf8_range.c)
|
||||
|
||||
+set_target_properties(utf8_range PROPERTIES OUTPUT_NAME ${LIB_PREFIX}utf8_range-${protobuf_VERSION})
|
||||
+set_target_properties(utf8_validity PROPERTIES OUTPUT_NAME ${LIB_PREFIX}utf8_validity-${protobuf_VERSION})
|
||||
+
|
||||
# Load Abseil dependency.
|
||||
if (NOT TARGET absl::strings)
|
||||
if (NOT ABSL_ROOT_DIR)
|
||||
Reference in New Issue
Block a user