Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package protobuf for openSUSE:Factory checked in at 2022-09-20 19:23:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/protobuf (Old) and /work/SRC/openSUSE:Factory/.protobuf.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "protobuf" Tue Sep 20 19:23:06 2022 rev:66 rq:1004584 version:21.6 Changes: -------- --- /work/SRC/openSUSE:Factory/protobuf/protobuf.changes 2022-08-19 17:54:12.191814245 +0200 +++ /work/SRC/openSUSE:Factory/.protobuf.new.2083/protobuf.changes 2022-09-20 19:23:08.710398582 +0200 @@ -1,0 +2,7 @@ +Mon Sep 19 07:27:02 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 21.6: + C++: + * Reduce memory consumption of MessageSet parsing + +------------------------------------------------------------------- Old: ---- protobuf-21.5.tar.gz New: ---- protobuf-21.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ protobuf.spec ++++++ --- /var/tmp/diff_new_pack.GXBdOy/_old 2022-09-20 19:23:09.226400062 +0200 +++ /var/tmp/diff_new_pack.GXBdOy/_new 2022-09-20 19:23:09.230400073 +0200 @@ -17,7 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define sover 3_21_5 +%define sover 3_21_6 %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.5 +Version: 21.6 Release: 0 Summary: Protocol Buffers - Google's data interchange format License: BSD-3-Clause ++++++ 10355.patch ++++++ --- /var/tmp/diff_new_pack.GXBdOy/_old 2022-09-20 19:23:09.250400131 +0200 +++ /var/tmp/diff_new_pack.GXBdOy/_new 2022-09-20 19:23:09.254400142 +0200 @@ -7,16 +7,16 @@ src/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -Index: protobuf-21.5/src/Makefile.am +Index: protobuf-21.6/src/Makefile.am =================================================================== ---- protobuf-21.5.orig/src/Makefile.am -+++ protobuf-21.5/src/Makefile.am +--- protobuf-21.6.orig/src/Makefile.am ++++ protobuf-21.6/src/Makefile.am @@ -18,7 +18,7 @@ else PTHREAD_DEF = endif --PROTOBUF_VERSION = 32:5:0 -+PROTOBUF_VERSION = 3.21.5 +-PROTOBUF_VERSION = 32:6:0 ++PROTOBUF_VERSION = 3.21.6 if GCC # Turn on all warnings except for sign comparison (we ignore sign comparison @@ -47,10 +47,10 @@ if HAVE_LD_VERSION_SCRIPT libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map -Index: protobuf-21.5/cmake/libprotobuf-lite.cmake +Index: protobuf-21.6/cmake/libprotobuf-lite.cmake =================================================================== ---- protobuf-21.5.orig/cmake/libprotobuf-lite.cmake -+++ protobuf-21.5/cmake/libprotobuf-lite.cmake +--- protobuf-21.6.orig/cmake/libprotobuf-lite.cmake ++++ protobuf-21.6/cmake/libprotobuf-lite.cmake @@ -112,7 +112,6 @@ if(protobuf_BUILD_SHARED_LIBS) endif() set_target_properties(libprotobuf-lite PROPERTIES @@ -59,10 +59,10 @@ OUTPUT_NAME ${LIB_PREFIX}protobuf-lite DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite) -Index: protobuf-21.5/cmake/libprotobuf.cmake +Index: protobuf-21.6/cmake/libprotobuf.cmake =================================================================== ---- protobuf-21.5.orig/cmake/libprotobuf.cmake -+++ protobuf-21.5/cmake/libprotobuf.cmake +--- protobuf-21.6.orig/cmake/libprotobuf.cmake ++++ protobuf-21.6/cmake/libprotobuf.cmake @@ -128,7 +128,6 @@ if(protobuf_BUILD_SHARED_LIBS) endif() set_target_properties(libprotobuf PROPERTIES @@ -71,10 +71,10 @@ OUTPUT_NAME ${LIB_PREFIX}protobuf DEBUG_POSTFIX "${protobuf_DEBUG_POSTFIX}") add_library(protobuf::libprotobuf ALIAS libprotobuf) -Index: protobuf-21.5/cmake/libprotoc.cmake +Index: protobuf-21.6/cmake/libprotoc.cmake =================================================================== ---- protobuf-21.5.orig/cmake/libprotoc.cmake -+++ protobuf-21.5/cmake/libprotoc.cmake +--- protobuf-21.6.orig/cmake/libprotoc.cmake ++++ protobuf-21.6/cmake/libprotoc.cmake @@ -130,7 +130,6 @@ endif() set_target_properties(libprotoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.GXBdOy/_old 2022-09-20 19:23:09.278400211 +0200 +++ /var/tmp/diff_new_pack.GXBdOy/_new 2022-09-20 19:23:09.282400223 +0200 @@ -1,4 +1,4 @@ -libprotobuf3_21_5 -libprotoc3_21_5 -libprotobuf-lite3_21_5 +libprotobuf3_21_6 +libprotoc3_21_6 +libprotobuf-lite3_21_6 ++++++ protobuf-21.5.tar.gz -> protobuf-21.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/Protobuf-C++.podspec new/protobuf-21.6/Protobuf-C++.podspec --- old/protobuf-21.5/Protobuf-C++.podspec 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/Protobuf-C++.podspec 2022-09-13 22:50:08.000000000 +0200 @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Protobuf-C++' - s.version = '3.21.5' + s.version = '3.21.6' s.summary = 'Protocol Buffers v3 runtime library for C++.' s.homepage = 'https://github.com/google/protobuf' s.license = 'BSD-3-Clause' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/Protobuf.podspec new/protobuf-21.6/Protobuf.podspec --- old/protobuf-21.5/Protobuf.podspec 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/Protobuf.podspec 2022-09-13 22:50:08.000000000 +0200 @@ -5,7 +5,7 @@ # dependent projects use the :git notation to refer to the library. Pod::Spec.new do |s| s.name = 'Protobuf' - s.version = '3.21.5' + s.version = '3.21.6' s.summary = 'Protocol Buffers v.3 runtime library for Objective-C.' s.homepage = 'https://github.com/protocolbuffers/protobuf' s.license = 'BSD-3-Clause' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/benchmarks/Makefile.am new/protobuf-21.6/benchmarks/Makefile.am --- old/protobuf-21.5/benchmarks/Makefile.am 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/benchmarks/Makefile.am 2022-09-13 22:50:08.000000000 +0200 @@ -91,8 +91,8 @@ initialize_submodule: oldpwd=`pwd` - cd $(top_srcdir) && git submodule update --init -r third_party/benchmark && \ - cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make + cd $(top_srcdir) && git submodule update --init -r third_party/benchmark && cd third_party/benchmark \ + && cmake -DCMAKE_BUILD_TYPE=Release && make cd $$oldpwd touch initialize_submodule diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/configure.ac new/protobuf-21.6/configure.ac --- old/protobuf-21.5/configure.ac 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/configure.ac 2022-09-13 22:50:08.000000000 +0200 @@ -17,7 +17,7 @@ # In the SVN trunk, the version should always be the next anticipated release # version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed # the size of one file name in the dist tarfile over the 99-char limit.) -AC_INIT([Protocol Buffers],[3.21.5],[proto...@googlegroups.com],[protobuf]) +AC_INIT([Protocol Buffers],[3.21.6],[proto...@googlegroups.com],[protobuf]) AM_MAINTAINER_MODE([enable]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/csharp/Google.Protobuf.Tools.nuspec new/protobuf-21.6/csharp/Google.Protobuf.Tools.nuspec --- old/protobuf-21.5/csharp/Google.Protobuf.Tools.nuspec 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/csharp/Google.Protobuf.Tools.nuspec 2022-09-13 22:50:08.000000000 +0200 @@ -5,7 +5,7 @@ <title>Google Protocol Buffers tools</title> <summary>Tools for Protocol Buffers - Google's data interchange format.</summary> <description>See project site for more info.</description> - <version>3.21.5</version> + <version>3.21.6</version> <authors>Google Inc.</authors> <owners>protobuf-packages</owners> <licenseUrl>https://github.com/protocolbuffers/protobuf/blob/main/LICENSE</licenseUrl> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/csharp/src/Google.Protobuf/Google.Protobuf.csproj new/protobuf-21.6/csharp/src/Google.Protobuf/Google.Protobuf.csproj --- old/protobuf-21.5/csharp/src/Google.Protobuf/Google.Protobuf.csproj 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/csharp/src/Google.Protobuf/Google.Protobuf.csproj 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <Description>C# runtime library for Protocol Buffers - Google's data interchange format.</Description> <Copyright>Copyright 2015, Google Inc.</Copyright> <AssemblyTitle>Google Protocol Buffers</AssemblyTitle> - <VersionPrefix>3.21.5</VersionPrefix> + <VersionPrefix>3.21.6</VersionPrefix> <!-- C# 7.2 is required for Span/BufferWriter/ReadOnlySequence --> <LangVersion>7.2</LangVersion> <Authors>Google Inc.</Authors> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/README.md new/protobuf-21.6/java/README.md --- old/protobuf-21.5/java/README.md 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/README.md 2022-09-13 22:50:08.000000000 +0200 @@ -23,7 +23,7 @@ <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </dependency> ``` @@ -37,7 +37,7 @@ <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java-util</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </dependency> ``` @@ -45,7 +45,7 @@ If you are using Gradle, add the following to your `build.gradle` file's dependencies: ``` - implementation 'com.google.protobuf:protobuf-java:3.21.5' + implementation 'com.google.protobuf:protobuf-java:3.21.6' ``` Again, be sure to check that the version number matches (or is newer than) the version number of protoc that you are using. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/bom/pom.xml new/protobuf-21.6/java/bom/pom.xml --- old/protobuf-21.5/java/bom/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/bom/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <groupId>com.google.protobuf</groupId> <artifactId>protobuf-bom</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> <packaging>pom</packaging> <name>Protocol Buffers [BOM]</name> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/core/pom.xml new/protobuf-21.6/java/core/pom.xml --- old/protobuf-21.5/java/core/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/core/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </parent> <artifactId>protobuf-java</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/kotlin/pom.xml new/protobuf-21.6/java/kotlin/pom.xml --- old/protobuf-21.5/java/kotlin/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/kotlin/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </parent> <artifactId>protobuf-kotlin</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/kotlin-lite/pom.xml new/protobuf-21.6/java/kotlin-lite/pom.xml --- old/protobuf-21.5/java/kotlin-lite/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/kotlin-lite/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </parent> <artifactId>protobuf-kotlin-lite</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/lite/pom.xml new/protobuf-21.6/java/lite/pom.xml --- old/protobuf-21.5/java/lite/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/lite/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </parent> <artifactId>protobuf-javalite</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/lite.md new/protobuf-21.6/java/lite.md --- old/protobuf-21.5/java/lite.md 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/lite.md 2022-09-13 22:50:08.000000000 +0200 @@ -29,7 +29,7 @@ <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-javalite</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </dependency> ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/pom.xml new/protobuf-21.6/java/pom.xml --- old/protobuf-21.5/java/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> <packaging>pom</packaging> <name>Protocol Buffers [Parent]</name> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/java/util/pom.xml new/protobuf-21.6/java/util/pom.xml --- old/protobuf-21.5/java/util/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/java/util/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -4,7 +4,7 @@ <parent> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-parent</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </parent> <artifactId>protobuf-java-util</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/macos/prepare_build_macos_rc new/protobuf-21.6/kokoro/macos/prepare_build_macos_rc --- old/protobuf-21.5/kokoro/macos/prepare_build_macos_rc 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/macos/prepare_build_macos_rc 2022-09-13 22:50:08.000000000 +0200 @@ -4,14 +4,19 @@ set -eux +export HOMEBREW_PREFIX=$(brew --prefix) + +## +# Remove any pre-existing protobuf installation. +brew uninstall protobuf + ## # Select Xcode version -# Remember to update the Xcode version when Xcode_11.3.app is not available. -# If xcode is not available, it will probably encounter the failure for -# "autom4te: need GNU m4 1.4 or later: /usr/bin/m4" -# go/kokoro/userdocs/macos/selecting_xcode.md for more information. -export DEVELOPER_DIR=/Applications/Xcode_11.3.app/Contents/Developer +## +# Select Xcode version +export DEVELOPER_DIR=/Applications/Xcode_13.3.1.app/Contents/Developer +sudo xcode-select -s "${DEVELOPER_DIR}" ## # Select C/C++ compilers @@ -20,21 +25,25 @@ export CXX=g++ ## +# Install Python 2 by default + +eval "$(pyenv init -)" +pyenv install -v -s 2.7.18 && pyenv global 2.7.18 + +## # Install Tox if [[ "${KOKORO_INSTALL_TOX:-}" == "yes" ]] ; then - sudo python3 -m pip install --upgrade pip tox + pyenv install -v -s 3.7.13 + pyenv global 3.7.13 + sudo python -m pip install --upgrade pip tox tox-pyenv fi ## -# Install RVM - +# Setup RVM if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then - curl -sSL https://rvm.io/mpapis.asc | gpg --import - - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - - - # Old OpenSSL versions cannot handle the SSL certificate used by - # https://get.rvm.io, so as a workaround we download RVM directly from - # GitHub. See this issue for details: https://github.com/rvm/rvm/issues/5133 - curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s master --ruby + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-cask + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-core + git config --global --add safe.directory $HOMEBREW_PREFIX/Library/Taps/homebrew/homebrew-services + sudo chown -R $(whoami) $HOME/.rvm/ fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/macos/ruby31/build.sh new/protobuf-21.6/kokoro/macos/ruby31/build.sh --- old/protobuf-21.5/kokoro/macos/ruby31/build.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/macos/ruby31/build.sh 2022-09-13 22:50:08.000000000 +0200 @@ -5,6 +5,9 @@ # Change to repo root cd $(dirname $0)/../../.. +# Fix locale issues in Monterey. +export LC_ALL=en_US.UTF-8 + # Prepare worker environment to run tests KOKORO_INSTALL_RVM=yes source kokoro/macos/prepare_build_macos_rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/release/python/macos/build_artifacts.sh new/protobuf-21.6/kokoro/release/python/macos/build_artifacts.sh --- old/protobuf-21.5/kokoro/release/python/macos/build_artifacts.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/release/python/macos/build_artifacts.sh 2022-09-13 22:50:08.000000000 +0200 @@ -2,6 +2,9 @@ set -ex +# Remove any pre-existing protobuf installation. +brew uninstall protobuf + # change to repo root pushd $(dirname $0)/../../../.. @@ -58,7 +61,6 @@ } export MB_PYTHON_OSX_VER=10.9 -build_artifact_version 3.6 build_artifact_version 3.7 build_artifact_version 3.8 build_artifact_version 3.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/release/python/macos/config.sh new/protobuf-21.6/kokoro/release/python/macos/config.sh --- old/protobuf-21.5/kokoro/release/python/macos/config.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/release/python/macos/config.sh 2022-09-13 22:50:08.000000000 +0200 @@ -26,7 +26,6 @@ pushd protobuf # Build protoc and protobuf libraries - use_bazel.sh 5.1.1 bazel build //:protoc export PROTOC=$PWD/bazel-bin/protoc mkdir src/.libs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/release/ruby/macos/build_artifacts.sh new/protobuf-21.6/kokoro/release/ruby/macos/build_artifacts.sh --- old/protobuf-21.5/kokoro/release/ruby/macos/build_artifacts.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/release/ruby/macos/build_artifacts.sh 2022-09-13 22:50:08.000000000 +0200 @@ -12,8 +12,5 @@ # ruby environment bash kokoro/release/ruby/macos/ruby/ruby_build_environment.sh -gem install rubygems-update -update_rubygems - # build artifacts bash kokoro/release/ruby/macos/ruby/ruby_build.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/release/ruby/macos/ruby/ruby_build.sh new/protobuf-21.6/kokoro/release/ruby/macos/ruby/ruby_build.sh --- old/protobuf-21.5/kokoro/release/ruby/macos/ruby/ruby_build.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/release/ruby/macos/ruby/ruby_build.sh 2022-09-13 22:50:08.000000000 +0200 @@ -3,7 +3,6 @@ set -ex # Build protoc -use_bazel.sh 5.1.1 bazel build //:protoc export PROTOC=$PWD/bazel-bin/protoc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh new/protobuf-21.6/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh --- old/protobuf-21.5/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/kokoro/release/ruby/macos/ruby/ruby_build_environment.sh 2022-09-13 22:50:08.000000000 +0200 @@ -2,6 +2,10 @@ set -ex +# Fix permissions +sudo chown -R $(whoami) $HOME/.rvm/ +sudo chown -R $(whoami) /Library/Ruby/ + set +ex # rvm script is very verbose and exits with errorcode curl -sSL https://rvm.io/mpapis.asc | gpg --import - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/php/ext/google/protobuf/package.xml new/protobuf-21.6/php/ext/google/protobuf/package.xml --- old/protobuf-21.5/php/ext/google/protobuf/package.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/php/ext/google/protobuf/package.xml 2022-09-13 22:50:08.000000000 +0200 @@ -10,11 +10,11 @@ <email>protobuf-packa...@google.com</email> <active>yes</active> </lead> - <date>2022-08-09</date> - <time>09:24:23</time> + <date>2022-09-13</date> + <time>13:50:07</time> <version> - <release>3.21.5</release> - <api>3.21.5</api> + <release>3.21.6</release> + <api>3.21.6</api> </version> <stability> <release>stable</release> @@ -1402,6 +1402,21 @@ <license uri="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause</license> <notes> </notes> + </release> + <release> + <version> + <release>3.21.6</release> + <api>3.21.6</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2022-09-13</date> + <time>13:50:07</time> + <license uri="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause</license> + <notes> + </notes> </release> </changelog> </package> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/php/ext/google/protobuf/protobuf.h new/protobuf-21.6/php/ext/google/protobuf/protobuf.h --- old/protobuf-21.5/php/ext/google/protobuf/protobuf.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/php/ext/google/protobuf/protobuf.h 2022-09-13 22:50:08.000000000 +0200 @@ -127,7 +127,7 @@ ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -#define PHP_PROTOBUF_VERSION "3.21.5" +#define PHP_PROTOBUF_VERSION "3.21.6" // ptr -> PHP object cache. This is a weak map that caches lazily-created // wrapper objects around upb types: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/protobuf_version.bzl new/protobuf-21.6/protobuf_version.bzl --- old/protobuf-21.5/protobuf_version.bzl 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/protobuf_version.bzl 2022-09-13 22:50:08.000000000 +0200 @@ -1,3 +1,3 @@ -PROTOC_VERSION = '21.5' -PROTOBUF_JAVA_VERSION = '3.21.5' -PROTOBUF_PYTHON_VERSION = '4.21.5' +PROTOC_VERSION = '21.6' +PROTOBUF_JAVA_VERSION = '3.21.6' +PROTOBUF_PYTHON_VERSION = '4.21.6' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/protoc-artifacts/pom.xml new/protobuf-21.6/protoc-artifacts/pom.xml --- old/protobuf-21.5/protoc-artifacts/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/protoc-artifacts/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -8,7 +8,7 @@ </parent> <groupId>com.google.protobuf</groupId> <artifactId>protoc</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> <packaging>pom</packaging> <name>Protobuf Compiler</name> <description> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/python/google/protobuf/__init__.py new/protobuf-21.6/python/google/protobuf/__init__.py --- old/protobuf-21.5/python/google/protobuf/__init__.py 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/python/google/protobuf/__init__.py 2022-09-13 22:50:08.000000000 +0200 @@ -30,4 +30,4 @@ # Copyright 2007 Google Inc. All Rights Reserved. -__version__ = '4.21.5' +__version__ = '4.21.6' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/ruby/google-protobuf.gemspec new/protobuf-21.6/ruby/google-protobuf.gemspec --- old/protobuf-21.5/ruby/google-protobuf.gemspec 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/ruby/google-protobuf.gemspec 2022-09-13 22:50:08.000000000 +0200 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = "google-protobuf" - s.version = "3.21.5" + s.version = "3.21.6" git_tag = "v#{s.version.to_s.sub('.rc.', '-rc')}" # Converts X.Y.Z.rc.N to vX.Y.Z-rcN, used for the git tag s.licenses = ["BSD-3-Clause"] s.summary = "Protocol Buffers" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/ruby/pom.xml new/protobuf-21.6/ruby/pom.xml --- old/protobuf-21.5/ruby/pom.xml 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/ruby/pom.xml 2022-09-13 22:50:08.000000000 +0200 @@ -9,7 +9,7 @@ <groupId>com.google.protobuf.jruby</groupId> <artifactId>protobuf-jruby</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> <name>Protocol Buffer JRuby native extension</name> <description> Protocol Buffers are a way of encoding structured data in an efficient yet @@ -76,7 +76,7 @@ <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java-util</artifactId> - <version>3.21.5</version> + <version>3.21.6</version> </dependency> <dependency> <groupId>org.jruby</groupId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/Makefile.am new/protobuf-21.6/src/Makefile.am --- old/protobuf-21.5/src/Makefile.am 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/Makefile.am 2022-09-13 22:50:08.000000000 +0200 @@ -18,7 +18,7 @@ PTHREAD_DEF = endif -PROTOBUF_VERSION = 32:5:0 +PROTOBUF_VERSION = 32:6:0 if GCC # Turn on all warnings except for sign comparison (we ignore sign comparison diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/any.pb.h new/protobuf-21.6/src/google/protobuf/any.pb.h --- old/protobuf-21.5/src/google/protobuf/any.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/any.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/api.pb.h new/protobuf-21.6/src/google/protobuf/api.pb.h --- old/protobuf-21.5/src/google/protobuf/api.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/api.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/compiler/plugin.pb.h new/protobuf-21.6/src/google/protobuf/compiler/plugin.pb.h --- old/protobuf-21.5/src/google/protobuf/compiler/plugin.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/compiler/plugin.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/descriptor.pb.h new/protobuf-21.6/src/google/protobuf/descriptor.pb.h --- old/protobuf-21.5/src/google/protobuf/descriptor.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/descriptor.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/duration.pb.h new/protobuf-21.6/src/google/protobuf/duration.pb.h --- old/protobuf-21.5/src/google/protobuf/duration.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/duration.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/empty.pb.h new/protobuf-21.6/src/google/protobuf/empty.pb.h --- old/protobuf-21.5/src/google/protobuf/empty.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/empty.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/extension_set_inl.h new/protobuf-21.6/src/google/protobuf/extension_set_inl.h --- old/protobuf-21.5/src/google/protobuf/extension_set_inl.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/extension_set_inl.h 2022-09-13 22:50:08.000000000 +0200 @@ -206,16 +206,21 @@ const char* ptr, const Msg* extendee, internal::InternalMetadata* metadata, internal::ParseContext* ctx) { std::string payload; - uint32_t type_id = 0; - bool payload_read = false; + uint32_t type_id; + enum class State { kNoTag, kHasType, kHasPayload, kDone }; + State state = State::kNoTag; + while (!ctx->Done(&ptr)) { uint32_t tag = static_cast<uint8_t>(*ptr++); if (tag == WireFormatLite::kMessageSetTypeIdTag) { uint64_t tmp; ptr = ParseBigVarint(ptr, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - type_id = tmp; - if (payload_read) { + if (state == State::kNoTag) { + type_id = tmp; + state = State::kHasType; + } else if (state == State::kHasPayload) { + type_id = tmp; ExtensionInfo extension; bool was_packed_on_wire; if (!FindExtension(2, type_id, extendee, ctx, &extension, @@ -241,20 +246,24 @@ GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) && tmp_ctx.EndedAtLimit()); } - type_id = 0; + state = State::kDone; } } else if (tag == WireFormatLite::kMessageSetMessageTag) { - if (type_id != 0) { + if (state == State::kHasType) { ptr = ParseFieldMaybeLazily(static_cast<uint64_t>(type_id) * 8 + 2, ptr, extendee, metadata, ctx); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - type_id = 0; + state = State::kDone; } else { + std::string tmp; int32_t size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ptr = ctx->ReadString(ptr, size, &payload); + ptr = ctx->ReadString(ptr, size, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - payload_read = true; + if (state == State::kNoTag) { + payload = std::move(tmp); + state = State::kHasPayload; + } } } else { ptr = ReadTag(ptr - 1, &tag); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/field_mask.pb.h new/protobuf-21.6/src/google/protobuf/field_mask.pb.h --- old/protobuf-21.5/src/google/protobuf/field_mask.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/field_mask.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/port_def.inc new/protobuf-21.6/src/google/protobuf/port_def.inc --- old/protobuf-21.5/src/google/protobuf/port_def.inc 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/port_def.inc 2022-09-13 22:50:08.000000000 +0200 @@ -178,7 +178,7 @@ #ifdef PROTOBUF_VERSION #error PROTOBUF_VERSION was previously defined #endif -#define PROTOBUF_VERSION 3021005 +#define PROTOBUF_VERSION 3021006 #ifdef PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC #error PROTOBUF_MIN_HEADER_VERSION_FOR_PROTOC was previously defined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/source_context.pb.h new/protobuf-21.6/src/google/protobuf/source_context.pb.h --- old/protobuf-21.5/src/google/protobuf/source_context.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/source_context.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/struct.pb.h new/protobuf-21.6/src/google/protobuf/struct.pb.h --- old/protobuf-21.5/src/google/protobuf/struct.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/struct.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/stubs/common.h new/protobuf-21.6/src/google/protobuf/stubs/common.h --- old/protobuf-21.5/src/google/protobuf/stubs/common.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/stubs/common.h 2022-09-13 22:50:08.000000000 +0200 @@ -82,7 +82,7 @@ // The current version, represented as a single integer to make comparison // easier: major * 10^6 + minor * 10^3 + micro -#define GOOGLE_PROTOBUF_VERSION 3021005 +#define GOOGLE_PROTOBUF_VERSION 3021006 // A suffix string for alpha, beta or rc releases. Empty for stable releases. #define GOOGLE_PROTOBUF_VERSION_SUFFIX "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/timestamp.pb.h new/protobuf-21.6/src/google/protobuf/timestamp.pb.h --- old/protobuf-21.5/src/google/protobuf/timestamp.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/timestamp.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/type.pb.h new/protobuf-21.6/src/google/protobuf/type.pb.h --- old/protobuf-21.5/src/google/protobuf/type.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/type.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/wire_format.cc new/protobuf-21.6/src/google/protobuf/wire_format.cc --- old/protobuf-21.5/src/google/protobuf/wire_format.cc 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/wire_format.cc 2022-09-13 22:50:08.000000000 +0200 @@ -657,9 +657,11 @@ const char* _InternalParse(const char* ptr, internal::ParseContext* ctx) { // Parse a MessageSetItem auto metadata = reflection->MutableInternalMetadata(msg); + enum class State { kNoTag, kHasType, kHasPayload, kDone }; + State state = State::kNoTag; + std::string payload; uint32_t type_id = 0; - bool payload_read = false; while (!ctx->Done(&ptr)) { // We use 64 bit tags in order to allow typeid's that span the whole // range of 32 bit numbers. @@ -668,8 +670,11 @@ uint64_t tmp; ptr = ParseBigVarint(ptr, &tmp); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - type_id = tmp; - if (payload_read) { + if (state == State::kNoTag) { + type_id = tmp; + state = State::kHasType; + } else if (state == State::kHasPayload) { + type_id = tmp; const FieldDescriptor* field; if (ctx->data().pool == nullptr) { field = reflection->FindKnownExtensionByNumber(type_id); @@ -696,17 +701,17 @@ GOOGLE_PROTOBUF_PARSER_ASSERT(value->_InternalParse(p, &tmp_ctx) && tmp_ctx.EndedAtLimit()); } - type_id = 0; + state = State::kDone; } continue; } else if (tag == WireFormatLite::kMessageSetMessageTag) { - if (type_id == 0) { + if (state == State::kNoTag) { int32_t size = ReadSize(&ptr); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); ptr = ctx->ReadString(ptr, size, &payload); GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - payload_read = true; - } else { + state = State::kHasPayload; + } else if (state == State::kHasType) { // We're now parsing the payload const FieldDescriptor* field = nullptr; if (descriptor->IsExtensionNumber(type_id)) { @@ -720,7 +725,12 @@ ptr = WireFormat::_InternalParseAndMergeField( msg, ptr, ctx, static_cast<uint64_t>(type_id) * 8 + 2, reflection, field); - type_id = 0; + state = State::kDone; + } else { + int32_t size = ReadSize(&ptr); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); + ptr = ctx->Skip(ptr, size); + GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); } } else { // An unknown field in MessageSetItem. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/wire_format_lite.h new/protobuf-21.6/src/google/protobuf/wire_format_lite.h --- old/protobuf-21.5/src/google/protobuf/wire_format_lite.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/wire_format_lite.h 2022-09-13 22:50:08.000000000 +0200 @@ -1831,6 +1831,9 @@ // we can parse it later. std::string message_data; + enum class State { kNoTag, kHasType, kHasPayload, kDone }; + State state = State::kNoTag; + while (true) { const uint32_t tag = input->ReadTagNoLastTag(); if (tag == 0) return false; @@ -1839,26 +1842,34 @@ case WireFormatLite::kMessageSetTypeIdTag: { uint32_t type_id; if (!input->ReadVarint32(&type_id)) return false; - last_type_id = type_id; - - if (!message_data.empty()) { + if (state == State::kNoTag) { + last_type_id = type_id; + state = State::kHasType; + } else if (state == State::kHasPayload) { // We saw some message data before the type_id. Have to parse it // now. io::CodedInputStream sub_input( reinterpret_cast<const uint8_t*>(message_data.data()), static_cast<int>(message_data.size())); sub_input.SetRecursionLimit(input->RecursionBudget()); - if (!ms.ParseField(last_type_id, &sub_input)) { + if (!ms.ParseField(type_id, &sub_input)) { return false; } message_data.clear(); + state = State::kDone; } break; } case WireFormatLite::kMessageSetMessageTag: { - if (last_type_id == 0) { + if (state == State::kHasType) { + // Already saw type_id, so we can parse this directly. + if (!ms.ParseField(last_type_id, input)) { + return false; + } + state = State::kDone; + } else if (state == State::kNoTag) { // We haven't seen a type_id yet. Append this data to message_data. uint32_t length; if (!input->ReadVarint32(&length)) return false; @@ -1869,11 +1880,9 @@ auto ptr = reinterpret_cast<uint8_t*>(&message_data[0]); ptr = io::CodedOutputStream::WriteVarint32ToArray(length, ptr); if (!input->ReadRaw(ptr, length)) return false; + state = State::kHasPayload; } else { - // Already saw type_id, so we can parse this directly. - if (!ms.ParseField(last_type_id, input)) { - return false; - } + if (!ms.SkipField(tag, input)) return false; } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/wire_format_unittest.inc new/protobuf-21.6/src/google/protobuf/wire_format_unittest.inc --- old/protobuf-21.5/src/google/protobuf/wire_format_unittest.inc 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/wire_format_unittest.inc 2022-09-13 22:50:08.000000000 +0200 @@ -581,28 +581,54 @@ EXPECT_EQ(message_set.DebugString(), dynamic_message_set.DebugString()); } -TEST(WireFormatTest, ParseMessageSetWithReverseTagOrder) { +namespace { +std::string BuildMessageSetItemStart() { std::string data; { - UNITTEST::TestMessageSetExtension1 message; - message.set_i(123); - // Build a MessageSet manually with its message content put before its - // type_id. io::StringOutputStream output_stream(&data); io::CodedOutputStream coded_output(&output_stream); coded_output.WriteTag(WireFormatLite::kMessageSetItemStartTag); + } + return data; +} +std::string BuildMessageSetItemEnd() { + std::string data; + { + io::StringOutputStream output_stream(&data); + io::CodedOutputStream coded_output(&output_stream); + coded_output.WriteTag(WireFormatLite::kMessageSetItemEndTag); + } + return data; +} +std::string BuildMessageSetTestExtension1(int value = 123) { + std::string data; + { + UNITTEST::TestMessageSetExtension1 message; + message.set_i(value); + io::StringOutputStream output_stream(&data); + io::CodedOutputStream coded_output(&output_stream); // Write the message content first. WireFormatLite::WriteTag(WireFormatLite::kMessageSetMessageNumber, WireFormatLite::WIRETYPE_LENGTH_DELIMITED, &coded_output); coded_output.WriteVarint32(message.ByteSizeLong()); message.SerializeWithCachedSizes(&coded_output); - // Write the type id. - uint32_t type_id = message.GetDescriptor()->extension(0)->number(); + } + return data; +} +std::string BuildMessageSetItemTypeId(int extension_number) { + std::string data; + { + io::StringOutputStream output_stream(&data); + io::CodedOutputStream coded_output(&output_stream); WireFormatLite::WriteUInt32(WireFormatLite::kMessageSetTypeIdNumber, - type_id, &coded_output); - coded_output.WriteTag(WireFormatLite::kMessageSetItemEndTag); + extension_number, &coded_output); } + return data; +} +void ValidateTestMessageSet(const std::string& test_case, + const std::string& data) { + SCOPED_TRACE(test_case); { PROTO2_WIREFORMAT_UNITTEST::TestMessageSet message_set; ASSERT_TRUE(message_set.ParseFromString(data)); @@ -612,6 +638,11 @@ .GetExtension( UNITTEST::TestMessageSetExtension1::message_set_extension) .i()); + + // Make sure it does not contain anything else. + message_set.ClearExtension( + UNITTEST::TestMessageSetExtension1::message_set_extension); + EXPECT_EQ(message_set.SerializeAsString(), ""); } { // Test parse the message via Reflection. @@ -627,6 +658,61 @@ UNITTEST::TestMessageSetExtension1::message_set_extension) .i()); } + { + // Test parse the message via DynamicMessage. + DynamicMessageFactory factory; + std::unique_ptr<Message> msg( + factory + .GetPrototype( + PROTO2_WIREFORMAT_UNITTEST::TestMessageSet::descriptor()) + ->New()); + msg->ParseFromString(data); + auto* reflection = msg->GetReflection(); + std::vector<const FieldDescriptor*> fields; + reflection->ListFields(*msg, &fields); + ASSERT_EQ(fields.size(), 1); + const auto& sub = reflection->GetMessage(*msg, fields[0]); + reflection = sub.GetReflection(); + EXPECT_EQ(123, reflection->GetInt32( + sub, sub.GetDescriptor()->FindFieldByName("i"))); + } +} +} // namespace + +TEST(WireFormatTest, ParseMessageSetWithAnyTagOrder) { + std::string start = BuildMessageSetItemStart(); + std::string end = BuildMessageSetItemEnd(); + std::string id = BuildMessageSetItemTypeId( + UNITTEST::TestMessageSetExtension1::descriptor()->extension(0)->number()); + std::string message = BuildMessageSetTestExtension1(); + + ValidateTestMessageSet("id + message", start + id + message + end); + ValidateTestMessageSet("message + id", start + message + id + end); +} + +TEST(WireFormatTest, ParseMessageSetWithDuplicateTags) { + std::string start = BuildMessageSetItemStart(); + std::string end = BuildMessageSetItemEnd(); + std::string id = BuildMessageSetItemTypeId( + UNITTEST::TestMessageSetExtension1::descriptor()->extension(0)->number()); + std::string other_id = BuildMessageSetItemTypeId(123456); + std::string message = BuildMessageSetTestExtension1(); + std::string other_message = BuildMessageSetTestExtension1(321); + + // Double id + ValidateTestMessageSet("id + other_id + message", + start + id + other_id + message + end); + ValidateTestMessageSet("id + message + other_id", + start + id + message + other_id + end); + ValidateTestMessageSet("message + id + other_id", + start + message + id + other_id + end); + // Double message + ValidateTestMessageSet("id + message + other_message", + start + id + message + other_message + end); + ValidateTestMessageSet("message + id + other_message", + start + message + id + other_message + end); + ValidateTestMessageSet("message + other_message + id", + start + message + other_message + id + end); } void SerializeReverseOrder( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/src/google/protobuf/wrappers.pb.h new/protobuf-21.6/src/google/protobuf/wrappers.pb.h --- old/protobuf-21.5/src/google/protobuf/wrappers.pb.h 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/src/google/protobuf/wrappers.pb.h 2022-09-13 22:50:08.000000000 +0200 @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3021005 < PROTOBUF_MIN_PROTOC_VERSION +#if 3021006 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/tests.sh new/protobuf-21.6/tests.sh --- old/protobuf-21.5/tests.sh 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/tests.sh 2022-09-13 22:50:08.000000000 +0200 @@ -23,17 +23,6 @@ internal_build_cpp make check -j$(nproc) || (cat src/test-suite.log; false) cd conformance && make test_cpp && cd .. - - # The benchmark code depends on cmake, so test if it is installed before - # trying to do the build. - if [[ $(type cmake 2>/dev/null) ]]; then - # Verify benchmarking code can build successfully. - cd benchmarks && make cpp-benchmark && cd .. - else - echo "" - echo "WARNING: Skipping validation of the benchmarking code, cmake isn't installed." - echo "" - fi } build_cpp_tcmalloc() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/protobuf-21.5/version.json new/protobuf-21.6/version.json --- old/protobuf-21.5/version.json 2022-08-09 19:12:44.000000000 +0200 +++ new/protobuf-21.6/version.json 2022-09-13 22:50:08.000000000 +0200 @@ -1,17 +1,17 @@ { "21.x": { - "protoc_version": "21.5", + "protoc_version": "21.6", "lts": false, - "date": "2022-08-09", + "date": "2022-09-13", "languages": { - "cpp": "3.21.5", - "csharp": "3.21.5", - "java": "3.21.5", - "javascript": "3.21.5", - "objectivec": "3.21.5", - "php": "3.21.5", - "python": "4.21.5", - "ruby": "3.21.5" + "cpp": "3.21.6", + "csharp": "3.21.6", + "java": "3.21.6", + "javascript": "3.21.6", + "objectivec": "3.21.6", + "php": "3.21.6", + "python": "4.21.6", + "ruby": "3.21.6" } } } \ No newline at end of file