Review Request 126086: [OS X] backend ported from KDE4

René J.V. Bertin rjvbertin at gmail.com
Tue Dec 20 14:28:42 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126086/
-----------------------------------------------------------

(Updated Dec. 20, 2016, 3:28 p.m.)


Review request for KDE Software on Mac OS X, KDE Frameworks and Valentin Rusu.


Changes
-------

rebased for 5.29.0+


Repository: kauth


Description
-------

This revision adds a port of the OS X backend improvements I implemented for KDE4 2 years ago, plus a few additional changes (some just to spark some debate).

kauth-policy-gen still should not be built as an app bundle on OS X.
This can be achieved by using `ecm_mark_nongui-executable`; there appear to be no contra-indications on other platforms.


Diffs (updated)
-----

  cmake/KF5AuthMacros.cmake 15f05c7 
  src/CMakeLists.txt 1b6930d 
  src/backends/dbus/DBusHelperProxy.cpp decc267 
  src/backends/mac/AuthServicesBackend.h 8f51eba 
  src/backends/mac/AuthServicesBackend.cpp e832bfe 
  src/backends/mac/kauth-policy-gen-mac.cpp b51d217 
  src/kauthhelpersupport.cpp 318d3a0 

Diff: https://git.reviewboard.kde.org/r/126086/diff/


Testing
-------

On OS X 10.9 with Qt 5.6.1 and Frameworks 5.24.0

There is an issue with one of the autotests:

```
build/autotests/KAuthHelperTest -vb -v1
********* Start testing of HelperTest *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 6.0 (clang-600.0.57) (Apple))
INFO   : HelperTest::initTestCase() entering
QDEBUG : HelperTest::initTestCase() Test backend loaded
QDEBUG : HelperTest::initTestCase() Waiting for HelperHandler to be initialized
QDEBUG : HelperTest::initTestCase() Initializing helper handler
QDEBUG : HelperTest::initTestCase() Adding proxy for thread QThread(0x7fab38e11e50)
PASS   : HelperTest::initTestCase()
INFO   : HelperTest::testBasicActionExecution() entering
QDEBUG : HelperTest::testBasicActionExecution() Capabilities changing
QDEBUG : HelperTest::testBasicActionExecution() Checking if action  "org.kde.kf5auth.autotest.standardaction" exists
QDEBUG : HelperTest::testBasicActionExecution() Caller ID: "a random caller Id"
QDEBUG : HelperTest::testBasicActionExecution() Standard action running
PASS   : HelperTest::testBasicActionExecution()
INFO   : HelperTest::testExecuteJobSignals() entering
QDEBUG : HelperTest::testExecuteJobSignals() Checking if action  "org.kde.kf5auth.autotest.longaction" exists
QDEBUG : HelperTest::testExecuteJobSignals() Caller ID: "a random caller Id"
QDEBUG : HelperTest::testExecuteJobSignals() Long action running. Don't be scared, this action takes 2 seconds to complete
PASS   : HelperTest::testExecuteJobSignals()
INFO   : HelperTest::testActionData() entering
QDEBUG : HelperTest::testActionData() Checking if action  "org.kde.kf5auth.autotest.echoaction" exists
QDEBUG : HelperTest::testActionData() Caller ID: "a random caller Id"
QDEBUG : HelperTest::testActionData() Echo action running
QWARN  : HelperTest::testActionData() QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
^CQFATAL : HelperTest::testActionData() Received signal 2
         Function time: 3563ms Total time: 5657ms
FAIL!  : HelperTest::testActionData() Received a fatal error.
   Loc: [Unknown file(0)]
Totals: 3 passed, 1 failed, 0 skipped, 0 blacklisted
********* Finished testing of HelperTest *********
```
I don't know if this is a structural error or if it's just the test that should be rewritten or skipped on OS X.

Also, I've noticed that applications like ksysguard5 that rely on a helper will authorise correctly in the main app, and then post an error:

```
DBus Backend error: connection to helper failed: "Not connected to D-Bus server"
```

Does this mean those applications are not written to comply with platforms where authorisation takes place in the host, or in a helper process they activate in a different way via DBus?


Thanks,

René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161220/da0ecb06/attachment.html>


More information about the Kde-frameworks-devel mailing list