diff --git a/0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch b/0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch new file mode 100644 index 0000000..36261c1 --- /dev/null +++ b/0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch @@ -0,0 +1,28 @@ +From 1a8862daee5c3ef502d7cf04e451180c15e8f3a3 Mon Sep 17 00:00:00 2001 +From: Fabian Vogt +Date: Thu, 3 Jun 2021 15:50:40 +0200 +Subject: [PATCH] Initialize m_lastChildrenRefresh to be really in the past + +steady_clock's epoch is the system start and such a default constructed +steady_clock::time_point might actually not be older than ATTR_TIMEOUT. +By setting it to min() explicitly, it should be sufficiently behind. +--- + kiofusenode.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kiofusenode.h b/kiofusenode.h +index 357b094..28a920a 100644 +--- a/kiofusenode.h ++++ b/kiofusenode.h +@@ -76,7 +76,7 @@ public: + // be emitted on finish. + bool m_childrenRequested = false; + // Stores the last time a node's children were refreshed via KIO::listDir. +- std::chrono::steady_clock::time_point m_lastChildrenRefresh; ++ std::chrono::steady_clock::time_point m_lastChildrenRefresh = decltype(m_lastChildrenRefresh)::min(); + // Returns true if a node is due for a readdir refresh, false otherwise. + bool haveChildrenTimedOut() { return m_lastChildrenRefresh < g_timeoutEpoch || (std::chrono::steady_clock::now() - m_lastChildrenRefresh) >= ATTR_TIMEOUT; } + +-- +2.25.1 + diff --git a/kio-fuse.changes b/kio-fuse.changes index dea3964..c67af1b 100644 --- a/kio-fuse.changes +++ b/kio-fuse.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 3 14:00:13 UTC 2021 - Fabian Vogt + +- Use %pkg_vcmp for util-linux requirement for %check +- Add patch to avoid occasional test failure: + * 0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch + ------------------------------------------------------------------- Sun Mar 21 14:37:43 UTC 2021 - Fabian Vogt diff --git a/kio-fuse.spec b/kio-fuse.spec index efd4a04..ce57ad1 100644 --- a/kio-fuse.spec +++ b/kio-fuse.spec @@ -29,6 +29,8 @@ Source0: https://download.kde.org/stable/%{name}/%{version}/%{name}-%{ver Source1: https://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz.sig Source2: kio-fuse.keyring %endif +# PATCH-FIX-UPSTREAM +Patch1: 0001-Initialize-m_lastChildrenRefresh-to-be-really-in-the.patch BuildRequires: extra-cmake-modules BuildRequires: pkgconfig BuildRequires: cmake(KF5KIO) >= 5.66.0 @@ -55,7 +57,7 @@ applications using FUSE. %install %kf5_makeinstall -C build -%if 0%{?suse_version} > 1500 +%if %{pkg_vcmp util-linux >= 2.34} %check # The hack below only works with util-linux 3.34+. # Without working umount, the tests can't work :-(