From 5b4336ff89f90366ca57bc3b1bd21c050dea6e60 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 21 Feb 2018 10:37:27 -0600 Subject: [PATCH] backport automount fix (kde#389479) use %ldconfig_scriptlets, %make_build, %find_lang_kf5 move translations to main pkg --- D10671.diff | 14 ++++++++++ kf5-solid.spec | 30 +++++++++++++--------- solid-5.25-fix-build-with-flex-2.6.0.patch | 16 ------------ 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 D10671.diff delete mode 100644 solid-5.25-fix-build-with-flex-2.6.0.patch diff --git a/D10671.diff b/D10671.diff new file mode 100644 index 0000000..c869886 --- /dev/null +++ b/D10671.diff @@ -0,0 +1,14 @@ +diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp +--- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp ++++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp +@@ -111,7 +111,8 @@ + + const QString path = filePath(); + +- return !path.startsWith(QLatin1String("/media/")) ++ return !path.isEmpty() ++ && !path.startsWith(QLatin1String("/media/")) + && !path.startsWith(QLatin1String("/run/media/")) + && !path.startsWith(QDir::homePath()); + } + diff --git a/kf5-solid.spec b/kf5-solid.spec index ca0f419..be6c9f2 100644 --- a/kf5-solid.spec +++ b/kf5-solid.spec @@ -2,7 +2,7 @@ Name: kf5-%{framework} Version: 5.43.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 1 integration module that provides hardware information License: LGPLv2+ @@ -17,9 +17,10 @@ URL: https://solid.kde.org/ %endif Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz -# Workaround https://bugzilla.redhat.com/show_bug.cgi?id=1364943 -# Technically only affects rawhide/f26, but is harmless elsewhere too -Patch0: solid-5.25-fix-build-with-flex-2.6.0.patch +## upstreamable patches +# https://bugs.kde.org/show_bug.cgi?id=389479 +# https://phabricator.kde.org/D10671 +Patch200: D10671.diff BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-rpm-macros >= %{version} @@ -72,14 +73,14 @@ Requires: %{name} = %{version}-%{release} Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: qt5-qtbase-devel - %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%autosetup -n %{framework}-%{version} +%autosetup -n %{framework}-%{version} -p1 + %build mkdir %{_target_platform} @@ -87,23 +88,23 @@ pushd %{_target_platform} %{cmake_kf5} .. popd -make %{?_smp_mflags} -C %{_target_platform} +%make_build -C %{_target_platform} + %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform} -%find_lang solid5_qt --with-qt --all-name +%find_lang_kf5 solid5_qt -%files +%files -f solid5_qt.lang %doc README.md TODO %license COPYING.LIB %{_kf5_bindir}/solid-hardware5 -%post libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig +%ldconfig_scriptlets libs -%files libs -f solid5_qt.lang +%files libs %{_kf5_qmldir}/org/kde/solid/ %{_kf5_libdir}/libKF5Solid.so.* @@ -116,6 +117,11 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Wed Feb 21 2018 Rex Dieter - 5.43.0-2 +- backport automount fix (kde#389479) +- use %%ldconfig_scriptlets, %%make_build, %%find_lang_kf5 +- move translations to main pkg + * Wed Feb 07 2018 Rex Dieter - 5.43.0-1 - 5.43.0 diff --git a/solid-5.25-fix-build-with-flex-2.6.0.patch b/solid-5.25-fix-build-with-flex-2.6.0.patch deleted file mode 100644 index 8fd6d8d..0000000 --- a/solid-5.25-fix-build-with-flex-2.6.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8a394d1..d88e824 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -45,6 +45,11 @@ set_package_properties(BISON PROPERTIES - PURPOSE "Required for the Predicate parser" - ) - -+# flex-2.6.0 generates C90-incompatible code. KDEFrameworksCompilerSettings -+# forces C90 standard though, overriding our CFLAGS env variable, so we must -+# override the -std flag here -+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") -+ - if (CMAKE_SYSTEM_NAME MATCHES Linux) - find_package( UDev ) -