fix obsoleting apper due to epoch [release 6.0.2-3mamba;Tue Mar 19 2024]

This commit is contained in:
Silvan Calarco 2024-03-29 17:50:55 +01:00
parent 3fd7acf6ea
commit 37219ca812
6 changed files with 216 additions and 130 deletions

View File

@ -1,4 +1,4 @@
# discover
KDE Frameworks 5 application installer.
KDE Plasma application installer.

View File

@ -1,11 +0,0 @@
--- discover-5.16.4/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp.orig 2019-07-30 12:13:58.000000000 +0200
+++ discover-5.16.4/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp 2019-08-15 10:20:45.411000000 +0200
@@ -396,7 +396,7 @@
if (!m_refresher) {
acquireFetching(true);
- m_refresher = PackageKit::Daemon::refreshCache(false);
+ m_refresher = PackageKit::Daemon::refreshCache(true);
connect(m_refresher.data(), &PackageKit::Transaction::errorCode, this, &PackageKitBackend::transactionError);
connect(m_refresher.data(), &PackageKit::Transaction::finished, this, [this]() {
m_refresher = nullptr;

View File

@ -1,20 +0,0 @@
--- discover-5.16.4/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp.orig 2019-07-30 12:13:58.000000000 +0200
+++ discover-5.16.4/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp 2019-08-15 10:34:42.034000000 +0200
@@ -251,15 +251,11 @@
void PackageKitBackend::resolvePackages(const QStringList &packageNames)
{
- PackageKit::Transaction * tArch = PackageKit::Daemon::resolve(packageNames, PackageKit::Transaction::FilterArch);
+ PackageKit::Transaction * tArch = PackageKit::Daemon::resolve(packageNames, PackageKit::Transaction::FilterNone);
connect(tArch, &PackageKit::Transaction::package, this, &PackageKitBackend::addPackageArch);
connect(tArch, &PackageKit::Transaction::errorCode, this, &PackageKitBackend::transactionError);
- PackageKit::Transaction * tNotArch = PackageKit::Daemon::resolve(packageNames, PackageKit::Transaction::FilterNotArch);
- connect(tNotArch, &PackageKit::Transaction::package, this, &PackageKitBackend::addPackageNotArch);
- connect(tNotArch, &PackageKit::Transaction::errorCode, this, &PackageKitBackend::transactionError);
-
- TransactionSet* merge = new TransactionSet({tArch, tNotArch});
+ TransactionSet* merge = new TransactionSet({tArch});
connect(merge, &TransactionSet::allFinished, this, &PackageKitBackend::getPackagesFinished);
}

View File

@ -1,12 +0,0 @@
--- discover-5.21.4/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h.orig 2021-04-08 23:38:00.476903110 +0200
+++ discover-5.21.4/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h 2021-04-08 23:36:36.090368104 +0200
@@ -7,8 +7,8 @@
#ifndef FLATPAKTRANSACTIONTHREAD_H
#define FLATPAKTRANSACTIONTHREAD_H
-extern "C" {
#include <flatpak.h>
+extern "C" {
#include <gio/gio.h>
#include <glib.h>
}

View File

@ -0,0 +1,128 @@
diff -Nru discover-5.93.0/.clang-format discover-5.93.0.patched/.clang-format
--- discover-5.93.0/.clang-format 1970-01-01 01:00:00.000000000 +0100
+++ discover-5.93.0.patched/.clang-format 2024-02-03 16:39:00.425891505 +0100
@@ -0,0 +1,88 @@
+---
+# SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org>
+# SPDX-FileCopyrightText: 2019 Gernot Gebhard <gebhard@absint.com>
+#
+# SPDX-License-Identifier: MIT
+
+# This file got automatically created by ECM, do not edit
+# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options
+# and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting
+# for clang-format tips & tricks
+---
+Language: JavaScript
+DisableFormat: true
+---
+
+# Style for C++
+Language: Cpp
+
+# base is WebKit coding style: https://webkit.org/code-style-guidelines/
+# below are only things set that diverge from this style!
+BasedOnStyle: WebKit
+
+# enforce C++11 (e.g. for std::vector<std::vector<lala>>
+Standard: Cpp11
+
+# 4 spaces indent
+TabWidth: 4
+
+# 2 * 80 wide lines
+ColumnLimit: 160
+
+# sort includes inside line separated groups
+SortIncludes: true
+
+# break before braces on function, namespace and class definitions.
+BreakBeforeBraces: Linux
+
+# CrlInstruction *a;
+PointerAlignment: Right
+
+# horizontally aligns arguments after an open bracket.
+AlignAfterOpenBracket: Align
+
+# don't move all parameters to new line
+AllowAllParametersOfDeclarationOnNextLine: false
+
+# no single line functions
+AllowShortFunctionsOnASingleLine: None
+
+# always break before you encounter multi line strings
+AlwaysBreakBeforeMultilineStrings: true
+
+# don't move arguments to own lines if they are not all on the same
+BinPackArguments: false
+
+# don't move parameters to own lines if they are not all on the same
+BinPackParameters: false
+
+# In case we have an if statement with multiple lines the operator should be at the beginning of the line
+# but we do not want to break assignments
+BreakBeforeBinaryOperators: NonAssignment
+
+# format C++11 braced lists like function calls
+Cpp11BracedListStyle: true
+
+# do not put a space before C++11 braced lists
+SpaceBeforeCpp11BracedList: false
+
+# remove empty lines
+KeepEmptyLinesAtTheStartOfBlocks: false
+
+# no namespace indentation to keep indent level low
+NamespaceIndentation: None
+
+# we use template< without space.
+SpaceAfterTemplateKeyword: false
+
+# Always break after template declaration
+AlwaysBreakTemplateDeclarations: true
+
+# macros for which the opening brace stays attached.
+ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
+
+# keep lambda formatting multi-line if not empty
+AllowShortLambdasOnASingleLine: Empty
+
+# We do not want clang-format to put all arguments on a new line
+AllowAllArgumentsOnNextLine: false
diff -Nru discover-5.93.0/libdiscover/backends/KNSBackend/KNSBackend.cpp discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSBackend.cpp
--- discover-5.93.0/libdiscover/backends/KNSBackend/KNSBackend.cpp 2024-01-31 12:20:25.000000000 +0100
+++ discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSBackend.cpp 2024-02-03 17:15:20.729134687 +0100
@@ -335,7 +335,7 @@
resourceForEntry(entry);
}
-void KNSBackend::slotErrorCode(const KNSCore::ErrorCode::ErrorCode &errorCode, const QString &message, const QVariant &metadata)
+void KNSBackend::slotErrorCode(const KNSCore::ErrorCode &errorCode, const QString &message, const QVariant &metadata)
{
QString error = message;
qWarning() << "KNS error in" << m_displayName << ":" << errorCode << message << metadata;
diff -Nru discover-5.93.0/libdiscover/backends/KNSBackend/KNSBackend.h discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSBackend.h
--- discover-5.93.0/libdiscover/backends/KNSBackend/KNSBackend.h 2024-01-31 12:20:25.000000000 +0100
+++ discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSBackend.h 2024-02-03 17:14:35.139045837 +0100
@@ -78,7 +78,7 @@
public Q_SLOTS:
void statusChanged(const KNSCore::Entry &entry);
void detailsLoaded(const KNSCore::Entry &entry);
- void slotErrorCode(const KNSCore::ErrorCode::ErrorCode &errorCode, const QString &message, const QVariant &metadata);
+ void slotErrorCode(const KNSCore::ErrorCode &errorCode, const QString &message, const QVariant &metadata);
void slotEntryEvent(const KNSCore::Entry &entry, KNSCore::Entry::EntryEvent event);
private:
diff -Nru discover-5.93.0/libdiscover/backends/KNSBackend/KNSTransaction.cpp discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSTransaction.cpp
--- discover-5.93.0/libdiscover/backends/KNSBackend/KNSTransaction.cpp 2024-01-31 12:20:25.000000000 +0100
+++ discover-5.93.0.patched/libdiscover/backends/KNSBackend/KNSTransaction.cpp 2024-02-03 17:16:15.188240885 +0100
@@ -59,7 +59,7 @@
setStatus(DoneStatus);
}
});
- connect(knsTransaction, &KNSCore::Transaction::signalErrorCode, this, [this](KNSCore::ErrorCode::ErrorCode /*errorCode*/, const QString &message) {
+ connect(knsTransaction, &KNSCore::Transaction::signalErrorCode, this, [this](KNSCore::ErrorCode /*errorCode*/, const QString &message) {
Q_EMIT passiveMessage(message);
});
});

View File

@ -1,173 +1,174 @@
%define plasmaver %(echo %version | cut -d. -f1-3)
Name: discover
Version: 5.27.10
Release: 2mamba
Summary: KDE Frameworks 5 application installer
Version: 6.0.2
Release: 3mamba
Summary: KDE Plasma application installer
Group: Graphical Desktop/Applications/Administration
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://kde.org/
Source: https://download.kde.org/stable/plasma/%{plasmaver}/discover-%{version}.tar.xz
Patch0: discover-5.16.4-PackageKit-refresh-force.patch
Patch1: discover-5.16.4-PackageKit-x86_64-multiarch.patch
Patch2: discover-5.21.4-flatpak_no_extern_c.patch
URL: https://kde.org/it/plasma-desktop/
Source: https://download.kde.org/%{stable_kf6}/plasma/%{plasmaver}/discover-%{version}.tar.xz
Patch0: discover-5.93.0-KNSCore-build-fix.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libQt5WebView-devel
BuildRequires: libX11-devel
BuildRequires: libappstream0-qt-devel
BuildRequires: libattica5-devel
BuildRequires: libappstream-qt-devel
BuildRequires: libflatpak-devel
%ifnarch arm aarch64
BuildRequires: libfwupd-devel
%endif
BuildRequires: libgcc
BuildRequires: libglib-devel
BuildRequires: libkarchive-devel
BuildRequires: libkauth-devel
BuildRequires: libkcmutils-devel
BuildRequires: libkcodecs-devel
BuildRequires: libkconfig-devel
BuildRequires: libkconfigwidgets-devel
BuildRequires: libkcoreaddons-devel
BuildRequires: libkcrash-devel
BuildRequires: libkdbusaddons-devel
BuildRequires: libkdeclarative-devel
BuildRequires: libki18n-devel
BuildRequires: libkidletime-devel
BuildRequires: libkio-devel
BuildRequires: libkjobwidgets-devel
BuildRequires: libknewstuff-devel
BuildRequires: libknotifications-devel
BuildRequires: libkservice-devel
BuildRequires: libkuserfeedback-devel
BuildRequires: libkwidgetsaddons-devel
BuildRequires: libkwindowsystem-devel
BuildRequires: libglvnd-devel
BuildRequires: libkf6-attica-devel
BuildRequires: libkf6-karchive-devel
BuildRequires: libkf6-kcmutils-devel
BuildRequires: libkf6-kconfig-devel
BuildRequires: libkf6-kcoreaddons-devel
BuildRequires: libkf6-kcrash-devel
BuildRequires: libkf6-kdbusaddons-devel
BuildRequires: libkf6-ki18n-devel
BuildRequires: libkf6-kidletime-devel
BuildRequires: libkf6-kio-devel
BuildRequires: libkf6-kjobwidgets-devel
BuildRequires: libkf6-knewstuff-devel
BuildRequires: libkf6-knotifications-devel
BuildRequires: libkf6-kservice-devel
BuildRequires: libkf6-kstatusnotifieritem-devel
BuildRequires: libkf6-kwidgetsaddons-devel
BuildRequires: libkf6-kwindowsystem-devel
BuildRequires: libmarkdown-devel
BuildRequires: libostree-devel
BuildRequires: libpackagekitqt5-devel
BuildRequires: libsnapd-qt-devel
BuildRequires: libpackagekitqt6-devel
BuildRequires: libstdc++6-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtdeclarative-devel
BuildRequires: qt6-qtwebview-devel
## AUTOBUILDREQ-END
BuildRequires: libappstream0-qt-devel
BuildRequires: libmarkdown-devel >= 3.0.0d
BuildRequires: libpackagekitqt5-devel >= 1:1.0.1-1mamba
BuildRequires: cmake
BuildRequires: rpm-macros-kde5
BuildRequires: librpm-ostree-devel
BuildRequires: kf6-rpm-macros
BuildRequires: libkf6-purpose-devel
BuildRequires: librpm-ostree-devel
BuildRequires: extra-cmake-modules
BuildRequires: librpm-ostree-devel
Requires: kirigami2
Provides: packagekitgui
Requires: kuserfeedback
Obsoletes: apper <= 1:1.0.0-2mamba
%description
KDE Frameworks 5 application installer.
KDE Plasma application installer.
%package snap-backend
Summary: KDE Frameworks 5 Snap backend for Discover
Summary: KDE Plasma Snap backend for Discover
Group: Graphical Desktop/Applications/Administration
Requires: %{name} == %{version}-%{release}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%ifnarch arm %{ix86}
Requires: snapd
%endif
%description snap-backend
Snap backend for Discover.
Snap backend for Plasma Discover.
%package notifier
Summary: KDE Frameworks 5 discover notifier
Summary: KDE Plasma discover notifier
Group: Graphical Desktop/Applications/Administration
Requires: %{name} == %{version}-%{release}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description notifier
Notifier for the KDE Frameworks 5 application installer.
Notifier for the KDE Frameworks application installer.
%debug_package
%prep
%setup -q
#%patch0 -p1
#%ifarch x86_64
#%patch1 -p1
#%endif
#%patch2 -p1
#%patch 0 -p1
## disable update notifier applet by default, in favour of plasma-pk-updates
#sed -i \
# -e 's|X-KDE-PluginInfo-EnabledByDefault=.*|X-KDE-PluginInfo-EnabledByDefault=false|g' \
# notifier/plasmoid/metadata.desktop
%build
%cmake_kde5 -d build
%make
%cmake_kf6 \
-DBUILD_SnapBackend=OFF
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%cmake_install
%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang
%find_lang %{name} --with-qt --all-name || touch %{name}.lang
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}5_qt.lang
%files -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/plasma-discover
%{_bindir}/plasma-discover-update
%dir %{_libdir}/plasma-discover
%{_libdir}/plasma-discover/libDiscover*.so
%dir %{_libdir}/qt5/plugins/discover
%{_libdir}/qt5/plugins/discover/kns-backend.so
%{_libdir}/qt5/plugins/discover/packagekit-backend.so
%{_libdir}/qt5/plugins/discover/flatpak-backend.so
%ifnarch arm aarch64
%{_libdir}/qt5/plugins/discover/fwupd-backend.so
%dir %{_qt6_plugindir}/discover
%{_qt6_plugindir}/discover/flatpak-backend.so
%ifarch x86_64 %{ix86}
%{_qt6_plugindir}/discover/fwupd-backend.so
%endif
%{_libdir}/qt5/plugins/plasma/kcms/systemsettings/kcm_updates.so
%{_libdir}/qt5/plugins/discover-notifier/rpm-ostree-notifier.so
%{_libdir}/qt5/plugins/discover/rpm-ostree-backend.so
%{_qt6_plugindir}/discover/kns-backend.so
%{_qt6_plugindir}/discover/packagekit-backend.so
%{_qt6_plugindir}/discover/rpm-ostree-backend.so
%{_qt6_plugindir}/plasma/kcms/systemsettings/kcm_updates.so
%{_datadir}/applications/org.kde.discover*.desktop
%{_datadir}/applications/kcm_updates.desktop
%{_datadir}/metainfo/org.kde.discover*.xml
%{_datadir}/kpackage/kcms/kcm_updates/contents/ui/main.qml
%{_datadir}/libdiscover/categories/*packagekit-backend-categories.xml
%{_datadir}/libdiscover/categories/flatpak-backend-categories.xml
%{_datadir}/libdiscover/categories/rpm-ostree-backend-categories.xml
%{_datadir}/kxmlgui5/plasmadiscover/plasmadiscoverui.rc
%{_datadir}/qlogging-categories5/discover.categories
%{_datadir}/qlogging-categories6/discover.categories
%{_datadir}/icons/hicolor/*/apps/plasmadiscover.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%doc LICENSES
%files snap-backend
%defattr(-,root,root)
%{_libdir}/qt5/plugins/discover/snap-backend.so
%{_libexecdir}/discover/SnapMacaroonDialog
%{_libexecdir}/kf5/kauth/libsnap_helper
%{_datadir}/polkit-1/actions/org.kde.discover.libsnapclient.policy
%{_datadir}/dbus-1/system-services/org.kde.discover.libsnapclient.service
%{_datadir}/dbus-1/system.d/org.kde.discover.libsnapclient.conf
#%files snap-backend
#%defattr(-,root,root)
#%{_libdir}/qt5/plugins/discover/snap-backend.so
#%{_libexecdir}/discover/SnapMacaroonDialog
#%{_libexecdir}/kf5/kauth/libsnap_helper
#%{_datadir}/polkit-1/actions/org.kde.discover.libsnapclient.policy
#%{_datadir}/dbus-1/system-services/org.kde.discover.libsnapclient.service
#%{_datadir}/dbus-1/system.d/org.kde.discover.libsnapclient.conf
%files notifier -f %{name}5_qt.lang
%files notifier
%defattr(-,root,root)
%{_sysconfdir}/xdg/autostart/org.kde.discover.notifier.desktop
%dir %{_libdir}/qt5/plugins/discover-notifier
%{_libdir}/qt5/plugins/discover-notifier/DiscoverPackageKitNotifier.so
%{_libdir}/qt5/plugins/discover-notifier/FlatpakNotifier.so
%dir %{_qt6_plugindir}/discover-notifier
%{_qt6_plugindir}/discover-notifier/DiscoverPackageKitNotifier.so
%{_qt6_plugindir}/discover-notifier/FlatpakNotifier.so
%{_qt6_plugindir}/discover-notifier/rpm-ostree-notifier.so
%{_libexecdir}/DiscoverNotifier
%{_datadir}/knotifications5/discoverabstractnotifier.notifyrc
%{_datadir}/knotifications6/discoverabstractnotifier.notifyrc
%changelog
* Tue Feb 20 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.27.10-2mamba
- rebuilt with libmarkdown 3.0.0d
* Tue Mar 19 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 6.0.2-3mamba
- fix obsoleting apper due to epoch
* Fri Mar 15 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 6.0.2-2mamba
- obsolete apper
* Wed Mar 13 2024 Automatic Build System <autodist@openmamba.org> 6.0.2-1mamba
- automatic version update by autodist
* Wed Mar 06 2024 Automatic Build System <autodist@openmamba.org> 6.0.1-1mamba
- automatic version update by autodist
* Fri Mar 01 2024 Automatic Build System <autodist@openmamba.org> 6.0.0-1mamba
- automatic version update by autodist
* Sat Feb 03 2024 Automatic Build System <autodist@openmamba.org> 5.93.0-1mamba
- automatic version update by autodist
* Thu Dec 07 2023 Automatic Build System <autodist@mambasoft.it> 5.27.10-1mamba
- automatic version update by autodist