From fd5ac7c00c167e34be06a3352feab9d044074803 Mon Sep 17 00:00:00 2001 From: zhongtao Date: Mon, 25 Nov 2024 12:00:12 +0800 Subject: [PATCH] sync the patch of 24.03Lts Signed-off-by: zhongtao (cherry picked from commit ab4d4ed93f71113878d8fea7098440591f0fcbc3) --- ...protobuf-add-coverage-compile-option.patch | 27 +++++++++ ...tch => 0004-backport-CVE-2024-7254-1.patch | 0 ...tch => 0004-backport-CVE-2024-7254-2.patch | 0 protobuf.spec | 57 ++++++++++++++----- 4 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 0003-protobuf-add-coverage-compile-option.patch rename 0003-backport-CVE-2024-7254-1.patch => 0004-backport-CVE-2024-7254-1.patch (100%) rename 0003-backport-CVE-2024-7254-2.patch => 0004-backport-CVE-2024-7254-2.patch (100%) diff --git a/0003-protobuf-add-coverage-compile-option.patch b/0003-protobuf-add-coverage-compile-option.patch new file mode 100644 index 0000000..7a6aa17 --- /dev/null +++ b/0003-protobuf-add-coverage-compile-option.patch @@ -0,0 +1,27 @@ +From ea6d56c3518dc3af0f326f52a266bc0986d8635c Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 25 Jul 2024 21:42:22 +0800 +Subject: [PATCH] protobuf: add coverage compile option + +Signed-off-by: zhongtao +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d17f09d..0b169f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 3.10...3.26) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fstack-check -fPIE") + set(CMAKE_EXE_LINKER_FLAGS "-pie") ++if (ENABLE_CONVERAGE) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") ++endif() + + # Revert to old behavior for MSVC debug symbols. + if(POLICY CMP0141) +-- +2.25.1 + diff --git a/0003-backport-CVE-2024-7254-1.patch b/0004-backport-CVE-2024-7254-1.patch similarity index 100% rename from 0003-backport-CVE-2024-7254-1.patch rename to 0004-backport-CVE-2024-7254-1.patch diff --git a/0003-backport-CVE-2024-7254-2.patch b/0004-backport-CVE-2024-7254-2.patch similarity index 100% rename from 0003-backport-CVE-2024-7254-2.patch rename to 0004-backport-CVE-2024-7254-2.patch diff --git a/protobuf.spec b/protobuf.spec index 00f157d..f455630 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -2,12 +2,16 @@ # Build -python subpackage %bcond_without python # Build -java subpackage +%ifarch loongarch64 +%bcond_with java +%else %bcond_without java +%endif Summary: Protocol Buffers - Google's data interchange format Name: protobuf Version: 25.1 -Release: 4 +Release: 7 License: BSD URL: https://github.com/protocolbuffers/protobuf Source: https://github.com/protocolbuffers/protobuf/releases/download/v%{version}%{?rcver}/%{name}-all-%{version}%{?rcver}.tar.gz @@ -16,8 +20,9 @@ Source1: protobuf-init.el Patch9000: 0001-add-secure-compile-option.patch Patch9001: 0002-Fix-CC-compiler-support.patch -Patch9002: 0003-backport-CVE-2024-7254-1.patch -Patch9003: 0003-backport-CVE-2024-7254-2.patch +Patch9002: 0003-protobuf-add-coverage-compile-option.patch +Patch9003: 0004-backport-CVE-2024-7254-1.patch +Patch9004: 0004-backport-CVE-2024-7254-2.patch BuildRequires: cmake gcc-c++ emacs zlib-devel gmock-devel gtest-devel jsoncpp-devel BuildRequires: fdupes pkgconfig python-rpm-macros pkgconfig(zlib) ninja-build @@ -341,21 +346,22 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %doc README.md %files devel -%doc CONTRIBUTORS.txt README.md -%{_bindir}/protoc* -%{_includedir}/google -%{_includedir}/*.h -%{_libdir}/cmake/protobuf -%{_libdir}/cmake/utf8_range -%{_libdir}/pkgconfig/* -%{_libdir}/libprotobuf-lite.so +%dir %{_includedir}/google +%{_includedir}/google/protobuf/ +%{_includedir}/utf8_range.h +%{_includedir}/utf8_validity.h %{_libdir}/libprotobuf.so %{_libdir}/libprotoc.so -%{_libdir}/libutf8_range.a -%{_libdir}/libutf8_validity.a +%{_libdir}/pkgconfig/protobuf.pc +%{_libdir}/pkgconfig/utf8_range.pc +%doc examples/add_person.cc examples/addressbook.proto examples/list_people.cc examples/Makefile examples/README.md %{_libdir}/libprotobuf.a %{_libdir}/libprotoc.a -%{_datadir}/vim +%{_datadir}/vim/vimfiles/syntax/proto.vim +%{_libdir}/cmake/utf8_range +%{_libdir}/cmake/protobuf +%{_libdir}/libutf8_range.a +%{_libdir}/libutf8_validity.a %{_includedir}/java/core/src/main/java/com/google/protobuf/java_features.proto %files lite @@ -399,12 +405,33 @@ install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} %endif %changelog -* Thu Sep 19 2024 zhangxianting - 25.1-4 +* Wed Sep 25 2024 zhangxianting - 25.1-7 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: append fix CVE-2024-7254 + +* Thu Sep 19 2024 zhangxianting - 25.1-6 - Type:bugfix - ID:NA - SUG:NA - DESC: fix CVE-2024-7254 +* Mon Aug 05 2024 zhongtao - 25.1-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: bugfix for devel package packaging file differences + +* Thu Jul 25 2024 zhongtao - 25.1-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: add coverage compile option + +* Mon Apr 15 2024 Wenlong Zhang - 25.1-4 +- disable java for loongarch64 + * Tue Apr 09 2024 zhongtao - 25.1-3 - Type:bugfix - ID:NA -- Gitee