#25 Update to 23.3
Opened 10 months ago by orion. Modified 5 months ago
rpms/ orion/protobuf 23-java  into  rawhide

file modified
+2
@@ -26,3 +26,5 @@ 

  /googletest-5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081.tar.gz

  /protobuf-3.19.5-all.tar.gz

  /protobuf-3.19.6-all.tar.gz

+ /protobuf-23.3-all.tar.gz

+ /protobuf-23.4-all.tar.gz

@@ -0,0 +1,57 @@ 

+ diff --git a/CMakeLists.txt b/CMakeLists.txt

+ index e6cf5184b..238520314 100644

+ --- a/CMakeLists.txt

+ +++ b/CMakeLists.txt

+ @@ -343,6 +343,9 @@ endif (protobuf_UNICODE)

+  set(protobuf_ABSL_PROVIDER "module" CACHE STRING "Provider of absl library")

+  set_property(CACHE protobuf_ABSL_PROVIDER PROPERTY STRINGS "module" "package")

+  

+ +set(protobuf_JSONCPP_PROVIDER "module" CACHE STRING "Provider of jsoncpp library")

+ +set_property(CACHE protobuf_JSONCPP_PROVIDER PROPERTY STRINGS "module" "package")

+ +

+  if (protobuf_BUILD_TESTS)

+    include(${protobuf_SOURCE_DIR}/cmake/gtest.cmake)

+  endif (protobuf_BUILD_TESTS)

+ diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake

+ index 61ac25a0d..6ba9050af 100644

+ --- a/cmake/conformance.cmake

+ +++ b/cmake/conformance.cmake

+ @@ -1,12 +1,15 @@

+ -

+ -if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/jsoncpp/CMakeLists.txt")

+ -  message(FATAL_ERROR

+ -          "Cannot find third_party/jsoncpp directory that's needed to "

+ -          "build conformance tests. If you use git, make sure you have cloned "

+ -          "submodules:\n"

+ -          "  git submodule update --init --recursive\n"

+ -          "If instead you want to skip them, run cmake with:\n"

+ -          "  cmake -Dprotobuf_BUILD_CONFORMANCE=OFF\n")

+ +if (protobuf_JSONCPP_PROVIDER STREQUAL "module")

+ +  if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/jsoncpp/CMakeLists.txt")

+ +    message(FATAL_ERROR

+ +            "Cannot find third_party/jsoncpp directory that's needed to "

+ +            "build conformance tests. If you use git, make sure you have cloned "

+ +            "submodules:\n"

+ +            "  git submodule update --init --recursive\n"

+ +            "If instead you want to skip them, run cmake with:\n"

+ +            "  cmake -Dprotobuf_BUILD_CONFORMANCE=OFF\n")

+ +  endif()

+ +elseif(protobuf_JSONCPP_PROVIDER STREQUAL "package")

+ +  find_package(jsoncpp REQUIRED)

+  endif()

+  

+  add_custom_command(

+ @@ -84,6 +87,10 @@ add_test(NAME conformance_cpp_test

+    DEPENDS conformance_test_runner conformance_cpp)

+  

+  set(JSONCPP_WITH_TESTS OFF CACHE BOOL "Disable tests")

+ -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp third_party/jsoncpp)

+ -target_include_directories(conformance_test_runner PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp/include)

+ -target_link_libraries(conformance_test_runner jsoncpp_lib)

+ +if(protobuf_JSONCPP_PROVIDER STREQUAL "module")

+ +  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp third_party/jsoncpp)

+ +  target_include_directories(conformance_test_runner PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp/include)

+ +  target_link_libraries(conformance_test_runner jsoncpp_lib)

+ +else()

+ +  target_link_libraries(conformance_test_runner jsoncpp)

+ +endif()

@@ -0,0 +1,22 @@ 

+ diff --git a/third_party/utf8_range/CMakeLists.txt b/third_party/utf8_range/CMakeLists.txt

+ index 69a4d8990..002c0b566 100644

+ --- a/third_party/utf8_range/CMakeLists.txt

+ +++ b/third_party/utf8_range/CMakeLists.txt

+ @@ -11,7 +11,7 @@ option (utf8_range_ENABLE_INSTALL "Configure installation" ON)

+  

+  ##

+  # Create the lightweight C library

+ -add_library (utf8_range STATIC

+ +add_library (utf8_range SHARED

+    naive.c

+    range2-neon.c

+    range2-sse.c

+ @@ -19,7 +19,7 @@ add_library (utf8_range STATIC

+  

+  ##

+  # A heavier-weight C++ wrapper that supports Abseil.

+ -add_library (utf8_validity STATIC utf8_validity.cc)

+ +add_library (utf8_validity SHARED utf8_validity.cc)

+  

+  # Load Abseil dependency.

+  if (NOT TARGET absl::strings)

@@ -14,63 +14,3 @@ 

   TEST(AnyTest, TestUnpackWithTypeMismatch) {

     protobuf_unittest::TestAny payload;

     payload.set_int32_value(13);

- --- src/google/protobuf/arena_unittest.cc	2021-10-22 08:52:37.804534886 +0200

- +++ src/google/protobuf/arena_unittest.cc.orig	2021-10-22 08:51:55.150217437 +0200

- @@ -1341,34 +1341,6 @@

-  // Align n to next multiple of 8

-  uint64_t Align8(uint64_t n) { return (n + 7) & -8; }

-  

- -TEST(ArenaTest, SpaceAllocated_and_Used) {

- -  Arena arena_1;

- -  EXPECT_EQ(0, arena_1.SpaceAllocated());

- -  EXPECT_EQ(0, arena_1.SpaceUsed());

- -  EXPECT_EQ(0, arena_1.Reset());

- -  Arena::CreateArray<char>(&arena_1, 320);

- -  // Arena will allocate slightly more than 320 for the block headers.

- -  EXPECT_LE(320, arena_1.SpaceAllocated());

- -  EXPECT_EQ(Align8(320), arena_1.SpaceUsed());

- -  EXPECT_LE(320, arena_1.Reset());

- -

- -  // Test with initial block.

- -  std::vector<char> arena_block(1024);

- -  ArenaOptions options;

- -  options.start_block_size = 256;

- -  options.max_block_size = 8192;

- -  options.initial_block = &arena_block[0];

- -  options.initial_block_size = arena_block.size();

- -  Arena arena_2(options);

- -  EXPECT_EQ(1024, arena_2.SpaceAllocated());

- -  EXPECT_EQ(0, arena_2.SpaceUsed());

- -  EXPECT_EQ(1024, arena_2.Reset());

- -  Arena::CreateArray<char>(&arena_2, 55);

- -  EXPECT_EQ(1024, arena_2.SpaceAllocated());

- -  EXPECT_EQ(Align8(55), arena_2.SpaceUsed());

- -  EXPECT_EQ(1024, arena_2.Reset());

- -}

- -

-  TEST(ArenaTest, BlockSizeDoubling) {

-    Arena arena;

-    EXPECT_EQ(0, arena.SpaceUsed());

- @@ -1368,22 +1396,6 @@

-    }

-  }

-  

- -TEST(ArenaTest, BlockSizeSmallerThanAllocation) {

- -  for (size_t i = 0; i <= 8; ++i) {

- -    ArenaOptions opt;

- -    opt.start_block_size = opt.max_block_size = i;

- -    Arena arena(opt);

- -

- -    *Arena::Create<int64_t>(&arena) = 42;

- -    EXPECT_GE(arena.SpaceAllocated(), 8);

- -    EXPECT_EQ(8, arena.SpaceUsed());

- -

- -    *Arena::Create<int64_t>(&arena) = 42;

- -    EXPECT_GE(arena.SpaceAllocated(), 16);

- -    EXPECT_EQ(16, arena.SpaceUsed());

- -  }

- -}

- -

-  TEST(ArenaTest, GetArenaShouldReturnTheArenaForArenaAllocatedMessages) {

-    Arena arena;

-    ArenaMessage* message = Arena::CreateMessage<ArenaMessage>(&arena);

@@ -1,25 +0,0 @@ 

- --- a/src/google/protobuf/io/zero_copy_stream_unittest.cc.orig	2021-01-12 12:25:18.471517830 +0100

- +++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc	2021-01-12 12:25:42.022696126 +0100

- @@ -712,22 +712,6 @@

-    }

-  }

-  

- -// Verifies that outputs up to kint32max can be created.

- -TEST_F(IoTest, LargeOutput) {

- -  std::string str;

- -  StringOutputStream output(&str);

- -  void* unused_data;

- -  int size;

- -  // Repeatedly calling Next should eventually grow the buffer to kint32max.

- -  do {

- -    EXPECT_TRUE(output.Next(&unused_data, &size));

- -  } while (str.size() < std::numeric_limits<int>::max());

- -  // Further increases should be possible.

- -  output.Next(&unused_data, &size);

- -  EXPECT_GT(size, 0);

- -}

- -

- -

-  // To test files, we create a temporary file, write, read, truncate, repeat.

-  TEST_F(IoTest, FileIo) {

-    std::string filename = TestTempDir() + "/zero_copy_stream_test_file";

@@ -1,135 +0,0 @@ 

- From 5576f98f5d6aa0cc1e845a5fe5d00c034ef51f30 Mon Sep 17 00:00:00 2001

- From: Alexander Shadchin <alexandr.shadchin@gmail.com>

- Date: Sun, 14 Aug 2022 21:13:49 +0300

- Subject: [PATCH] Fix build with Python 3.11

- 

- The PyFrameObject structure members have been removed from the public C API.

- ---

-  python/google/protobuf/pyext/descriptor.cc | 75 ++++++++++++++++++----

-  1 file changed, 62 insertions(+), 13 deletions(-)

- 

- diff --git a/python/google/protobuf/pyext/descriptor.cc b/python/google/protobuf/pyext/descriptor.cc

- index a2993d908..44d811923 100644

- --- a/python/google/protobuf/pyext/descriptor.cc

- +++ b/python/google/protobuf/pyext/descriptor.cc

- @@ -57,6 +57,37 @@

-                                : 0)                                            \

-                         : PyBytes_AsStringAndSize(ob, (charpp), (sizep)))

-  

- +#if PY_VERSION_HEX < 0x030900B1 && !defined(PYPY_VERSION)

- +static PyCodeObject* PyFrame_GetCode(PyFrameObject *frame)

- +{

- +    Py_INCREF(frame->f_code);

- +    return frame->f_code;

- +}

- +

- +static PyFrameObject* PyFrame_GetBack(PyFrameObject *frame)

- +{

- +    Py_XINCREF(frame->f_back);

- +    return frame->f_back;

- +}

- +#endif

- +

- +#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)

- +static PyObject* PyFrame_GetLocals(PyFrameObject *frame)

- +{

- +    if (PyFrame_FastToLocalsWithError(frame) < 0) {

- +        return NULL;

- +    }

- +    Py_INCREF(frame->f_locals);

- +    return frame->f_locals;

- +}

- +

- +static PyObject* PyFrame_GetGlobals(PyFrameObject *frame)

- +{

- +    Py_INCREF(frame->f_globals);

- +    return frame->f_globals;

- +}

- +#endif

- +

-  namespace google {

-  namespace protobuf {

-  namespace python {

- @@ -95,48 +126,66 @@ bool _CalledFromGeneratedFile(int stacklevel) {

-    // This check is not critical and is somewhat difficult to implement correctly

-    // in PyPy.

-    PyFrameObject* frame = PyEval_GetFrame();

- +  PyCodeObject* frame_code = nullptr;

- +  PyObject* frame_globals = nullptr;

- +  PyObject* frame_locals = nullptr;

- +  bool result = false;

- +

-    if (frame == NULL) {

- -    return false;

- +    goto exit;

-    }

- +  Py_INCREF(frame);

-    while (stacklevel-- > 0) {

- -    frame = frame->f_back;

- +    PyFrameObject* next_frame = PyFrame_GetBack(frame);

- +    Py_DECREF(frame);

- +    frame = next_frame;

-      if (frame == NULL) {

- -      return false;

- +      goto exit;

-      }

-    }

-  

- -  if (frame->f_code->co_filename == NULL) {

- -    return false;

- +  frame_code = PyFrame_GetCode(frame);

- +  if (frame_code->co_filename == NULL) {

- +    goto exit;

-    }

-    char* filename;

-    Py_ssize_t filename_size;

- -  if (PyString_AsStringAndSize(frame->f_code->co_filename,

- +  if (PyString_AsStringAndSize(frame_code->co_filename,

-                                 &filename, &filename_size) < 0) {

-      // filename is not a string.

-      PyErr_Clear();

- -    return false;

- +    goto exit;

-    }

-    if ((filename_size < 3) ||

-        (strcmp(&filename[filename_size - 3], ".py") != 0)) {

-      // Cython's stack does not have .py file name and is not at global module

-      // scope.

- -    return true;

- +    result = true;

- +    goto exit;

-    }

-    if (filename_size < 7) {

-      // filename is too short.

- -    return false;

- +    goto exit;

-    }

-    if (strcmp(&filename[filename_size - 7], "_pb2.py") != 0) {

-      // Filename is not ending with _pb2.

- -    return false;

- +    goto exit;

-    }

-  

- -  if (frame->f_globals != frame->f_locals) {

- +  frame_globals = PyFrame_GetGlobals(frame);

- +  frame_locals = PyFrame_GetLocals(frame);

- +  if (frame_globals != frame_locals) {

-      // Not at global module scope

- -    return false;

- +    goto exit;

-    }

-  #endif

- -  return true;

- +  result = true;

- +exit:

- +  Py_XDECREF(frame_globals);

- +  Py_XDECREF(frame_locals);

- +  Py_XDECREF(frame_code);

- +  Py_XDECREF(frame);

- +  return result;

-  }

-  

-  // If the calling code is not a _pb2.py file, raise AttributeError.

- -- 

- 2.38.1

- 

@@ -0,0 +1,28 @@ 

+ diff -up protobuf-23.3/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java.UnittestRetention protobuf-23.3/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java

+ --- protobuf-23.3/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java.UnittestRetention	2023-06-15 22:14:42.754927813 -0600

+ +++ protobuf-23.3/java/core/src/test/java/com/google/protobuf/DescriptorsTest.java	2023-06-16 07:35:45.400850777 -0600

+ @@ -65,7 +65,6 @@ import protobuf_unittest.UnittestProto.T

+  import protobuf_unittest.UnittestProto.TestReservedEnumFields;

+  import protobuf_unittest.UnittestProto.TestReservedFields;

+  import protobuf_unittest.UnittestProto.TestService;

+ -import protobuf_unittest.UnittestRetention;

+  import java.util.Collections;

+  import java.util.List;

+  import org.junit.Test;

+ @@ -565,16 +564,6 @@ public class DescriptorsTest {

+          .isEqualTo(UnittestCustomOptions.MethodOpt1.METHODOPT1_VAL2);

+    }

+  

+ -  @Test

+ -  public void testOptionRetention() throws Exception {

+ -    // Verify that options with RETENTION_SOURCE are stripped from the

+ -    // generated descriptors.

+ -    FileOptions options = UnittestRetention.getDescriptor().getOptions();

+ -    assertThat(options.hasExtension(UnittestRetention.plainOption)).isTrue();

+ -    assertThat(options.hasExtension(UnittestRetention.runtimeRetentionOption)).isTrue();

+ -    assertThat(options.hasExtension(UnittestRetention.sourceRetentionOption)).isFalse();

+ -  }

+ -

+    /** Test that the FieldDescriptor.Type enum is the same as the WireFormat.FieldType enum. */

+    @Test

+    public void testFieldTypeTablesMatch() throws Exception {

file modified
+118 -130
@@ -10,99 +10,66 @@ 

  %bcond_without java

  %endif

  

- #global rcver rc2

+ # Language major versions

+ %global pb_cxx 4

+ %global pb_java 3

+ %global pb_python 4

+ 

+ %global pb_release 23.4

+ #global pb_prerelease rc3

+ %global so_version %{pb_release}.0

+ %global pb_version %{pb_release}%{?pb_prerelease:~%{pb_prerelease}}

+ %global pb_source  %{pb_release}%{?pb_prerelease:-%{pb_prerelease}}

  

  Summary:        Protocol Buffers - Google's data interchange format

  Name:           protobuf

+ # NOTE: protobuf sets the sover to the full version of the package, so

+ # every version change is a soname bump and all deps need to get rebuilt.

  # NOTE: perl-Alien-ProtoBuf has an exact-version dependency on the version of

  # protobuf with which it was built; it therefore needs to be rebuilt even for

  # “patch” updates of protobuf.

- Version:        3.19.6

- %global so_version 30

- Release:        6%{?dist}

- 

- # The entire source is BSD-3-Clause, except the following files, which belong

- # to the build system; are unpackaged maintainer utility scripts; or are used

- # only for building tests that are not packaged—and so they do not affect the

- # licenses of the binary RPMs:

- #

- # FSFAP:

- #   m4/ax_cxx_compile_stdcxx.m4

- #   m4/ax_prog_cc_for_build.m4

- #   m4/ax_prog_cxx_for_build.m4

- # Apache-2.0:

- #   python/mox.py

- #   python/stubout.py

- #   third_party/googletest/

- #     except the following, which are BSD-3-Clause:

- #       third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc

- #       third_party/googletest/googletest/include/gtest/gtest-param-test.h

- #       third_party/googletest/googletest/include/gtest/gtest-param-test.h.pump

- #       third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h

- #       third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump

- #       third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h

- #       third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h.pump

- # MIT:

- #   conformance/third_party/jsoncpp/json.h

- #   conformance/third_party/jsoncpp/jsoncpp.cpp

+ Version:        %{pb_version}

+ Release:        1%{?dist}

  License:        BSD-3-Clause

  URL:            https://github.com/protocolbuffers/protobuf

- Source0:        %{url}/archive/v%{version}%{?rcver}/protobuf-%{version}%{?rcver}-all.tar.gz

+ Source0:        %{url}/archive/v%{pb_source}/protobuf-%{pb_source}-all.tar.gz

  

  Source1:        ftdetect-proto.vim

  Source2:        protobuf-init.el

  

- # We bundle a copy of the exact version of gtest that is used by upstream in

- # the source RPM rather than using the system copy. This is to be discouraged,

- # but necessary in this case.  It is not treated as a bundled library because

- # it is used only at build time, and contributes nothing to the installed

- # files.  We take measures to verify this in %%check. See

- # https://github.com/protocolbuffers/protobuf/tree/v%%{version}/third_party to

- # check the correct commit hash.

- %global gtest_url https://github.com/google/googletest

- %global gtest_commit 5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081

- %global gtest_dir googletest-%{gtest_commit}

- # For tests (using exactly the same version as the release)

- Source3:        %{gtest_url}/archive/%{gtest_commit}/%{gtest_dir}.tar.gz

- 

  # Man page hand-written for Fedora in groff_man(7) format based on “protoc

  # --help” output.

- Source4:        protoc.1

+ Source3:        protoc.1

  

- # https://github.com/protocolbuffers/protobuf/issues/8082

- Patch1:         protobuf-3.14-disable-IoTest.LargeOutput.patch

  # Disable tests that are failing on 32bit systems

  Patch2:         disable-tests-on-32-bit-systems.patch

  # https://bugzilla.redhat.com/show_bug.cgi?id=2051202

  # java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)

  # throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @12d5624a

- #	at com.google.protobuf.ServiceTest.testGetPrototype(ServiceTest.java:107)

+ # at com.google.protobuf.ServiceTest.testGetPrototype(ServiceTest.java:107)

  Patch3:         protobuf-3.19.4-jre17-add-opens.patch

- # Backport upstream commit da973aff2adab60a9e516d3202c111dbdde1a50f:

- #   Fix build with Python 3.11

- #

- #   The PyFrameObject structure members have been removed from the public C API.

- Patch4:         protobuf-3.19.4-python3.11.patch

- 

- # A bundled copy of jsoncpp is included in the conformance tests, but the

- # result is not packaged, so we do not treat it as a formal bundled

- # dependency—thus the virtual Provides below is commented out. The bundling is

- # removed in a later release:

- #   Make jsoncpp a formal dependency

- #   https://github.com/protocolbuffers/protobuf/pull/10739

- # The bundled version number is obtained from JSONCPP_VERSION_STRING in

- # conformance/third_party/jsoncpp/json.h.

- # Provides:       bundled(jsoncpp) = 1.6.5

- 

- BuildRequires:  autoconf

- BuildRequires:  automake

- BuildRequires:  libtool

- 

- BuildRequires:  make

+ 

+ # Patch CMake config to allow the use of a system provided

+ # jsoncpp and force libutf8 to build as a shared library.

+ Patch4:         cmake-enable-system-jsoncpp.patch

+ Patch5:         cmake-shared-utf8_range-build-type.patch

+ 

+ # Configure python build to use default CXX standard.

+ Patch6:         python-cxx-standard.patch

+ 

+ # No protobuf_unittest.UnittestRetention for some unknown reason

+ Patch7:         protobuf-UnittestRetention.patch

+ 

+ BuildRequires:  cmake

+ BuildRequires:  ninja-build

  BuildRequires:  gcc-c++

  

  BuildRequires:  emacs

  BuildRequires:  zlib-devel

+ BuildRequires:  gmock-devel

+ BuildRequires:  gtest-devel

+ BuildRequires:  abseil-cpp-devel

+ BuildRequires:  jsoncpp-devel

  

  %if %{with java}

  %ifnarch %{java_arches}
@@ -113,6 +80,10 @@ 

  Obsoletes:      protobuf-javalite < 3.19.4-4

  %endif

  %endif

+ Provides:       protobuf-cxx = %{pb_cxx}.%{pb_version}

+ Provides:       protobuf-cxx = %{version}-%{release}

+ Provides:       protobuf-cpp = %{pb_cxx}.%{pb_version}

+ Provides:       protobuf-cpp = %{version}-%{release}

  

  %description

  Protocol Buffers are a way of encoding structured data in an efficient
@@ -120,7 +91,7 @@ 

  its internal RPC protocols and file formats.

  

  Protocol buffers are a flexible, efficient, automated mechanism for

- serializing structured data – think XML, but smaller, faster, and

+ serializing structured data - think XML, but smaller, faster, and

  simpler. You define how you want your data to be structured once, then

  you can use special generated source code to easily write and read

  your structured data to and from a variety of data streams and using a
@@ -139,10 +110,15 @@ 

  Summary:        Protocol Buffers C++ headers and libraries

  Requires:       protobuf = %{version}-%{release}

  Requires:       protobuf-compiler = %{version}-%{release}

+ Requires:       protobuf-lite = %{version}-%{release}

  Requires:       zlib-devel

  

  Obsoletes:      protobuf-static < 3.19.6-4

  

+ Provides:       protobuf-lite-devel = %{version}-%{release}

+ Obsoletes:      protobuf-lite-devel < 23

+ Obsoletes:      protobuf-lite-static < 3.19.6-4

+ 

  %description devel

  This package contains Protocol Buffers compiler for all languages and

  C++ headers and libraries
@@ -157,21 +133,6 @@ 

  which only depends libprotobuf-lite, which is much smaller than libprotobuf but

  lacks descriptors, reflection, and some other features.

  

- %package lite-devel

- Summary:        Protocol Buffers LITE_RUNTIME development libraries

- Requires:       protobuf-devel = %{version}-%{release}

- Requires:       protobuf-lite = %{version}-%{release}

- 

- Obsoletes:      protobuf-lite-static < 3.19.6-4

- 

- %description lite-devel

- This package contains development libraries built with

- optimize_for = LITE_RUNTIME.

- 

- The "optimize_for = LITE_RUNTIME" option causes the compiler to generate code

- which only depends libprotobuf-lite, which is much smaller than libprotobuf but

- lacks descriptors, reflection, and some other features.

- 

  %if %{with python}

  %package -n python3-protobuf

  Summary:        Python bindings for Google Protocol Buffers
@@ -186,6 +147,7 @@ 

  Conflicts:      protobuf-compiler > %{version}

  Conflicts:      protobuf-compiler < %{version}

  Provides:       protobuf-python3 = %{version}-%{release}

+ Provides:       protobuf-python3 = %{pb_python}.%{pb_version}

  

  %description -n python3-protobuf

  This package contains Python libraries for Google Protocol Buffers
@@ -206,7 +168,6 @@ 

  

  %if %{with java}

  %ifarch %{java_arches}

- 

  %package java

  Summary:        Java Protocol Buffers runtime library

  BuildArch:      noarch
@@ -221,9 +182,13 @@ 

  BuildRequires:  mvn(org.apache.maven.plugins:maven-source-plugin)

  BuildRequires:  mvn(org.codehaus.mojo:build-helper-maven-plugin)

  BuildRequires:  mvn(org.easymock:easymock)

+ BuildRequires:  mvn(org.mockito:mockito-core)

  Conflicts:      protobuf-compiler > %{version}

  Conflicts:      protobuf-compiler < %{version}

+ 

  Obsoletes:      protobuf-javanano < 3.6.0

+ Provides:       protobuf-java = %{version}-%{release}

+ Provides:       protobuf-java = %{pb_java}.%{pb_version}

  

  %description java

  This package contains Java Protocol Buffers runtime library.
@@ -271,6 +236,7 @@ 

  Summary:        Emacs mode for Google Protocol Buffers descriptions

  BuildArch:      noarch

  Requires:       emacs-filesystem >= %{_emacs_version}

+ 

  Obsoletes:      protobuf-emacs-el < 3.6.1-4

  

  %description emacs
@@ -278,28 +244,25 @@ 

  descriptions in the Emacs editor.

  

  %prep

- %setup -q -n protobuf-%{version}%{?rcver} -a 3

+ %setup -q -n protobuf-%{pb_source}

  %ifarch %{ix86}

- # IoTest.LargeOutput fails on 32bit arches

- # https://github.com/protocolbuffers/protobuf/issues/8082

- %patch 1 -p1

  # Need to disable more tests that fail on 32bit arches only

  %patch 2 -p0

  %endif

  %patch 3 -p1 -b .jre17

- %patch 4 -p1 -b .python311

- 

- # Copy in the needed gtest/gmock implementations.

- %setup -q -T -D -b 3 -n protobuf-%{version}%{?rcver}

- rm -rvf 'third_party/googletest'

- mv '../%{gtest_dir}' 'third_party/googletest'

+ %patch 4 -p1

+ %patch 5 -p1

+ %patch 6 -p1

+ %patch 7 -p1 -b .UnittestRetention

  

  find -name \*.cc -o -name \*.h | xargs chmod -x

- chmod 644 examples/*

+ find examples -type f | xargs chmod 0644

  %if %{with java}

  %ifarch %{java_arches}

  %pom_remove_dep com.google.errorprone:error_prone_annotations java/util/pom.xml

  %pom_remove_dep com.google.j2objc:j2objc-annotations java/util/pom.xml

+ %pom_remove_plugin org.codehaus.mojo:animal-sniffer-maven-plugin java/pom.xml

+ %pom_remove_plugin org.codehaus.mojo:animal-sniffer-maven-plugin java/util/pom.xml

  

  # Remove annotation libraries we don't have

  annotations=$(
@@ -324,19 +287,22 @@ 

  %build

  iconv -f iso8859-1 -t utf-8 CONTRIBUTORS.txt > CONTRIBUTORS.txt.utf8

  mv CONTRIBUTORS.txt.utf8 CONTRIBUTORS.txt

- export PTHREAD_LIBS="-lpthread"

- ./autogen.sh

- %configure --disable-static

  

- # -Wno-error=type-limits:

- #     https://bugzilla.redhat.com/show_bug.cgi?id=1838470

- #     https://github.com/protocolbuffers/protobuf/issues/7514

- #     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95148

- #  (also set in %%check)

- %make_build CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits"

+ %cmake . -G Ninja \

+   -Dprotobuf_BUILD_TESTS:BOOL=ON \

+   -Dprotobuf_BUILD_CONFORMANCE:BOOL=ON \

+   -Dprotobuf_BUILD_LIBPROTOC:BOOL=ON \

+   -Dprotobuf_ABSL_PROVIDER:STRING="package" \

+   -Dprotobuf_JSONCPP_PROVIDER:STRING="package" \

+   -Dprotobuf_USE_EXTERNAL_GTEST:BOOL=ON

+ 

+ %cmake_build

  

  %if %{with python}

  pushd python

+ PROTOC="../%{_vpath_builddir}/protoc" \

+ CXXFLAGS="%{build_cxxflags}" \

+ LDFLAGS="-L../%{_vpath_builddir} -L../%{_vpath_builddir}/third_party/utf8_range %{build_ldflags}" \

  %py3_build %{?with_python_cpp:-- --cpp_implementation}

  popd

  %endif
@@ -348,6 +314,7 @@ 

  %endif

  %pom_disable_module kotlin java/pom.xml

  %pom_disable_module kotlin-lite java/pom.xml

+ sed -i 's|${protobuf.basedir}/protoc|${protobuf.basedir}/%{_vpath_builddir}/protoc|' java/pom.xml

  %mvn_build -s -- -f java/pom.xml

  %endif

  %endif
@@ -356,26 +323,31 @@ 

  

  

  %check

- %make_build check CXXFLAGS="%{build_cxxflags} -Wno-error=type-limits"

+ %ctest

  

  

  %install

- %make_install %{?_smp_mflags} STRIPBINARIES=no INSTALL="%{__install} -p" CPPROG="cp -p"

+ %cmake_install

  find %{buildroot} -type f -name "*.la" -exec rm -f {} +

+ find %{buildroot} -type f -name "*.o" -exec rm -f {} +

+ find %{buildroot} -type f -name "*.a" -exec rm -f {} +

+ 

  

  # protoc.1 man page

- install -p -m 0644 -D -t '%{buildroot}%{_mandir}/man1' '%{SOURCE4}'

+ %__install -p -m 0644 -D -t '%{buildroot}%{_mandir}/man1' '%{SOURCE3}'

  

  %if %{with python}

  pushd python

+ CXXFLAGS="%{build_cxxflags}" \

+ LDFLAGS="-L../%{_vpath_builddir} -L../%{_vpath_builddir}/third_party/utf8_range %{build_ldflags}" \

  %py3_install %{?with_python_cpp:-- --cpp_implementation}

  %if %{without python_cpp}

  find %{buildroot}%{python3_sitelib} -name \*.py -exec sed -i -e '1{\@^#!@d}' {} +

  %endif

  popd

  %endif

- install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim

- install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim

+ %__install -p -m 644 -D %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/proto.vim

+ %__install -p -m 644 -D editors/proto.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/proto.vim

  

  %if %{with java}

  %ifarch %{java_arches}
@@ -383,31 +355,39 @@ 

  %endif

  %endif

  

- mkdir -p %{buildroot}%{_emacs_sitelispdir}/protobuf

- install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/protobuf

- install -p -m 0644 editors/protobuf-mode.elc %{buildroot}%{_emacs_sitelispdir}/protobuf

- mkdir -p %{buildroot}%{_emacs_sitestartdir}

- install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}

+ %__mkdir -p %{buildroot}%{_emacs_sitelispdir}/protobuf

+ %__install -p -m 0644 editors/protobuf-mode.el %{buildroot}%{_emacs_sitelispdir}/protobuf

+ %__install -p -m 0644 editors/protobuf-mode.elc %{buildroot}%{_emacs_sitelispdir}/protobuf

+ %__mkdir -p %{buildroot}%{_emacs_sitestartdir}

+ %__install -p -m 0644 %{SOURCE2} %{buildroot}%{_emacs_sitestartdir}

  

  %files

- %doc CHANGES.txt CONTRIBUTORS.txt README.md

+ %doc CONTRIBUTORS.txt README.md

  %license LICENSE

- %{_libdir}/libprotobuf.so.%{so_version}{,.*}

+ %{_libdir}/libprotobuf.so.%{so_version}*

+ %{_libdir}/libutf8_validity.so

  

  %files compiler

  %doc README.md

  %license LICENSE

- %{_bindir}/protoc

+ %{_bindir}/protoc*

  %{_mandir}/man1/protoc.1*

- %{_libdir}/libprotoc.so.%{so_version}{,.*}

+ %{_libdir}/libprotoc.so.%{so_version}*

  

  %files devel

  %dir %{_includedir}/google

  %{_includedir}/google/protobuf/

+ %{_includedir}/utf8_*.h

  %{_libdir}/libprotobuf.so

+ %{_libdir}/libprotobuf-lite.so

  %{_libdir}/libprotoc.so

+ %{_libdir}/libutf8_range.so

+ %{_libdir}/cmake/protobuf/

+ %{_libdir}/cmake/utf8_range/

  %{_libdir}/pkgconfig/protobuf.pc

- %doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.md

+ %{_libdir}/pkgconfig/protobuf-lite.pc

+ %{_libdir}/pkgconfig/utf8_range.pc

+ %doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/CMakeLists.txt examples/README.md

  

  %files emacs

  %license LICENSE
@@ -416,25 +396,21 @@ 

  

  %files lite

  %license LICENSE

- %{_libdir}/libprotobuf-lite.so.%{so_version}{,.*}

- 

- %files lite-devel

- %{_libdir}/libprotobuf-lite.so

- %{_libdir}/pkgconfig/protobuf-lite.pc

+ %{_libdir}/libprotobuf-lite.so.*

  

  %if %{with python}

  %files -n python3-protobuf

  %if %{with python_cpp}

  %dir %{python3_sitearch}/google

  %{python3_sitearch}/google/protobuf/

- %{python3_sitearch}/protobuf-%{version}%{?rcver}-py3.*.egg-info/

- %{python3_sitearch}/protobuf-%{version}%{?rcver}-py3.*-nspkg.pth

+ %{python3_sitearch}/protobuf-%{pb_python}.%{pb_release}%{?pb_prerelease}-py3.*.egg-info/

+ %{python3_sitearch}/protobuf-%{pb_python}.%{pb_release}%{?pb_prerelease}-py3.*-nspkg.pth

  %else

  %license LICENSE

  %dir %{python3_sitelib}/google

  %{python3_sitelib}/google/protobuf/

- %{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*.egg-info/

- %{python3_sitelib}/protobuf-%{version}%{?rcver}-py3.*-nspkg.pth

+ %{python3_sitelib}/protobuf-%{pb_python}.%{pb_release}%{?pb_prerelease}-py3.*.egg-info/

+ %{python3_sitelib}/protobuf-%{pb_python}.%{pb_release}%{?pb_prerelease}-py3.*-nspkg.pth

  %endif

  %doc python/README.md

  %doc examples/add_person.py examples/list_people.py examples/addressbook.proto
@@ -447,7 +423,6 @@ 

  

  %if %{with java}

  %ifarch %{java_arches}

- 

  %files java -f .mfiles-protobuf-java

  %doc examples/AddPerson.java examples/ListPeople.java

  %doc java/README.md
@@ -473,6 +448,19 @@ 

  

  

  %changelog

+ * Tue Jul 25 2023 Orion Poplawski <orion@nwra.com> - 23.4-1

+ - Update to 23.4

+ - Merge protobuf-lite-devel into protobuf-devel

+ 

+ * Fri Jul 21 2023 Orion Poplawski <orion@nwra.com> - 23.3-1

+ - Fix java and i686 builds

+ 

+ * Fri Jul 21 2023 Mike Rochefort <mroche@omenos.dev> - 23.3-1

+ - Update to v23.3

+ - Modify versioning to reflect upstream process

+ - Use Ninja for building instead of Makefiles

+ - Remove unnecessary Python compatibility patch

+ 

  * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.19.6-6

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

@@ -0,0 +1,12 @@ 

+ diff --git a/python/setup.py b/python/setup.py

+ index e65631013..e46e0ce67 100755

+ --- a/python/setup.py

+ +++ b/python/setup.py

+ @@ -370,7 +370,6 @@ if __name__ == '__main__':

+        extra_compile_args.append('-Wno-invalid-offsetof')

+        extra_compile_args.append('-Wno-sign-compare')

+        extra_compile_args.append('-Wno-unused-variable')

+ -      extra_compile_args.append('-std=c++14')

+  

+      if sys.platform == 'darwin':

+        extra_compile_args.append('-Wno-shorten-64-to-32')

file modified
+1 -2
@@ -1,2 +1,1 @@ 

- SHA512 (protobuf-3.19.6-all.tar.gz) = 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4

- SHA512 (googletest-5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081.tar.gz) = 623b077b3334958fafcbc34aa85891883277994af33be530efd903f47738a3e3562001cbf3b6da1a5e7d03803c5bd51bcc1fab81490db85d5a4f2b15e7de1495

+ SHA512 (protobuf-23.4-all.tar.gz) = b93a4e0339ecbe085796de5b6c61feae35229d40db9019c043090bcaa483a1cce78a99487c5638482c68832fcede5579a0e5ec731221a88359b80db9bb6dc566

rebased onto 95e45f10bda8acc678b44bcc39452b207a898188

10 months ago

1 new commit added

  • Re-add perl-Alien-Protobuf note
10 months ago

Couple things:
- This re-adds a %{so_version} and makes a note that now every version change is a soname bump.
- It also re-adds the licensing notes. We're they intentionally removed because they are incorrect? I haven't been following changes closely I'm afraid.

1 new commit added

  • Fix i686 builds
10 months ago

So I checked out this PR locally and built protobuf just fine with mock. I'll get this into a COPR and see what we can do here.

I just uploaded protobuf-23.3-all.tar.gz to the lookaside cache.

Thanks, @Ben. If I get this PR merged, it will break grpc as far as I can tell. Do you want me to wait a bit for your update there or just send this one into rawhide now?

Here are the packages that depend directly on protobuf-devel:

mock -r fedora-rawhide-x86_64 --enablerepo='*source*' --dnf-cmd -- repoquery --whatrequires 'protobuf-devel'
CuraEngine-1:5.3.0-3.fc39.src
HepMC3-0:3.2.6-2.fc39.src
OliveTin-0:2022.11.14-4.fc38.src
android-tools-1:33.0.3p1-1.fc38.src
bear-0:3.1.2-4.fc39.src
bloaty-0:1.1-20.fc39.src
chatty-0:0.7.3-2.fc39.src
clementine-0:1.4.0~rc2-3.fc38.src
cockatrice-0:2.8.0-8.fc38.src
credentials-fetcher-0:1.2.0-1.fc39.src
criu-0:3.18-3.fc39.src
dmlite-0:1.15.2-16.fc39.src
dnsdist-0:1.8.0-2.fc39.src
fcitx5-mozc-0:2.17.2102.102.1-25.20230320git242b4f7.fc39.src
gazebo-0:10.1.0-38.fc39.src
gazebo-devel-0:10.1.0-38.fc39.i686
gazebo-devel-0:10.1.0-38.fc39.x86_64
grpc-0:1.48.4-19.fc39.src
grpc-devel-0:1.48.4-19.fc39.i686
grpc-devel-0:1.48.4-19.fc39.x86_64
hidviz-0:0.2-2.fc39.src
ignition-msgs-0:1.0.0-17.fc38.src
ignition-msgs-devel-0:1.0.0-17.fc38.i686
ignition-msgs-devel-0:1.0.0-17.fc38.x86_64
ignition-transport-0:4.0.0-18.fc38.src
ignition-transport-devel-0:4.0.0-18.fc38.i686
ignition-transport-devel-0:4.0.0-18.fc38.x86_64
kf5-kitinerary-0:23.04.2-1.fc39.src
kismet-0:0.0.2022.08.R1-3.fc39.src
libarcus-0:5.2.2-2.fc39.src
libcompizconfig-1:0.8.18-10.fc38.src
liborc-0:1.9.0-1.fc39.src
libphonenumber-0:8.13.15-1.fc39.src
libzypp-0:17.31.8-2.fc39.src
marble-1:23.04.2-1.fc39.src
mmsd-tng-0:2.2.0-2.fc39.src
mosh-0:1.4.0-2.fc38.src
mozc-0:2.29.5111.102-1.fc39.src
mumble-0:1.4.274-5.fc38.src
mypaint-0:2.0.1-7.fc39.src
nanopb-0:0.4.7-2.fc39.src
ncid-0:1.14-2.fc39.src
netdata-0:1.40.1-1.fc39.src
opencv-0:4.7.0-12.fc39.src
opentrep-0:0.07.13-2.fc39.src
osgearth-0:3.4-2.fc39.src
osmpbf-0:1.5.0-13.fc38.src
paraview-0:5.11.1-5.fc39.src
pdns-0:4.8.1-1.fc39.src
pdns-recursor-0:4.9.0-1.fc39.src
perl-Alien-ProtoBuf-0:0.09-20.fc38.noarch
perl-Alien-ProtoBuf-0:0.09-20.fc38.src
plasma-dialer-0:23.01.0-3.fc39.src
plasma-dialer-devel-0:23.01.0-3.fc39.x86_64
pokerth-0:1.1.2-25.fc39.src
protobuf-c-0:1.4.1-4.fc38.src
protobuf-lite-devel-0:3.19.6-5.fc39.i686
protobuf-lite-devel-0:3.19.6-5.fc39.x86_64
protozero-0:1.7.1-5.fc39.src
raceintospace-0:2.0.0-8.rc1.fc38.src
ricochet-0:1.1.4-32.fc39.src
root-0:6.28.04-3.fc39.src
spacebar-0:23.01.0-3.fc39.src
srpc-0:0.10.0-1.fc39.src
strawberry-0:1.0.17-1.fc39.src
usbguard-0:1.1.0-6.fc39.src

At a minimum, all of those directly-dependent packages need to be tested in COPR to ensure they can build with protobuf v4. (Ideally, we would add --recursive to the query, and test those too.)

It is possible that merging and building this update would break a large fraction of those packages in significant and difficult-to-fix ways. Nobody knows because nobody has tested them.

Most of the above packages will need to be rebuilt in a side tag with the protobuf update. We can see the binary packages that link libprotobuf.so.30 and will be affected by the SONAME version bump with:

mock -r fedora-rawhide-x86_64 --dnf-cmd -- repoquery --whatrequires 'libprotobuf.so.*'

Packages that depend on the protobuf compiler at runtime or build time need to be tested too:

mock -r fedora-rawhide-x86_64 --dnf-cmd --enablerepo='*source*' -- repoquery --whatrequires 'protobuf-compiler'
OliveTin-0:2022.11.14-4.fc38.src
et-0:6.2.1-3.fc37.src
golang-github-gogo-protobuf-0:1.3.2-11.fc38.src
golang-github-googleapis-gnostic-0:0.5.3-10.fc38.src
golang-google-protobuf-0:1.28.1-1.fc37.src
grpc-0:1.48.4-19.fc39.src
grpc-cpp-0:1.48.4-19.fc39.i686
grpc-cpp-0:1.48.4-19.fc39.x86_64
grpc-plugins-0:1.48.4-19.fc39.i686
grpc-plugins-0:1.48.4-19.fc39.x86_64
kata-containers-0:3.0.1-1.fc38.1.src
libphonenumber-0:8.13.15-1.fc39.src
mingw-opencv-0:4.7.0-3.fc39.src
mingw32-protobuf-0:3.19.6-2.fc38.noarch
mingw64-protobuf-0:3.19.6-2.fc38.noarch
mirrormanager2-0:0.16-6.fc38.src
mosh-0:1.4.0-2.fc38.src
netavark-0:1.7.0-1.fc39.src
opentrep-0:0.07.13-2.fc39.src
osmpbf-0:1.5.0-13.fc38.src
pdns-0:4.8.1-1.fc39.src
protobuf-c-compiler-0:1.4.1-4.fc38.i686
protobuf-c-compiler-0:1.4.1-4.fc38.x86_64
protobuf-devel-0:3.19.6-5.fc39.i686
protobuf-devel-0:3.19.6-5.fc39.x86_64
protozero-0:1.7.1-5.fc39.src
python-sentry-sdk-0:1.27.0-1.fc39.src
python-sentry-sdk-0:1.28.0-1.fc39.src
python3-grpcio-tools-0:1.48.4-19.fc39.x86_64
ricochet-0:1.1.4-32.fc39.src
rust-prost-build-0:0.8.0-5.fc39.src
rust-prost-build-devel-0:0.8.0-5.fc39.noarch
usbguard-0:1.1.0-6.fc39.src
yara-0:4.3.2-1.fc39.src

So should the packages that use the Python bindings:

mock -r fedora-rawhide-x86_64 --dnf-cmd --enablerepo='*source*' -- repoquery --whatrequires 'python*protobuf*'
buildstream-0:1.6.9-1.fc39.noarch
buildstream-0:1.6.9-1.fc39.src
electron-cash-0:4.3.1-1.fc39.noarch
electrum-0:4.3.4-1.fc39.noarch
electrum-0:4.3.4-1.fc39.src
grpc-0:1.48.4-19.fc39.src
komikku-0:1.22.0-2.fc39.noarch
libarcus-0:5.2.2-2.fc39.src
lutris-0:0.5.13-3.fc39.x86_64
mirrormanager2-0:0.16-6.fc38.noarch
mirrormanager2-0:0.16-6.fc38.src
mirrormanager2-lib-0:0.16-6.fc38.noarch
mirrormanager2-mirrorlist-0:0.16-6.fc38.noarch
mypaint-0:2.0.1-7.fc39.x86_64
mysql-connector-python3-0:8.0.21-9.fc39.noarch
nanopb-0:0.4.7-2.fc39.src
nanopb-python3-0:0.4.7-2.fc39.x86_64
ogr2osm-0:1.1.2-3.fc39.noarch
onnx-0:1.14.0-3.fc39.src
pychromecast-0:13.0.7-1.fc39.src
python-aioesphomeapi-0:13.0.0-3.fc39.src
python-axolotl-0:0.2.3-7.fc39.src
python-carbon-0:1.1.10-2.fc38.src
python-google-api-core-1:2.11.1-4.fc39.src
python-google-cloud-access-approval-0:1.11.2-1.fc39.src
python-google-cloud-access-context-manager-0:0.1.16-2.fc39.src
python-google-cloud-api-gateway-0:1.7.2-1.fc39.src
python-google-cloud-apigee-connect-0:1.7.1-2.fc39.src
python-google-cloud-appengine-admin-0:1.9.3-1.fc39.src
python-google-cloud-asset-0:3.19.1-1.fc39.src
python-google-cloud-automl-0:2.11.2-1.fc39.src
python-google-cloud-bigquery-0:3.11.1-1.fc39.src
python-google-cloud-bigquery-connection-0:1.13.0-1.fc39.src
python-google-cloud-bigquery-datatransfer-0:3.11.2-1.fc39.src
python-google-cloud-bigquery-reservation-0:1.11.2-1.fc39.src
python-google-cloud-bigquery-storage-0:2.22.0-1.fc39.src
python-google-cloud-bigtable-0:2.19.0-2.fc39.src
python-google-cloud-billing-0:1.11.1-1.fc39.src
python-google-cloud-billing-budgets-0:1.11.1-1.fc39.src
python-google-cloud-build-0:3.18.0-1.fc39.src
python-google-cloud-common-0:1.2.0-2.fc39.src
python-google-cloud-container-0:2.26.0-1.fc39.src
python-google-cloud-containeranalysis-0:2.12.2-1.fc39.src
python-google-cloud-data-fusion-0:1.8.2-1.fc39.src
python-google-cloud-datacatalog-0:3.11.1-2.fc39.src
python-google-cloud-dataproc-0:5.4.2-1.fc39.src
python-google-cloud-dataproc-metastore-0:1.12.0-1.fc39.src
python-google-cloud-debugger-client-0:1.7.0-1.fc39.src
python-google-cloud-deploy-0:1.11.0-1.fc39.src
python-google-cloud-dlp-0:3.12.2-1.fc39.src
python-google-cloud-dms-0:1.7.1-2.fc39.src
python-google-cloud-domains-0:1.4.1-2.fc39.src
python-google-cloud-filestore-0:1.5.0-2.fc39.src
python-google-cloud-firestore-0:2.11.1-2.fc39.src
python-google-cloud-functions-0:1.13.1-2.fc39.src
python-google-cloud-iam-0:2.12.1-1.fc39.src
python-google-cloud-kms-0:2.18.0-1.fc39.src
python-google-cloud-org-policy-0:1.8.2-1.fc39.src
python-google-cloud-os-config-0:1.15.2-1.fc39.src
python-google-cloud-private-ca-0:1.8.1-1.fc39.src
python-google-cloud-pubsub-0:2.14.1-1.fc39.src
python-google-cloud-redis-0:2.13.1-1.fc39.src
python-google-cloud-shell-0:1.6.1-2.fc39.src
python-google-cloud-source-context-0:1.4.2-1.fc39.src
python-google-cloud-spanner-0:3.36.0-2.fc39.src
python-googleapis-common-protos-0:1.59.1-3.fc39.src
python-grafeas-0:1.8.1-2.fc39.src
python-grpc-google-iam-v1-0:0.12.6-3.fc39.src
python-omemo-backend-signal-0:0.3.1~beta-3.fc39.src
python-opentelemetry-0:1.18.0-4.fc39.src
python-opentelemetry-contrib-1:1.18.0-21.fc39.src
python-proto-plus-0:1.22.3-1.fc39.src
python-sentry-sdk-0:1.28.0-1.fc39.src
python-steam-0:1.4.4-2.fc39.src
python3-aioesphomeapi-0:13.0.0-3.fc39.noarch
python3-axolotl-0:0.2.3-7.fc39.noarch
python3-chromecast-0:13.0.7-1.fc39.noarch
python3-criu-0:3.18-3.fc39.x86_64
python3-etcd3-0:0.12.0-9.fc39.noarch
python3-google-api-core-1:2.11.1-4.fc39.noarch
python3-google-cloud-access-approval-0:1.11.2-1.fc39.noarch
python3-google-cloud-access-context-manager-0:0.1.16-2.fc39.noarch
python3-google-cloud-api-gateway-0:1.7.2-1.fc39.noarch
python3-google-cloud-apigee-connect-0:1.7.1-2.fc39.noarch
python3-google-cloud-appengine-admin-0:1.9.3-1.fc39.noarch
python3-google-cloud-asset-0:3.19.1-1.fc39.noarch
python3-google-cloud-automl-0:2.11.2-1.fc39.noarch
python3-google-cloud-bigquery-0:3.11.1-1.fc39.noarch
python3-google-cloud-bigquery-connection-0:1.13.0-1.fc39.noarch
python3-google-cloud-bigquery-datatransfer-0:3.11.2-1.fc39.noarch
python3-google-cloud-bigquery-reservation-0:1.11.2-1.fc39.noarch
python3-google-cloud-bigquery-storage-0:2.22.0-1.fc39.noarch
python3-google-cloud-bigtable-0:2.19.0-2.fc39.noarch
python3-google-cloud-billing-0:1.11.1-1.fc39.noarch
python3-google-cloud-billing-budgets-0:1.11.1-1.fc39.noarch
python3-google-cloud-build-0:3.18.0-1.fc39.noarch
python3-google-cloud-common-0:1.2.0-2.fc39.noarch
python3-google-cloud-container-0:2.26.0-1.fc39.noarch
python3-google-cloud-containeranalysis-0:2.12.2-1.fc39.noarch
python3-google-cloud-data-fusion-0:1.8.2-1.fc39.noarch
python3-google-cloud-datacatalog-0:3.11.1-2.fc39.noarch
python3-google-cloud-dataproc-0:5.4.2-1.fc39.noarch
python3-google-cloud-dataproc-metastore-0:1.12.0-1.fc39.noarch
python3-google-cloud-debugger-client-0:1.7.0-1.fc39.noarch
python3-google-cloud-deploy-0:1.11.0-1.fc39.noarch
python3-google-cloud-dlp-0:3.12.2-1.fc39.noarch
python3-google-cloud-dms-0:1.7.1-2.fc39.noarch
python3-google-cloud-domains-0:1.4.1-2.fc39.noarch
python3-google-cloud-filestore-0:1.5.0-2.fc39.noarch
python3-google-cloud-firestore-0:2.11.1-2.fc39.noarch
python3-google-cloud-functions-0:1.13.1-2.fc39.noarch
python3-google-cloud-iam-0:2.12.1-1.fc39.noarch
python3-google-cloud-kms-0:2.18.0-1.fc39.noarch
python3-google-cloud-org-policy-0:1.8.2-1.fc39.noarch
python3-google-cloud-os-config-0:1.15.2-1.fc39.noarch
python3-google-cloud-private-ca-0:1.8.1-1.fc39.noarch
python3-google-cloud-pubsub-0:2.14.1-1.fc39.noarch
python3-google-cloud-redis-0:2.13.1-1.fc39.noarch
python3-google-cloud-shell-0:1.6.1-2.fc39.noarch
python3-google-cloud-source-context-0:1.4.2-1.fc39.noarch
python3-google-cloud-spanner-0:3.36.0-2.fc39.noarch
python3-googleapis-common-protos-0:1.59.1-3.fc39.noarch
python3-grafeas-0:1.8.1-2.fc39.noarch
python3-grpc-google-iam-v1-0:0.12.6-3.fc39.noarch
python3-grpcio-channelz-0:1.48.4-19.fc39.noarch
python3-grpcio-health-checking-0:1.48.4-19.fc39.noarch
python3-grpcio-reflection-0:1.48.4-19.fc39.noarch
python3-grpcio-status-0:1.48.4-19.fc39.noarch
python3-grpcio-testing-0:1.48.4-19.fc39.noarch
python3-grpcio-tools-0:1.48.4-19.fc39.x86_64
python3-omemo-backend-signal-0:0.3.1~beta-3.fc39.noarch
python3-opentelemetry-exporter-opencensus-0:0.39~b0-4.fc39.noarch
python3-opentelemetry-exporter-zipkin-proto-http-0:1.18.0-4.fc39.noarch
python3-opentelemetry-proto-0:1.18.0-4.fc39.noarch
python3-proto-plus-0:1.22.3-1.fc39.noarch

Oh, and there’s the protobuf-lite subpackages:

mock -r fedora-rawhide-x86_64 --enablerepo='*source*' --dnf-cmd -- repoquery --whatrequires 'protobuf-lite-devel'
appstream-0:0.16.1-1.fc39.src
community-mysql-0:8.0.32-1.module_f39+16042+8dc9dec8.src
community-mysql-0:8.0.33-2.fc39.src
et-0:6.2.1-3.fc37.src
libzypp-0:17.31.8-2.fc39.src
onnx-0:1.14.0-3.fc39.src
protozero-0:1.7.1-5.fc39.src
qgis-0:3.30.3-2.fc39.src
qt5-qtpbfimageformat-0:2.3-9.fc38.src

And these depend on the protobuf-lite shared library at runtime and will need their source packages rebuilt in the side tag too:

mock -r fedora-rawhide-x86_64 --dnf-cmd -- repoquery --whatrequires 'libprotobuf-lite.so.*'

Right, and the Java bindings. Maybe this is enough to find the packages to check?

mock -r fedora-rawhide-x86_64 --dnf-cmd -- repoquery --whatrequires 'protobuf-java'
mysql-connector-java-1:8.0.30-2.fc38.noarch
protobuf-java-util-0:3.19.6-5.fc39.noarch

For all of the testing, you need to make sure that packages aren’t succeeding only because they upper-bound the protobuf version and thereby force dnf to install the existing version of protobuf from Rawhide rather than the version you are trying to test. You can check the build logs manually for each package or try the technique discussed in https://lists.fedorahosted.org/archives/list/copr-devel@lists.fedorahosted.org/thread/YO2K2D2JJ3AW2B643CNXYNJGOUOTE7GF/.

The mass-prebuild tool might be able to help here. I’ve played with it a little, but haven’t really gotten it working well enough to offer advice yet.

Starting a list of dependent packages with pre-existing FTBFS:

I am basing this on this COPR, which is currently a control COPR. It includes recursively dependent packages, a few of which might be unnecessary.

This version of protobuf requires C++14 at the API level. Dependent packages that are built with older versions will have errors like:

/usr/include/google/protobuf/port_def.inc:205:15: error: static assertion failed: Protobuf only supports C++14 and newer.
  205 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");

…and will need to be forced to C++14 or later. As far as I can tell, the compiled protobuf bindings will generally use abseil-cpp, and since C++17 is required to link against abseil-cpp libraries compiled as C++17 (as an intentional abseil-cpp design decision), that means we should upgrade to C++17.

Packages that are C++14 and should be C++17 might have errors like:

/usr/include/absl/strings/string_view.h:52:26: error: 'string_view' in namespace 'std' does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:52:21: note: 'std::string_view' is only available from C++17 onwards

from C++ sources that were generated from protobufs.

Starting a list:

Starting a list of failures that look idiosyncratic (but might turn out to belong to a larger pattern as I build more packages):

liborc

In member function 'InternalSwap':
lto1: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=]
/builddir/build/BUILD/orc-1.9.0/redhat-linux-build/c++/src/orc_proto.pb.h:2499:38: note: at offset 64 into destination object 'intstatistics_' of size 8
 2499 |     ::orc::proto::IntegerStatistics* intstatistics_;
      |                                      ^

Possibly related? https://github.com/protocolbuffers/protobuf/issues/10377

libphonenumber

/usr/bin/ld: /usr/lib64/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012512log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib64/libabsl_log_internal_check_op.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

This is an abseil-cpp symbol.

protobuf-c

checking for protobuf... yes
checking for google/protobuf/compiler/command_line_interface.h... no
configure: error: required protobuf header file not found

It looks like it will be necessary to package a pre-release snapshot, or at least carry a patch, until 1.5.0 is released: https://github.com/protobuf-c/protobuf-c/pull/673

Proposed patch: https://src.fedoraproject.org/rpms/protobuf-c/pull-request/1

ignition-msgs

Missing std:: from std::string; backported https://github.com/gazebosim/gz-msgs/pull/242 in:

After that patch is applied, there is a new problem:

[  1%] Linking CXX executable ign_msgs_gen
cd /builddir/build/BUILD/ignition-msgs-1.0.0/redhat-linux-build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/ign_msgs_gen.dir/link.txt --verbose=1
/usr/bin/g++ -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wl,--as-needed -DNDEBUG  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Winit-self -Wswitch-default -Wmissing-include-dirs -pedantic  -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes CMakeFiles/ign_msgs_gen.dir/Generator.cc.o CMakeFiles/ign_msgs_gen.dir/generator_main.cc.o -o ign_msgs_gen  /usr/lib64/libprotobuf.so /usr/lib64/libprotoc.so -lpthread 
/usr/bin/ld: /usr/lib64/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2023012513hash_internal15MixingHashState28CombineLargeContiguousImpl64EmPKhm'
/usr/bin/ld: /usr/lib64/libabsl_hash.so.2301.0.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

This is fixed by backporting https://github.com/gazebosim/gz-msgs/pull/346.

Finally, I encountered the same issue I saw in grpc, where the CMake files in protobuf-devel require protobuf-lite-devel, but protobuf-devel does not depend on protobuf-lite-devel. I worked around it for now by adding an explicit protobuf-lite-devel dependency.

Proposed patch: https://src.fedoraproject.org/rpms/ignition-msgs/pull-request/1

opencv

Needed to be built with C++17: https://src.fedoraproject.org/rpms/opencv/pull-request/23

With that PR, and with protobuf from this PR, there are many linker errors like:

/usr/bin/ld: CMakeFiles/opencv_dnn.dir/opencv-caffe.pb.cc.o: in function `google::protobuf::io::EpsCopyOutputStream::WriteTag(unsigned int, unsigned int, unsigned char*)':
/usr/include/google/protobuf/io/coded_stream.h:868: undefined reference to `absl::lts_20230125::log_internal::LogMessageFatal::LogMessageFatal(char const*, int, std::basic_string_view<char, std::char_traits<char> >)'
/usr/bin/ld: /usr/include/google/protobuf/io/coded_stream.h:868: undefined reference to `absl::lts_20230125::log_internal::LogMessageFatal::~LogMessageFatal()'
/usr/bin/ld: CMakeFiles/opencv_dnn.dir/opencv-caffe.pb.cc.o: in function `opencv_caffe::LossParameter::SharedDtor()':
/builddir/build/BUILD/opencv-4.7.0/redhat-linux-build/modules/dnn/opencv-caffe.pb.cc:15932: undefined reference to `absl::lts_20230125::log_internal::LogMessageFatal::LogMessageFatal(char const*, int, std::basic_string_view<char, std::char_traits<char> >)'
/usr/bin/ld: /builddir/build/BUILD/opencv-4.7.0/redhat-linux-build/modules/dnn/opencv-caffe.pb.cc:15932: undefined reference to `absl::lts_20230125::log_internal::LogMessageFatal::~LogMessageFatal()'

It looks like the indirect abseil-cpp dependencies via the generated protobuf bindings are not reflected in the linker flags.

Starting a list of packages that are blocked by dependencies:

  • beargrpc
  • chattylibphonenumber
  • credentials-fetchergrpc
  • gazeboopencv
  • HepMC3libarrowliborc
  • libarrowliborc

In grpc:

CMake Error at /usr/lib64/cmake/protobuf/protobuf-targets.cmake:116 (message):
  The imported target "protobuf::libprotobuf-lite" references the file

     "/usr/lib64/libprotobuf-lite.so.23.3.0"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib64/cmake/protobuf/protobuf-targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib64/cmake/protobuf/protobuf-config.cmake:16 (include)
  cmake/protobuf.cmake:58 (find_package)
  CMakeLists.txt:322 (include)

I would say that perhaps that indicates protobuf-devel needs to Requires: protobuf-lite-devel = %{version}-%{release}, but we already have Requires: protobuf-devel = %{version}-%{release} in protobuf-lite-devel, so that would create an unwanted circular dependency. Perhaps the two -devel packages need to be merged, with a protobuf-devel that Provides: protobuf-lite-devel%{?_isa} = %{version}-%{release}?

For now I’m going to work around it with an explicit protobuf-lite-devel dependency from grpc.

Couple things:
- This re-adds a %{so_version} and makes a note that now every version change is a soname bump.
- It also re-adds the licensing notes. We're they intentionally removed because they are incorrect? I haven't been following changes closely I'm afraid.

I removed the licensing notes as the source files referenced no longer exist in the source tree. As for specifying %{so_version}, is there a reason this needs to be specified? Asking as I don't know if this is due to an RPM dependency generator or just to add manual friction to package updates to make sure maintainers are aware.

I removed the licensing notes as the source files referenced no longer exist in the source tree.

:thumbsup:

As for specifying %{so_version}, is there a reason this needs to be specified? Asking as I don't know if this is due to an RPM dependency generator or just to add manual friction to package updates to make sure maintainers are aware.

It’s basically the friction thing. The guidelines forbid globbing over the version for shared libraries because writing it explicitly really cuts down on undetected ABI bumps.

@orion, I ran into https://src.fedoraproject.org/rpms/protobuf/pull-request/25#comment-149926 in ignition-msgs too. I kind of like the idea of merging the protobuf-devel and protobuf-lite-devel packages rather than creating a circular dependency, but I haven’t looked too closely at what’s actually in the two devel packages. What do you think? Would you mind updating the PR with a fix? Thanks!

@orion Protobuf 23.4 is out, so it might be worth just bumping that up (assuming it doesn't require extra Java dependency updates).

There's also v24.0-rc1 out now, I'm not sure if there's interest in hopping on that train.

%global pb_release 24.0
%global pb_prerelease rc1

In checking the release, it doesn't seem like the CXX, Java, or Python major releases have changed. And it looks like my jsoncpp patch is included as part of v24; it didn't seem like they were backported from main into the 23.x branch.

I have a successful build of grpc 1.56.2 in COPR. Some details, like the test skips, still need reviewing, but it’s in “merge-able” condition. (Reminder: the grpc update has to be simultaneous with the protobuf update.)

rebased onto a617a56

9 months ago

I've updated to 23.4 and merged protobuf-lite-devel into protobuf-devel.

@orion You can clear lines 33-57 of the spec file (the "other files" licensing section) as the files referenced no longer exist in the protobuf source tree.

1 new commit added

  • Remove old licensing notes
9 months ago

Note that I don't have the time to drive this update in Fedora.

Note that I don't have the time to drive this update in Fedora.

I suspect that nobody does. I know I don’t. Hopefully there are enough people involved that it will be possible to eventually finish chipping away at the various compatibility issues.

It looks like we will need to rebase to 24.x for compatibility with the current abseil-cpp LTS release. We’re still pretty far from being able to merge this PR, so I don’t see this as a problem.

Hello, first time contributor here. Is it possible to get involved with this porting effort? If so, is there a list of all affected packages that I could begin with?

Hello, first time contributor here. Is it possible to get involved with this porting effort? If so, is there a list of all affected packages that I could begin with?

https://src.fedoraproject.org/rpms/protobuf/pull-request/25#comment-149638 documents all potentially affected packages as of the time I wrote the comment.

For incompatible packages, one can look at https://copr.fedorainfracloud.org/coprs/music/protobuf-grpc/packages/ and start triaging failures, or look at some of the triaged but unexplained failures in https://src.fedoraproject.org/rpms/protobuf/pull-request/25#comment-149677.

Hi thank you for the initiative, I would also like to help with the rebase - the package mysql-connector-j that I maintain needs newer protobuf in its lstest version.
I would like to start going through protobuf deps in the copr that FTBFS.
@music would you mind rebuilding the copr repo? The logs are no longer available and I am not sure I could rebuilt it - maybe in my own copied copr repo only.

I have created commit[1] for rebasing protobuf to 24.4 which builds successfully[2].

Then I created a commit[3] for libphonenumber rebase in order to get there this[4] patch and added part of not-yet-merged patch[5] for dealing with incorrect abseil linking issue. It also builds [6] but is not working with older protobufs.

Feel free to use this commits in any way or do not use it at all. I will also continue to look into packages that did not build because libphonenumber was not built with newer protobuf.

[1] https://src.fedoraproject.org/fork/zmiklank/rpms/protobuf/c/0f6354df64bce5a4b6e721bd43a5e12cef489f06?branch=rebase-24.4
[2] https://copr.fedorainfracloud.org/coprs/zmiklank/protobuf-grpc/build/6606752/
[3] https://src.fedoraproject.org/fork/zmiklank/rpms/libphonenumber/c/42e225d6a0703dd57838665439a638c59db00880?branch=rebase_8.13.24
[4] https://github.com/google/libphonenumber/pull/3211
[5] https://github.com/google/libphonenumber/pull/3213
[6] https://copr.fedorainfracloud.org/coprs/zmiklank/protobuf-grpc/build/6607653/

Thank you @zmiklank! I have this on my list to review.

@music Do you think that using mass prebuild would be helpful here to test it?

@music Do you think that using mass prebuild would be helpful here to test it?

Probably, although:

  • I haven’t taken the time to get it working the way I expect it to—not implying there’s anything wrong with it, just that I haven’t gotten comfortable with it
  • The hard and time-consuming part is digging through all the packages that FTBFS

By the way, the latest release is now 25.0.

There’s also a 3.20.3 release that is probably worth updating to as an interim measure. I started a control COPR; I haven’t had much time to work on it, and I’m still at the stage of trying to document everything that already FTBFS. This work can be re-used for the v4 update, at least.

Once we are close to being able to actually do this update, I think it probably deserves a Change proposal. However, I think it makes sense to fully understand and have a plan for the remaining compatibility issues before trying to write that up.