* [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0
@ 2026-03-10 10:43 Michael Nosthoff via buildroot
2026-03-10 10:43 ` [Buildroot] [PATCH v2 2/2] package/protobuf-c: fix protobuf v34.0 compatibility Michael Nosthoff via buildroot
2026-03-10 22:06 ` [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Julien Olivain via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2026-03-10 10:43 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard, Asaf Kahlon
- contains breaking changes, hence python major version is bumped to 7.
Changelog:
https://github.com/protocolbuffers/protobuf/releases/tag/v34.0
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
V2:
- no changes in this commit
- series now contains fix for protobuf-c for protobuf v34.0
---
package/protobuf/protobuf.hash | 2 +-
package/protobuf/protobuf.mk | 2 +-
package/python-protobuf/python-protobuf.hash | 4 ++--
package/python-protobuf/python-protobuf.mk | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash
index 7211fa7c87..fe1084b640 100644
--- a/package/protobuf/protobuf.hash
+++ b/package/protobuf/protobuf.hash
@@ -1,3 +1,3 @@
# Locally calculated
sha256 6e5e117324afd944dcf67f36cf329843bc1a92229a8cd9bb573d7a83130fea7d LICENSE
-sha256 c6c7c27fadc19d40ab2eaa23ff35debfe01f6494a8345559b9bb285ce4144dd1 protobuf-33.5.tar.gz
+sha256 e540aae70d3b4f758846588768c9e39090fab880bc3233a1f42a8ab8d3781efd protobuf-34.0.tar.gz
diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk
index b2046e057b..1d110fdbf0 100644
--- a/package/protobuf/protobuf.mk
+++ b/package/protobuf/protobuf.mk
@@ -7,7 +7,7 @@
# When bumping this package, make sure to also verify if the
# python-protobuf package still works and to update its hash,
# as they share the same version/site variables.
-PROTOBUF_VERSION = 33.5
+PROTOBUF_VERSION = 34.0
PROTOBUF_SITE = https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOBUF_VERSION)
PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
diff --git a/package/python-protobuf/python-protobuf.hash b/package/python-protobuf/python-protobuf.hash
index 1141edf396..1d84f02292 100644
--- a/package/python-protobuf/python-protobuf.hash
+++ b/package/python-protobuf/python-protobuf.hash
@@ -1,5 +1,5 @@
# md5, sha256 from https://pypi.org/pypi/protobuf/json
-md5 5d9230257cd63f6f94ca3a7303b22413 protobuf-6.33.5.tar.gz
-sha256 6ddcac2a081f8b7b9642c09406bc6a4290128fce5f471cddd165960bb9119e5c protobuf-6.33.5.tar.gz
+md5 f8ad7dac46884ad2ac3929eecfcafb0a protobuf-7.34.0.tar.gz
+sha256 3871a3df67c710aaf7bb8d214cc997342e63ceebd940c8c7fc65c9b3d697591a protobuf-7.34.0.tar.gz
# Locally computed sha256 checksums
sha256 6e5e117324afd944dcf67f36cf329843bc1a92229a8cd9bb573d7a83130fea7d LICENSE
diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk
index 167b94a646..84a6c3a8a6 100644
--- a/package/python-protobuf/python-protobuf.mk
+++ b/package/python-protobuf/python-protobuf.mk
@@ -5,8 +5,8 @@
################################################################################
PYTHON_PROTOBUF_VERSION = $(PROTOBUF_VERSION)
-PYTHON_PROTOBUF_SOURCE = protobuf-6.$(PYTHON_PROTOBUF_VERSION).tar.gz
-PYTHON_PROTOBUF_SITE = https://files.pythonhosted.org/packages/ba/25/7c72c307aafc96fa87062aa6291d9f7c94836e43214d43722e86037aac02
+PYTHON_PROTOBUF_SOURCE = protobuf-7.$(PYTHON_PROTOBUF_VERSION).tar.gz
+PYTHON_PROTOBUF_SITE = https://files.pythonhosted.org/packages/f2/00/04a2ab36b70a52d0356852979e08b44edde0435f2115dc66e25f2100f3ab
PYTHON_PROTOBUF_LICENSE = BSD-3-Clause
PYTHON_PROTOBUF_LICENSE_FILES = LICENSE
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/protobuf-c: fix protobuf v34.0 compatibility
2026-03-10 10:43 [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Michael Nosthoff via buildroot
@ 2026-03-10 10:43 ` Michael Nosthoff via buildroot
2026-03-10 22:06 ` [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Julien Olivain via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2026-03-10 10:43 UTC (permalink / raw)
To: buildroot
pull in patch from https://github.com/protobuf-c/protobuf-c/pull/797
which fixes compatibility with Protobuf v34.0
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
.../0001-fix-protobuf-34-compatibility.patch | 208 ++++++++++++++++++
1 file changed, 208 insertions(+)
create mode 100644 package/protobuf-c/0001-fix-protobuf-34-compatibility.patch
diff --git a/package/protobuf-c/0001-fix-protobuf-34-compatibility.patch b/package/protobuf-c/0001-fix-protobuf-34-compatibility.patch
new file mode 100644
index 0000000000..d1acdf232e
--- /dev/null
+++ b/package/protobuf-c/0001-fix-protobuf-34-compatibility.patch
@@ -0,0 +1,208 @@
+From d39f001b4578966600de0aaf7fc665eec6e057e5 Mon Sep 17 00:00:00 2001
+From: Leon White <l.white@interstellarlab.earth>
+Date: Tue, 10 Mar 2026 10:37:18 +0100
+Subject: [PATCH] Fix compilation against protobuf v34
+
+Upstream: https://github.com/protobuf-c/protobuf-c/pull/797
+Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
+
+---
+ protoc-gen-c/c_bytes_field.cc | 4 ++--
+ protoc-gen-c/c_enum_field.cc | 4 ++--
+ protoc-gen-c/c_field.cc | 10 +++++-----
+ protoc-gen-c/c_helpers.cc | 11 +++++++++++
+ protoc-gen-c/c_helpers.h | 5 +++++
+ protoc-gen-c/c_message_field.cc | 4 ++--
+ protoc-gen-c/c_primitive_field.cc | 4 ++--
+ protoc-gen-c/c_string_field.cc | 4 ++--
+ 8 files changed, 31 insertions(+), 15 deletions(-)
+
+diff --git a/protoc-gen-c/c_bytes_field.cc b/protoc-gen-c/c_bytes_field.cc
+index c8ac7725..ab101177 100644
+--- a/protoc-gen-c/c_bytes_field.cc
++++ b/protoc-gen-c/c_bytes_field.cc
+@@ -94,7 +94,7 @@ BytesFieldGenerator::~BytesFieldGenerator() {}
+
+ void BytesFieldGenerator::GenerateStructMembers(google::protobuf::io::Printer* printer) const
+ {
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(variables_, "ProtobufCBinaryData $name$$deprecated$;\n");
+ break;
+@@ -135,7 +135,7 @@ std::string BytesFieldGenerator::GetDefaultValue(void) const
+ }
+ void BytesFieldGenerator::GenerateStaticInit(google::protobuf::io::Printer* printer) const
+ {
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(variables_, "$default_value$");
+ break;
+diff --git a/protoc-gen-c/c_enum_field.cc b/protoc-gen-c/c_enum_field.cc
+index c3111f50..78ffb1c7 100644
+--- a/protoc-gen-c/c_enum_field.cc
++++ b/protoc-gen-c/c_enum_field.cc
+@@ -95,7 +95,7 @@ EnumFieldGenerator::~EnumFieldGenerator() {}
+
+ void EnumFieldGenerator::GenerateStructMembers(google::protobuf::io::Printer* printer) const
+ {
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(variables_, "$type$ $name$$deprecated$;\n");
+ break;
+@@ -117,7 +117,7 @@ std::string EnumFieldGenerator::GetDefaultValue(void) const
+ }
+ void EnumFieldGenerator::GenerateStaticInit(google::protobuf::io::Printer* printer) const
+ {
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(variables_, "$default$");
+ break;
+diff --git a/protoc-gen-c/c_field.cc b/protoc-gen-c/c_field.cc
+index 8d22343f..8f83e1b1 100644
+--- a/protoc-gen-c/c_field.cc
++++ b/protoc-gen-c/c_field.cc
+@@ -125,11 +125,11 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(google::protobuf::io::
+ variables["oneofname"] = CamelToLower(oneof->name());
+
+ if (FieldSyntax(descriptor_) == 3 &&
+- descriptor_->label() == google::protobuf::FieldDescriptor::LABEL_OPTIONAL) {
++ FieldLabel(descriptor_) == google::protobuf::FieldDescriptor::LABEL_OPTIONAL) {
+ variables["LABEL"] = "NONE";
+ optional_uses_has = false;
+ } else {
+- variables["LABEL"] = CamelToUpper(GetLabelName(descriptor_->label()));
++ variables["LABEL"] = CamelToUpper(GetLabelName(FieldLabel(descriptor_)));
+ }
+
+ if (descriptor_->has_default_value()) {
+@@ -145,11 +145,11 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(google::protobuf::io::
+
+ variables["flags"] = "0";
+
+- if (descriptor_->label() == google::protobuf::FieldDescriptor::LABEL_REPEATED
++ if (FieldLabel(descriptor_) == google::protobuf::FieldDescriptor::LABEL_REPEATED
+ && is_packable_type (descriptor_->type())
+ && descriptor_->options().packed()) {
+ variables["flags"] += " | PROTOBUF_C_FIELD_FLAG_PACKED";
+- } else if (descriptor_->label() == google::protobuf::FieldDescriptor::LABEL_REPEATED
++ } else if (FieldLabel(descriptor_) == google::protobuf::FieldDescriptor::LABEL_REPEATED
+ && is_packable_type (descriptor_->type())
+ && FieldSyntax(descriptor_) == 3
+ && !descriptor_->options().has_packed()) {
+@@ -179,7 +179,7 @@ void FieldGenerator::GenerateDescriptorInitializerGeneric(google::protobuf::io::
+ " $value$,\n"
+ " PROTOBUF_C_LABEL_$LABEL$,\n"
+ " PROTOBUF_C_TYPE_$TYPE$,\n");
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(variables, " 0, /* quantifier_offset */\n");
+ break;
+diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
+index e5c177c9..fcfc2588 100644
+--- a/protoc-gen-c/c_helpers.cc
++++ b/protoc-gen-c/c_helpers.cc
+@@ -338,6 +338,17 @@ std::string GetLabelName(google::protobuf::FieldDescriptor::Label label) {
+ return "bad-label";
+ }
+
++google::protobuf::FieldDescriptor::Label FieldLabel(
++ const google::protobuf::FieldDescriptor* field) {
++ if (field->is_repeated()) {
++ return google::protobuf::FieldDescriptor::LABEL_REPEATED;
++ }
++ if (field->is_required()) {
++ return google::protobuf::FieldDescriptor::LABEL_REQUIRED;
++ }
++ return google::protobuf::FieldDescriptor::LABEL_OPTIONAL;
++}
++
+ unsigned
+ WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, compat::StringView name)
+ {
+diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
+index 69369997..210f17a9 100644
+--- a/protoc-gen-c/c_helpers.h
++++ b/protoc-gen-c/c_helpers.h
+@@ -153,6 +153,11 @@ std::string FilenameIdentifier(compat::StringView filename);
+ // return 'required', 'optional', or 'repeated'
+ std::string GetLabelName(google::protobuf::FieldDescriptor::Label label);
+
++// Returns the field label in a way that is compatible with protobuf versions
++// where FieldDescriptor::label() is unavailable.
++google::protobuf::FieldDescriptor::Label FieldLabel(
++ const google::protobuf::FieldDescriptor* field);
++
+ // write IntRanges entries for a bunch of sorted values.
+ // returns the number of ranges there are to bsearch.
+ unsigned WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, compat::StringView name);
+diff --git a/protoc-gen-c/c_message_field.cc b/protoc-gen-c/c_message_field.cc
+index 9fca9208..43661353 100644
+--- a/protoc-gen-c/c_message_field.cc
++++ b/protoc-gen-c/c_message_field.cc
+@@ -83,7 +83,7 @@ void MessageFieldGenerator::GenerateStructMembers(google::protobuf::io::Printer*
+ vars["name"] = FieldName(descriptor_);
+ vars["type"] = FullNameToC(descriptor_->message_type()->full_name(), descriptor_->message_type()->file());
+ vars["deprecated"] = FieldDeprecated(descriptor_);
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ case google::protobuf::FieldDescriptor::LABEL_OPTIONAL:
+ printer->Print(vars, "$type$ *$name$$deprecated$;\n");
+@@ -103,7 +103,7 @@ std::string MessageFieldGenerator::GetDefaultValue(void) const
+ }
+ void MessageFieldGenerator::GenerateStaticInit(google::protobuf::io::Printer* printer) const
+ {
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ case google::protobuf::FieldDescriptor::LABEL_OPTIONAL:
+ printer->Print("NULL");
+diff --git a/protoc-gen-c/c_primitive_field.cc b/protoc-gen-c/c_primitive_field.cc
+index 588f60e6..b3a4a46e 100644
+--- a/protoc-gen-c/c_primitive_field.cc
++++ b/protoc-gen-c/c_primitive_field.cc
+@@ -109,7 +109,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(google::protobuf::io::Printe
+ vars["name"] = FieldName(descriptor_);
+ vars["deprecated"] = FieldDeprecated(descriptor_);
+
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(vars, "$c_type$ $name$$deprecated$;\n");
+ break;
+@@ -156,7 +156,7 @@ void PrimitiveFieldGenerator::GenerateStaticInit(google::protobuf::io::Printer*
+ } else {
+ vars["default_value"] = "0";
+ }
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ printer->Print(vars, "$default_value$");
+ break;
+diff --git a/protoc-gen-c/c_string_field.cc b/protoc-gen-c/c_string_field.cc
+index 163f4246..6aea8dd3 100644
+--- a/protoc-gen-c/c_string_field.cc
++++ b/protoc-gen-c/c_string_field.cc
+@@ -94,7 +94,7 @@ void StringFieldGenerator::GenerateStructMembers(google::protobuf::io::Printer*
+ {
+ const ProtobufCFileOptions opt = descriptor_->file()->options().GetExtension(pb_c_file);
+
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ case google::protobuf::FieldDescriptor::LABEL_OPTIONAL:
+ if (opt.const_strings())
+@@ -138,7 +138,7 @@ void StringFieldGenerator::GenerateStaticInit(google::protobuf::io::Printer* pri
+ } else {
+ vars["default"] = "(char *)protobuf_c_empty_string";
+ }
+- switch (descriptor_->label()) {
++ switch (FieldLabel(descriptor_)) {
+ case google::protobuf::FieldDescriptor::LABEL_REQUIRED:
+ case google::protobuf::FieldDescriptor::LABEL_OPTIONAL:
+ printer->Print(vars, "$default$");
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0
2026-03-10 10:43 [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Michael Nosthoff via buildroot
2026-03-10 10:43 ` [Buildroot] [PATCH v2 2/2] package/protobuf-c: fix protobuf v34.0 compatibility Michael Nosthoff via buildroot
@ 2026-03-10 22:06 ` Julien Olivain via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Julien Olivain via buildroot @ 2026-03-10 22:06 UTC (permalink / raw)
To: Michael Nosthoff; +Cc: buildroot, James Hilliard, Asaf Kahlon
On 10/03/2026 11:43, Michael Nosthoff via buildroot wrote:
> - contains breaking changes, hence python major version is bumped to 7.
>
> Changelog:
> https://github.com/protocolbuffers/protobuf/releases/tag/v34.0
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-10 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 10:43 [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Michael Nosthoff via buildroot
2026-03-10 10:43 ` [Buildroot] [PATCH v2 2/2] package/protobuf-c: fix protobuf v34.0 compatibility Michael Nosthoff via buildroot
2026-03-10 22:06 ` [Buildroot] [PATCH v2 1/2] package/{python-}protobuf: bump to version 34.0 Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox