From patchwork Sun Sep 10 13:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 30248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 576E6EE7FF4 for ; Sun, 10 Sep 2023 13:18:28 +0000 (UTC) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web11.35736.1694351904613607529 for ; Sun, 10 Sep 2023 06:18:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Ak5voKGe; spf=pass (domain: gmail.com, ip: 209.85.128.44, mailfrom: peron.clem@gmail.com) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-402d0eda361so41558015e9.0 for ; Sun, 10 Sep 2023 06:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694351902; x=1694956702; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y3IRUxAP6TZRsMoByLp791YA7R9j0Atv2jRoActYUnY=; b=Ak5voKGeG/9XdMNydfjIvuhRS5pYkNGMfLyD1qtpkIbs6HcjrX304bbG76qJqMof0N /1q5Ah37wUUJcm81PWuC0YDay5qrxLKjqhwLXuSSmX/LHzUxaECJogUgOK0UXHudQsxF bOQJkjM5Hh/UHq3Do3ekvGJNIccgjZRJEH+xRk2eex9LUYrrHgC2oag/a9o+WEvADze1 EAwc1Bedflejy7f90sh/7y5M8kAOXUaQO4a1mq4gxWd8FaI7a1njNZrZYCxr5QOuuo3H jqD2Oq5uRNZscHDnavTh6RVWW+ns91em4mrfVYMg14291Z9dcB6lEL55B+x2Z4caPMky QlUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694351902; x=1694956702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y3IRUxAP6TZRsMoByLp791YA7R9j0Atv2jRoActYUnY=; b=TTwRf41pmRiY2DpyKCRhz0heLjlr+rPWiWF2xouLmoZu+RH5xBjmerQu9y/7Ut56Xk g/0tnl4qkxTZ/JE9zy8lMrONSG02DJml+0KpJoEYj6O0JRo99Jl6HZ/bkRTbHvQsMGH8 bsPH2sb8zi6iCLQk6CQ4xBbj32RYuoPRwyQgY3HguqDMTXmXfZq59EwICc0CL8Sk1F1X h+WqucyiZblbrlA0vXqoT358rL6nGrqunXSv3WDr0z1mn/aLesIrMpqRFuR1eWMYhDLw Z/+/Vr4CQj+CimWBMLkKlUWTlAnCW2TVWXItiXcSI6Q/Uu74RcEymOU8mtE//M1kUqvN 0Wng== X-Gm-Message-State: AOJu0YzAzetyY/aQH08MpBcnWVkabEtqdt4reA9SW2KxZBUEqQOFJ2e+ ccvOmz0E2OCTUTCv9RbqGjl6+pqrn2k= X-Google-Smtp-Source: AGHT+IHWAZZbzY3LdiKuwBAkZfl5TvYaiKHKnkjKH7AbOJX6kMXspHukMNFlfs0J5BeGKgF6S/v9HA== X-Received: by 2002:adf:e984:0:b0:317:f046:25ef with SMTP id h4-20020adfe984000000b00317f04625efmr5797946wrm.44.1694351902340; Sun, 10 Sep 2023 06:18:22 -0700 (PDT) Received: from firmware-builder.outsight.local (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id o16-20020a5d62d0000000b0031980294e9fsm7308782wrv.116.2023.09.10.06.18.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 06:18:21 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: openembedded-devel@lists.openembedded.org Cc: Xiangyu Chen , =?utf-8?b?Q2zDqW1lbnQgUMOp?= =?utf-8?b?cm9u?= Subject: [PATCH v2 1/4] protobuf: upgrade 3.21.12 -> 4.22.2 Date: Sun, 10 Sep 2023 15:18:15 +0200 Message-Id: <20230910131818.1538524-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230910131818.1538524-1-peron.clem@gmail.com> References: <20230910131818.1538524-1-peron.clem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 10 Sep 2023 13:18:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/104823 From: Xiangyu Chen Signed-off-by: Xiangyu Chen Signed-off-by: Clément Péron --- ...efile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 +++++++++------ .../{protobuf_3.21.12.bb => protobuf_4.22.2.bb} | 11 ++++++++--- 2 files changed, 17 insertions(+), 9 deletions(-) rename meta-oe/recipes-devtools/protobuf/{protobuf_3.21.12.bb => protobuf_4.22.2.bb} (86%) diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch index 36c3c597a..7c4bf260e 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch @@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/Makefile b/examples/Makefile -index 1c7ec8d63..85f591231 100644 +index ef7a4ef58..7206e14e1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@ @@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644 all: cpp java python cpp: add_person_cpp list_people_cpp -@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto +@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto add_person_cpp: add_person.cc protoc_middleman pkg-config --cflags protobuf # fails if protobuf is not installed -- 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 +- c++ -std=c++14 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 #$(CXX) -std=c++17 $(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++ -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 +- c++ -std=c++14 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 #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp add_person_dart: add_person.dart protoc_middleman_dart +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb similarity index 86% rename from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb rename to meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb index d95e1c20f..b97da6ea6 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb @@ -7,12 +7,12 @@ SECTION = "console/tools" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" -DEPENDS = "zlib" +DEPENDS = "zlib abseil-cpp" DEPENDS:append:class-target = " protobuf-native" -SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" +SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" -SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ +SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \ file://run-ptest \ file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ file://0001-Fix-linking-error-with-ld-gold.patch \ @@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\ -Dprotobuf_BUILD_LIBPROTOC=ON \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_EXAMPLES=OFF \ + -Dprotobuf_ABSL_PROVIDER="package" \ " TEST_SRC_DIR = "examples" @@ -52,7 +53,11 @@ do_compile_ptest() { cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot{includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" + sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" # Until out-of-tree build of examples is supported, we have to use this approach sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" From patchwork Sun Sep 10 13:18:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 30246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68EE9EEB57E for ; Sun, 10 Sep 2023 13:18:28 +0000 (UTC) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.web10.35751.1694351906595167554 for ; Sun, 10 Sep 2023 06:18:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=TrDOAkQN; spf=pass (domain: gmail.com, ip: 209.85.128.54, mailfrom: peron.clem@gmail.com) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-403012f27e3so13980235e9.3 for ; Sun, 10 Sep 2023 06:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694351904; x=1694956704; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mv9onMfzryYeVT3tPm0WaM1IyMYOr9Imu+/BBYjJWwA=; b=TrDOAkQNdD/kOpwky+DRI+l0eFk5iy0tGfhTkxEpX7knKScoIIc9nMWPRKPWFGiHLg y23xIp6lGDFgO0Q3ijrNJ4sp3NBEnfcTejBiNN6q6igBgmlDHtCLnnWVhRU314KdMFZ/ U7Tqf3toFUVpDIQ8npPbd75JbkLwGlC8FLUfRk7EX5L1A4Ca0Cv/H/1hsABPXXZoelli MCChrGwiglgbEjomruAdMub9EPmx2XJ799AGn2peMPlNvN2VgjWpO2ON3At1BIi+ZUHS U/pJySgtRKbDyEQXXD7K1ut2yCbSWgehLisT+zX0ksU7446r7ErDg8gxLkrIe8u0nI9j 3w7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694351904; x=1694956704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mv9onMfzryYeVT3tPm0WaM1IyMYOr9Imu+/BBYjJWwA=; b=Kqx9fwvR2iJi5uUozHKwA8gLQzHhtmT88UAyh1pk55r1xXAHJCbGJZfh5XnIpF85Zd 8JJ25WGMihKWIdV13OJJHffAfTevXbCQQsTYb2NHa+vz/r14CA0lSmLxnzBp3/4d/OdB YJSgBpjV1wdb6DprhftIiasq4+h5QS+v/KUqUeTkPb6HtsDj6VjFXqdXJoO1Z4QpgxBi 2E4TR7DmNe/5kNWxjoKLn+NWyE5Fzgi0nsLjCl2tfFS37zKA6EPRYOUU/3D9gaKJxkVu hIVHoqZWPnTck8AhPbusymL8OwYulcG5qkJs+tod+1P3IC4WgSEX4Et5AiSHFbzA2cyR wlTw== X-Gm-Message-State: AOJu0Yy52FqXcMHEG3D9/JEFlYOLOyYIwl3AocKHs1Bbn3boTGbKjAdJ 5w1/NuxVKgeClX1KR7Fn0KMDdeYAQso= X-Google-Smtp-Source: AGHT+IEP6IVGHwSoBliMgWomGArvnofjZZubMu+dfYgc5xiFgut3WDkcBB+JTq10NJkIsRJSQurW3Q== X-Received: by 2002:a5d:525a:0:b0:317:5f13:5c2f with SMTP id k26-20020a5d525a000000b003175f135c2fmr5564673wrc.0.1694351904055; Sun, 10 Sep 2023 06:18:24 -0700 (PDT) Received: from firmware-builder.outsight.local (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id o16-20020a5d62d0000000b0031980294e9fsm7308782wrv.116.2023.09.10.06.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 06:18:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: openembedded-devel@lists.openembedded.org Cc: Xiangyu Chen , =?utf-8?b?Q2zDqW1lbnQgUMOp?= =?utf-8?b?cm9u?= Subject: [PATCH v2 2/4] protobuf-c: add support of protobuf 4.22.x Date: Sun, 10 Sep 2023 15:18:16 +0200 Message-Id: <20230910131818.1538524-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230910131818.1538524-1-peron.clem@gmail.com> References: <20230910131818.1538524-1-peron.clem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 10 Sep 2023 13:18:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/104824 From: Xiangyu Chen Signed-off-by: Xiangyu Chen Signed-off-by: Clément Péron --- ...ot-compile-the-code-which-was-genera.patch | 147 ++++++++ .../0001-add-support-of-protobuf-4.22.x.patch | 315 ++++++++++++++++++ .../protobuf/protobuf-c_1.4.1.bb | 6 +- 3 files changed, 467 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch new file mode 100644 index 000000000..4450a2f62 --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch @@ -0,0 +1,147 @@ +From c263360d4f40beb2badd04e5bd084f46fd25595b Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen +Date: Fri, 31 Mar 2023 16:02:50 +0800 +Subject: [PATCH] Makefile.am: do not compile the code which was generated from + test-full.proto in protobuf-c-native + +Those code was auto generated by protoc command with test-full.proto, those code are not compatible +with protobuf 4.22.x, so temporarily disable compile those code until protobuf-c upstream adapt +the test-full.proto with latest version protobuf. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Xiangyu Chen +--- + Makefile.am | 116 ++++++++++++++++++++++++++-------------------------- + 1 file changed, 58 insertions(+), 58 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3b0d1d6..ff4c196 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -136,64 +136,64 @@ else + + LOG_COMPILER = $(VALGRIND) + +-check_PROGRAMS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/version/version +- +-TESTS += \ +- t/generated-code/test-generated-code \ +- t/generated-code2/test-generated-code2 \ +- t/version/version +- +-t_generated_code_test_generated_code_SOURCES = \ +- t/generated-code/test-generated-code.c \ +- t/test.pb-c.c +-t_generated_code_test_generated_code_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-t_generated_code2_test_generated_code2_SOURCES = \ +- t/generated-code2/test-generated-code2.c \ +- t/test-full.pb-c.c \ +- t/test-optimized.pb-c.c +-t_generated_code2_test_generated_code2_LDADD = \ +- protobuf-c/libprotobuf-c.la +- +-noinst_PROGRAMS += \ +- t/generated-code2/cxx-generate-packed-data +- +-t_generated_code2_cxx_generate_packed_data_SOURCES = \ +- t/generated-code2/cxx-generate-packed-data.cc \ +- t/test-full.pb.cc \ +- protobuf-c/protobuf-c.pb.cc +-$(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h +-t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ +- $(AM_CXXFLAGS) \ +- $(protobuf_CFLAGS) +-t_generated_code2_cxx_generate_packed_data_LDADD = \ +- $(protobuf_LIBS) +- +-t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto +- +-t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto +- +-t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto +- $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto +- +-t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) +- $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc +- +-BUILT_SOURCES += \ +- t/test.pb-c.c t/test.pb-c.h \ +- t/test-full.pb-c.c t/test-full.pb-c.h \ +- t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ +- t/test-full.pb.cc t/test-full.pb.h \ +- t/generated-code2/test-full-cxx-output.inc ++# check_PROGRAMS += \ ++# t/generated-code/test-generated-code \ ++# t/generated-code2/test-generated-code2 \ ++# t/version/version ++ ++# TESTS += \ ++# t/generated-code/test-generated-code \ ++# t/generated-code2/test-generated-code2 \ ++# t/version/version ++ ++# t_generated_code_test_generated_code_SOURCES = \ ++# t/generated-code/test-generated-code.c \ ++# t/test.pb-c.c ++# t_generated_code_test_generated_code_LDADD = \ ++# protobuf-c/libprotobuf-c.la ++ ++# t_generated_code2_test_generated_code2_SOURCES = \ ++# t/generated-code2/test-generated-code2.c \ ++# t/test-full.pb-c.c \ ++# t/test-optimized.pb-c.c ++# t_generated_code2_test_generated_code2_LDADD = \ ++# protobuf-c/libprotobuf-c.la ++ ++# noinst_PROGRAMS += \ ++# t/generated-code2/cxx-generate-packed-data ++ ++# t_generated_code2_cxx_generate_packed_data_SOURCES = \ ++# t/generated-code2/cxx-generate-packed-data.cc \ ++# t/test-full.pb.cc \ ++# protobuf-c/protobuf-c.pb.cc ++# $(t_generated_code2_cxx_generate_packed_data_OBJECTS): t/test-full.pb.h ++# t_generated_code2_cxx_generate_packed_data_CXXFLAGS = \ ++# $(AM_CXXFLAGS) \ ++# $(protobuf_CFLAGS) ++# t_generated_code2_cxx_generate_packed_data_LDADD = \ ++# $(protobuf_LIBS) ++ ++# t/test.pb-c.c t/test.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test.proto ++# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test.proto ++ ++# t/test-optimized.pb-c.c t/test-optimized.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-optimized.proto ++# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-optimized.proto ++ ++# t/test-full.pb-c.c t/test-full.pb-c.h: $(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) $(top_srcdir)/t/test-full.proto ++# $(AM_V_GEN)@PROTOC@ --plugin=protoc-gen-c=$(top_builddir)/protoc-c/protoc-gen-c$(EXEEXT) -I$(top_srcdir) --c_out=$(top_builddir) $(top_srcdir)/t/test-full.proto ++ ++# t/test-full.pb.cc t/test-full.pb.h: @PROTOC@ $(top_srcdir)/t/test-full.proto ++# $(AM_V_GEN)@PROTOC@ -I$(top_srcdir) --cpp_out=$(top_builddir) $(top_srcdir)/t/test-full.proto ++ ++# t/generated-code2/test-full-cxx-output.inc: t/generated-code2/cxx-generate-packed-data$(EXEEXT) ++# $(AM_V_GEN)$(top_builddir)/t/generated-code2/cxx-generate-packed-data$(EXEEXT) > $(top_builddir)/t/generated-code2/test-full-cxx-output.inc ++ ++# BUILT_SOURCES += \ ++# t/test.pb-c.c t/test.pb-c.h \ ++# t/test-full.pb-c.c t/test-full.pb-c.h \ ++# t/test-optimized.pb-c.c t/test-optimized.pb-c.h \ ++# t/test-full.pb.cc t/test-full.pb.h \ ++# t/generated-code2/test-full-cxx-output.inc + + if BUILD_PROTO3 + +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch new file mode 100644 index 000000000..075b7044c --- /dev/null +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c/0001-add-support-of-protobuf-4.22.x.patch @@ -0,0 +1,315 @@ +From 66a0b0d205224f63f19dd8f96abf9dcdc2112331 Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen +Date: Wed, 29 Mar 2023 14:25:17 +0800 +Subject: [PATCH] add support of protobuf 4.22.x + +after upgrade the protobuf to 4.22.x, the protobuf-c cannot compile anymore (#544) due to following changes: +1.protobuf using c++14, that cause the command_line_interface.h report error +2.protobuf using abseil-cpp library instead the trace API with GOOGLE_ header +3. removed GOOGLE_DISALLOW_EVIL_CONSTRUCTORS + +Upstream-Status: Pending [https://github.com/protobuf-c/protobuf-c/pull/548] + +Signed-off-by: Xiangyu Chen +--- + Makefile.am | 2 +- + configure.ac | 8 ++++++++ + protoc-c/c_bytes_field.h | 1 - + protoc-c/c_enum.h | 1 - + protoc-c/c_enum_field.h | 1 - + protoc-c/c_extension.h | 1 - + protoc-c/c_field.cc | 2 +- + protoc-c/c_field.h | 3 --- + protoc-c/c_file.h | 1 - + protoc-c/c_generator.h | 2 -- + protoc-c/c_helpers.cc | 4 ++-- + protoc-c/c_message.cc | 4 ++-- + protoc-c/c_message.h | 1 - + protoc-c/c_message_field.h | 3 --- + protoc-c/c_primitive_field.cc | 6 +++--- + protoc-c/c_primitive_field.h | 3 --- + protoc-c/c_service.h | 1 - + protoc-c/c_string_field.h | 1 - + 18 files changed, 17 insertions(+), 28 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c7339ef..3b0d1d6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,7 +20,7 @@ AM_CPPFLAGS = \ + -I${top_builddir} \ + -I${top_srcdir} + AM_CFLAGS = ${my_CFLAGS} +-AM_LDFLAGS = ++AM_LDFLAGS = ${ABSL_LOG_INTERNAL_CHECK_OP_LIBS} ${ABSL_LOG_RAW_HASH_SET_LIBS} + + # code coverage + +diff --git a/configure.ac b/configure.ac +index f5a0261..8ed549a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -78,6 +78,14 @@ if test "x$enable_protoc" != "xno"; then + + AX_CXX_COMPILE_STDCXX(11, noext, mandatory) + ++# now checking 4.22.x protobuf, if so, set cxx as 14 ++ AS_IF([pkg-config --atleast-version 4.22.0 protobuf],[AX_CXX_COMPILE_STDCXX(14, noext, mandatory)]) ++ ++ AS_IF([pkg-config --atleast-version 4.22.0 protobuf], ++ [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op], ++ [PKG_CHECK_MODULES([ABSL_LOG_RAW_HASH_SET], [absl_raw_hash_set], [], [AC_MSG_ERROR([Missing absl_raw_hash_set library.])])], ++ [AC_MSG_ERROR([Missing absl_log_internal_check_op library.])])]) ++ + PKG_CHECK_MODULES([protobuf], [protobuf >= 3.0.0], + [proto3_supported=yes], + [PKG_CHECK_MODULES([protobuf], [protobuf >= 2.6.0])] +diff --git a/protoc-c/c_bytes_field.h b/protoc-c/c_bytes_field.h +index bf873f0..8fc63d3 100644 +--- a/protoc-c/c_bytes_field.h ++++ b/protoc-c/c_bytes_field.h +@@ -88,7 +88,6 @@ class BytesFieldGenerator : public FieldGenerator { + private: + std::map variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(BytesFieldGenerator); + }; + + +diff --git a/protoc-c/c_enum.h b/protoc-c/c_enum.h +index 9c34b69..d5e58f0 100644 +--- a/protoc-c/c_enum.h ++++ b/protoc-c/c_enum.h +@@ -107,7 +107,6 @@ class EnumGenerator { + const EnumDescriptor* descriptor_; + std::string dllexport_decl_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_enum_field.h b/protoc-c/c_enum_field.h +index 3f8c005..03eb402 100644 +--- a/protoc-c/c_enum_field.h ++++ b/protoc-c/c_enum_field.h +@@ -86,7 +86,6 @@ class EnumFieldGenerator : public FieldGenerator { + private: + std::map variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); + }; + + +diff --git a/protoc-c/c_extension.h b/protoc-c/c_extension.h +index 9541388..9c5797d 100644 +--- a/protoc-c/c_extension.h ++++ b/protoc-c/c_extension.h +@@ -99,7 +99,6 @@ class ExtensionGenerator { + std::string type_traits_; + std::string dllexport_decl_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ExtensionGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_field.cc b/protoc-c/c_field.cc +index 0716744..4abdc6d 100644 +--- a/protoc-c/c_field.cc ++++ b/protoc-c/c_field.cc +@@ -231,7 +231,7 @@ FieldGeneratorMap::~FieldGeneratorMap() {} + + const FieldGenerator& FieldGeneratorMap::get( + const FieldDescriptor* field) const { +- GOOGLE_CHECK_EQ(field->containing_type(), descriptor_); ++ ABSL_CHECK_EQ(field->containing_type(), descriptor_); + return *field_generators_[field->index()]; + } + +diff --git a/protoc-c/c_field.h b/protoc-c/c_field.h +index 3cad35d..76d3b0b 100644 +--- a/protoc-c/c_field.h ++++ b/protoc-c/c_field.h +@@ -104,8 +104,6 @@ class FieldGenerator { + const std::string &descriptor_addr) const; + const FieldDescriptor *descriptor_; + +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGenerator); + }; + + // Convenience class which constructs FieldGenerators for a Descriptor. +@@ -122,7 +120,6 @@ class FieldGeneratorMap { + + static FieldGenerator* MakeGenerator(const FieldDescriptor* field); + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); + }; + + } // namespace c +diff --git a/protoc-c/c_file.h b/protoc-c/c_file.h +index 8dfd8ba..ec55906 100644 +--- a/protoc-c/c_file.h ++++ b/protoc-c/c_file.h +@@ -104,7 +104,6 @@ class FileGenerator { + std::unique_ptr[]> service_generators_; + std::unique_ptr[]> extension_generators_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_generator.h b/protoc-c/c_generator.h +index ac1ffaf..9260116 100644 +--- a/protoc-c/c_generator.h ++++ b/protoc-c/c_generator.h +@@ -94,8 +94,6 @@ class PROTOC_C_EXPORT CGenerator : public CodeGenerator { + OutputDirectory* output_directory, + std::string* error) const; + +- private: +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_helpers.cc b/protoc-c/c_helpers.cc +index 6fd0cd3..1eaeeb4 100644 +--- a/protoc-c/c_helpers.cc ++++ b/protoc-c/c_helpers.cc +@@ -286,7 +286,7 @@ const char* const kKeywordList[] = { + + std::set MakeKeywordsMap() { + std::set result; +- for (int i = 0; i < GOOGLE_ARRAYSIZE(kKeywordList); i++) { ++ for (int i = 0; i < ABSL_ARRAYSIZE(kKeywordList); i++) { + result.insert(kKeywordList[i]); + } + return result; +@@ -548,7 +548,7 @@ std::string CEscape(const std::string& src) { + std::unique_ptr dest(new char[dest_length]); + const int len = CEscapeInternal(src.data(), src.size(), + dest.get(), dest_length, false); +- GOOGLE_DCHECK_GE(len, 0); ++ ABSL_DCHECK_GE(len, 0); + return std::string(dest.get(), len); + } + +diff --git a/protoc-c/c_message.cc b/protoc-c/c_message.cc +index 37e8bf8..c7e8515 100755 +--- a/protoc-c/c_message.cc ++++ b/protoc-c/c_message.cc +@@ -499,7 +499,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + // NOTE: not supported by protobuf + vars["maybe_static"] = ""; + vars["field_dv_ctype"] = "{ ... }"; +- GOOGLE_LOG(DFATAL) << "Messages can't have default values!"; ++ ABSL_LOG(FATAL) << "Messages can't have default values!"; + break; + case FieldDescriptor::CPPTYPE_STRING: + if (fd->type() == FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) +@@ -521,7 +521,7 @@ GenerateMessageDescriptor(io::Printer* printer, bool gen_init) { + break; + } + default: +- GOOGLE_LOG(DFATAL) << "Unknown CPPTYPE"; ++ ABSL_LOG(FATAL) << "Unknown CPPTYPE"; + break; + } + if (!already_defined) +diff --git a/protoc-c/c_message.h b/protoc-c/c_message.h +index ea1c3ab..e90782b 100644 +--- a/protoc-c/c_message.h ++++ b/protoc-c/c_message.h +@@ -137,7 +137,6 @@ class MessageGenerator { + std::unique_ptr[]> enum_generators_; + std::unique_ptr[]> extension_generators_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_message_field.h b/protoc-c/c_message_field.h +index 39b8d99..42efe36 100644 +--- a/protoc-c/c_message_field.h ++++ b/protoc-c/c_message_field.h +@@ -83,9 +83,6 @@ class MessageFieldGenerator : public FieldGenerator { + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; + +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageFieldGenerator); + }; + + +diff --git a/protoc-c/c_primitive_field.cc b/protoc-c/c_primitive_field.cc +index 6990893..d5a7b60 100644 +--- a/protoc-c/c_primitive_field.cc ++++ b/protoc-c/c_primitive_field.cc +@@ -99,7 +99,7 @@ void PrimitiveFieldGenerator::GenerateStructMembers(io::Printer* printer) const + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +@@ -143,7 +143,7 @@ std::string PrimitiveFieldGenerator::GetDefaultValue() const + case FieldDescriptor::CPPTYPE_BOOL: + return descriptor_->default_value_bool() ? "1" : "0"; + default: +- GOOGLE_LOG(DFATAL) << "unexpected CPPTYPE in c_primitive_field"; ++ ABSL_LOG(FATAL) << "unexpected CPPTYPE in c_primitive_field"; + return "UNEXPECTED_CPPTYPE"; + } + } +@@ -197,7 +197,7 @@ void PrimitiveFieldGenerator::GenerateDescriptorInitializer(io::Printer* printer + case FieldDescriptor::TYPE_STRING : + case FieldDescriptor::TYPE_BYTES : + case FieldDescriptor::TYPE_GROUP : +- case FieldDescriptor::TYPE_MESSAGE : GOOGLE_LOG(FATAL) << "not a primitive type"; break; ++ case FieldDescriptor::TYPE_MESSAGE : ABSL_LOG(FATAL) << "not a primitive type"; break; + + // No default because we want the compiler to complain if any new + // types are added. +diff --git a/protoc-c/c_primitive_field.h b/protoc-c/c_primitive_field.h +index a9eb893..d2bb724 100644 +--- a/protoc-c/c_primitive_field.h ++++ b/protoc-c/c_primitive_field.h +@@ -83,9 +83,6 @@ class PrimitiveFieldGenerator : public FieldGenerator { + std::string GetDefaultValue(void) const; + void GenerateStaticInit(io::Printer* printer) const; + +- private: +- +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(PrimitiveFieldGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_service.h b/protoc-c/c_service.h +index 27125a6..4737ff3 100644 +--- a/protoc-c/c_service.h ++++ b/protoc-c/c_service.h +@@ -101,7 +101,6 @@ class ServiceGenerator { + const ServiceDescriptor* descriptor_; + std::map vars_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); + }; + + } // namespace c +diff --git a/protoc-c/c_string_field.h b/protoc-c/c_string_field.h +index 513cea7..ba258e4 100644 +--- a/protoc-c/c_string_field.h ++++ b/protoc-c/c_string_field.h +@@ -88,7 +88,6 @@ class StringFieldGenerator : public FieldGenerator { + private: + std::map variables_; + +- GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(StringFieldGenerator); + }; + + +-- +2.34.1 + diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb index d724287d6..86d83e9cc 100644 --- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb +++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.4.1.bb @@ -12,7 +12,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9f725889e0d77383e26cb42b0b62cea2" DEPENDS = "protobuf-native protobuf" -SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https" +SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \ + file://0001-add-support-of-protobuf-4.22.x.patch \ + " +SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" + SRCREV = "abc67a11c6db271bedbb9f58be85d6f4e2ea8389" S = "${WORKDIR}/git" From patchwork Sun Sep 10 13:18:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 30247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67ABFEE57CD for ; Sun, 10 Sep 2023 13:18:28 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web10.35752.1694351907255015626 for ; Sun, 10 Sep 2023 06:18:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=JszbEo5A; spf=pass (domain: gmail.com, ip: 209.85.221.50, mailfrom: peron.clem@gmail.com) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-31f737b8b69so3023784f8f.3 for ; Sun, 10 Sep 2023 06:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694351905; x=1694956705; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9aMcFJTLSQ3KgIt5h1CsiNkpJNO98d6lat8zqh3iNQU=; b=JszbEo5A/w3nIrWesxdgVrjcUTnUnNs5Cr6vuBDHMrrXnPXy+V6Z4mNdBmqVcF0HjR aJ4lmsrRjAIuJnvI0TMbFEidkVOXYc9v9L4ryXUJl4zd7bfNtgulhOMqsFjgP1jl3NLC uLb3Wz+DsqcG/GOwS6v1n+vGKkvboGb/Uqvv4tV5HfLywr4ic480UvNr+/k62mSysL5+ +2wBojlM9C3kbEs2zNMaGri4KiNP774BsM91Cn2FeWsZP2o+izndOcNjKyeo/e+tqjxD mE/SMRipjWEqZbWOVPAUS9vN8sJB8KYT9o+yJgyLufVeblalmQHlPrvSsWnBPk/EZDhv w4Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694351905; x=1694956705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9aMcFJTLSQ3KgIt5h1CsiNkpJNO98d6lat8zqh3iNQU=; b=C9djVWbp/Ro3bY011XRmzXEtQo8J1lOskvI8MdzgRT8XXkvWSMO992YDWgrkg1jALz sQYWOFZ78f3GuqM1Fo8DzTT0Bw/SJgcDcOvK1uhYzder5ZfvYSRrCIqNs+YK4MxTRDL9 ucyr1gB2b1l1Kc17/xrYW9pbxy23cJ5iViQVrZhBSs9tJQ7Cd1IDT2AbYyxBce41fOAb Vf6ZOGL+auXvN0HKQ5FAmzKCxnF0Wkg2lnc9MF6bpCZhCgSzZCtLBIXp3RRfBbuYaAVn b2515pcYOFyGxqpEu/AEZKuPf0aoQFutKIYmR3BBf+2E0sgTYzfbDe1PgsZDPkEITW2A R9qw== X-Gm-Message-State: AOJu0YzYjPfIU5lVOTmKANnzqnX7dAMnetUT144mP0vF13hiIILuKOoz kohWbhzlQoK/ODlnbcybKcrLsNlhwis= X-Google-Smtp-Source: AGHT+IHNEP2I0eP6pAVjChhLRTGjUHtoDHkzbq1p5ZQl3W6nqnvdNd02heeU8Hbp9qgeVTls1lmOyg== X-Received: by 2002:a05:6000:186b:b0:31f:91ae:4509 with SMTP id d11-20020a056000186b00b0031f91ae4509mr3501083wri.40.1694351904901; Sun, 10 Sep 2023 06:18:24 -0700 (PDT) Received: from firmware-builder.outsight.local (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id o16-20020a5d62d0000000b0031980294e9fsm7308782wrv.116.2023.09.10.06.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 06:18:24 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: openembedded-devel@lists.openembedded.org Cc: Xiangyu Chen , =?utf-8?b?Q2zDqW1lbnQgUMOp?= =?utf-8?b?cm9u?= Subject: [PATCH v2 3/4] mosh: add support of protobuf 4.22.x Date: Sun, 10 Sep 2023 15:18:17 +0200 Message-Id: <20230910131818.1538524-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230910131818.1538524-1-peron.clem@gmail.com> References: <20230910131818.1538524-1-peron.clem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 10 Sep 2023 13:18:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/104825 From: Xiangyu Chen Signed-off-by: Xiangyu Chen Signed-off-by: Clément Péron --- ...re.ac-add-support-of-protobuf-4.22.x.patch | 63 +++++++++++++++++++ .../recipes-connectivity/mosh/mosh_1.4.0.bb | 7 ++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch diff --git a/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch b/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch new file mode 100644 index 000000000..088124391 --- /dev/null +++ b/meta-oe/recipes-connectivity/mosh/mosh/0001-configure.ac-add-support-of-protobuf-4.22.x.patch @@ -0,0 +1,63 @@ +From d9a1a6aac5a3b270449d09ec0d2a556807ab9287 Mon Sep 17 00:00:00 2001 +From: Xiangyu Chen +Date: Wed, 29 Mar 2023 13:53:44 +0800 +Subject: [PATCH] configure.ac: add support of protobuf 4.22.x + +the protobuf 4.22x is using c++14 as default, this caused the mosh cannot compile anymore and report following error: + +.... +/usr/include/google/protobuf/port_def.inc:200:15: error: static assertion failed: Protobuf only supports C++14 and newer. +| 200 | static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer."); +| | ^~~~~~~~~~~~~~~~~~~~~~ +.... + +Upstream-Status: Pending [https://github.com/mobile-shell/mosh/pull/1266] + +Signed-off-by: Xiangyu Chen +--- + configure.ac | 8 ++++++++ + src/frontend/Makefile.am | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ee70c7b..5457009 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -26,6 +26,10 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + AS_IF([pkg-config --atleast-version 3.6.0 protobuf], + [AX_CXX_COMPILE_STDCXX([11])]) + ++# If current protobuf 4.22+ update the requires to C++14. ++AS_IF([pkg-config --atleast-version 4.22.0 protobuf], ++ [AX_CXX_COMPILE_STDCXX([14])]) ++ + WARNING_CXXFLAGS="" + PICKY_CXXFLAGS="" + DISTCHECK_CXXFLAGS="" +@@ -311,6 +315,10 @@ AC_CHECK_FUNCS(m4_normalize([ + pledge + ])) + ++AS_IF([pkg-config --atleast-version 4.22.0 protobuf], ++ [PKG_CHECK_MODULES([ABSL_LOG_INTERNAL_CHECK_OP], [absl_log_internal_check_op],[], ++ [AC_MSG_ERROR([Missing abseil-cpp library.])])]) ++ + # Start by trying to find the needed tinfo parts by pkg-config + PKG_CHECK_MODULES([TINFO], [tinfo], + [AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if is present])], +diff --git a/src/frontend/Makefile.am b/src/frontend/Makefile.am +index 1aa83fd..399ecd6 100644 +--- a/src/frontend/Makefile.am ++++ b/src/frontend/Makefile.am +@@ -1,7 +1,7 @@ + AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I../protobufs -I$(srcdir)/../util $(TINFO_CFLAGS) $(protobuf_CFLAGS) $(CRYPTO_CFLAGS) + AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) $(HARDEN_CFLAGS) $(MISC_CXXFLAGS) $(CODE_COVERAGE_CXXFLAGS) + AM_LDFLAGS = $(HARDEN_LDFLAGS) $(CODE_COVERAGE_LIBS) +-LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(CRYPTO_LIBS) ++LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lm $(TINFO_LIBS) $(protobuf_LIBS) $(CRYPTO_LIBS) $(ABSL_LOG_INTERNAL_CHECK_OP_LIBS) + + mosh_server_LDADD = $(LDADD) + +-- +2.34.1 + diff --git a/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb b/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb index 2869e0633..0ee050da9 100644 --- a/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb +++ b/meta-oe/recipes-connectivity/mosh/mosh_1.4.0.bb @@ -12,9 +12,12 @@ HOMEPAGE = "http://mosh.mit.edu" LICENSE = "GPL-3.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" -DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter" +DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter abseil-cpp" + +SRC_URI = "https://mosh.org/${BP}.tar.gz \ + file://0001-configure.ac-add-support-of-protobuf-4.22.x.patch \ + " -SRC_URI = "https://mosh.org/${BP}.tar.gz" SRC_URI[sha256sum] = "872e4b134e5df29c8933dff12350785054d2fd2839b5ae6b5587b14db1465ddd" inherit autotools pkgconfig From patchwork Sun Sep 10 13:18:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 30249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BA36EE57CD for ; Sun, 10 Sep 2023 13:18:38 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web10.35753.1694351909099873282 for ; Sun, 10 Sep 2023 06:18:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SrhStCPQ; spf=pass (domain: gmail.com, ip: 209.85.221.41, mailfrom: peron.clem@gmail.com) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-31c5c06e8bbso3549292f8f.1 for ; Sun, 10 Sep 2023 06:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694351907; x=1694956707; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/Paz36ekLcpCZCJW0j7qgHyStRY/rvanK8tOH6fnzNk=; b=SrhStCPQE2LoE8YsyHteeJM82BSRpWB8cPe3Gl21D5amHcGm6HHv32QZk1wR2u8lNX YL/St+Bchn71WoVMJw0nqNgkdyQ8TqNU03zJVMJM1y6O8QyoOkRcHG/QhtP7hzMtcn7E BFEbTZ6fFe1epSFlcYPhr2+Vcy38wCcgamLGZ0rCJ2p0Cv8uDyKZ/+Iy4ti2senrYfkl C5eifyDqOiCQE/VKuKGy54v9h0u9yos7GlnZTapdkI80z+STOt+ps/sXI+atDcKocd0V /726GAx1qzQ9oXJT33PYdDUVAN5zcIY1HNlPV5CiREtL5FCDVyoY1xgXLyM98Ggp1MNG 2e+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694351907; x=1694956707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Paz36ekLcpCZCJW0j7qgHyStRY/rvanK8tOH6fnzNk=; b=ayX2GAAN5XlzvtCc93xcUtHZEdnoSl2K9bhSDOkkSIQ7skLCbmylxMIW30mpO3FoO9 BMJcsBtMtwnajNIOmvC50Akfx8YFtUSO1Ftze54ygdFCxBCm6poYDFFlKZe0/+LsWK6F 49HfPyYf/wZwqY5gFrFGIcKV9AoWPM5jHeQIFC5awEldG/kuxiPrGX3RYdMmCG4wZ+nj hiL0SH1M+ShK9Sg8Z+3srEDflKP7AMESMbn2WpK8aa+heSce+fg1kYgkJY5uLNpqlqPG mSN017oQdVu6bjVbn+fbIFeL7ctKRbyyl69I9EaYv0HpMXBOw3x4yHrdThy2Dzr/fNUD lvWw== X-Gm-Message-State: AOJu0YxVuLPfKPdm+r90eORPwOiDeXbH3YcsFACLvMKTdw7Pugid+iDg pq1H5UxZK7S3gS4j8PUKu1UaAs8xsNw= X-Google-Smtp-Source: AGHT+IEM0juCY46kfHDCoqEPwqq412UrkZdXqlnuOvNtQxXZQ6Eg98OEdNzyb1EKDopyUHdpqWUHiA== X-Received: by 2002:a5d:4ac3:0:b0:317:6cc7:6b21 with SMTP id y3-20020a5d4ac3000000b003176cc76b21mr5801767wrs.69.1694351906561; Sun, 10 Sep 2023 06:18:26 -0700 (PDT) Received: from firmware-builder.outsight.local (lputeaux-656-1-11-33.w82-127.abo.wanadoo.fr. [82.127.142.33]) by smtp.gmail.com with ESMTPSA id o16-20020a5d62d0000000b0031980294e9fsm7308782wrv.116.2023.09.10.06.18.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 06:18:25 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: openembedded-devel@lists.openembedded.org Cc: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v2 4/4] devtools: grpc: bump to 1.56.2 Date: Sun, 10 Sep 2023 15:18:18 +0200 Message-Id: <20230910131818.1538524-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230910131818.1538524-1-peron.clem@gmail.com> References: <20230910131818.1538524-1-peron.clem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 10 Sep 2023 13:18:38 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/104826 Remove merged patch that export plugin to a separate targets Remove no more applicatable patch Remove CVE patch already present Signed-off-by: Clément Péron --- ...RPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch | 62 ------------- ...d-separate-export-for-plugin-targets.patch | 93 ------------------- .../grpc/grpc/0001-fix-CVE-2023-32732.patch | 81 ---------------- .../grpc/{grpc_1.50.1.bb => grpc_1.56.2.bb} | 7 +- 4 files changed, 2 insertions(+), 241 deletions(-) delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch delete mode 100644 meta-oe/recipes-devtools/grpc/grpc/0001-fix-CVE-2023-32732.patch rename meta-oe/recipes-devtools/grpc/{grpc_1.50.1.bb => grpc_1.56.2.bb} (90%) diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch deleted file mode 100644 index b245ad865..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch +++ /dev/null @@ -1,62 +0,0 @@ -From dc593958e556dd496b774f35c5992285510d6859 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Tue, 19 Oct 2021 17:09:55 +0200 -Subject: [PATCH] Revert "Changed GRPCPP_ABSEIL_SYNC to GPR_ABSEIL_SYNC - (#25681)" - -This reverts commit 931f91b745cd5b2864a0d1787815871d0bd844ae. - -Fixes sysdig from meta-oe and other recipes (like com.webos.service.tts -libgoogleassistant from meta-webosose) failing with: - -| FAILED: userspace/sysdig/sysdig -| : && /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-sec -urity --sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -f -debug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/bu -ild/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build -/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wall -ggdb -std=c++0x -O3 -fno-strict-aliasing -DNDEBUG -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security ---sysroot=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-p -refix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe- -core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/OE/build/oe-cor -e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-cor -e/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2- -64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/ -oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0=/usr/src/debug/sysdig/0.27.1-r0 -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot= -fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/ -core2-64-oe-linux/sysdig/0.27.1-r0/recipe-sysroot-native= -Wl,-z,relro,-z,now -rdynamic userspace/sysdig/CMakeFiles/sysdig.dir/fields_info.cpp.o userspace/sysdig/CMakeFiles/sysdig.dir/sysdig.cpp.o -o userspace/sysdig/sysdig userspace/libsinsp/libsinsp.a userspace/libscap/libscap.a - -lelf -lz -lcurl -ljsoncpp -ltbb -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -lcares -lgrpc++_unsecure -lgrpc_unsecure -lprotobuf -ljq -lb64 -lrt -lanl -lssl -lcrypto -lluajit-5.1 -ldl -lpthread && : -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:121: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| /usr/include/grpcpp/impl/codegen/completion_queue.h:259: error: undefined reference to 'absl::lts_20210324::Mutex::~Mutex()' -| collect2: error: ld returned 1 exit status - -Signed-off-by: Martin Jansa - ---- -Upstream-Status: Pending - - include/grpcpp/impl/codegen/sync.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/grpcpp/impl/codegen/sync.h b/include/grpcpp/impl/codegen/sync.h -index 4cb8133c7c..3d10d9a3a0 100644 ---- a/include/grpcpp/impl/codegen/sync.h -+++ b/include/grpcpp/impl/codegen/sync.h -@@ -47,7 +47,7 @@ - namespace grpc { - namespace internal { - --#ifdef GPR_ABSEIL_SYNC -+#ifdef GRPCPP_ABSEIL_SYNC - - using Mutex = absl::Mutex; - using MutexLock = absl::MutexLock; -@@ -142,7 +142,7 @@ class CondVar { - gpr_cv cv_; - }; - --#endif // GPR_ABSEIL_SYNC -+#endif // GRPCPP_ABSEIL_SYNC - - template - GRPC_DEPRECATED("incompatible with thread safety analysis") diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch deleted file mode 100644 index 679bd3882..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-cmake-add-separate-export-for-plugin-targets.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 3150cb043363e05588062dd392b940be25594713 Mon Sep 17 00:00:00 2001 -From: Stefan Herbrechtsmeier -Date: Tue, 18 Feb 2020 14:17:07 +0100 -Subject: [PATCH] cmake: add separate export for plugin targets - -Upstream-Status: Submitted [https://github.com/grpc/grpc/pull/29328] - - ---- - CMakeLists.txt | 18 +++++++++++------- - 1 file changed, 11 insertions(+), 7 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index efdaf8936d..6608b1b00c 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -10935,7 +10935,7 @@ target_link_libraries(grpc_cpp_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_cpp_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_cpp_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -10975,7 +10975,7 @@ target_link_libraries(grpc_csharp_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_csharp_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_csharp_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11015,7 +11015,7 @@ target_link_libraries(grpc_node_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_node_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_node_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11055,7 +11055,7 @@ target_link_libraries(grpc_objective_c_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_objective_c_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11095,7 +11095,7 @@ target_link_libraries(grpc_php_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_php_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_php_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11135,7 +11135,7 @@ target_link_libraries(grpc_python_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_python_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_python_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -11175,7 +11175,7 @@ target_link_libraries(grpc_ruby_plugin - - - if(gRPC_INSTALL) -- install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets -+ install(TARGETS grpc_ruby_plugin EXPORT gRPCPluginTargets - RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} - BUNDLE DESTINATION ${gRPC_INSTALL_BINDIR} - LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} -@@ -17349,6 +17349,10 @@ if(gRPC_INSTALL) - DESTINATION ${gRPC_INSTALL_CMAKEDIR} - NAMESPACE gRPC:: - ) -+ install(EXPORT gRPCPluginTargets -+ DESTINATION ${gRPC_INSTALL_CMAKEDIR} -+ NAMESPACE gRPC:: -+ ) - endif() - - include(CMakePackageConfigHelpers) --- -2.30.2 - diff --git a/meta-oe/recipes-devtools/grpc/grpc/0001-fix-CVE-2023-32732.patch b/meta-oe/recipes-devtools/grpc/grpc/0001-fix-CVE-2023-32732.patch deleted file mode 100644 index ab46897b1..000000000 --- a/meta-oe/recipes-devtools/grpc/grpc/0001-fix-CVE-2023-32732.patch +++ /dev/null @@ -1,81 +0,0 @@ -From d39489045b5aa73e27713e3cbacb8832c1140ec8 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Wed, 9 Aug 2023 13:33:45 +0800 -Subject: [PATCH] fix CVE-2023-32732 - -CVE: CVE-2023-32732 - -Upstream-Status: Backport [https://github.com/grpc/grpc/pull/32309/commits/6a7850ef4f042ac26559854266dddc79bfbc75b2] -The original patch is adjusted to fit the current 1.50.1 version. - -Signed-off-by: Chen Qi ---- - .../ext/transport/chttp2/transport/hpack_parser.cc | 10 +++++++--- - src/core/ext/transport/chttp2/transport/internal.h | 2 -- - src/core/ext/transport/chttp2/transport/parsing.cc | 6 ++---- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -index f2e49022dc3..cd459d15238 100644 ---- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc -+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc -@@ -1211,12 +1211,16 @@ class HPackParser::Parser { - "). GRPC_ARG_MAX_METADATA_SIZE can be set to increase this limit.", - *frame_length_, metadata_size_limit_); - if (metadata_buffer_ != nullptr) metadata_buffer_->Clear(); -+ // StreamId is used as a signal to skip this stream but keep the connection -+ // alive - return input_->MaybeSetErrorAndReturn( - [] { - return grpc_error_set_int( -- GRPC_ERROR_CREATE_FROM_STATIC_STRING( -- "received initial metadata size exceeds limit"), -- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); -+ grpc_error_set_int( -+ GRPC_ERROR_CREATE_FROM_STATIC_STRING( -+ "received initial metadata size exceeds limit"), -+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED), -+ GRPC_ERROR_INT_STREAM_ID, 0); - }, - false); - } -diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h -index 4a2f4261d83..f8b544d9583 100644 ---- a/src/core/ext/transport/chttp2/transport/internal.h -+++ b/src/core/ext/transport/chttp2/transport/internal.h -@@ -542,8 +542,6 @@ struct grpc_chttp2_stream { - - grpc_core::Timestamp deadline = grpc_core::Timestamp::InfFuture(); - -- /** saw some stream level error */ -- grpc_error_handle forced_close_error = GRPC_ERROR_NONE; - /** how many header frames have we received? */ - uint8_t header_frames_received = 0; - /** number of bytes received - reset at end of parse thread execution */ -diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc -index 980f13543f6..afe6da190b6 100644 ---- a/src/core/ext/transport/chttp2/transport/parsing.cc -+++ b/src/core/ext/transport/chttp2/transport/parsing.cc -@@ -22,6 +22,7 @@ - #include - - #include -+#include - - #include "absl/base/attributes.h" - #include "absl/status/status.h" -@@ -719,10 +720,7 @@ static grpc_error_handle parse_frame_slice(grpc_chttp2_transport* t, - } - grpc_chttp2_parsing_become_skip_parser(t); - if (s) { -- s->forced_close_error = err; -- grpc_chttp2_add_rst_stream_to_next_write(t, t->incoming_stream_id, -- GRPC_HTTP2_PROTOCOL_ERROR, -- &s->stats.outgoing); -+ grpc_chttp2_cancel_stream(t, s, std::exchange(err, absl::OkStatus())); - } else { - GRPC_ERROR_UNREF(err); - } --- -2.34.1 - diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.50.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.56.2.bb similarity index 90% rename from meta-oe/recipes-devtools/grpc/grpc_1.50.1.bb rename to meta-oe/recipes-devtools/grpc/grpc_1.56.2.bb index 45bfcb857..c4dd6b985 100644 --- a/meta-oe/recipes-devtools/grpc/grpc_1.50.1.bb +++ b/meta-oe/recipes-devtools/grpc/grpc_1.56.2.bb @@ -20,13 +20,10 @@ RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler" # RDEPENDS:${PN}-dev += "${PN}-compiler" S = "${WORKDIR}/git" -SRCREV_grpc = "90ccf24d22b6fc909a1021ebd89fd8c838467d26" -BRANCH = "v1.50.x" +SRCREV_grpc = "c0d1c393d9365664d47df41746e992ae97b651ef" +BRANCH = "v1.56.x" SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;name=grpc;branch=${BRANCH} \ - file://0001-Revert-Changed-GRPCPP_ABSEIL_SYNC-to-GPR_ABSEIL_SYNC.patch \ - file://0001-cmake-add-separate-export-for-plugin-targets.patch \ file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ - file://0001-fix-CVE-2023-32732.patch \ " # Fixes build with older compilers 4.8 especially on ubuntu 14.04 CXXFLAGS:append:class-native = " -Wl,--no-as-needed"