diff mbox series

[meta-oe] protobuf: update 6.33.1 -> 35.1

Message ID 20260719144631.1408576-1-f_l_k@t-online.de
State New
Headers show
Series [meta-oe] protobuf: update 6.33.1 -> 35.1 | expand

Commit Message

Markus Volk July 19, 2026, 2:46 p.m. UTC
- Remove PROTOC_VERSION. It now matches PV
    - Adjust PROTOC_BRANCH
    - Do not build with a custom configuration for protobuf-native; in particular, do not build shared libraries
    - protobuf-native only needs to provide the binaries. Do not package the library and includes to
      avoid potential linking failures
---
 .../{protobuf_6.33.6.bb => protobuf_35.1.bb}  | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
 rename meta-oe/recipes-devtools/protobuf/{protobuf_6.33.6.bb => protobuf_35.1.bb} (92%)

Comments

Marko, Peter July 19, 2026, 6:35 p.m. UTC | #1
Couple comments on this patch:
* there is a typo in commit message (6.33.1 instead of 6.33.6)
* please upgrade python3-prptobuf recipe together with c++ protobuf
* the correct version for this upgrade is 7.35.1
* possibly add link to https://protobuf.dev/support/version-support/ somewhere in the recipe to explain the versioning

Peter

> -----Original Message-----
> From: openembedded-devel@lists.openembedded.org <openembedded-
> devel@lists.openembedded.org> On Behalf Of Markus Volk via
> lists.openembedded.org
> Sent: Sunday, July 19, 2026 4:47 PM
> To: openembedded-devel@lists.openembedded.org
> Subject: [oe] [meta-oe][PATCH] protobuf: update 6.33.1 -> 35.1
> 
>     - Remove PROTOC_VERSION. It now matches PV
>     - Adjust PROTOC_BRANCH
>     - Do not build with a custom configuration for protobuf-native; in particular, do not
> build shared libraries
>     - protobuf-native only needs to provide the binaries. Do not package the library and
> includes to
>       avoid potential linking failures
> ---
>  .../{protobuf_6.33.6.bb => protobuf_35.1.bb}  | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
>  rename meta-oe/recipes-devtools/protobuf/{protobuf_6.33.6.bb => protobuf_35.1.bb}
> (92%)
> 
> diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb b/meta-oe/recipes-
> devtools/protobuf/protobuf_35.1.bb
> similarity index 92%
> rename from meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
> rename to meta-oe/recipes-devtools/protobuf/protobuf_35.1.bb
> index 880dd82b1d..dd3f364de2 100644
> --- a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
> +++ b/meta-oe/recipes-devtools/protobuf/protobuf_35.1.bb
> @@ -10,21 +10,20 @@ LIC_FILES_CHKSUM = " \
>      file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c
> \
>  "
> 
> -PROTOC_VERSION = "v${@d.getVar('PV').split('.', 1)[1]}"
> -PROTOC_BRANCH = "${@d.getVar('PV').split('.', 2)[1]}.x"
> +PROTOC_BRANCH = "${@d.getVar('PV').split('.')[0]}.x"
> 
>  DEPENDS = "zlib abseil-cpp jsoncpp"
>  DEPENDS:append:class-target = " protobuf-native"
> 
> -SRCREV = "6e1998413a5bca7c058b85999667893f167434bc"
> +SRCREV = "35cd01f9fe9afbeea38cc7b979a3b6bfcde82c03"
> 
> -SRC_URI =
> "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol
> =https;tag=${PROTOC_VERSION} \
> +SRC_URI =
> "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol
> =https;tag=v${PV} \
>             file://run-ptest \
>             file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
>             file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \
>             "
> 
> -UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)"
> +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+)"
> 
>  CVE_PRODUCT = "google:protobuf protobuf:protobuf google-protobuf protobuf-cpp"
> 
> @@ -39,7 +38,7 @@ PACKAGECONFIG:class-nativesdk ?= "compiler"
>  PACKAGECONFIG[python] = ",,"
>  PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-
> Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
> 
> -EXTRA_OECMAKE += "\
> +EXTRA_OECMAKE:class-target = "\
>      -Dprotobuf_BUILD_SHARED_LIBS=ON \
>      -Dprotobuf_BUILD_LIBPROTOC=ON \
>      -Dprotobuf_BUILD_TESTS=OFF \
> @@ -100,6 +99,14 @@ do_compile_ptest() {
>  	export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir
>  }
> 
> +do_install:append:class-native() {
> +    rm -rf ${D}${libdir} ${D}${includedir}
> +}
> +
> +do_install:append:class-nativesdk() {
> +    rm -rf ${D}${libdir} ${D}${includedir}
> +}
> +
>  do_install_ptest() {
>  	local olddir=`pwd`
> 
> --
> 2.55.0
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb b/meta-oe/recipes-devtools/protobuf/protobuf_35.1.bb
similarity index 92%
rename from meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_35.1.bb
index 880dd82b1d..dd3f364de2 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_35.1.bb
@@ -10,21 +10,20 @@  LIC_FILES_CHKSUM = " \
     file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \
 "
 
-PROTOC_VERSION = "v${@d.getVar('PV').split('.', 1)[1]}"
-PROTOC_BRANCH = "${@d.getVar('PV').split('.', 2)[1]}.x"
+PROTOC_BRANCH = "${@d.getVar('PV').split('.')[0]}.x"
 
 DEPENDS = "zlib abseil-cpp jsoncpp"
 DEPENDS:append:class-target = " protobuf-native"
 
-SRCREV = "6e1998413a5bca7c058b85999667893f167434bc"
+SRCREV = "35cd01f9fe9afbeea38cc7b979a3b6bfcde82c03"
 
-SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=${PROTOC_VERSION} \
+SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=v${PV} \
            file://run-ptest \
            file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
            file://0001-fix-protobuf-native-build-failure-with-gcc-10.patch \
            "
 
-UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+)"
 
 CVE_PRODUCT = "google:protobuf protobuf:protobuf google-protobuf protobuf-cpp"
 
@@ -39,7 +38,7 @@  PACKAGECONFIG:class-nativesdk ?= "compiler"
 PACKAGECONFIG[python] = ",,"
 PACKAGECONFIG[compiler] = "-Dprotobuf_BUILD_PROTOC_BINARIES=ON,-Dprotobuf_BUILD_PROTOC_BINARIES=OFF"
 
-EXTRA_OECMAKE += "\
+EXTRA_OECMAKE:class-target = "\
     -Dprotobuf_BUILD_SHARED_LIBS=ON \
     -Dprotobuf_BUILD_LIBPROTOC=ON \
     -Dprotobuf_BUILD_TESTS=OFF \
@@ -100,6 +99,14 @@  do_compile_ptest() {
 	export PKG_CONFIG_SYSROOT_DIR=$save_pkg_config_sysroot_dir
 }
 
+do_install:append:class-native() {
+    rm -rf ${D}${libdir} ${D}${includedir}
+}
+
+do_install:append:class-nativesdk() {
+    rm -rf ${D}${libdir} ${D}${includedir}
+}
+
 do_install_ptest() {
 	local olddir=`pwd`