The package rpms/mediawriter.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/mediawriter.git/commit/?id=279568....
Change:
-ExcludeArch: s390x
Thanks.
Full change:
============
commit 279568f0f95d25d206f84c9eabfbfd6ebc0da463
Author: Jan Grulich <jgrulich(a)redhat.com>
Date: Mon May 9 11:24:44 2022 +0200
5.0.0
diff --git a/.gitignore b/.gitignore
index 0872f25..779102b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@
/MediaWriter-4.2.0.tar.gz
/MediaWriter-4.2.1.tar.gz
/MediaWriter-4.2.2.tar.gz
+/MediaWriter-5.0.0.tar.gz
diff --git a/mediawriter-use-filechooser-portal.patch
b/mediawriter-use-filechooser-portal.patch
deleted file mode 100644
index 3a67964..0000000
--- a/mediawriter-use-filechooser-portal.patch
+++ /dev/null
@@ -1,359 +0,0 @@
-diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
-index 764767d..16a3461 100644
---- a/app/CMakeLists.txt
-+++ b/app/CMakeLists.txt
-@@ -12,6 +12,7 @@ set(MEDIAWRITER_SRCS
- fakedrivemanager.cpp
- main.cpp
- notifications.cpp
-+ portalfiledialog.cpp
- releasemanager.cpp
- units.cpp
- utilities.cpp
-diff --git a/app/main.cpp b/app/main.cpp
-index 5a3c08f..e37f371 100644
---- a/app/main.cpp
-+++ b/app/main.cpp
-@@ -32,6 +32,7 @@
- #include "crashhandler.h"
- #include "drivemanager.h"
- #include "icon.h"
-+#include "portalfiledialog.h"
- #include "releasemanager.h"
- #include "units.h"
- #include "versionchecker.h"
-@@ -51,8 +52,6 @@ Q_IMPORT_PLUGIN(QmlFolderListModelPlugin);
- Q_IMPORT_PLUGIN(QmlSettingsPlugin);
- #endif
-
--#include <QDebug>
--
- int main(int argc, char **argv)
- {
- MessageHandler::install();
-@@ -96,8 +95,10 @@ int main(int argc, char **argv)
-
- mDebug() << "Injecting QML context properties";
- QQmlApplicationEngine engine;
-+
- engine.rootContext()->setContextProperty("downloadManager",
DownloadManager::instance());
- engine.rootContext()->setContextProperty("drives",
DriveManager::instance());
-+ engine.rootContext()->setContextProperty("portalFileDialog", new
PortalFileDialog(&app));
- engine.rootContext()->setContextProperty("mediawriterVersion",
MEDIAWRITER_VERSION);
- engine.rootContext()->setContextProperty("releases", new
ReleaseManager());
- engine.rootContext()->setContextProperty("units", Units::instance());
-diff --git a/app/portalfiledialog.cpp b/app/portalfiledialog.cpp
-new file mode 100644
-index 0000000..a368abb
---- /dev/null
-+++ b/app/portalfiledialog.cpp
-@@ -0,0 +1,195 @@
-+/*
-+ * Fedora Media Writer
-+ * Copyright (C) 2021 Jan Grulich <jgrulich(a)redhat.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version 2
-+ * of the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-+ */
-+
-+#include "portalfiledialog.h"
-+#include "utilities.h"
-+
-+#include <QGuiApplication>
-+#include <QRandomGenerator>
-+#include <QFileDialog>
-+#include <QStandardPaths>
-+
-+#ifdef __linux
-+#include <QtDBus/QtDBus>
-+#include <QDBusConnection>
-+#include <QDBusConnectionInterface>
-+#include <QDBusMessage>
-+#include <QDBusPendingCall>
-+#include <QDBusPendingCallWatcher>
-+#include <QDBusPendingReply>
-+
-+// Copied from PortalFileDialog
-+QDBusArgument &operator <<(QDBusArgument &arg, const
PortalFileDialog::FilterCondition &filterCondition)
-+{
-+ arg.beginStructure();
-+ arg << filterCondition.type << filterCondition.pattern;
-+ arg.endStructure();
-+ return arg;
-+}
-+const QDBusArgument &operator >>(const QDBusArgument &arg,
PortalFileDialog::FilterCondition &filterCondition)
-+{
-+ uint type;
-+ QString filterPattern;
-+ arg.beginStructure();
-+ arg >> type >> filterPattern;
-+ filterCondition.type = (PortalFileDialog::ConditionType)type;
-+ filterCondition.pattern = filterPattern;
-+ arg.endStructure();
-+ return arg;
-+}
-+QDBusArgument &operator <<(QDBusArgument &arg, const
PortalFileDialog::Filter filter)
-+{
-+ arg.beginStructure();
-+ arg << filter.name << filter.filterConditions;
-+ arg.endStructure();
-+ return arg;
-+}
-+const QDBusArgument &operator >>(const QDBusArgument &arg,
PortalFileDialog::Filter &filter)
-+{
-+ QString name;
-+ PortalFileDialog::FilterConditionList filterConditions;
-+ arg.beginStructure();
-+ arg >> name >> filterConditions;
-+ filter.name = name;
-+ filter.filterConditions = filterConditions;
-+ arg.endStructure();
-+ return arg;
-+}
-+#endif
-+
-+static inline bool checkSandboxEnvironment()
-+{
-+ return !QStandardPaths::locate(QStandardPaths::RuntimeLocation,
QStringLiteral("flatpak-info")).isEmpty() ||
qEnvironmentVariableIsSet("SNAP");
-+}
-+
-+PortalFileDialog::PortalFileDialog(QObject *parent, WId winId)
-+ : QObject(parent)
-+ , m_winId(winId)
-+{
-+#ifdef __linux
-+ QDBusConnectionInterface *interface = QDBusConnection::sessionBus().interface();
-+ m_available =
interface->isServiceRegistered(QStringLiteral("org.freedesktop.portal.Desktop"));
-+
-+ // In case we are in sandbox we can use native dialog which will already use
portals
-+ if (m_available) {
-+ m_available = !checkSandboxEnvironment();
-+ }
-+#endif
-+}
-+
-+PortalFileDialog::~PortalFileDialog()
-+{
-+}
-+
-+bool PortalFileDialog::isAvailable() const
-+{
-+#ifdef __linux
-+ return m_available;
-+#else
-+ return false;
-+#endif
-+}
-+
-+void PortalFileDialog::open()
-+{
-+ if (!m_available) {
-+ return;
-+ }
-+
-+#ifdef __linux
-+ QDBusMessage message =
QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.portal.Desktop"),
-+
QStringLiteral("/org/freedesktop/portal/desktop"),
-+
QStringLiteral("org.freedesktop.portal.FileChooser"),
-+
QStringLiteral("OpenFile"));
-+ QVariantMap options;
-+ options.insert(QStringLiteral("modal"), true);
-+ options.insert(QStringLiteral("handle_token"),
QStringLiteral("qt%1").arg(QRandomGenerator::global()->generate()));
-+ options.insert(QStringLiteral("multiple"), false);
-+
-+ qDBusRegisterMetaType<FilterCondition>();
-+ qDBusRegisterMetaType<FilterConditionList>();
-+ qDBusRegisterMetaType<Filter>();
-+ qDBusRegisterMetaType<FilterList>();
-+
-+ FilterList filterList;
-+
-+ FilterConditionList filterConditions1;
-+ FilterCondition filterCondition1;
-+ filterCondition1.type = GlobalPattern;
-+ filterCondition1.pattern = QStringLiteral("*.iso");
-+ FilterCondition filterCondition2;
-+ filterCondition2.type = GlobalPattern;
-+ filterCondition2.pattern = QStringLiteral("*.raw");
-+ FilterCondition filterCondition3;
-+ filterCondition3.type = GlobalPattern;
-+ filterCondition3.pattern = QStringLiteral("*.xz");
-+ filterConditions1 << filterCondition1 << filterCondition2 <<
filterCondition3;
-+
-+ Filter filter1;
-+ filter1.name = tr("Image files");
-+ filter1.filterConditions = filterConditions1;
-+
-+ FilterConditionList filterConditions2;
-+ FilterCondition filterCondition4;
-+ filterCondition4.type = GlobalPattern;
-+ filterCondition4.pattern = QStringLiteral("*");
-+ filterConditions2 << filterCondition4;
-+
-+ Filter filter2;
-+ filter2.name = tr("All files");
-+ filter2.filterConditions = filterConditions2;
-+
-+ filterList << filter1 << filter2;
-+
-+ options.insert(QLatin1String("filters"),
QVariant::fromValue(filterList));
-+
-+ const QString parentWindow = QGuiApplication::platformName() ==
QStringLiteral("xcb") ?
QStringLiteral("x11:%1").arg(QString::number(m_winId)) :
-+
QStringLiteral("wayland:%1").arg(QString::number(m_winId));
-+
-+ message << parentWindow << tr("Open File") << options;
-+
-+ QDBusPendingCall pendingCall = QDBusConnection::sessionBus().asyncCall(message);
-+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall);
-+ connect(watcher, &QDBusPendingCallWatcher::finished, this, [this]
(QDBusPendingCallWatcher *watcher) {
-+ QDBusPendingReply<QDBusObjectPath> reply = *watcher;
-+ if (!reply.isError()) {
-+ QDBusConnection::sessionBus().connect(nullptr,
-+ reply.value().path(),
-+
QStringLiteral("org.freedesktop.portal.Request"),
-+ QStringLiteral("Response"),
-+ this,
-+ SLOT(gotResponse(uint,QVariantMap)));
-+ } else {
-+ mWarning() << "Failed to open portal file dialog: " <<
reply.error().message();
-+ }
-+ });
-+#endif
-+}
-+
-+void PortalFileDialog::gotResponse(uint response, const QVariantMap &results)
-+{
-+ if (!response) {
-+ if (results.contains(QLatin1String("uris"))) {
-+ const QStringList selectedFiles =
results.value(QLatin1String("uris")).toStringList();
-+ Q_EMIT fileSelected(selectedFiles.first());
-+ }
-+ } else {
-+ mWarning() << "Portal file dialog cancelled or failed to open";
-+ }
-+}
-diff --git a/app/portalfiledialog.h b/app/portalfiledialog.h
-new file mode 100644
-index 0000000..a7358f0
---- /dev/null
-+++ b/app/portalfiledialog.h
-@@ -0,0 +1,73 @@
-+/*
-+ * Fedora Media Writer
-+ * Copyright (C) 2021 Jan Grulich <jgrulich(a)redhat.com>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * as published by the Free Software Foundation; either version 2
-+ * of the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-+ */
-+
-+#ifndef PORTALPortalFileDialog_H
-+#define PORTALPortalFileDialog_H
-+
-+#include <QObject>
-+#include <QWindow>
-+
-+class PortalFileDialog : public QObject
-+{
-+ Q_OBJECT
-+ Q_PROPERTY(bool isAvailable READ isAvailable)
-+public:
-+ // Copied from QXdgDesktopPortalFileDialog
-+ enum ConditionType : uint {
-+ GlobalPattern = 0,
-+ MimeType = 1
-+ };
-+ // Filters a(sa(us))
-+ // Example: [('Images', [(0, '*.ico'), (1, 'image/png')]),
('Text', [(0, '*.txt')])]
-+ struct FilterCondition {
-+ ConditionType type;
-+ QString pattern; // E.g. '*ico' or 'image/png'
-+ };
-+ typedef QVector<FilterCondition> FilterConditionList;
-+ struct Filter {
-+ QString name; // E.g. 'Images' or 'Text
-+ FilterConditionList filterConditions;; // E.g. [(0, '*.ico'), (1,
'image/png')] or [(0, '*.txt')]
-+ };
-+ typedef QVector<Filter> FilterList;
-+
-+ PortalFileDialog(QObject *parent = nullptr, WId winId = 0);
-+ virtual ~PortalFileDialog() override;
-+
-+ bool isAvailable() const;
-+
-+public Q_SLOTS:
-+ void open();
-+
-+private Q_SLOTS:
-+ void gotResponse(uint response, const QVariantMap &results);
-+
-+Q_SIGNALS:
-+ void fileSelected(const QUrl &fileName);
-+
-+private:
-+ bool m_available;
-+ WId m_winId;
-+};
-+
-+Q_DECLARE_METATYPE(PortalFileDialog::FilterCondition);
-+Q_DECLARE_METATYPE(PortalFileDialog::FilterConditionList);
-+Q_DECLARE_METATYPE(PortalFileDialog::Filter);
-+Q_DECLARE_METATYPE(PortalFileDialog::FilterList);
-+
-+#endif // PORTALPortalFileDialog_H
-diff --git a/app/qml/DelegateImage.qml b/app/qml/DelegateImage.qml
-index de32e55..214924c 100644
---- a/app/qml/DelegateImage.qml
-+++ b/app/qml/DelegateImage.qml
-@@ -175,7 +175,10 @@ Item {
- function action() {
- if (release.isLocal) {
- releases.selectedIndex = index
-- fileDialog.visible = true
-+ if (portalFileDialog.isAvailable)
-+ portalFileDialog.open()
-+ else
-+ fileDialog.open()
- }
- else {
- imageList.currentIndex = index
-diff --git a/app/qml/main.qml b/app/qml/main.qml
-index efc803e..e7a714d 100644
---- a/app/qml/main.qml
-+++ b/app/qml/main.qml
-@@ -162,6 +162,14 @@ ApplicationWindow {
- }
- }
-
-+ Connections {
-+ target: portalFileDialog
-+ function onFileSelected(fileName) {
-+ releases.setLocalFile(fileName)
-+ dlDialog.visible = true
-+ }
-+ }
-+
- FullscreenViewer {
- id: fullscreenViewer
- }
diff --git a/mediawriter.spec b/mediawriter.spec
index 4b37dcc..431d806 100644
--- a/mediawriter.spec
+++ b/mediawriter.spec
@@ -1,19 +1,12 @@
-# FIXME: qt6-qtdeclarative doesn't build on S390x
-# BUG:
https://bugreports.qt.io/browse/QTBUG-93101
-# For that reason we don't have adwaita-qt
-ExcludeArch: s390x
-
Name: mediawriter
-Version: 4.2.2
-Release: 4%{?dist}
+Version: 5.0.0
+Release: 1%{?dist}
Summary: Fedora Media Writer
License: GPLv2+
URL:
https://github.com/FedoraQt/MediaWriter
Source0:
https://github.com/FedoraQt/MediaWriter/archive/MediaWriter-%{version}.ta...
-Patch0: mediawriter-use-filechooser-portal.patch
-
Provides: liveusb-creator = %{version}-%{release}
Obsoletes: liveusb-creator <= 3.95.4-2
@@ -22,15 +15,13 @@ BuildRequires: gettext
BuildRequires: cmake
BuildRequires: make
BuildRequires: libappstream-glib
-BuildRequires: libadwaita-qt5-devel
-BuildRequires: qt5-qtbase-devel
-BuildRequires: qt5-qtdeclarative-devel
-BuildRequires: qt5-qtquickcontrols2-devel
-BuildRequires: qt5-qtx11extras-devel
+BuildRequires: libadwaita-qt6-devel
+BuildRequires: qt6-qtbase-devel
+BuildRequires: qt6-qtdeclarative-devel
BuildRequires: xz-devel
-Requires: qt5-qtquickcontrols >= 5.3.0
-Requires: qt5-qtquickcontrols2 >= 5.12.0
+Requires: qt6-qtsvg
+Requires: qt6-qtdeclarative
%if !0%{?flatpak}
Requires: polkit
@@ -52,11 +43,8 @@ like flash drives or memory cards.
%prep
%autosetup -p1 -n MediaWriter-%{version}
-# Remove 1024x1024 icon
-rm -rf app/data/icons/hicolor/1024x1024
-
# Install the theme into correct prefix when building for /app
-sed -i 's@\${QT_INSTALL_QML}@%{_qt5_qmldir}@' theme/CMakeLists.txt
+sed -i 's@\${QT6_INSTALL_QML}@%{_qt6_qmldir}@' src/theme/CMakeLists.txt
%build
%cmake
@@ -83,12 +71,14 @@ appstream-util validate-relax --nonet
%{buildroot}/%{_datadir}/metainfo/org.fedo
%{_datadir}/icons/hicolor/128x128/apps/org.fedoraproject.MediaWriter.png
%{_datadir}/icons/hicolor/256x256/apps/org.fedoraproject.MediaWriter.png
%{_datadir}/icons/hicolor/512x512/apps/org.fedoraproject.MediaWriter.png
-%{_qt5_qmldir}/QtQuick/Controls.2/org.fedoraproject.AdwaitaTheme/
-%{_qt5_qmldir}/org/fedoraproject/AdwaitaTheme/libadwaitathemeplugin.so
-%{_qt5_qmldir}/org/fedoraproject/AdwaitaTheme/qmldir
-
+%{_qt6_qmldir}/QtQuick/Controls/org/fedoraproject/AdwaitaTheme/
+%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/libadwaitathemeplugin.so
+%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/qmldir
%changelog
+* Mon May 09 2022 Jan Grulich <jgrulich(a)redhat.com> - 5.0.0-1
+- 5.0.0
+
* Thu Jan 20 2022 Fedora Release Engineering <releng(a)fedoraproject.org> - 4.2.2-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
diff --git a/sources b/sources
index 242388f..4fd4f67 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (MediaWriter-4.2.2.tar.gz) =
04486db868a21db068907ee6942c325f71205bfcb3a471c3ea20a2165903c18cb626425ecafa40e31f7d67389416916be664e68121065b28578d57a4a62f29f4
+SHA512 (MediaWriter-5.0.0.tar.gz) =
84a7284a3b9c9c652c2d42a241f1cf46e707a75ff9e1354df750c5a423438887a6ddb4184fe36d6c9d0326b126a84674c5baeebcff4a880fd31f8d4b303aba99