diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..0a80fdce31f59c062e2abba28776e9521eddff30 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.lfsconfig b/.lfsconfig new file mode 100644 index 0000000000000000000000000000000000000000..b408532ecb5ea1bcc0d3378a59640a33585353fd --- /dev/null +++ b/.lfsconfig @@ -0,0 +1,2 @@ +[lfs] + url = https://artlfs.openeuler.openatom.cn/src-openEuler/bcc diff --git a/backport-Bump-CMake-minimum-version-to-3.12.patch b/backport-Bump-CMake-minimum-version-to-3.12.patch new file mode 100644 index 0000000000000000000000000000000000000000..13f6b79fe6dd53af5c35f590d4d5197522cc9d2f --- /dev/null +++ b/backport-Bump-CMake-minimum-version-to-3.12.patch @@ -0,0 +1,49 @@ +From dd1437669ddd2938e742a73c53d0c4af6357cf61 Mon Sep 17 00:00:00 2001 +From: Shung-Hsi Yu <6041291+shunghsiyu@users.noreply.github.com> +Date: Fri, 21 Mar 2025 10:48:38 +0800 +Subject: [PATCH] Bump CMake minimum version to 3.12 (#5245) + +With CMake 4 the minimum support version is 3.5, and since the current +minimum version we set is 2.8.12, it will fail with the following +message: + + CMake Error at CMakeLists.txt:3 (cmake_minimum_required): + Compatibility with CMake < 3.5 has been removed from CMake. + + Update the VERSION argument value. Or, use the ... syntax + to tell CMake that the project requires at least but has been updated + to work with policies introduced by or earlier. + + Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. + +However, instead of bumping the minimum version requirement to 3.5, bump +to a slightly higher 3.12 instead to be consistent with +examples/usdt_sample/. + +Also update cmake_policy() calls due to this change, dropping CMP0057 +since the OLD behavior is no longer supported anyway. +--- + CMakeLists.txt | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d003a784641..e0a423cbf69a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,14 +1,7 @@ + # Copyright (c) PLUMgrid, Inc. + # Licensed under the Apache License, Version 2.0 (the "License") +-cmake_minimum_required(VERSION 2.8.12) +- +-if(${CMAKE_VERSION} VERSION_EQUAL 3.12.0 OR ${CMAKE_VERSION} VERSION_GREATER 3.12.0) +- cmake_policy(SET CMP0074 NEW) +-endif() +- +-if(${CMAKE_VERSION} VERSION_EQUAL 3.3.0 OR ${CMAKE_VERSION} VERSION_GREATER 3.3.0) +- cmake_policy(SET CMP0057 NEW) +-endif() ++cmake_minimum_required(VERSION 3.12) ++cmake_policy(SET CMP0074 NEW) + + project(bcc) + if(NOT CMAKE_BUILD_TYPE) diff --git a/bcc-src-with-submodule.tar.gz b/bcc-src-with-submodule.tar.gz index cf441ca848030c32bafb5a8b0eee20d04ea0f1fc..128455d6a7968118b22ef4b3962b0f3adfb3bfd8 100644 Binary files a/bcc-src-with-submodule.tar.gz and b/bcc-src-with-submodule.tar.gz differ diff --git a/bcc.spec b/bcc.spec index 319453ed16e6d61d0e4bca5714a50a78974a6014..409a9581c03a05e219c462ea4fa41f81ab2a0987 100644 --- a/bcc.spec +++ b/bcc.spec @@ -2,7 +2,7 @@ Name: bcc Version: 0.29.1 -Release: 4 +Release: 5 Summary: BPF Compiler Collection (BCC) License: Apache-2.0 URL: https://github.com/iovisor/bcc @@ -11,12 +11,13 @@ Source0: %{url}/releases/download/v%{version}/%{name}-src-with-submodule. Patch0001: backport-Fix-ttysnoop.py-with-newer-kernels-4888.patch Patch0002: backport-CVE-2024-2314-clang-check-header-owners.patch +Patch0003: backport-Bump-CMake-minimum-version-to-3.12.patch # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches BuildRequires: gcc gcc-c++ -BuildRequires: bison cmake >= 2.8.7 flex libxml2-devel python3-devel +BuildRequires: bison cmake >= 3.12 flex libxml2-devel python3-devel BuildRequires: elfutils-libelf-devel llvm-devel clang-devel llvm-test BuildRequires: llvm-static ncurses-devel pkgconfig(luajit) BuildRequires: libbpf-devel >= 0.8.0-1, libbpf-static >= 0.8.0-1 @@ -163,6 +164,9 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ %changelog +* Fri Aug 22 2025 Funda Wang - 0.29.1-5 +- fix build with cmake 4 + * Fri Dec 20 2024 Funda Wang - 0.29.1-4 - adopt to new cmake macro