From 7f047da3e80cfb225fb05c76ba2d89dd2c5329ff5363ba3535e7fad4e141e1e2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 4 Aug 2022 20:59:41 +0000 Subject: [PATCH] Accepting request 993137 from home:dirkmueller:Factory - add 10355.patch to fix soversioning - update to 21.4: * Reduce the required alignment of ArenaString from 8 to 4 - update to 21.3: * C++ * Add header search paths to Protobuf-C++.podspec (#10024) * Fixed Visual Studio constinit errors (#10232) * Fix #9947: make the ABI compatible between debug and non-debug builds (#10271) * UPB * Allow empty package names (fixes behavior regression in 4.21.0) * Fix a SEGV bug when comparing a non-materialized sub-message (#10208) * Fix several bugs in descriptor mapping containers (eg. descriptor.services_by_name) * for x in mapping now yields keys rather than values, to match Python conventions and the behavior of the old library. * Lookup operations now correctly reject unhashable types as map keys. * We implement repr() to use the same format as dict. * Fix maps to use the ScalarMapContainer class when appropriate * Fix bug when parsing an unknown value in a proto2 enum extension (protocolbuffers/upb#717) * PHP * Add "readonly" as a keyword for PHP and add previous classnames to descriptor pool (#10041) * Python * Make //:protobuf_python and //:well_known_types_py_pb2 public (#10118) * Bazel * Add back a filegroup for :well_known_protos (#10061) OBS-URL: https://build.opensuse.org/request/show/993137 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=127 --- 10355.patch | 85 +++++++++++++++++++++ baselibs.conf | 6 +- gcc12-disable-__constinit-with-c++-11.patch | 12 +-- protobuf-21.2.tar.gz | 3 - protobuf-21.4.tar.gz | 3 + protobuf.changes | 36 +++++++++ protobuf.spec | 19 +++-- 7 files changed, 145 insertions(+), 19 deletions(-) create mode 100644 10355.patch delete mode 100644 protobuf-21.2.tar.gz create mode 100644 protobuf-21.4.tar.gz diff --git a/10355.patch b/10355.patch new file mode 100644 index 0000000..79264de --- /dev/null +++ b/10355.patch @@ -0,0 +1,85 @@ +From 15daef3b7912b9434955a8614e018de00591aefb Mon Sep 17 00:00:00 2001 +From: Deanna Garcia +Date: Wed, 3 Aug 2022 17:40:03 +0000 +Subject: [PATCH 1/2] Use release version instead of libtool version + +--- + src/Makefile.am | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: protobuf-21.4/src/Makefile.am +=================================================================== +--- protobuf-21.4.orig/src/Makefile.am ++++ protobuf-21.4/src/Makefile.am +@@ -18,7 +18,7 @@ else + PTHREAD_DEF = + endif + +-PROTOBUF_VERSION = 32:4:0 ++PROTOBUF_VERSION = 3.21.4 + + if GCC + # Turn on all warnings except for sign comparison (we ignore sign comparison +@@ -188,7 +188,7 @@ nobase_include_HEADERS = + lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la + + libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) +-libprotobuf_lite_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined ++libprotobuf_lite_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined + if HAVE_LD_VERSION_SCRIPT + libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map + EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map +@@ -235,7 +235,7 @@ libprotobuf_lite_la_SOURCES = + google/protobuf/wire_format_lite.cc + + libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) +-libprotobuf_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined ++libprotobuf_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined + if HAVE_LD_VERSION_SCRIPT + libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map + EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map +@@ -320,7 +320,7 @@ libprotobuf_la_SOURCES = + nodist_libprotobuf_la_SOURCES = $(nodist_libprotobuf_lite_la_SOURCES) + + libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la +-libprotoc_la_LDFLAGS = -version-info $(PROTOBUF_VERSION) -export-dynamic -no-undefined ++libprotoc_la_LDFLAGS = -release $(PROTOBUF_VERSION) -export-dynamic -no-undefined + if HAVE_LD_VERSION_SCRIPT + libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map + EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map +Index: protobuf-21.4/cmake/libprotobuf-lite.cmake +=================================================================== +--- protobuf-21.4.orig/cmake/libprotobuf-lite.cmake ++++ protobuf-21.4/cmake/libprotobuf-lite.cmake +@@ -112,7 +112,6 @@ if(protobuf_BUILD_SHARED_LIBS) + endif() + set_target_properties(libprotobuf-lite PROPERTIES + VERSION ${protobuf_VERSION} +- SOVERSION 32 + OUTPUT_NAME ${LIB_PREFIX}protobuf-lite + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") + add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite) +Index: protobuf-21.4/cmake/libprotobuf.cmake +=================================================================== +--- protobuf-21.4.orig/cmake/libprotobuf.cmake ++++ protobuf-21.4/cmake/libprotobuf.cmake +@@ -128,7 +128,6 @@ if(protobuf_BUILD_SHARED_LIBS) + endif() + set_target_properties(libprotobuf PROPERTIES + VERSION ${protobuf_VERSION} +- SOVERSION 32 + OUTPUT_NAME ${LIB_PREFIX}protobuf + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") + add_library(protobuf::libprotobuf ALIAS libprotobuf) +Index: protobuf-21.4/cmake/libprotoc.cmake +=================================================================== +--- protobuf-21.4.orig/cmake/libprotoc.cmake ++++ protobuf-21.4/cmake/libprotoc.cmake +@@ -130,7 +130,6 @@ endif() + set_target_properties(libprotoc PROPERTIES + COMPILE_DEFINITIONS LIBPROTOC_EXPORTS + VERSION ${protobuf_VERSION} +- SOVERSION 32 + OUTPUT_NAME ${LIB_PREFIX}protoc + DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") + add_library(protobuf::libprotoc ALIAS libprotoc) diff --git a/baselibs.conf b/baselibs.conf index 109dedd..1d32a84 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,3 @@ -libprotobuf32 -libprotoc32 -libprotobuf-lite32 +libprotobuf3_21_4 +libprotoc3_21_4 +libprotobuf-lite3_21_4 diff --git a/gcc12-disable-__constinit-with-c++-11.patch b/gcc12-disable-__constinit-with-c++-11.patch index 4bfba8a..ff6c0c0 100644 --- a/gcc12-disable-__constinit-with-c++-11.patch +++ b/gcc12-disable-__constinit-with-c++-11.patch @@ -1,6 +1,8 @@ ---- protobuf-21.2/src/google/protobuf/port_def.inc.orig 2022-07-03 09:45:35.196880191 +0200 -+++ protobuf-21.2/src/google/protobuf/port_def.inc 2022-07-03 09:46:17.673245305 +0200 -@@ -651,7 +651,11 @@ +Index: protobuf-21.4/src/google/protobuf/port_def.inc +=================================================================== +--- protobuf-21.4.orig/src/google/protobuf/port_def.inc ++++ protobuf-21.4/src/google/protobuf/port_def.inc +@@ -652,7 +652,11 @@ #define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]] #define PROTOBUF_CONSTEXPR constexpr #elif PROTOBUF_GNUC_MIN(12, 2) @@ -10,5 +12,5 @@ +#define PROTOBUF_CONSTINIT +#endif #define PROTOBUF_CONSTEXPR constexpr - #else - #define PROTOBUF_CONSTINIT + // MSVC 17 currently seems to raise an error about constant-initialized pointers. + #elif defined(_MSC_VER) && _MSC_VER >= 1930 diff --git a/protobuf-21.2.tar.gz b/protobuf-21.2.tar.gz deleted file mode 100644 index b45cb7c..0000000 --- a/protobuf-21.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ca983c9d2c8f8c935513642bcc4b2cbc64e4046e0bb16bf2ff893128577ece8c -size 5103383 diff --git a/protobuf-21.4.tar.gz b/protobuf-21.4.tar.gz new file mode 100644 index 0000000..e9d46e0 --- /dev/null +++ b/protobuf-21.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:990e47a163b4057f98b899eca591981b5b735872b58f59b9ead9cecabbb21a2a +size 5105058 diff --git a/protobuf.changes b/protobuf.changes index 6af35a0..15a7de6 100644 --- a/protobuf.changes +++ b/protobuf.changes @@ -1,3 +1,39 @@ +------------------------------------------------------------------- +Thu Aug 4 20:50:38 UTC 2022 - Dirk Müller + +- add 10355.patch to fix soversioning + +------------------------------------------------------------------- +Thu Jul 28 19:47:05 UTC 2022 - Dirk Müller + +- update to 21.4: + * Reduce the required alignment of ArenaString from 8 to 4 + +------------------------------------------------------------------- +Mon Jul 25 07:11:14 UTC 2022 - Dirk Müller + +- update to 21.3: + * C++ + * Add header search paths to Protobuf-C++.podspec (#10024) + * Fixed Visual Studio constinit errors (#10232) + * Fix #9947: make the ABI compatible between debug and non-debug builds (#10271) + * UPB + * Allow empty package names (fixes behavior regression in 4.21.0) + * Fix a SEGV bug when comparing a non-materialized sub-message (#10208) + * Fix several bugs in descriptor mapping containers (eg. descriptor.services_by_name) + * for x in mapping now yields keys rather than values, to match Python + conventions and the behavior of the old library. + * Lookup operations now correctly reject unhashable types as map keys. + * We implement repr() to use the same format as dict. + * Fix maps to use the ScalarMapContainer class when appropriate + * Fix bug when parsing an unknown value in a proto2 enum extension (protocolbuffers/upb#717) + * PHP + * Add "readonly" as a keyword for PHP and add previous classnames to descriptor pool (#10041) + * Python + * Make //:protobuf_python and //:well_known_types_py_pb2 public (#10118) + * Bazel + * Add back a filegroup for :well_known_protos (#10061) + ------------------------------------------------------------------- Sun Jul 3 07:50:16 UTC 2022 - Paolo Stivanin diff --git a/protobuf.spec b/protobuf.spec index da3b088..f05ff20 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -17,7 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define sover 32 +%define sover 3_21_4 %define tarname protobuf %define src_install_dir %{_prefix}/src/%{name} %define extra_java_flags -source 7 -target 7 @@ -27,7 +27,7 @@ %bcond_without python2 %bcond_without python3 Name: protobuf -Version: 21.2 +Version: 21.4 Release: 0 Summary: Protocol Buffers - Google's data interchange format License: BSD-3-Clause @@ -37,6 +37,8 @@ Source0: https://github.com/protocolbuffers/protobuf/archive/v%{version}. Source1: manifest.txt.in Source2: baselibs.conf Patch0: gcc12-disable-__constinit-with-c++-11.patch +# https://github.com/protocolbuffers/protobuf/pull/10355 +Patch1: 10355.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module setuptools} @@ -164,8 +166,7 @@ This package contains the Python bindings for Google Protocol Buffers. %endif %prep -%setup -n %{tarname}-%{version} -%patch0 -p1 +%autosetup -p1 -n %{tarname}-%{version} mkdir gmock %if %{with python2} || %{with python3} @@ -256,20 +257,22 @@ find %{buildroot}%{src_install_dir} -type f -name ".gitignore" -exec rm -f "{}" %files -n libprotobuf%{sover} %license LICENSE -%{_libdir}/libprotobuf.so.%{sover}* +%{_libdir}/libprotobuf-3.%{version}.so %files -n libprotoc%{sover} -%{_libdir}/libprotoc.so.%{sover}* +%{_libdir}/libprotoc-3.%{version}.so %files -n libprotobuf-lite%{sover} -%{_libdir}/libprotobuf-lite.so.%{sover}* +%{_libdir}/libprotobuf-lite-3.%{version}.so %files devel %doc CHANGES.txt CONTRIBUTORS.txt README.md %{_bindir}/protoc %{_includedir}/google -%{_libdir}/*.so %{_libdir}/pkgconfig/* +%{_libdir}/libprotobuf-lite.so +%{_libdir}/libprotobuf.so +%{_libdir}/libprotoc.so %{_datadir}/vim %files source