[PATCH v2 7/7] cmake: remove obsolete patches

Ross Burton
2026-02-16T13:48:52Z

0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch can be
replaced with two variable assignments to seed the results we want.

0002-CMakeLists.txt-disable-USE_NGHTTP2.patch is not needed anymore as
the vendored curl will disable the use of nghttp2 automatically if it
isn't found.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../cmake/cmake-native_4.2.3.bb | 5 ++-
...ext2fs-ext2_fs.h-by-cmake-s-internal.patch | 38 -------------------
...2-CMakeLists.txt-disable-USE_NGHTTP2.patch | 36 ------------------
3 files changed, 3 insertions(+), 76 deletions(-)
delete mode 100644 meta/recipes-devtools/cmake/cmake/0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch
delete mode 100644 meta/recipes-devtools/cmake/cmake/0002-CMakeLists.txt-disable-USE_NGHTTP2.patch

diff --git a/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb b/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
index a4d53274381..cf800d48543 100644
--- a/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_4.2.3.bb
@@ -5,8 +5,6 @@ DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-n

SRC_URI += "file://OEToolchainConfig.cmake \
file://environment.d-cmake.sh \
- file://0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch \
- file://0002-CMakeLists.txt-disable-USE_NGHTTP2.patch \
"

LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl & Apache-2.0"
@@ -37,6 +35,9 @@ EXTRA_OECMAKE += "\
-DHAVE_SYS_ACL_H=0 \
"

+# Ensure e2fsprogs isn't found on the host to remove a build dependency and reproducible builds.
+EXTRA_OECMAKE += "-DHAVE_EXT2FS_EXT2_FS_H=0 -DHAVE_WORKING_EXT2_IOC_GETFLAGS=0"
+
do_configure () {
${S}/bootstrap --verbose --prefix=${prefix} \
${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
diff --git a/meta/recipes-devtools/cmake/cmake/0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch b/meta/recipes-devtools/cmake/cmake/0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch
deleted file mode 100644
index 7a717f72d80..00000000000
--- a/meta/recipes-devtools/cmake/cmake/0001-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From d3859840c134012b18e3bca7e4bab60c9bc8efd5 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Thu, 5 Jul 2018 10:28:04 -0300
-Subject: [PATCH] Disable use of ext2fs/ext2_fs.h by cmake's internal
-
- libarchive copy
-Organization: O.S. Systems Software LTDA.
-
-We don't want to add a dependency on e2fsprogs-native for cmake-native,
-and we don't use CPack so just disable this functionality.
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
- Utilities/cmlibarchive/CMakeLists.txt | 8 ++------
- 1 file changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
-index 9957052d..71a7aeb5 100644
---- a/Utilities/cmlibarchive/CMakeLists.txt
-+++ b/Utilities/cmlibarchive/CMakeLists.txt
-@@ -734,12 +734,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
- LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
- LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
- LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
--LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H)
--
--CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
--#include <ext2fs/ext2_fs.h>
--int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS)
--
-+SET(HAVE_EXT2FS_EXT2_FS_H 0)
-+SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0)
- LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
- LA_CHECK_INCLUDE_FILE("fnmatch.h" HAVE_FNMATCH_H)
- LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
diff --git a/meta/recipes-devtools/cmake/cmake/0002-CMakeLists.txt-disable-USE_NGHTTP2.patch b/meta/recipes-devtools/cmake/cmake/0002-CMakeLists.txt-disable-USE_NGHTTP2.patch
deleted file mode 100644
index c03e5e2364a..00000000000
--- a/meta/recipes-devtools/cmake/cmake/0002-CMakeLists.txt-disable-USE_NGHTTP2.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 811ad63aeff08fb6308203989f6cc664d00a2fa9 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 28 Dec 2022 17:51:27 +0800
-Subject: [PATCH] CMakeLists.txt: disable USE_NGHTTP2
-
-nghttp2 depends on cmake-native to build, to break circular
-dependency, disable nghttp2.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
-
-Adjust the patch to apply on top of v3.28.3.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
-
-Adjust the patch to apply on top of v3.30.1.
-
-Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
----
- Utilities/cmcurl/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
-index 63d3a4f5..ab5f1c50 100644
---- a/Utilities/cmcurl/CMakeLists.txt
-+++ b/Utilities/cmcurl/CMakeLists.txt
-@@ -109,7 +109,7 @@ set(USE_ECH OFF)
- set(USE_HTTPSRR OFF)
- set(USE_LIBIDN2 ON)
- set(USE_LIBRTMP OFF)
--set(USE_NGHTTP2 ON)
-+set(USE_NGHTTP2 OFF)
- set(USE_NGTCP2 OFF)
- set(USE_OPENSSL_QUIC OFF)
- set(USE_QUICHE OFF)
--
2.43.0