From 7c3e3769670193597ee74841068955698a8ecea5 Mon Sep 17 00:00:00 2001 From: XCas13 Date: Sun, 8 Feb 2026 11:26:05 +0400 Subject: [PATCH] btop: patch to move the log file to tmpfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The log file path is hardcoded as $HOME/.local/state/btop.log, i.e. to the router’s flash storage rather than to tmpfs. This patch sets the log file path to /tmp/log/btop.log Signed-off-by: XCas13 --- admin/btop/Makefile | 2 +- admin/btop/patches/001-move-log-to-tmpfs.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 admin/btop/patches/001-move-log-to-tmpfs.patch diff --git a/admin/btop/Makefile b/admin/btop/Makefile index 032986e3bd..98280a0c40 100644 --- a/admin/btop/Makefile +++ b/admin/btop/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=btop PKG_VERSION:=1.4.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL=https://codeload.github.com/aristocratos/btop/tar.gz/v$(PKG_VERSION)? diff --git a/admin/btop/patches/001-move-log-to-tmpfs.patch b/admin/btop/patches/001-move-log-to-tmpfs.patch new file mode 100644 index 0000000000..900e136d03 --- /dev/null +++ b/admin/btop/patches/001-move-log-to-tmpfs.patch @@ -0,0 +1,14 @@ +--- a/src/btop_config.cpp ++++ b/src/btop_config.cpp +@@ -800,10 +800,7 @@ namespace Config { + if (xdg_state_home_ptr != nullptr) { + xdg_state_home = std::make_optional(fs::path(xdg_state_home_ptr)); + } else { +- const auto* home_ptr = std::getenv("HOME"); +- if (home_ptr != nullptr) { +- xdg_state_home = std::make_optional(fs::path(home_ptr) / ".local" / "state"); +- } ++ xdg_state_home = std::make_optional(fs::path("/tmp/log")); + } + } +