Update package to version 5.113.0

This commit is contained in:
jxy_git 2024-01-03 09:59:04 +08:00
parent adfc31fe91
commit 89cd53aa79
4 changed files with 4 additions and 71 deletions

Binary file not shown.

BIN
baloo-5.113.0.tar.xz Normal file

Binary file not shown.

View File

@ -9,7 +9,7 @@
Name: kf5-%{framework}
Summary: A Tier 3 KDE Frameworks 5 module that provides indexing and search functionality
Version: 5.108.0
Version: 5.113.0
Release: 1
License: (LGPLv2 or LGPLv3) and (GPLv2 or GPLv3)
URL: https://community.kde.org/Baloo
@ -22,8 +22,6 @@ Source1: 97-kde-baloo-filewatch-inotify.conf
Source2: baloo_file_shutdown.sh
Patch100: baloo-5.67.0-baloofile_config.patch
# https://invent.kde.org/frameworks/baloo/-/merge_requests/131
Patch101: use_the_FSID_as_the_device_identifier_where_possible.patch
BuildRequires: extra-cmake-modules >= %{majmin}
BuildRequires: kf5-kconfig-devel >= %{majmin}
@ -183,6 +181,9 @@ make test ARGS="--output-on-failure --timeout 300" -C %{_target_platform} ||:
%changelog
* Wed Jan 03 2024 jiangxinyu <jiangxinyu@kylinos.cn> - 5.113.0-1
- Update package to version 5.113.0
* Thu Aug 03 2023 leeffo <liweiganga@uniontech.com> - 5.108.0-1
- upgrade to version 5.108.0

View File

@ -1,68 +0,0 @@
From 7026ec9ab4bc28e97886e4c56ac4c7fc48d8f344 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Trnka?= <tomastrnka@gmx.com>
Date: Wed, 17 May 2023 21:07:57 +0200
Subject: [PATCH] Use the FSID as the device identifier where possible
The device number returned by stat() in st_dev is not persistent in many
cases. Btrfs subvolumes or partitions on NVMe devices are assigned
device numbers dynamically, so the resulting device ID is typically
different after every reboot, forcing Baloo to repeatedly reindex all
files.
Fortunately, filesystems like Btrfs or ext4 return a persistent
unique filesystem ID as f_fsid from statvfs(), so we can use that when
available. Other filesystems like XFS derive the FSID from the device
number of the underlying block device, so switching to the FSID does not
change anything.
CCBUG: 402154
---
src/engine/idutils.h | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/src/engine/idutils.h b/src/engine/idutils.h
index 78d881a96..606ac9dca 100644
--- a/src/engine/idutils.h
+++ b/src/engine/idutils.h
@@ -13,6 +13,8 @@
#ifdef Q_OS_WIN
# include <QFileInfo>
+#else
+# include <sys/statvfs.h>
#endif
namespace Baloo {
@@ -40,10 +42,28 @@ inline quint64 statBufToId(const QT_STATBUF& stBuf)
static_cast<quint32>(stBuf.st_ino));
}
+#ifndef Q_OS_WIN
+inline int statWithFsid(const char* path, QT_STATBUF* statBuf)
+{
+ int ret = QT_LSTAT(path, statBuf);
+ if (ret != 0) {
+ return ret;
+ }
+
+ struct statvfs fsBuf;
+ ret = statvfs(path, &fsBuf);
+ if (ret == 0 && fsBuf.f_fsid != 0) {
+ // Fold FSID into 32 bits, statBufToId would discard anything else
+ statBuf->st_dev = static_cast<quint32>(fsBuf.f_fsid ^ (fsBuf.f_fsid >> 32));
+ }
+ return ret;
+}
+#endif
+
inline int filePathToStat(const QByteArray& filePath, QT_STATBUF& statBuf)
{
#ifndef Q_OS_WIN
- return QT_LSTAT(filePath.constData(), &statBuf);
+ return statWithFsid(filePath.constData(), &statBuf);
#else
const int ret = QT_STAT(filePath.constData(), &statBuf);
const QString filePathStr = QString::fromUtf8(filePath);
--
GitLab