Control: tags 1112699 + patch Control: tags 1112699 + pending Dear maintainer,
I've prepared an NMU for anope (versioned as 2.0.17-1.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for anope-2.0.17 anope-2.0.17 changelog | 7 patches/0001-Bump-minimum-CMake-version-to-3.8.patch | 25 +++ patches/0002-Fix-cmake-deprecation-warning-CMP0026.patch | 77 ++++++++++ patches/0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch | 36 ++++ patches/series | 3 5 files changed, 148 insertions(+) diff -Nru anope-2.0.17/debian/changelog anope-2.0.17/debian/changelog --- anope-2.0.17/debian/changelog 2025-03-24 23:58:25.000000000 +0200 +++ anope-2.0.17/debian/changelog 2025-10-11 13:45:08.000000000 +0300 @@ -1,3 +1,10 @@ +anope (2.0.17-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Backport upstream fixes for FTBFS with CMake 4. (Closes: #1112699) + + -- Adrian Bunk <[email protected]> Sat, 11 Oct 2025 13:45:08 +0300 + anope (2.0.17-1) unstable; urgency=medium * New upstream release (Closes: #1089533) diff -Nru anope-2.0.17/debian/patches/0001-Bump-minimum-CMake-version-to-3.8.patch anope-2.0.17/debian/patches/0001-Bump-minimum-CMake-version-to-3.8.patch --- anope-2.0.17/debian/patches/0001-Bump-minimum-CMake-version-to-3.8.patch 1970-01-01 02:00:00.000000000 +0200 +++ anope-2.0.17/debian/patches/0001-Bump-minimum-CMake-version-to-3.8.patch 2025-10-11 13:45:08.000000000 +0300 @@ -0,0 +1,25 @@ +From 4e0418e0df1c515bbacb9b0b174dcddf5fcab454 Mon Sep 17 00:00:00 2001 +From: Sadie Powell <[email protected]> +Date: Tue, 27 Apr 2021 17:48:28 +0100 +Subject: Bump minimum CMake version to 3.8. + +This is the minimum version that supports CMAKE_CXX_STANDARD=17. +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 822f6f39d..6c2a3c80b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ +-# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions) +-cmake_minimum_required(VERSION 2.4 FATAL_ERROR) ++# This usage of CMake requires at least version 3.8 ++cmake_minimum_required(VERSION 3.8 FATAL_ERROR) + if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) + if(POLICY CMP0026) +-- +2.30.2 + diff -Nru anope-2.0.17/debian/patches/0002-Fix-cmake-deprecation-warning-CMP0026.patch anope-2.0.17/debian/patches/0002-Fix-cmake-deprecation-warning-CMP0026.patch --- anope-2.0.17/debian/patches/0002-Fix-cmake-deprecation-warning-CMP0026.patch 1970-01-01 02:00:00.000000000 +0200 +++ anope-2.0.17/debian/patches/0002-Fix-cmake-deprecation-warning-CMP0026.patch 2025-10-11 13:45:08.000000000 +0300 @@ -0,0 +1,77 @@ +From d27d4af6c7f985a03d5256f177fa5a696d0c41f0 Mon Sep 17 00:00:00 2001 +From: Sadie Powell <[email protected]> +Date: Tue, 30 Nov 2021 09:59:40 +0000 +Subject: Fix cmake deprecation warning CMP0026. + +--- + CMakeLists.txt | 5 +---- + include/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 2 +- + src/tools/CMakeLists.txt | 2 +- + 4 files changed, 4 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c2a3c80b..5cc0a187b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,9 +2,6 @@ + cmake_minimum_required(VERSION 3.8 FATAL_ERROR) + if(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +- if(POLICY CMP0026) +- cmake_policy(SET CMP0026 OLD) +- endif(POLICY CMP0026) + if(POLICY CMP0007) + cmake_policy(SET CMP0007 OLD) + endif(POLICY CMP0007) +@@ -488,7 +485,7 @@ add_subdirectory(modules) + add_subdirectory(include) + + # Get the filename of the Anope binary, to use later +-get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION) ++set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>") + get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME) + + # At install time, create the following additional directories +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index a434be6e1..e76df454d 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -3,7 +3,7 @@ set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "$ + # Generate version-bin executable to modify version.h, setting it's linker flags as well + add_executable(version-bin version.cpp) + set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}") +-get_target_property(version_BINARY version-bin LOCATION) ++set(version_BINARY "$<TARGET_FILE:version-bin>") + # Modify version.h from the above executable, with dependencies to version.cpp + # and all of the source files in the main build + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b390d164b..bdec61abf 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -97,7 +97,7 @@ if(GETTEXT_FOUND) + endif(GETTEXT_FOUND) + + # Get the filename of the Anope executable as it is in on this system +-get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION) ++set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>") + get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME) + # Add the Anope executable to the list of files for CPack to ignore + add_to_cpack_ignored_files("${SERVICES_BINARY}$" TRUE) +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt +index 3e00b981d..29421aeeb 100644 +--- a/src/tools/CMakeLists.txt ++++ b/src/tools/CMakeLists.txt +@@ -29,7 +29,7 @@ foreach(SRC ${TOOLS_SRCS}) + DESTINATION ${BIN_DIR} + ) + # Add the executable to the list of files for CPack to ignore +- get_target_property(EXE_BINARY ${EXE} LOCATION) ++ set(EXE_BINARY "$<TARGET_FILE:${EXE}>") + get_filename_component(EXE_BINARY ${EXE_BINARY} NAME) + add_to_cpack_ignored_files("${EXE_BINARY}$" TRUE) + endif(NOT SKIP) +-- +2.30.2 + diff -Nru anope-2.0.17/debian/patches/0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch anope-2.0.17/debian/patches/0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch --- anope-2.0.17/debian/patches/0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch 1970-01-01 02:00:00.000000000 +0200 +++ anope-2.0.17/debian/patches/0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch 2025-10-11 13:45:08.000000000 +0300 @@ -0,0 +1,36 @@ +From 1b5d892977ea3f2a875b55668963c5b93b443386 Mon Sep 17 00:00:00 2001 +From: Sadie Powell <[email protected]> +Date: Tue, 30 Nov 2021 10:09:08 +0000 +Subject: CMake warnings CMP0003 and CMP0007 are not necessary. + +--- + CMakeLists.txt | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cc0a187b..4466ec4bf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,5 @@ + # This usage of CMake requires at least version 3.8 + cmake_minimum_required(VERSION 3.8 FATAL_ERROR) +-if(COMMAND cmake_policy) +- cmake_policy(SET CMP0003 NEW) +- if(POLICY CMP0007) +- cmake_policy(SET CMP0007 OLD) +- endif(POLICY CMP0007) +-endif(COMMAND cmake_policy) + + # Set the project as C++ primarily, but have C enabled for the checks required later + project(Anope CXX) +@@ -419,7 +413,6 @@ read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS) + # Iterate through the strings found + foreach(VERSION_STR ${VERSIONS}) + string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR}) +- # Depends on CMP0007 OLD + list(LENGTH VERSION_OUT VERSION_LEN) + list(GET VERSION_OUT 0 VERSION_TYPE) + if(${VERSION_LEN} GREATER 1) +-- +2.30.2 + diff -Nru anope-2.0.17/debian/patches/series anope-2.0.17/debian/patches/series --- anope-2.0.17/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ anope-2.0.17/debian/patches/series 2025-10-11 13:45:08.000000000 +0300 @@ -0,0 +1,3 @@ +0001-Bump-minimum-CMake-version-to-3.8.patch +0002-Fix-cmake-deprecation-warning-CMP0026.patch +0003-CMake-warnings-CMP0003-and-CMP0007-are-not-necessary.patch

