Skip to contentSkip to conversation

protobuf: Upgrade 3.11.4 -> 3.12.3

PATCH In review Leon Anavi 3 participants 4 messages Jun 15, 2020 – Jun 17, 2020

lore
Share & tools
lore

Leon Anavi

author
#0 lore raw

PATCH 1/1 protobuf: Upgrade 3.11.4 -> 3.12.3

Upgrade to release 3.12.3. Update the path to the git repository in GitHub. Update the patch for examples/Makefile.

The new release brings:

- [experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.
- Allow duplicate symbol names when multiple descriptor sets are passed on the command-line, to match the behavior when multiple .proto files are passed.
- Deterministic protoc --descriptor_set_out
- Bug fixes for the supported programming languages

---
 ...Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 12 ++++++++----
 .../{protobuf_3.11.4.bb => protobuf_3.12.3.bb}       |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)
 rename meta-oe/recipes-devtools/protobuf/{protobuf_3.11.4.bb => protobuf_3.12.3.bb} (96%)
meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +8 -4
index 0a2e5e2df..934c98193 100644
@@ -1,4 +1,4 @@
-From a28e15092a298e0c73c6fc1ded0913275cf27cb0 Mon Sep 17 00:00:00 2001
+From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001
 From: Martin Jansa <[email protected]>
 Date: Fri, 28 Jun 2019 13:50:52 +0000
 Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
@@ -23,12 +23,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
 
 Upstream-Status: Pending
 Signed-off-by: Martin Jansa <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
 ---
  examples/Makefile | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/examples/Makefile b/examples/Makefile
-index 4ad605641..31d887639 100644
+index e9f9635ae..b2fbe2de1 100644
 --- a/examples/Makefile
 +++ b/examples/Makefile
 @@ -2,6 +2,8 @@
@@ -44,13 +45,16 @@ index 4ad605641..31d887639 100644
  
  add_person_cpp: add_person.cc protoc_middleman
  	pkg-config --cflags protobuf  # fails if protobuf is not installed
--	c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
+-	c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
 +	$(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
  
  list_people_cpp: list_people.cc protoc_middleman
  	pkg-config --cflags protobuf  # fails if protobuf is not installed
--	c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
+-	c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
 +	$(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
  
  add_person_dart: add_person.dart protoc_middleman_dart
  
+-- 
+2.17.1
+
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +2 -2
similarity index 96%
rename from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb
index 4d6c5b255..21ad7a460 100644
@@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
 DEPENDS = "zlib"
 DEPENDS_append_class-target = " protobuf-native"
 
-SRCREV = "d0bfd5221182da1a7cc280f3337b5e41a89539cf"
+SRCREV = "31ebe2ac71400344a5db91ffc13c4ddfb7589f92"
 
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x \
+SRC_URI = "git://github.com/protocolbuffers/protobuf.git \
            file://run-ptest \
            file://0001-protobuf-fix-configure-error.patch \
            file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \
Signature · 1 line
2.17.1
#1 lore raw
Quoted 75 lines · Leon Anavi

Upgrade to release 3.12.3. Update the path to the git repository in GitHub. Update the patch for examples/Makefile.

The new release brings:

- [experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.
- Allow duplicate symbol names when multiple descriptor sets are passed on the command-line, to match the behavior when multiple .proto files are passed.
- Deterministic protoc --descriptor_set_out
- Bug fixes for the supported programming languages

---
 ...Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 12 ++++++++----
 .../{protobuf_3.11.4.bb => protobuf_3.12.3.bb}       |  4 ++--
 2 files changed, 10 insertions(+), 6 deletions(-)
 rename meta-oe/recipes-devtools/protobuf/{protobuf_3.11.4.bb => protobuf_3.12.3.bb} (96%)
meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +8 -4
index 0a2e5e2df..934c98193 100644
@@ -1,4 +1,4 @@
-From a28e15092a298e0c73c6fc1ded0913275cf27cb0 Mon Sep 17 00:00:00 2001
+From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001
 From: Martin Jansa <[email protected]>
 Date: Fri, 28 Jun 2019 13:50:52 +0000
 Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
@@ -23,12 +23,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
 
 Upstream-Status: Pending
 Signed-off-by: Martin Jansa <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
 ---
  examples/Makefile | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/examples/Makefile b/examples/Makefile
-index 4ad605641..31d887639 100644
+index e9f9635ae..b2fbe2de1 100644
 --- a/examples/Makefile
 +++ b/examples/Makefile
 @@ -2,6 +2,8 @@
@@ -44,13 +45,16 @@ index 4ad605641..31d887639 100644
 
  add_person_cpp: add_person.cc protoc_middleman
        pkg-config --cflags protobuf  # fails if protobuf is not installed
--      c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
+-      c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
 +      $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
 
  list_people_cpp: list_people.cc protoc_middleman
        pkg-config --cflags protobuf  # fails if protobuf is not installed
--      c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
+-      c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
 +      $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
 
  add_person_dart: add_person.dart protoc_middleman_dart
 
+--
+2.17.1
+
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +0 -0
similarity index 96%
rename from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb
index 4d6c5b255..21ad7a460 100644

meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" · line 15

Quoted 8 lines
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +2 -2
@@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
 DEPENDS = "zlib"
 DEPENDS_append_class-target = " protobuf-native"
 
-SRCREV = "d0bfd5221182da1a7cc280f3337b5e41a89539cf"
+SRCREV = "31ebe2ac71400344a5db91ffc13c4ddfb7589f92"
 
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x \
+SRC_URI = "git://github.com/protocolbuffers/protobuf.git \

shouldn't this be pointing to 3.12.x branch ?

Quoted 7 lines
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +0 -1
            file://run-ptest \
            file://0001-protobuf-fix-configure-error.patch \
            file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \
--

2.17.1

author
#2 lore raw

Hi Khem,

Quoted 78 lines · Khem Raj
Quoted 77 lines · Leon Anavi

Upgrade to release 3.12.3. Update the path to the git repository in GitHub. Update the patch for examples/Makefile.

The new release brings:

- [experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.
- Allow duplicate symbol names when multiple descriptor sets are passed on the command-line, to match the behavior when multiple .proto files are passed.
- Deterministic protoc --descriptor_set_out
- Bug fixes for the supported programming languages

---
  ...Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 12 ++++++++----
  .../{protobuf_3.11.4.bb => protobuf_3.12.3.bb}       |  4 ++--
  2 files changed, 10 insertions(+), 6 deletions(-)

rename meta-oe/recipes-devtools/protobuf/{protobuf_3.11.4.bb => protobuf_3.12.3.bb} (96%)

meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +8 -4
index 0a2e5e2df..934c98193 100644
@@ -1,4 +1,4 @@
-From a28e15092a298e0c73c6fc1ded0913275cf27cb0 Mon Sep 17 00:00:00 2001
+From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001
  From: Martin Jansa <[email protected]>
  Date: Fri, 28 Jun 2019 13:50:52 +0000
  Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
@@ -23,12 +23,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
 
  Upstream-Status: Pending
  Signed-off-by: Martin Jansa <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
  ---
   examples/Makefile | 6 ++++--
   1 file changed, 4 insertions(+), 2 deletions(-)
 
  diff --git a/examples/Makefile b/examples/Makefile
-index 4ad605641..31d887639 100644
+index e9f9635ae..b2fbe2de1 100644
  --- a/examples/Makefile
  +++ b/examples/Makefile
  @@ -2,6 +2,8 @@
@@ -44,13 +45,16 @@ index 4ad605641..31d887639 100644
 
   add_person_cpp: add_person.cc protoc_middleman
         pkg-config --cflags protobuf  # fails if protobuf is not installed
--      c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
+-      c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
  +      $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
 
   list_people_cpp: list_people.cc protoc_middleman
         pkg-config --cflags protobuf  # fails if protobuf is not installed
--      c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
+-      c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
  +      $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
 
   add_person_dart: add_person.dart protoc_middleman_dart
 
+--
+2.17.1
+
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +0 -0
similarity index 96%
rename from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb
index 4d6c5b255..21ad7a460 100644
@@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
  DEPENDS = "zlib"
  DEPENDS_append_class-target = " protobuf-native"
 
Quoted 6 lines

meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" · line 15

Quoted 5 lines
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +2 -2
-SRCREV = "d0bfd5221182da1a7cc280f3337b5e41a89539cf"
+SRCREV = "31ebe2ac71400344a5db91ffc13c4ddfb7589f92"
 
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x \
+SRC_URI = "git://github.com/protocolbuffers/protobuf.git \

shouldn't this be pointing to 3.12.x branch ?

To be honest I was wondering about the same. The release tag in GitHub is explicitly for this merge commit in the master branch:
https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.3

I've decided to use the exact commit tagged as v3.12.3 which is in master (not available at 3.12.x). The same patch is with different commit hash in branch 3.12.x:
https://github.com/protocolbuffers/protobuf/commit/9ce8c330e736b99c2bb00bdc6a60f00ab600c283

Regarding these circumstances should I switch to branch 3.12.x and the other commit hash?

Best regards,
Leon

Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +0 -1
             file://run-ptest \
             file://0001-protobuf-fix-configure-error.patch \
             file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \
--

2.17.1

Signature · 3 lines
Leon Anavi
Software Engineer
konsulko.com
Acked-by on v1 1/1
#3 lore raw
In reply to Leon Anavi
Quoted 15 lines · Leon Anavi

Upgrade to release 3.12.3. Update the path to the git repository in GitHub. Update the patch for examples/Makefile.

The new release brings:

- [experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.
- Allow duplicate symbol names when multiple descriptor sets are passed on the command-line, to match the behavior when multiple .proto files are passed.
- Deterministic protoc --descriptor_set_out
- Bug fixes for the supported programming languages

Quoted 1 line
Quoted 71 lines
---
  ...Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 12 ++++++++----
  .../{protobuf_3.11.4.bb => protobuf_3.12.3.bb}       |  4 ++--
  2 files changed, 10 insertions(+), 6 deletions(-)

rename meta-oe/recipes-devtools/protobuf/{protobuf_3.11.4.bb => protobuf_3.12.3.bb} (96%)

meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +8 -4
index 0a2e5e2df..934c98193 100644
@@ -1,4 +1,4 @@
-From a28e15092a298e0c73c6fc1ded0913275cf27cb0 Mon Sep 17 00:00:00 2001
+From e5340f816aa273cfda36998466739ca0748caafb Mon Sep 17 00:00:00 2001
  From: Martin Jansa <[email protected]>
  Date: Fri, 28 Jun 2019 13:50:52 +0000
  Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
@@ -23,12 +23,13 @@ Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build
 
  Upstream-Status: Pending
  Signed-off-by: Martin Jansa <[email protected]>
+Signed-off-by: Leon Anavi <[email protected]>
  ---
   examples/Makefile | 6 ++++--
   1 file changed, 4 insertions(+), 2 deletions(-)
 
  diff --git a/examples/Makefile b/examples/Makefile
-index 4ad605641..31d887639 100644
+index e9f9635ae..b2fbe2de1 100644
  --- a/examples/Makefile
  +++ b/examples/Makefile
  @@ -2,6 +2,8 @@
@@ -44,13 +45,16 @@ index 4ad605641..31d887639 100644
 
   add_person_cpp: add_person.cc protoc_middleman
   	pkg-config --cflags protobuf  # fails if protobuf is not installed
--	c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
+-	c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
  +	$(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
 
   list_people_cpp: list_people.cc protoc_middleman
   	pkg-config --cflags protobuf  # fails if protobuf is not installed
--	c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
+-	c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
  +	$(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
 
   add_person_dart: add_person.dart protoc_middleman_dart
 
+--
+2.17.1
+
meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb +2 -2
similarity index 96%
rename from meta-oe/recipes-devtools/protobuf/protobuf_3.11.4.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_3.12.3.bb
index 4d6c5b255..21ad7a460 100644
@@ -10,9 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
  DEPENDS = "zlib"
  DEPENDS_append_class-target = " protobuf-native"
 
-SRCREV = "d0bfd5221182da1a7cc280f3337b5e41a89539cf"
+SRCREV = "31ebe2ac71400344a5db91ffc13c4ddfb7589f92"
 
-SRC_URI = "git://github.com/google/protobuf.git;branch=3.11.x \
+SRC_URI = "git://github.com/protocolbuffers/protobuf.git \
             file://run-ptest \
             file://0001-protobuf-fix-configure-error.patch \
             file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \