commit protobuf-c for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package protobuf-c for openSUSE:Factory checked in at 2024-10-27 11:24:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/protobuf-c (Old) and /work/SRC/openSUSE:Factory/.protobuf-c.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "protobuf-c" Sun Oct 27 11:24:04 2024 rev:30 rq:1216992 version:1.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/protobuf-c/protobuf-c.changes 2024-08-15 09:57:24.468667358 +0200 +++ /work/SRC/openSUSE:Factory/.protobuf-c.new.2020/protobuf-c.changes 2024-10-27 11:24:07.567547149 +0100 @@ -1,0 +2,17 @@ +Tue Oct 22 08:48:51 UTC 2024 - Fridrich Strba <fstrba@suse.com> + +- Modified patch: + * 711.patch + + Drop a hunk that was creating problems when the protoc-c + was called directly and not just as a plugin to protoc + +------------------------------------------------------------------- +Mon Oct 21 18:20:27 UTC 2024 - Fridrich Strba <fstrba@suse.com> + +- Added patch: + * 711.patch + + Backport the changes from the pull request #711 + https://github.com/protobuf-c/protobuf-c/pull/711 fixing + build with protobuf 26.0+ + +------------------------------------------------------------------- New: ---- 711.patch BETA DEBUG BEGIN: New:- Modified patch: * 711.patch + Drop a hunk that was creating problems when the protoc-c BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ protobuf-c.spec ++++++ --- /var/tmp/diff_new_pack.Pf6JlT/_old 2024-10-27 11:24:08.143571025 +0100 +++ /var/tmp/diff_new_pack.Pf6JlT/_new 2024-10-27 11:24:08.147571191 +0100 @@ -27,6 +27,7 @@ Group: Development/Tools/Other URL: https://github.com/protobuf-c/protobuf-c Source: https://github.com/protobuf-c/protobuf-c/releases/download/v%version/%name-%... +Patch0: 711.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: c++_compiler ++++++ 711.patch ++++++ --- protobuf-c-1.5.0/protoc-c/c_file.cc 2024-10-21 20:22:31.574369622 +0200 +++ protobuf-c-1.5.0/protoc-c/c_file.cc 2024-10-21 20:22:43.064450125 +0200 @@ -117,14 +117,7 @@ void FileGenerator::GenerateHeader(io::Printer* printer) { std::string filename_identifier = FilenameIdentifier(file_->name()); - int min_header_version = 1000000; -#if GOOGLE_PROTOBUF_VERSION >= 4023000 - if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) { -#else - if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) { -#endif - min_header_version = 1003000; - } + const int min_header_version = 1003000; // Generate top of header. printer->Print( --- protobuf-c-1.5.0/protoc-c/c_helpers.h 2024-10-21 20:22:31.574369622 +0200 +++ protobuf-c-1.5.0/protoc-c/c_helpers.h 2024-10-21 20:22:43.064450125 +0200 @@ -70,10 +70,6 @@ #include <protobuf-c/protobuf-c.pb.h> #include <google/protobuf/io/printer.h> -#if GOOGLE_PROTOBUF_VERSION >= 4023000 -# include <google/protobuf/descriptor_legacy.h> -#endif - namespace google { namespace protobuf { namespace compiler { @@ -173,13 +169,21 @@ int compare_name_indices_by_name(const void*, const void*); // Return the syntax version of the file containing the field. -// This wrapper is needed to be able to compile against protobuf2. inline int FieldSyntax(const FieldDescriptor* field) { -#if GOOGLE_PROTOBUF_VERSION >= 4023000 - return FileDescriptorLegacy(field->file()).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3 ? 3 : 2; -#else - return field->file()->syntax() == FileDescriptor::SYNTAX_PROTO3 ? 3 : 2; -#endif + auto proto = FileDescriptorProto(); + field->file()->CopyTo(&proto); + + if (proto.has_syntax()) { + auto syntax = proto.syntax(); + assert(syntax == "proto2" || syntax == "proto3"); + if (syntax == "proto2") { + return 2; + } else if (syntax == "proto3") { + return 3; + } + } + + return 2; } // Work around changes in protobuf >= 22.x without breaking compilation against
participants (1)
-
Source-Sync