[packages/protobuf] - updated to 33.6 (cpp+python 6.33.6/ruby 4.33.6; new sonames)
qboosh
qboosh at pld-linux.org
Fri Nov 6 20:13:40 CET 2026
commit 3429fe9fc601a350be35ca3694241875b0f10004
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Nov 6 20:14:32 2026 +0100
- updated to 33.6 (cpp+python 6.33.6/ruby 4.33.6; new sonames)
protobuf-abseil-if_constexpr.patch | 115 -------------------------------------
protobuf.spec | 34 +++++------
2 files changed, 15 insertions(+), 134 deletions(-)
---
diff --git a/protobuf.spec b/protobuf.spec
index aa85261..47d4b46 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -8,11 +8,11 @@
%bcond_with ruby # Ruby bindings
%bcond_without tests # test suite (requires 4+GB RAM on 64-bit archs)
-# versions have diverged: for protoc 29.x binding version is 3.29.x, 4.29.x and 5.29.x depending on language
+# versions have diverged: for protoc 33.x binding version is 4.33.x and 6.33.x depending on language
# see version.json for individual languages
-%define protoc_version 29.6
-%define cpp_version 5.%{protoc_version}
-%define python_version 5.%{protoc_version}
+%define protoc_version 33.6
+%define cpp_version 6.%{protoc_version}
+%define python_version 6.%{protoc_version}
%define ruby_version 4.%{protoc_version}
# libraries soname
%define abi_ver %{protoc_version}.0
@@ -28,14 +28,13 @@ License: BSD
Group: Libraries
#Source0Download: https://github.com/protocolbuffers/protobuf/releases
Source0: https://github.com/protocolbuffers/protobuf/archive/v%{protoc_version}/%{name}-%{protoc_version}.tar.gz
-# Source0-md5: 097e057e4e6e006e5127b43abf0a85bd
+# Source0-md5: d1ad80c2ade50e86f9754c2586cc17f0
Source1: ftdetect-proto.vim
-Patch0: %{name}-abseil-if_constexpr.patch
Patch3: no-death-test.patch
URL: https://github.com/protocolbuffers/protobuf/
BuildRequires: abseil-cpp-devel >= %{abseil_ver}
%{?with_tests:BuildRequires: abseil-cpp-test-devel >= %{abseil_ver}}
-BuildRequires: cmake >= 3.10
+BuildRequires: cmake >= 3.16
%{?with_tests:BuildRequires: gmock-devel >= 1.9.0}
%{?with_tests:BuildRequires: gtest-devel >= 1.9.0}
BuildRequires: libstdc++-devel >= 6:7
@@ -43,7 +42,7 @@ BuildRequires: pkgconfig
BuildRequires: sed >= 4.0
%if %{with python3}
BuildRequires: bazel
-BuildRequires: python3-modules >= 1:3.8
+BuildRequires: python3-modules >= 1:3.9
BuildRequires: python3-setuptools
BuildRequires: rpm-pythonprov
%endif
@@ -250,7 +249,6 @@ buforów protokołowych (Protocol Buffers).
%prep
%setup -q -n %{name}-%{protoc_version}
-%patch -P0 -p1
%patch -P3 -p1
%{__sed} -i -e '1s, */usr/bin/env python$,%{__python3},' \
@@ -262,17 +260,14 @@ buforów protokołowych (Protocol Buffers).
examples/list_people.rb
%build
-mkdir -p build
-cd build
-%cmake .. \
+%cmake -B build \
-Dprotobuf_BUILD_TESTS=%{__ON_OFF tests} \
-Dprotobuf_USE_EXTERNAL_GTEST=ON \
-Dprotobuf_ABSL_PROVIDER=package
-%{__make}
+%{__make} -C build
-export PROTOC="$(pwd)/protoc"
-cd ..
+export PROTOC="$(pwd)/build/protoc"
%if %{with python3}
bazel build //python/dist:binary_wheel
@@ -328,7 +323,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CONTRIBUTORS.txt LICENSE README.md
+%doc CONTRIBUTORS.txt LICENSE README.md SECURITY.md
%attr(755,root,root) %{_bindir}/protoc
%attr(755,root,root) %{_bindir}/protoc-%{abi_ver}
%{_libdir}/libprotoc.so.%{abi_ver}
@@ -365,17 +360,18 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/protoc-gen-upbdefs-%{abi_ver}
%{_libdir}/libupb.a
%{_includedir}/upb
-%{_includedir}/upb_generator
%{_pkgconfigdir}/upb.pc
%files -n utf8_range
%defattr(644,root,root,755)
%doc third_party/utf8_range/{LICENSE,README.md}
-%{_libdir}/libutf8_range.so
-%{_libdir}/libutf8_validity.so
+%{_libdir}/libutf8_range.so.%{abi_ver}
+%{_libdir}/libutf8_validity.so.%{abi_ver}
%files -n utf8_range-devel
%defattr(644,root,root,755)
+%{_libdir}/libutf8_range.so
+%{_libdir}/libutf8_validity.so
%{_includedir}/utf8_range.h
%{_includedir}/utf8_validity.h
%{_libdir}/cmake/utf8_range
diff --git a/protobuf-abseil-if_constexpr.patch b/protobuf-abseil-if_constexpr.patch
deleted file mode 100644
index 4e40870..0000000
--- a/protobuf-abseil-if_constexpr.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 0ea5ccd61c69ff5000631781c6c9a3a50241392c Mon Sep 17 00:00:00 2001
-From: Derek Mauro <dmauro at google.com>
-Date: Wed, 19 Feb 2025 11:03:21 -0800
-Subject: [PATCH] Use `if constexpr` instead of
- `absl::utility_internal::IfConstexprElseIfConstexprElse`
-
-PiperOrigin-RevId: 728737911
----
- src/google/protobuf/arena.h | 61 +++++++++++++++----------------------
- 1 file changed, 25 insertions(+), 36 deletions(-)
-
-diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h
-index 97cb45379af24..0409e585a3d8a 100644
---- protobuf-29.6/src/google/protobuf/arena.h.orig 2026-02-04 21:07:58.000000000 +0100
-+++ protobuf-29.6/src/google/protobuf/arena.h 2026-02-28 10:33:15.379938726 +0100
-@@ -32,7 +32,6 @@ using type_info = ::type_info;
- #include "absl/base/optimization.h"
- #include "absl/base/prefetch.h"
- #include "absl/log/absl_check.h"
--#include "absl/utility/internal/if_constexpr.h"
- #include "google/protobuf/arena_align.h"
- #include "google/protobuf/arena_allocation_policy.h"
- #include "google/protobuf/port.h"
-@@ -214,41 +213,31 @@ class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8
- // otherwise, returns a heap-allocated object.
- template <typename T, typename... Args>
- PROTOBUF_NDEBUG_INLINE static T* Create(Arena* arena, Args&&... args) {
-- return absl::utility_internal::IfConstexprElse<
-- is_arena_constructable<T>::value>(
-- // Arena-constructable
-- [arena](auto&&... args) {
-- using Type = std::remove_const_t<T>;
--#ifdef __cpp_if_constexpr
-- // DefaultConstruct/CopyConstruct are optimized for messages, which
-- // are both arena constructible and destructor skippable and they
-- // assume much. Don't use these functions unless the invariants
-- // hold.
-- if constexpr (is_destructor_skippable<T>::value) {
-- constexpr auto construct_type = GetConstructType<T, Args&&...>();
-- // We delegate to DefaultConstruct/CopyConstruct where appropriate
-- // because protobuf generated classes have external templates for
-- // these functions for code size reasons. When `if constexpr` is not
-- // available always use the fallback.
-- if constexpr (construct_type == ConstructType::kDefault) {
-- return static_cast<Type*>(DefaultConstruct<Type>(arena));
-- } else if constexpr (construct_type == ConstructType::kCopy) {
-- return static_cast<Type*>(CopyConstruct<Type>(arena, &args...));
-- }
-- }
--#endif
-- return CreateArenaCompatible<Type>(arena,
-- std::forward<Args>(args)...);
-- },
-- // Non arena-constructable
-- [arena](auto&&... args) {
-- if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
-- return new T(std::forward<Args>(args)...);
-- }
-- return new (arena->AllocateInternal<T>())
-- T(std::forward<Args>(args)...);
-- },
-- std::forward<Args>(args)...);
-+ if constexpr (is_arena_constructable<T>::value) {
-+ using Type = std::remove_const_t<T>;
-+ // DefaultConstruct/CopyConstruct are optimized for messages, which
-+ // are both arena constructible and destructor skippable and they
-+ // assume much. Don't use these functions unless the invariants
-+ // hold.
-+ if constexpr (is_destructor_skippable<T>::value) {
-+ constexpr auto construct_type = GetConstructType<T, Args&&...>();
-+ // We delegate to DefaultConstruct/CopyConstruct where appropriate
-+ // because protobuf generated classes have external templates for
-+ // these functions for code size reasons. When `if constexpr` is not
-+ // available always use the fallback.
-+ if constexpr (construct_type == ConstructType::kDefault) {
-+ return static_cast<Type*>(DefaultConstruct<Type>(arena));
-+ } else if constexpr (construct_type == ConstructType::kCopy) {
-+ return static_cast<Type*>(CopyConstruct<Type>(arena, &args...));
-+ }
-+ }
-+ return CreateArenaCompatible<Type>(arena, std::forward<Args>(args)...);
-+ } else {
-+ if (PROTOBUF_PREDICT_FALSE(arena == nullptr)) {
-+ return new T(std::forward<Args>(args)...);
-+ }
-+ return new (arena->AllocateInternal<T>()) T(std::forward<Args>(args)...);
-+ }
- }
-
- // API to delete any objects not on an arena. This can be used to safely
-From d801cbd86818b587e0ebba2de13614a3ee83d369 Mon Sep 17 00:00:00 2001
-From: Christian Blichmann <cblichmann at google.com>
-Date: Thu, 20 Feb 2025 09:11:09 -0800
-Subject: [PATCH] Remove `absl::if_constexpr` from list of used Abseil targets
-
-This is a follow-up on 0ea5ccd61c69ff5000631781c6c9a3a50241392c, moving to C++'s
-`if constexpr`.
-
-PiperOrigin-RevId: 729136260
----
- cmake/abseil-cpp.cmake | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake
-index 2baebed55bb69..29d5044a77b6e 100644
---- a/cmake/abseil-cpp.cmake
-+++ b/cmake/abseil-cpp.cmake
-@@ -72,7 +72,6 @@ else()
- absl::flat_hash_set
- absl::function_ref
- absl::hash
-- absl::if_constexpr
- absl::layout
- absl::log_initialize
- absl::log_globals
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/3429fe9fc601a350be35ca3694241875b0f10004
More information about the pld-cvs-commit
mailing list