From d00f2e3b812d3a655fee7ce1139a9e86f7dc14c5 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 24 Nov 2025 22:23:42 +0100 Subject: [PATCH] taskwarrior: bump to 2.6.2 and backport patch for CMake >= 4.0 support Bump taskwarrior to 2.6.2 release and backport upstream patch for CMake >= 4.0 support. Minor modification were done to the backport patch to adapt to release 2.6.2. Signed-off-by: Christian Marangi --- utils/taskwarrior/Makefile | 6 +- ...tom-commands-and-custom-scripts-3468.patch | 121 ++++++++++++++++++ ...rn-FetchContent-design-patterns-3903.patch | 68 ++++++++++ 3 files changed, 192 insertions(+), 3 deletions(-) create mode 100644 utils/taskwarrior/patches/001-remove-custom-commands-and-custom-scripts-3468.patch create mode 100644 utils/taskwarrior/patches/002-Use-modern-FetchContent-design-patterns-3903.patch diff --git a/utils/taskwarrior/Makefile b/utils/taskwarrior/Makefile index 5439c7e937..069b531553 100644 --- a/utils/taskwarrior/Makefile +++ b/utils/taskwarrior/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=taskwarrior -PKG_VERSION:=2.5.3 -PKG_RELEASE:=3 +PKG_VERSION:=2.6.2 +PKG_RELEASE:=1 PKG_SOURCE:=task-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.taskwarrior.org/download -PKG_HASH:=7243d75e0911d9e2c9119ad94a61a87f041e4053e197f7280c42410aa1ee963b +PKG_HASH:=b1d3a7f000cd0fd60640670064e0e001613c9e1cb2242b9b3a9066c78862cfec PKG_BUILD_DIR:=$(BUILD_DIR)/task-$(PKG_VERSION) PKG_MAINTAINER:= diff --git a/utils/taskwarrior/patches/001-remove-custom-commands-and-custom-scripts-3468.patch b/utils/taskwarrior/patches/001-remove-custom-commands-and-custom-scripts-3468.patch new file mode 100644 index 0000000000..e32293f2a6 --- /dev/null +++ b/utils/taskwarrior/patches/001-remove-custom-commands-and-custom-scripts-3468.patch @@ -0,0 +1,121 @@ +From 236a5f0bf19d1d1df504301543073d3782e02fb7 Mon Sep 17 00:00:00 2001 +From: Felix Schurk <75752337+felixschurk@users.noreply.github.com> +Date: Wed, 29 May 2024 00:27:09 +0200 +Subject: [PATCH] remove custom commands and custom scripts (#3468) + +Fixes #3462. +--- + CMakeLists.txt | 17 ------------ + scripts/reproduce-dockerfile | 34 ----------------------- + scripts/review-dockerfile | 54 ------------------------------------ + 3 files changed, 105 deletions(-) + delete mode 100644 scripts/reproduce-dockerfile + delete mode 100644 scripts/review-dockerfile + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,18 +165,6 @@ foreach (doc_FILE ${doc_FILES}) + install (FILES ${doc_FILE} DESTINATION ${TASK_DOCDIR}) + endforeach (doc_FILE) + +-add_custom_command(OUTPUT run-review +- COMMAND docker build -q --build-arg PR=$(PR) --build-arg LIBPR=$(LIBPR) -t taskwarrior-review:$(PR)s$(LIBPR) - < scripts/review-dockerfile +- COMMAND docker run --rm --memory 1g --hostname pr-$(PR)s$(LIBPR) -it taskwarrior-review:$(PR)s$(LIBPR) bash || : +-) +-add_custom_target(review DEPENDS run-review) +- +-add_custom_command(OUTPUT run-reproduce +- COMMAND docker build -q --build-arg RELEASE=$(RELEASE) -t taskwarrior-reproduce:$(RELEASE) - < scripts/reproduce-dockerfile +- COMMAND docker run --rm --memory 1g --hostname tw-$(RELEASE) -it taskwarrior-reproduce:$(RELEASE) bash || : +-) +-add_custom_target(reproduce DEPENDS run-reproduce) +- + # --- + + set (CPACK_SOURCE_GENERATOR "TGZ") +--- a/scripts/reproduce-dockerfile ++++ /dev/null +@@ -1,34 +0,0 @@ +-# Dockerfile for containers to perform PR review in +-# Use with make as follows: make RELEASE=v2.5.1 reproduce +- +-FROM centos:8 +- +-RUN dnf update -y +-RUN yum install epel-release -y +-RUN dnf install python38 vim git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime sudo man gdb -y +- +-RUN useradd warrior +-RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior +- +-USER warrior +-WORKDIR /home/warrior/ +- +-# Setup taskwarrior +-# The purpose is to speed up subsequent re-installs due to Docker layer caching +-RUN git clone https://github.com/GothenburgBitFactory/taskwarrior.git +-WORKDIR /home/warrior/taskwarrior/ +-RUN git submodule init +- +-# Install the given release +-ARG RELEASE +-RUN git checkout $RELEASE +-RUN git submodule update --init +-RUN cmake -DCMAKE_BUILD_TYPE=debug . +-RUN make -j8 +-RUN sudo make install +- +-# Set the PS1 variable +-ENV PS1="[\u@\H \W]\$ " +- +-WORKDIR /home/warrior +-RUN task rc.confirmation=0 _ids || : # Generate default taskrc +--- a/scripts/review-dockerfile ++++ /dev/null +@@ -1,46 +0,0 @@ +-# Dockerfile for containers to perform PR review in +-# Use with make as follows: make PR=1234 review +- +-FROM centos:8 +- +-RUN dnf update -y +-RUN yum install epel-release -y +-RUN dnf install python38 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime sudo man -y +- +-RUN useradd warrior +-RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior +- +-USER warrior +-WORKDIR /home/warrior/ +- +-# Setup taskwarrior +-# The purpose is to speed up subsequent re-installs due to Docker layer caching +-RUN git clone https://github.com/GothenburgBitFactory/taskwarrior.git +-WORKDIR /home/warrior/taskwarrior/ +-RUN git submodule init +-RUN git submodule update +-RUN cmake -DCMAKE_BUILD_TYPE=debug . +-RUN make -j8 +-RUN sudo make install +- +-# Use specified PR's branch, if provided +-ARG PR +-RUN if [[ ! -z $PR ]]; then \ +- git fetch origin refs/pull/${PR}/head:pr-${PR}; \ +- git checkout pr-${PR}; fi +- +-# Use specified libshared PR's branch, if provided +-ARG LIBPR +-WORKDIR /home/warrior/taskwarrior/src/libshared/ +-RUN if [[ ! -z $LIBPR ]]; then \ +- git fetch origin refs/pull/${LIBPR}/head:libpr-${LIBPR}; \ +- git checkout libpr-${LIBPR}; fi +- +-# Install taskwarrior +-WORKDIR /home/warrior/taskwarrior/ +-RUN cmake -DCMAKE_BUILD_TYPE=debug . +-RUN make -j8 +-RUN sudo make install +- +-WORKDIR /home/warrior +-RUN task rc.confirmation=0 _ids || : # Generate default taskrc diff --git a/utils/taskwarrior/patches/002-Use-modern-FetchContent-design-patterns-3903.patch b/utils/taskwarrior/patches/002-Use-modern-FetchContent-design-patterns-3903.patch new file mode 100644 index 0000000000..495fff4bd2 --- /dev/null +++ b/utils/taskwarrior/patches/002-Use-modern-FetchContent-design-patterns-3903.patch @@ -0,0 +1,68 @@ +From 236b57f321374f3556aeaf8baf9f231388497fc3 Mon Sep 17 00:00:00 2001 +From: Cristian Le +Date: Wed, 9 Jul 2025 03:39:54 +0200 +Subject: [PATCH] Use modern FetchContent design patterns (#3903) + +* Add higher bound to the CMake policies +* Add the latest cmake to ubuntu22.04 image +--- + CMakeLists.txt | 2 +- + doc/CMakeLists.txt | 2 +- + performance/CMakeLists.txt | 2 +- + scripts/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 2 +- + src/columns/CMakeLists.txt | 2 +- + src/commands/CMakeLists.txt | 2 +- + src/taskchampion-cpp/CMakeLists.txt | 48 +++++++++++++++++++++++++++-- + test/CMakeLists.txt | 2 +- + test/docker/ubuntu2204 | 9 +++++- + 10 files changed, 61 insertions(+), 12 deletions(-) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.24...4.0) + set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") + + include (CheckFunctionExists) +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.22...4.0) + message ("-- Configuring man pages") + set (man_FILES task-color.5 task-sync.5 taskrc.5 task.1) + foreach (man_FILE ${man_FILES}) +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.22...4.0) + install (DIRECTORY bash fish vim hooks + DESTINATION ${TASK_DOCDIR}/scripts) + install (FILES zsh/_task +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.22...4.0) + include_directories (${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/commands +--- a/src/columns/CMakeLists.txt ++++ b/src/columns/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.22...4.0) + include_directories (${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/commands +--- a/src/commands/CMakeLists.txt ++++ b/src/commands/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.22...4.0) + include_directories (${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/commands -- 2.30.2