From a562b3fdaa40a3dcdc4d605ff7454d3f8c55e75f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 08:44:11 +0000 Subject: import bluedevil-2.1-1.el7 --- diff --git a/.bluedevil.metadata b/.bluedevil.metadata index 4bdb497..dab36fe 100644 --- a/.bluedevil.metadata +++ b/.bluedevil.metadata @@ -1 +1 @@ -ddef236967be4a0143a09cc595ff4c9dcd566e03 SOURCES/bluedevil-1.3.tar.bz2 +7938a2e4bddbc1622522d24f999e74ba2b271d7c SOURCES/bluedevil-2.1.tar.xz diff --git a/.gitignore b/.gitignore index 6c8da58..6a364ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/bluedevil-1.3.tar.bz2 +SOURCES/bluedevil-2.1.tar.xz diff --git a/SOURCES/0002-KCM-SystemCheck-Add-NoUsableAdapter-error.patch b/SOURCES/0002-KCM-SystemCheck-Add-NoUsableAdapter-error.patch new file mode 100644 index 0000000..7a0484f --- /dev/null +++ b/SOURCES/0002-KCM-SystemCheck-Add-NoUsableAdapter-error.patch @@ -0,0 +1,327 @@ +From 6566e8d25e41eed5bf03124740320bc92caaca93 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Thu, 25 Dec 2014 18:04:10 +0100 +Subject: [PATCH 02/20] KCM SystemCheck: Add NoUsableAdapter error + +Show "Your Bluetooth adapter is powered off" instead of +"No Bluetooth adapters found" when there are adapters +in system, but all of them powered off. + +Also drop support to build with kdelibs < 4.7 +--- + src/kcmodule/systemcheck.cpp | 143 ++++++++----------------------------------- + src/kcmodule/systemcheck.h | 31 ++-------- + 2 files changed, 29 insertions(+), 145 deletions(-) + +diff --git a/src/kcmodule/systemcheck.cpp b/src/kcmodule/systemcheck.cpp +index 44c47e5..6ad75d2 100644 +--- a/src/kcmodule/systemcheck.cpp ++++ b/src/kcmodule/systemcheck.cpp +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -39,93 +40,12 @@ + #include + #include + +-#if KDE_IS_VERSION(4,6,41) +-#include +-#else +- +-class ErrorWidget +- : public QWidget +-{ +-public: +- ErrorWidget(QWidget *parent = 0); +- virtual ~ErrorWidget(); +- +- void setIcon(const QString &icon); +- void setText(const QString &reason); +- void addAction(KPushButton *action); +- +-protected: +- virtual void paintEvent(QPaintEvent *event); +- +-private: +- QLabel *m_icon; +- QLabel *m_reason; +- QHBoxLayout *m_actions; +-}; +- +-ErrorWidget::ErrorWidget(QWidget *parent) +- : QWidget(parent) +- , m_icon(new QLabel(this)) +- , m_reason(new QLabel(this)) +- , m_actions(new QHBoxLayout) +-{ +- setAutoFillBackground(false); +- +- m_actions->addStretch(); +- +- QHBoxLayout *layout = new QHBoxLayout; +- layout->addWidget(m_icon); +- layout->addWidget(m_reason, 1); +- +- QVBoxLayout *outter = new QVBoxLayout; +- outter->addLayout(layout); +- outter->addLayout(m_actions); +- +- setLayout(outter); +-} +- +-ErrorWidget::~ErrorWidget() +-{ +-} +- +-void ErrorWidget::setIcon(const QString &icon) +-{ +- m_icon->setPixmap(KIconLoader::global()->loadIcon(icon, KIconLoader::Dialog)); +-} +- +-void ErrorWidget::setText(const QString &reason) +-{ +- m_reason->setText(reason); +-} +- +-void ErrorWidget::addAction(KPushButton *action) +-{ +- action->setAutoFillBackground(false); +- m_actions->addWidget(action); +-} +- +-void ErrorWidget::paintEvent(QPaintEvent *event) +-{ +- const QRect r = event->rect(); +- const KColorScheme colorScheme(QPalette::Active, KColorScheme::Window); +- +- QPainter p(this); +- p.setRenderHint(QPainter::Antialiasing); +- +- QPainterPath path; +- path.addRoundedRect(0, 0, r.width(), r.height(), 10, 10); +- p.fillPath(path, colorScheme.background(KColorScheme::NegativeBackground)); +- +- QWidget::paintEvent(event); +-} +-#endif +-//////////////////////////////////////////////////////////////////////////////////////////////////// +- + SystemCheck::SystemCheck(QWidget *parent) + : QObject(parent) + , m_kded(new KDED("org.kde.kded", "/kded", QDBusConnection::sessionBus())) + , m_parent(parent) + , m_noAdaptersError(0) ++ , m_noUsableAdapterError(0) + , m_notDiscoverableAdapterError(0) + , m_disabledNotificationsError(0) + { +@@ -133,9 +53,6 @@ SystemCheck::SystemCheck(QWidget *parent) + + SystemCheck::~SystemCheck() + { +- m_noAdaptersError = 0; +- m_notDiscoverableAdapterError = 0; +- m_disabledNotificationsError = 0; + delete m_kded; + } + +@@ -145,18 +62,22 @@ void SystemCheck::createWarnings(QVBoxLayout *layout) + return; + } + +-#if KDE_IS_VERSION(4,6,41) + m_noAdaptersError = new KMessageWidget(m_parent); + m_noAdaptersError->setMessageType(KMessageWidget::Error); + m_noAdaptersError->setCloseButtonVisible(false); +-#else +- m_noAdaptersError = new ErrorWidget(m_parent); +- m_noAdaptersError->setIcon("window-close"); +-#endif + m_noAdaptersError->setText(i18n("No Bluetooth adapters have been found.")); + layout->addWidget(m_noAdaptersError); + +-#if KDE_IS_VERSION(4,6,41) ++ m_noUsableAdapterError = new KMessageWidget(m_parent); ++ m_noUsableAdapterError->setMessageType(KMessageWidget::Warning); ++ m_noUsableAdapterError->setCloseButtonVisible(false); ++ m_noUsableAdapterError->setText(i18n("Your Bluetooth adapter is powered off.")); ++ ++ KAction *fixNoUsableAdapter = new KAction(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_noUsableAdapterError); ++ connect(fixNoUsableAdapter, SIGNAL(triggered(bool)), this, SLOT(fixNoUsableAdapterError())); ++ m_noUsableAdapterError->addAction(fixNoUsableAdapter); ++ layout->addWidget(m_noUsableAdapterError); ++ + m_notDiscoverableAdapterError = new KMessageWidget(m_parent); + m_notDiscoverableAdapterError->setMessageType(KMessageWidget::Warning); + m_notDiscoverableAdapterError->setCloseButtonVisible(false); +@@ -164,19 +85,10 @@ void SystemCheck::createWarnings(QVBoxLayout *layout) + KAction *fixNotDiscoverableAdapter = new KAction(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_notDiscoverableAdapterError); + connect(fixNotDiscoverableAdapter, SIGNAL(triggered(bool)), this, SLOT(fixNotDiscoverableAdapterError())); + m_notDiscoverableAdapterError->addAction(fixNotDiscoverableAdapter); +-#else +- m_notDiscoverableAdapterError = new ErrorWidget(m_parent); +- m_notDiscoverableAdapterError->setIcon("edit-find"); +- +- KPushButton *fixNotDiscoverableAdapter = new KPushButton(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_notDiscoverableAdapterError); +- connect(fixNotDiscoverableAdapter, SIGNAL(clicked()), this, SLOT(fixNotDiscoverableAdapterError())); +- m_notDiscoverableAdapterError->addAction(fixNotDiscoverableAdapter); +-#endif + m_notDiscoverableAdapterError->setText(i18n("Your default Bluetooth adapter is not visible for remote devices.")); + + layout->addWidget(m_notDiscoverableAdapterError); + +-#if KDE_IS_VERSION(4,6,41) + m_disabledNotificationsError = new KMessageWidget(m_parent); + m_disabledNotificationsError->setMessageType(KMessageWidget::Warning); + m_disabledNotificationsError->setCloseButtonVisible(false); +@@ -184,19 +96,10 @@ void SystemCheck::createWarnings(QVBoxLayout *layout) + KAction *fixDisabledNotifications = new KAction(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_disabledNotificationsError); + connect(fixDisabledNotifications, SIGNAL(triggered(bool)), this, SLOT(fixDisabledNotificationsError())); + m_disabledNotificationsError->addAction(fixDisabledNotifications); +-#else +- m_disabledNotificationsError = new ErrorWidget(m_parent); +- m_disabledNotificationsError->setIcon("preferences-desktop-notification"); +- +- KPushButton *fixDisabledNotifications = new KPushButton(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_disabledNotificationsError); +- connect(fixDisabledNotifications, SIGNAL(clicked()), this, SLOT(fixDisabledNotificationsError())); +- m_disabledNotificationsError->addAction(fixDisabledNotifications); +-#endif + m_disabledNotificationsError->setText(i18n("Interaction with Bluetooth system is not optimal.")); + + layout->addWidget(m_disabledNotificationsError); + +-#if KDE_IS_VERSION(4,6,41) + m_noKDEDRunning = new KMessageWidget(m_parent); + m_noKDEDRunning ->setMessageType(KMessageWidget::Warning); + m_noKDEDRunning->setCloseButtonVisible(false); +@@ -204,14 +107,6 @@ void SystemCheck::createWarnings(QVBoxLayout *layout) + KAction *fixNoKDEDRunning = new KAction(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_noKDEDRunning); + connect(fixNoKDEDRunning, SIGNAL(triggered(bool)), this, SLOT(fixNoKDEDRunning())); + m_noKDEDRunning->addAction(fixNoKDEDRunning); +-#else +- m_noKDEDRunning = new ErrorWidget(m_parent); +- m_noKDEDRunning->setIcon("dialog-warning"); +- +- KPushButton *fixNoKDEDRunning = new KPushButton(KIcon("dialog-ok-apply"), i18nc("Action to fix a problem", "Fix it"), m_noKDEDRunning); +- connect(fixNoKDEDRunning, SIGNAL(clicked()), this, SLOT(fixNoKDEDRunning())); +- m_noKDEDRunning->addAction(fixNoKDEDRunning); +-#endif + m_noKDEDRunning->setText(i18n("Bluetooth is not completely enabled.")); + + layout->addWidget(m_noKDEDRunning); +@@ -259,6 +154,7 @@ void SystemCheck::updateInformationState() + { + m_noAdaptersError->setEnabled(true); + m_noAdaptersError->setVisible(false); ++ m_noUsableAdapterError->setVisible(false); + m_notDiscoverableAdapterError->setVisible(false); + m_disabledNotificationsError->setVisible(false); + m_noKDEDRunning->setVisible(false); +@@ -268,9 +164,14 @@ void SystemCheck::updateInformationState() + return; + } + ++ if (BlueDevil::Manager::self()->adapters().isEmpty()) { ++ m_noAdaptersError->setVisible(true); ++ return; ++ } ++ + BlueDevil::Adapter *const usableAdapter = BlueDevil::Manager::self()->usableAdapter(); + if (!usableAdapter) { +- m_noAdaptersError->setVisible(true); ++ m_noUsableAdapterError->setVisible(true); + return; + } + if (!usableAdapter->isDiscoverable()) { +@@ -293,6 +194,12 @@ void SystemCheck::fixNoKDEDRunning() + m_kded->loadModule("bluedevil"); + } + ++void SystemCheck::fixNoUsableAdapterError() ++{ ++ m_noUsableAdapterError->setVisible(false); ++ BlueDevil::Manager::self()->adapters().first()->setPowered(true); ++} ++ + void SystemCheck::fixNotDiscoverableAdapterError() + { + m_notDiscoverableAdapterError->setVisible(false); +diff --git a/src/kcmodule/systemcheck.h b/src/kcmodule/systemcheck.h +index e03daf9..ee94f7e 100644 +--- a/src/kcmodule/systemcheck.h ++++ b/src/kcmodule/systemcheck.h +@@ -22,19 +22,12 @@ + #define BLUEDEVIL_SYSTEM_CHECK_H + #include + +-#include +- + class QVBoxLayout; + + class KDED; +-#if KDE_IS_VERSION(4,6,41) + class KMessageWidget; +-#else +-class ErrorWidget; +-#endif + +-class SystemCheck +- : public QObject ++class SystemCheck : public QObject + { + Q_OBJECT + +@@ -42,17 +35,6 @@ public: + SystemCheck(QWidget *parent); + virtual ~SystemCheck(); + +- struct SystemCheckResult { +- enum Result { +- NoWarnings = 0, +- BluetoothDisabled, +- NoAdapters, +- NotificationsDisabled, +- DefaultAdapterHidden +- } result; +- QWidget *warningWidget; +- }; +- + void createWarnings(QVBoxLayout *layout); + + bool checkKDEDModuleLoaded(); +@@ -67,23 +49,18 @@ public Q_SLOTS: + + private Q_SLOTS: + void fixNoKDEDRunning(); ++ void fixNoUsableAdapterError(); + void fixNotDiscoverableAdapterError(); + void fixDisabledNotificationsError(); + + private: + KDED *m_kded; + QWidget *m_parent; +-#if KDE_IS_VERSION(4,6,41) + KMessageWidget *m_noAdaptersError; ++ KMessageWidget *m_noUsableAdapterError; + KMessageWidget *m_noKDEDRunning; + KMessageWidget *m_notDiscoverableAdapterError; + KMessageWidget *m_disabledNotificationsError; +-#else +- ErrorWidget *m_noAdaptersError; +- ErrorWidget *m_noKDEDRunning; +- ErrorWidget *m_notDiscoverableAdapterError; +- ErrorWidget *m_disabledNotificationsError; +-#endif + }; + +-#endif //BLUEDEVIL_SYSTEM_CHECK_H +\ No newline at end of file ++#endif //BLUEDEVIL_SYSTEM_CHECK_H +-- +2.1.0 + diff --git a/SOURCES/0004-obexftpdaemon-session-method-now-takes-target-parame.patch b/SOURCES/0004-obexftpdaemon-session-method-now-takes-target-parame.patch new file mode 100644 index 0000000..86fe279 --- /dev/null +++ b/SOURCES/0004-obexftpdaemon-session-method-now-takes-target-parame.patch @@ -0,0 +1,160 @@ +From 21f1f3861d5d7a4e4a9c83d1d109d37713191b65 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Mon, 29 Dec 2014 12:24:37 +0100 +Subject: [PATCH 04/20] obexftpdaemon: session() method now takes target + parameter + +This way it is now possible to create other session than only +"ftp". This is needed to be able to create "pcsuite" sessions. + +Also address parameter of session() method is now taken +in correct form (uppercase colon separated). +--- + src/kio/obexftp/daemon/ObexFtpDaemon.cpp | 8 +++----- + src/kio/obexftp/daemon/ObexFtpDaemon.h | 2 +- + src/kio/obexftp/daemon/createsessionjob.cpp | 7 ++++--- + src/kio/obexftp/daemon/createsessionjob.h | 5 +++-- + src/kio/obexftp/kded_obexftp.xml | 1 + + src/kio/obexftp/kio_obexftp.cpp | 3 ++- + 6 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/src/kio/obexftp/daemon/ObexFtpDaemon.cpp b/src/kio/obexftp/daemon/ObexFtpDaemon.cpp +index 782f8d3..d811291 100644 +--- a/src/kio/obexftp/daemon/ObexFtpDaemon.cpp ++++ b/src/kio/obexftp/daemon/ObexFtpDaemon.cpp +@@ -123,15 +123,13 @@ bool ObexFtpDaemon::isOnline() + return d->m_status == Private::Online; + } + +-QString ObexFtpDaemon::session(QString address, const QDBusMessage& msg) ++QString ObexFtpDaemon::session(const QString &address, const QString &target, const QDBusMessage& msg) + { +- address.replace("-", ":"); +- + if (d->m_sessionMap.contains(address)) { + return d->m_sessionMap[address]; + } + +- kDebug(dobex()) << "Creating session for" << address; ++ kDebug(dobex()) << "Creating session for" << address << "target" << target; + + // At this point we always want delayed reply + msg.setDelayedReply(true); +@@ -141,7 +139,7 @@ QString ObexFtpDaemon::session(QString address, const QDBusMessage& msg) + return QString(); + } + +- CreateSessionJob *job = new CreateSessionJob(address, msg); ++ CreateSessionJob *job = new CreateSessionJob(address, target, msg); + connect(job, SIGNAL(finished(KJob*)), SLOT(sessionCreated(KJob*))); + job->start(); + +diff --git a/src/kio/obexftp/daemon/ObexFtpDaemon.h b/src/kio/obexftp/daemon/ObexFtpDaemon.h +index d06b391..e58a74d 100644 +--- a/src/kio/obexftp/daemon/ObexFtpDaemon.h ++++ b/src/kio/obexftp/daemon/ObexFtpDaemon.h +@@ -39,7 +39,7 @@ public: + + public Q_SLOTS: + Q_SCRIPTABLE bool isOnline(); +- Q_SCRIPTABLE QString session(QString address, const QDBusMessage &msg); ++ Q_SCRIPTABLE QString session(const QString &address, const QString &target, const QDBusMessage &msg); + Q_SCRIPTABLE bool cancelTransfer(const QString &transfer); + + private Q_SLOTS: +diff --git a/src/kio/obexftp/daemon/createsessionjob.cpp b/src/kio/obexftp/daemon/createsessionjob.cpp +index e84f8ee..883fe11 100644 +--- a/src/kio/obexftp/daemon/createsessionjob.cpp ++++ b/src/kio/obexftp/daemon/createsessionjob.cpp +@@ -25,9 +25,10 @@ + #include + + // class +-CreateSessionJob::CreateSessionJob(const QString& address, const QDBusMessage& msg, QObject* parent) ++CreateSessionJob::CreateSessionJob(const QString &address, const QString &target, const QDBusMessage &msg, QObject *parent) + : KJob(parent) + , m_address(address) ++ , m_target(target) + , m_client(0) + { + m_messages.append(msg); +@@ -53,7 +54,7 @@ void CreateSessionJob::addMessage(const QDBusMessage& msg) + m_messages.append(msg); + } + +-const QList< QDBusMessage > CreateSessionJob::messages() const ++const QList CreateSessionJob::messages() const + { + return m_messages; + } +@@ -62,7 +63,7 @@ void CreateSessionJob::createSession() + { + kDebug(dobex()); + QVariantMap args; +- args["Target"] = "ftp"; ++ args["Target"] = m_target; + m_client = new OrgBluezObexClient1Interface("org.bluez.obex", + "/org/bluez/obex", + QDBusConnection::sessionBus(), this); +diff --git a/src/kio/obexftp/daemon/createsessionjob.h b/src/kio/obexftp/daemon/createsessionjob.h +index a457b02..667384b 100644 +--- a/src/kio/obexftp/daemon/createsessionjob.h ++++ b/src/kio/obexftp/daemon/createsessionjob.h +@@ -29,7 +29,7 @@ class CreateSessionJob : public KJob + { + Q_OBJECT + public: +- explicit CreateSessionJob(const QString &address, const QDBusMessage &msg, QObject* parent = 0); ++ explicit CreateSessionJob(const QString &address, const QString &target, const QDBusMessage &msg, QObject *parent = 0); + + virtual void start(); + QString path(); +@@ -44,9 +44,10 @@ private Q_SLOTS: + private: + QString m_path; + QString m_address; ++ QString m_target; + QList m_messages; + + OrgBluezObexClient1Interface* m_client; + }; + +-#endif //CREATE_SESSION_JOB_H +\ No newline at end of file ++#endif //CREATE_SESSION_JOB_H +diff --git a/src/kio/obexftp/kded_obexftp.xml b/src/kio/obexftp/kded_obexftp.xml +index ec718e6..06e3b14 100644 +--- a/src/kio/obexftp/kded_obexftp.xml ++++ b/src/kio/obexftp/kded_obexftp.xml +@@ -8,6 +8,7 @@ + + + ++ + + + +diff --git a/src/kio/obexftp/kio_obexftp.cpp b/src/kio/obexftp/kio_obexftp.cpp +index 5ae5920..a8c27e7 100644 +--- a/src/kio/obexftp/kio_obexftp.cpp ++++ b/src/kio/obexftp/kio_obexftp.cpp +@@ -83,7 +83,7 @@ void KioFtp::launchProgressBar() + + void KioFtp::connectToHost() + { +- QDBusPendingReply reply = m_kded->session(m_host); ++ QDBusPendingReply reply = m_kded->session(m_host, "ftp"); + reply.waitForFinished(); + + const QString &sessionPath = reply.value(); +@@ -225,6 +225,7 @@ void KioFtp::setHost(const QString &host, quint16 port, const QString &user, con + Q_UNUSED(pass) + + m_host = host; ++ m_host = m_host.replace(QLatin1Char('-'), QLatin1Char(':')).toUpper(); + + infoMessage(i18n("Connecting to the device")); + +-- +2.1.0 + diff --git a/SOURCES/0005-kio_obexftp-Prefer-pcsuite-target-for-S60-devices.patch b/SOURCES/0005-kio_obexftp-Prefer-pcsuite-target-for-S60-devices.patch new file mode 100644 index 0000000..391aa93 --- /dev/null +++ b/SOURCES/0005-kio_obexftp-Prefer-pcsuite-target-for-S60-devices.patch @@ -0,0 +1,152 @@ +From 2d29f4ebc6f9a9c0d5d5807c662e64df56c8c711 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Mon, 29 Dec 2014 13:59:32 +0100 +Subject: [PATCH 05/20] kio_obexftp: Prefer "pcsuite" target for S60 devices + +BUG: 342259 +--- + src/kio/obexftp/kio_obexftp.cpp | 61 ++++++++++++++++++++++++++++++----------- + src/kio/obexftp/kio_obexftp.h | 4 +++ + 2 files changed, 49 insertions(+), 16 deletions(-) + +diff --git a/src/kio/obexftp/kio_obexftp.cpp b/src/kio/obexftp/kio_obexftp.cpp +index a8c27e7..0783662 100644 +--- a/src/kio/obexftp/kio_obexftp.cpp ++++ b/src/kio/obexftp/kio_obexftp.cpp +@@ -35,6 +35,8 @@ + + #include + ++Q_DECLARE_METATYPE(DeviceInfo) ++ + extern "C" int KDE_EXPORT kdemain(int argc, char **argv) + { + KAboutData about("kioobexftp", "bluedevil", ki18n("kioobexftp"), bluedevil_version); +@@ -64,6 +66,7 @@ KioFtp::KioFtp(const QByteArray &pool, const QByteArray &app) + m_timer = new QTimer(); + m_timer->setInterval(100); + ++ qDBusRegisterMetaType(); + qDBusRegisterMetaType(); + m_kded = new org::kde::ObexFtp("org.kde.kded", "/modules/obexftpdaemon", QDBusConnection::sessionBus(), 0); + } +@@ -83,7 +86,36 @@ void KioFtp::launchProgressBar() + + void KioFtp::connectToHost() + { +- QDBusPendingReply reply = m_kded->session(m_host, "ftp"); ++ // Prefer pcsuite target on S60 devices ++ if (m_uuids.contains(QLatin1String("00005005-0000-1000-8000-0002EE000001"))) { ++ if (createSession("pcsuite")) { ++ return; ++ } ++ // Fallback to ftp ++ } ++ ++ createSession("ftp"); ++} ++ ++bool KioFtp::testConnection() ++{ ++ if (!m_kded->isOnline().value()) { ++ error(KIO::ERR_SLAVE_DEFINED, i18n("Obexd service is not running.")); ++ return false; ++ } ++ ++ connectToHost(); ++ ++ if (!m_transfer) { ++ error(KIO::ERR_COULD_NOT_CONNECT, m_host); ++ return false; ++ } ++ return true; ++} ++ ++bool KioFtp::createSession(const QString &target) ++{ ++ QDBusPendingReply reply = m_kded->session(m_host, target); + reply.waitForFinished(); + + const QString &sessionPath = reply.value(); +@@ -95,7 +127,7 @@ void KioFtp::connectToHost() + delete m_transfer; + m_transfer = 0; + m_sessionPath.clear(); +- return; ++ return false; + } + + if (m_sessionPath != sessionPath) { +@@ -104,24 +136,11 @@ void KioFtp::connectToHost() + m_transfer = new org::bluez::obex::FileTransfer1("org.bluez.obex", sessionPath, QDBusConnection::sessionBus()); + m_sessionPath = sessionPath; + } +-} + +-bool KioFtp::testConnection() +-{ +- if (!m_kded->isOnline().value()) { +- error(KIO::ERR_SLAVE_DEFINED, i18n("Obexd service is not running.")); +- return false; +- } +- +- connectToHost(); +- +- if (!m_transfer) { +- error(KIO::ERR_COULD_NOT_CONNECT, m_host); +- return false; +- } + return true; + } + ++ + void KioFtp::updateProcess() + { + if (m_counter == 49) { +@@ -227,6 +246,16 @@ void KioFtp::setHost(const QString &host, quint16 port, const QString &user, con + m_host = host; + m_host = m_host.replace(QLatin1Char('-'), QLatin1Char(':')).toUpper(); + ++ QDBusMessage call = QDBusMessage::createMethodCall("org.kde.kded", ++ "/modules/bluedevil", ++ "org.kde.BlueDevil", ++ "device"); ++ call << m_host; ++ QDBusReply reply = QDBusConnection::sessionBus().call(call); ++ DeviceInfo info = reply.value(); ++ ++ m_uuids = info["UUIDs"]; ++ + infoMessage(i18n("Connecting to the device")); + + connectToHost(); +diff --git a/src/kio/obexftp/kio_obexftp.h b/src/kio/obexftp/kio_obexftp.h +index 6f22525..6fe0e56 100644 +--- a/src/kio/obexftp/kio_obexftp.h ++++ b/src/kio/obexftp/kio_obexftp.h +@@ -30,6 +30,8 @@ + + #include + ++typedef QMap DeviceInfo; ++ + class OrgBluezObexFileTransfer1Interface; + class KioFtp + : public QObject +@@ -72,11 +74,13 @@ private: + void launchProgressBar(); + void connectToHost(); + bool testConnection(); ++ bool createSession(const QString &target); + + private: + int m_counter; + QMap m_statMap; + QString m_host; ++ QString m_uuids; + QString m_sessionPath; + QTimer *m_timer; + org::kde::ObexFtp *m_kded; +-- +2.1.0 + diff --git a/SOURCES/0007-wizard-Add-Success-page.patch b/SOURCES/0007-wizard-Add-Success-page.patch new file mode 100644 index 0000000..5f411fe --- /dev/null +++ b/SOURCES/0007-wizard-Add-Success-page.patch @@ -0,0 +1,427 @@ +From 725524d8e23fbc5fad9aab00cbaa3d66589baf14 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Wed, 31 Dec 2014 12:07:56 +0100 +Subject: [PATCH 07/20] wizard: Add Success page + +Instead of closing the wizard, show a final page +to user to indicate the pairing was completed successfully. +--- + src/wizard/CMakeLists.txt | 2 ++ + src/wizard/bluewizard.cpp | 2 ++ + src/wizard/bluewizard.h | 2 +- + src/wizard/pages/fail.cpp | 2 ++ + src/wizard/pages/fail.ui | 10 +++++++ + src/wizard/pages/nopairing.cpp | 46 +++++++++++----------------- + src/wizard/pages/nopairing.h | 10 +++---- + src/wizard/pages/success.cpp | 64 +++++++++++++++++++++++++++++++++++++++ + src/wizard/pages/success.h | 46 ++++++++++++++++++++++++++++ + src/wizard/pages/success.ui | 68 ++++++++++++++++++++++++++++++++++++++++++ + 10 files changed, 216 insertions(+), 36 deletions(-) + create mode 100644 src/wizard/pages/success.cpp + create mode 100644 src/wizard/pages/success.h + create mode 100644 src/wizard/pages/success.ui + +diff --git a/src/wizard/CMakeLists.txt b/src/wizard/CMakeLists.txt +index 847e672..f2ada0f 100644 +--- a/src/wizard/CMakeLists.txt ++++ b/src/wizard/CMakeLists.txt +@@ -10,6 +10,7 @@ set(wizard_SRCS + pages/keyboardpairing.cpp + pages/ssppairing.cpp + pages/fail.cpp ++ pages/success.cpp + ) + + kde4_add_ui_files(wizard_SRCS +@@ -19,6 +20,7 @@ kde4_add_ui_files(wizard_SRCS + pages/keyboardpairing.ui + pages/ssppairing.ui + pages/fail.ui ++ pages/success.ui + ) + + kde4_add_executable(bluedevil-wizard ${wizard_SRCS}) +diff --git a/src/wizard/bluewizard.cpp b/src/wizard/bluewizard.cpp +index de241b0..91cb28f 100644 +--- a/src/wizard/bluewizard.cpp ++++ b/src/wizard/bluewizard.cpp +@@ -24,6 +24,7 @@ + #include "pages/legacypairingdatabase.h" + #include "pages/keyboardpairing.h" + #include "pages/ssppairing.h" ++#include "pages/success.h" + #include "pages/fail.h" + + #include +@@ -57,6 +58,7 @@ BlueWizard::BlueWizard(const KUrl &url) : QWizard(), m_device(0), m_manualPin(fa + setPage(LegacyPairingDatabase, new LegacyPairingPageDatabase(this)); + setPage(KeyboardPairing, new KeyboardPairingPage(this)); + setPage(SSPPairing, new SSPPairingPage(this)); ++ setPage(Success, new SuccessPage(this)); + setPage(Fail, new FailPage(this)); + + setButton(QWizard::BackButton, new KPushButton(KStandardGuiItem::back(KStandardGuiItem::UseRTL))); +diff --git a/src/wizard/bluewizard.h b/src/wizard/bluewizard.h +index fcb2015..4685aca 100644 +--- a/src/wizard/bluewizard.h ++++ b/src/wizard/bluewizard.h +@@ -53,7 +53,7 @@ public: + + WizardAgent* agent() const; + +- enum {Discover, NoPairing, LegacyPairing, LegacyPairingDatabase, KeyboardPairing, SSPPairing, Fail, Connect}; ++ enum {Discover, NoPairing, LegacyPairing, LegacyPairingDatabase, KeyboardPairing, SSPPairing, Success, Fail, Connect}; + + public Q_SLOTS: + void restartWizard(); +diff --git a/src/wizard/pages/fail.cpp b/src/wizard/pages/fail.cpp +index f7c065e..e9f44ef 100644 +--- a/src/wizard/pages/fail.cpp ++++ b/src/wizard/pages/fail.cpp +@@ -37,6 +37,8 @@ FailPage::FailPage(BlueWizard* parent) : QWizardPage(parent) + , m_wizard(parent) + { + setupUi(this); ++ ++ failIcon->setPixmap(KIcon("task-reject").pixmap(48)); + } + + void FailPage::initializePage() +diff --git a/src/wizard/pages/fail.ui b/src/wizard/pages/fail.ui +index 0470e8f..375a4fb 100644 +--- a/src/wizard/pages/fail.ui ++++ b/src/wizard/pages/fail.ui +@@ -30,6 +30,16 @@ + + + ++ ++ ++ ++ 48 ++ 48 ++ ++ ++ ++ ++ + + + +diff --git a/src/wizard/pages/nopairing.cpp b/src/wizard/pages/nopairing.cpp +index 65be653..c169a49 100644 +--- a/src/wizard/pages/nopairing.cpp ++++ b/src/wizard/pages/nopairing.cpp +@@ -32,9 +32,10 @@ + + using namespace BlueDevil; + +-NoPairingPage::NoPairingPage(BlueWizard* parent) : QWizardPage(parent) +-, m_validPage(false) +-, m_wizard(parent) ++NoPairingPage::NoPairingPage(BlueWizard *parent) ++ : QWizardPage(parent) ++ , m_success(false) ++ , m_wizard(parent) + { + setupUi(this); + m_working = new KPixmapSequenceOverlayPainter(this); +@@ -42,6 +43,14 @@ NoPairingPage::NoPairingPage(BlueWizard* parent) : QWizardPage(parent) + m_working->start(); + } + ++int NoPairingPage::nextId() const ++{ ++ if (m_success) { ++ return BlueWizard::Success; ++ } ++ return BlueWizard::Fail; ++} ++ + void NoPairingPage::initializePage() + { + kDebug(); +@@ -49,10 +58,6 @@ void NoPairingPage::initializePage() + + connecting->setText(connecting->text().append(m_wizard->device()->name())); + +- //It can happen that the device is technically connected and trusted but we are not connected +- //to the profile. We have no way to know if the profile was activated or not so we have to relay +- //on a timeout (10s) +- QTimer::singleShot(10000, this, SLOT(timeout())); + connect(m_wizard->device(), SIGNAL(connectedChanged(bool)), SLOT(connectedChanged(bool))); + connect(m_wizard->device(), SIGNAL(trustedChanged(bool)), SLOT(connectedChanged(bool))); + +@@ -60,30 +65,14 @@ void NoPairingPage::initializePage() + m_wizard->device()->setTrusted(true); + } + +-void NoPairingPage::timeout() +-{ +- connectedChanged(true); +-} +- + void NoPairingPage::connectedChanged(bool connected) + { +- kDebug(); +- +- m_validPage = connected; +- if (m_validPage) { +- kDebug() << "Done"; +- m_wizard->done(0); +- } +-} +- +-bool NoPairingPage::validatePage() +-{ +- return m_validPage; +-} ++ kDebug() << "Connect finished" << connected; + +-int NoPairingPage::nextId() const +-{ +- return -1; ++ // Connect may fail but that doesn't really mean the device was setup incorrectly ++ // Device::connectDevice will fail eg. when A2DP profile could not be connected due to missing pulseaudio plugin ++ m_success = true; ++ QTimer::singleShot(500, m_wizard, SLOT(next())); + } + + QList NoPairingPage::wizardButtonsLayout() const +@@ -91,6 +80,5 @@ QList NoPairingPage::wizardButtonsLayout() const + QList list; + list << QWizard::Stretch; + list << QWizard::CancelButton; +- + return list; + } +diff --git a/src/wizard/pages/nopairing.h b/src/wizard/pages/nopairing.h +index 9b9f4bf..ca03fb8 100644 +--- a/src/wizard/pages/nopairing.h ++++ b/src/wizard/pages/nopairing.h +@@ -46,21 +46,19 @@ Q_OBJECT + public: + NoPairingPage(BlueWizard* parent = 0); + +- virtual void initializePage(); +- virtual bool validatePage(); + virtual int nextId() const; ++ virtual void initializePage(); + + protected: + QList wizardButtonsLayout() const; + + private Q_SLOTS: +- void timeout(); + void connectedChanged(bool connected); + + private: +- bool m_validPage; +- BlueWizard *m_wizard; ++ bool m_success; ++ BlueWizard *m_wizard; + KPixmapSequenceOverlayPainter *m_working; + }; + +-#endif // NOPAIRING_H +\ No newline at end of file ++#endif // NOPAIRING_H +diff --git a/src/wizard/pages/success.cpp b/src/wizard/pages/success.cpp +new file mode 100644 +index 0000000..44b70fa +--- /dev/null ++++ b/src/wizard/pages/success.cpp +@@ -0,0 +1,64 @@ ++/***************************************************************************** ++ * This file is part of the KDE project * ++ * * ++ * Copyright (C) 2010 Alejandro Fiestas Olivares * ++ * Copyright (C) 2010-2011 UFO Coders * ++ * Copyright (C) 2014 David Rosca * ++ * * ++ * This library is free software; you can redistribute it and/or * ++ * modify it under the terms of the GNU Library General Public * ++ * License as published by the Free Software Foundation; either * ++ * version 2 of the License, or (at your option) any later version. * ++ * * ++ * This library 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 * ++ * Library General Public License for more details. * ++ * * ++ * You should have received a copy of the GNU Library General Public License * ++ * along with this library; see the file COPYING.LIB. If not, write to * ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * ++ * Boston, MA 02110-1301, USA. * ++ *****************************************************************************/ ++ ++#include "success.h" ++#include "bluewizard.h" ++ ++#include ++#include ++ ++#include ++ ++SuccessPage::SuccessPage(BlueWizard *parent) ++ : QWizardPage(parent) ++ , m_wizard(parent) ++{ ++ setupUi(this); ++ ++ successIcon->setPixmap(KIcon("task-complete").pixmap(48)); ++} ++ ++void SuccessPage::initializePage() ++{ ++ kDebug() << "Initialize Success Page"; ++ ++ QList list; ++ list << QWizard::Stretch; ++ list << QWizard::FinishButton; ++ ++ m_wizard->setButtonLayout(list); ++ ++ setFinalPage(true); ++ ++ QString deviceName = m_wizard->device()->name(); ++ if (deviceName.isEmpty()) { ++ successLbl->setText(i18nc("This string is shown when the wizard succeeds", "The setup of the device has succeeded")); ++ } else { ++ successLbl->setText(i18n("The setup of %1 has succeeded", deviceName)); ++ } ++} ++ ++int SuccessPage::nextId() const ++{ ++ return -1; ++} +diff --git a/src/wizard/pages/success.h b/src/wizard/pages/success.h +new file mode 100644 +index 0000000..a41f73e +--- /dev/null ++++ b/src/wizard/pages/success.h +@@ -0,0 +1,46 @@ ++/***************************************************************************** ++ * This file is part of the KDE project * ++ * * ++ * Copyright (C) 2010 Alejandro Fiestas Olivares * ++ * Copyright (C) 2010-2011 UFO Coders * ++ * Copyright (C) 2014 David Rosca * ++ * * ++ * This library is free software; you can redistribute it and/or * ++ * modify it under the terms of the GNU Library General Public * ++ * License as published by the Free Software Foundation; either * ++ * version 2 of the License, or (at your option) any later version. * ++ * * ++ * This library 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 * ++ * Library General Public License for more details. * ++ * * ++ * You should have received a copy of the GNU Library General Public License * ++ * along with this library; see the file COPYING.LIB. If not, write to * ++ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * ++ * Boston, MA 02110-1301, USA. * ++ *****************************************************************************/ ++ ++#ifndef SUCCESS_H ++#define SUCCESS_H ++ ++#include "ui_success.h" ++#include ++ ++class BlueWizard; ++ ++class SuccessPage : public QWizardPage, Ui::Success ++{ ++ Q_OBJECT ++ ++public: ++ SuccessPage(BlueWizard *parent = 0); ++ ++ virtual void initializePage(); ++ virtual int nextId() const; ++ ++private: ++ BlueWizard *m_wizard; ++}; ++ ++#endif // SUCCESS_H +diff --git a/src/wizard/pages/success.ui b/src/wizard/pages/success.ui +new file mode 100644 +index 0000000..3630db3 +--- /dev/null ++++ b/src/wizard/pages/success.ui +@@ -0,0 +1,68 @@ ++ ++ ++ Success ++ ++ ++ ++ 0 ++ 0 ++ 400 ++ 300 ++ ++ ++ ++ ++ ++ ++ ++ ++ Qt::Horizontal ++ ++ ++ QSizePolicy::Fixed ++ ++ ++ ++ 10 ++ 20 ++ ++ ++ ++ ++ ++ ++ ++ ++ 48 ++ 48 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Qt::Vertical ++ ++ ++ ++ 20 ++ 40 ++ ++ ++ ++ ++ ++ ++ ++ ++ +-- +2.1.0 + diff --git a/SOURCES/0017-filereceiver-Fix-crash-when-sending-device-is-null.patch b/SOURCES/0017-filereceiver-Fix-crash-when-sending-device-is-null.patch new file mode 100644 index 0000000..bfc9b50 --- /dev/null +++ b/SOURCES/0017-filereceiver-Fix-crash-when-sending-device-is-null.patch @@ -0,0 +1,53 @@ +From a967936a34b2f17e002f9d69dae3e74b0ef20799 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Mon, 12 Jan 2015 14:19:42 +0100 +Subject: [PATCH 17/20] filereceiver: Fix crash when sending device is null + +BUG: 342581 +--- + src/daemon/kded/filereceiver/receivefilejob.cpp | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/src/daemon/kded/filereceiver/receivefilejob.cpp b/src/daemon/kded/filereceiver/receivefilejob.cpp +index daf6c57..1de755a 100644 +--- a/src/daemon/kded/filereceiver/receivefilejob.cpp ++++ b/src/daemon/kded/filereceiver/receivefilejob.cpp +@@ -85,20 +85,31 @@ void ReceiveFileJob::init() + SLOT(transferPropertiesChanged(QString,QVariantMap,QStringList))); + + m_session = new org::bluez::obex::Session1("org.bluez.obex", m_transfer->session().path(), QDBusConnection::sessionBus(), this); +- kDebug(dblue()) << m_session->destination(); + +- Device* device = Manager::self()->usableAdapter()->deviceForAddress(m_session->destination()); +- kDebug(dblue()) << device; ++ kDebug(dblue()) << "Source:" << m_session->source(); ++ kDebug(dblue()) << "Destination:" << m_session->destination(); ++ ++ Device *device = 0; ++ bool isDeviceTrusted = false; ++ ++ Q_FOREACH (Adapter *adapter, Manager::self()->adapters()) { ++ if (adapter->address() == m_session->source()) { ++ device = adapter->deviceForAddress(m_session->destination()); ++ break; ++ } ++ } + + m_deviceName = m_session->destination(); ++ + if (device) { + kDebug(dblue()) << device->name(); + m_deviceName = device->name(); ++ isDeviceTrusted = device->isTrusted(); + } + + FileReceiverSettings::self()->readConfig(); + kDebug(dblue()) << "Auto Accept: " << FileReceiverSettings::self()->autoAccept(); +- if (FileReceiverSettings::self()->autoAccept() == 1 && device->isTrusted()) { ++ if (FileReceiverSettings::self()->autoAccept() == 1 && isDeviceTrusted) { + slotAccept(); + return; + } else if (FileReceiverSettings::self()->autoAccept() == 2) { +-- +2.1.0 + diff --git a/SOURCES/0018-kio_obexftp-Fix-finished-called-twice-in-get.patch b/SOURCES/0018-kio_obexftp-Fix-finished-called-twice-in-get.patch new file mode 100644 index 0000000..345c1c6 --- /dev/null +++ b/SOURCES/0018-kio_obexftp-Fix-finished-called-twice-in-get.patch @@ -0,0 +1,52 @@ +From fae9b31c270adfe867365b1908dc9888fdb00fd1 Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Mon, 12 Jan 2015 15:04:40 +0100 +Subject: [PATCH 18/20] kio_obexftp: Fix finished() called twice in get() + +This fixes eg. loading images from obexftp in gwenview +--- + src/kio/obexftp/kio_obexftp.cpp | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/src/kio/obexftp/kio_obexftp.cpp b/src/kio/obexftp/kio_obexftp.cpp +index 0783662..82ce5cd 100644 +--- a/src/kio/obexftp/kio_obexftp.cpp ++++ b/src/kio/obexftp/kio_obexftp.cpp +@@ -195,6 +195,7 @@ void KioFtp::copy(const KUrl &src, const KUrl &dest, int permissions, KIO::JobFl + kDebug() << "copy: " << src.url() << " to " << dest.url(); + + copyHelper(src, dest); ++ finished(); + } + + void KioFtp::rename(const KUrl& src, const KUrl& dest, KIO::JobFlags flags) +@@ -342,8 +343,6 @@ void KioFtp::copyWithinObexftp(const KUrl &src, const KUrl &dest) + if (!copyFile(src.path(), dest.path())) { + return; + } +- +- finished(); + } + + void KioFtp::copyFromObexftp(const KUrl& src, const KUrl& dest) +@@ -362,8 +361,6 @@ void KioFtp::copyFromObexftp(const KUrl& src, const KUrl& dest) + + TransferFileJob *getFile = new TransferFileJob(dbusPath, this); + getFile->exec(); +- +- finished(); + } + + void KioFtp::copyToObexftp(const KUrl& src, const KUrl& dest) +@@ -382,8 +379,6 @@ void KioFtp::copyToObexftp(const KUrl& src, const KUrl& dest) + + TransferFileJob *putFile = new TransferFileJob(dbusPath, this); + putFile->exec(); +- +- finished(); + } + + void KioFtp::statHelper(const KUrl& url) +-- +2.1.0 + diff --git a/SOURCES/0021-daemon-Don-t-try-to-infinitely-kill-monolithic-when-.patch b/SOURCES/0021-daemon-Don-t-try-to-infinitely-kill-monolithic-when-.patch new file mode 100644 index 0000000..c106bf3 --- /dev/null +++ b/SOURCES/0021-daemon-Don-t-try-to-infinitely-kill-monolithic-when-.patch @@ -0,0 +1,30 @@ +From 9d732a65008b54b10ea57eb33ae3648cab1fb41d Mon Sep 17 00:00:00 2001 +From: David Rosca +Date: Sat, 7 Feb 2015 14:11:53 +0100 +Subject: [PATCH 21/21] daemon: Don't try to infinitely kill monolithic when it + fails + +Killing monolithic may fail for various reasons (eg. it may not +be running in the first place). Don't try to kill it again when it +fails. + +BUG: 343682 +--- + src/daemon/kded/BlueDevilDaemon.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/daemon/kded/BlueDevilDaemon.cpp b/src/daemon/kded/BlueDevilDaemon.cpp +index 12efc73..1a4c250 100644 +--- a/src/daemon/kded/BlueDevilDaemon.cpp ++++ b/src/daemon/kded/BlueDevilDaemon.cpp +@@ -375,7 +375,6 @@ void BlueDevilDaemon::monolithicQuit(QDBusPendingCallWatcher* watcher) + QDBusPendingReply reply = *watcher; + if (reply.isError()) { + qDebug() << "Error response: " << reply.error().message(); +- killMonolithic(); + } + } + +-- +2.1.0 + diff --git a/SPECS/bluedevil.spec b/SPECS/bluedevil.spec index 8269aec..909474b 100644 --- a/SPECS/bluedevil.spec +++ b/SPECS/bluedevil.spec @@ -1,55 +1,59 @@ Name: bluedevil Summary: Bluetooth stack for KDE -Version: 1.3 -Release: 4%{?dist} +Version: 2.1 +Release: 1%{?dist} License: GPLv2+ URL: https://projects.kde.org/projects/extragear/base/bluedevil -Source0: http://download.kde.org/%{?pre:un}stable/bluedevil/%{version}%{?pre:-%{pre}}/src/bluedevil-%{version}%{?pre:-%{pre}}.tar.bz2 +%if 0%{?snap:1} +Source0: bluedevil-%{version}-%{git_short}.tar.xz +%else +Source0: http://download.kde.org/%{?pre:un}stable/bluedevil/%{version}%{?pre:-%{pre}}/src/bluedevil-%{version}%{?pre:-%{pre}}.tar.xz +%endif # support (or not) same arch's that obexd does ExcludeArch: s390 s390x ## upstream patches +Patch2: 0002-KCM-SystemCheck-Add-NoUsableAdapter-error.patch +Patch4: 0004-obexftpdaemon-session-method-now-takes-target-parame.patch +Patch5: 0005-kio_obexftp-Prefer-pcsuite-target-for-S60-devices.patch +Patch7: 0007-wizard-Add-Success-page.patch +Patch17: 0017-filereceiver-Fix-crash-when-sending-device-is-null.patch +Patch18: 0018-kio_obexftp-Fix-finished-called-twice-in-get.patch +Patch21: 0021-daemon-Don-t-try-to-infinitely-kill-monolithic-when-.patch -BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: kdelibs4-devel -BuildRequires: libbluedevil-devel +BuildRequires: libbluedevil-devel >= %{version} Provides: dbus-bluez-pin-helper Obsoletes: kbluetooth < 0.4.2-3 +Obsoletes: bluedevil-devel < 2.0.0-0.10 -# not sure if just kdelibs is enough -- Rex -Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}} - -## Runtime requirements for file transfers, as per README: -Requires: obex-data-server -# This package contains the obexd client only, which is all we want: -Requires: obexd -# (The obexd server conflicts with obex-data-server and is disabled in Fedora.) - +Requires: kde-runtime +Requires: libbluedevil%{?_isa} >= %{version} Requires: pulseaudio-module-bluetooth %description BlueDevil is the bluetooth stack for KDE. -%package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -%description devel +%package autostart +Summary: Autostart support for non-KDE desktops +Requires: %{name} = %{version}-%{release} +%description autostart %{summary}. %prep -%setup -q -n %{name}-%{version}%{?pre:-%{pre}} +%autosetup -n %{name}-%{version}%{?pre:-%{pre}} -p1 %build -mkdir -p %{_target_platform} +mkdir %{_target_platform} pushd %{_target_platform} %{cmake_kde4} .. popd @@ -62,55 +66,66 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %find_lang %{name} --with-kde +desktop-file-install \ + --dir=%{buildroot}%{_sysconfdir}/xdg/autostart/ \ + --add-not-show-in=KDE \ + %{buildroot}%{_kde4_datadir}/applications/kde4/bluedevil-monolithic.desktop + %check -# FIXME: .desktop files need some mime/Categories love to validate properly -- Rex -for desktop_file in %{buildroot}%{_kde4_datadir}/applications/kde4/*.desktop ; do -desktop-file-validate ${desktop_file} ||: -done +desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/bluedevil-monolithic.desktop +desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/bluedevil-sendfile.desktop +desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/bluedevil-wizard.desktop +%post +touch --no-create %{_kde4_datadir}/mime/packages &> /dev/null || : %postun if [ $1 -eq 0 ] ; then update-desktop-database -q &> /dev/null - update-mime-database %{_kde4_datadir}/mime &> /dev/null + touch --no-create %{_kde4_datadir}/mime/packages &> /dev/null || : + update-mime-database %{?fedora:-n} %{_kde4_datadir}/mime &> /dev/null || : fi %posttrans update-desktop-database -q &> /dev/null -update-mime-database %{_kde4_datadir}/mime >& /dev/null +update-mime-database %{_kde4_datadir}/mime &> /dev/null || : %files -f %{name}.lang %doc README %{_kde4_appsdir}/bluedevil/ %{_kde4_appsdir}/bluedevilwizard/ -%{_kde4_bindir}/bluedevil-audio -%{_kde4_bindir}/bluedevil-helper -%{_kde4_bindir}/bluedevil-input + %{_kde4_bindir}/bluedevil-monolithic -%{_kde4_bindir}/bluedevil-network-dun -%{_kde4_bindir}/bluedevil-network-panu %{_kde4_bindir}/bluedevil-sendfile %{_kde4_bindir}/bluedevil-wizard -%{_kde4_datadir}/applications/kde4/*.desktop -%{_datadir}/dbus-1/services/*.service -%{_kde4_datadir}/kde4/services/* -%{_kde4_datadir}/kde4/servicetypes/actionplugin.desktop +%{_kde4_datadir}/applications/kde4/bluedevil-monolithic.desktop +%{_kde4_datadir}/applications/kde4/bluedevil-sendfile.desktop +%{_kde4_datadir}/applications/kde4/bluedevil-wizard.desktop +%{_kde4_datadir}/kde4/services/bluedevil*.desktop +%{_kde4_datadir}/kde4/services/*.protocol +%{_kde4_datadir}/kde4/services/kded/*.desktop %{_kde4_datadir}/mime/packages/bluedevil-mime.xml -%{_kde4_libdir}/kde4/* -%{_kde4_libdir}/libbluedevilaction.so +%{_kde4_libdir}/kde4/*.so %{_kde4_libexecdir}/bluedevil-authorize %{_kde4_libexecdir}/bluedevil-confirmmodechange %{_kde4_libexecdir}/bluedevil-requestconfirmation %{_kde4_libexecdir}/bluedevil-requestpin -%files devel -%doc HACKING -%{_includedir}/actionplugin.h +%files autostart +%{_sysconfdir}/xdg/autostart/bluedevil-monolithic.desktop %changelog +* Mon May 25 2015 Jan Grulich 2-1-1 +- Re-base to 2.1 (sync with F21) + +* Fri May 08 2015 Ray Strode 1.3-5 +- Rebuild against bluez5. This won't work, but will + at least prevent broken dependencies + Related: #1174545 1219504 + * Fri Dec 27 2013 Daniel Mach - 1.3-4 - Mass rebuild 2013-12-27