From f94d9ca3bdaef4c468051513dc93bd9e99f5ab8c Mon Sep 17 00:00:00 2001 From: Carter Li Date: Thu, 3 Apr 2025 08:49:01 +0800 Subject: [PATCH 1/5] Packaging: update debian stuff [ci skip] --- debian/changelog | 6 ++++++ debian/files | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cc9db9c92..8866aeede 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +fastfetch (2.40.0) jammy; urgency=medium + + * Update to 2.40.0 + + -- Carter Li Thu, 03 Apr 2025 08:46:54 +0800 + fastfetch (2.39.1) jammy; urgency=medium * Update to 2.39.1 diff --git a/debian/files b/debian/files index 9e8529510..d7e6e7364 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -fastfetch_2.39.1_source.buildinfo universe/utils optional +fastfetch_2.40.0_source.buildinfo universe/utils optional From f04851891e13b235e35d9a65caf1d2bc8b84875a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 3 Apr 2025 16:20:20 +0800 Subject: [PATCH 2/5] TPM (macOS): fix compiling error on old system Fix #1659 --- src/detection/tpm/tpm_apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/tpm/tpm_apple.c b/src/detection/tpm/tpm_apple.c index 8e22d5dc9..daef285e9 100644 --- a/src/detection/tpm/tpm_apple.c +++ b/src/detection/tpm/tpm_apple.c @@ -16,7 +16,7 @@ const char* ffDetectTPM(FFTPMResult* result) #else FF_IOOBJECT_AUTO_RELEASE io_service_t t2Service = IOServiceGetMatchingService( - kIOMainPortDefault, + MACH_PORT_NULL, IOServiceMatching("AppleT2")); if (t2Service) { From 6bbed12083c473b865c61d862ac42bd8578f7136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 3 Apr 2025 22:37:58 +0800 Subject: [PATCH 3/5] IO: remove fast path of `ffPathExists`, which causes too many problems Fix #1662 --- src/common/io/io.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/common/io/io.h b/src/common/io/io.h index 4cc65003e..bfa372111 100644 --- a/src/common/io/io.h +++ b/src/common/io/io.h @@ -119,7 +119,6 @@ static inline bool ffPathExists(const char* path, FFPathType pathType) } else { - #if (__APPLE__ || __HAIKU__) // #1395 struct stat fileStat; if(stat(path, &fileStat) != 0) return false; @@ -131,24 +130,6 @@ static inline bool ffPathExists(const char* path, FFPathType pathType) if(pathType & FF_PATHTYPE_DIRECTORY && mode == S_IFDIR) return true; - #else - size_t len = strlen(path); - assert(len < PATH_MAX); - if (len == 0) return false; - - int ret; - if (path[len - 1] != '/') - { - char buf[PATH_MAX + 1]; - memcpy(buf, path, len); - buf[len] = '/'; - buf[len + 1] = 0; - ret = access(buf, F_OK); - } - else - ret = access(path, F_OK); - return pathType == FF_PATHTYPE_DIRECTORY ? ret == 0 : ret == -1 && errno == ENOTDIR; - #endif } #endif From b679185c872d94fa04956a63e864c92da402c1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 3 Apr 2025 22:42:15 +0800 Subject: [PATCH 4/5] Logo: don't try to find files named `-` --- src/logo/logo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/logo/logo.c b/src/logo/logo.c index 8e95f8620..1a3af9e1c 100644 --- a/src/logo/logo.c +++ b/src/logo/logo.c @@ -473,6 +473,9 @@ static void updateLogoPath(void) if(ffPathExists(options->source.chars, FF_PATHTYPE_FILE)) return; + if (ffStrbufEqualS(&options->source, "-")) // stdin + return; + FF_STRBUF_AUTO_DESTROY fullPath = ffStrbufCreate(); if (ffPathExpandEnv(options->source.chars, &fullPath) && ffPathExists(fullPath.chars, FF_PATHTYPE_FILE)) { From 90ca6ee3cd7728797f6c032c31e6ded50bffb1de Mon Sep 17 00:00:00 2001 From: Carter Li Date: Fri, 4 Apr 2025 00:27:11 +0800 Subject: [PATCH 5/5] Release: v2.40.1 --- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c0626e4..33f4617a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 2.40.1 + +Bugfixes: +* Fix compiling error on old intel platform (TPM, macOS) +* Fix `--file-raw -` no longer working (Logo, #1659) + * Regression of v2.40.0 + # 2.40.0 Changes: diff --git a/CMakeLists.txt b/CMakeLists.txt index b5af69cfc..b9f3a90d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url project(fastfetch - VERSION 2.40.0 + VERSION 2.40.1 LANGUAGES C DESCRIPTION "Fast neofetch-like system information tool" HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"