[neon/kf6/kf6-kauth/Neon/unstable] debian: add heiko's coinstall patch

Carlos De Maine null at kde.org
Wed Aug 30 09:08:52 BST 2023


Git commit 7b9afb489f03eaeb640b084019e8ca02d89d677f by Carlos De Maine.
Committed on 30/08/2023 at 10:08.
Pushed by carlosdem into branch 'Neon/unstable'.

add heiko's coinstall patch

M  +1    -1    debian/kf6-kauth.install
A  +309  -0    debian/patches/kf6_coinstall
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/kf6/kf6-kauth/-/commit/7b9afb489f03eaeb640b084019e8ca02d89d677f

diff --git a/debian/kf6-kauth.install b/debian/kf6-kauth.install
index f0aab8c..f7a28dc 100644
--- a/debian/kf6-kauth.install
+++ b/debian/kf6-kauth.install
@@ -1,6 +1,6 @@
 usr/lib/*/libKF6AuthCore.so.5.*
 usr/lib/*/libKF6AuthCore.so.6
-usr/lib/*/qt6/plugins/kf6/kauth/*
+usr/lib/*/qt6/plugins/kf6/kauth/
 usr/share/dbus-1/system.d/
 usr/share/kf6/kauth/
 usr/share/locale/
diff --git a/debian/patches/kf6_coinstall b/debian/patches/kf6_coinstall
new file mode 100644
index 0000000..7b5aeba
--- /dev/null
+++ b/debian/patches/kf6_coinstall
@@ -0,0 +1,309 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d72fe5b8ed62fe965953b79d2449798f7da2868..719fd8df6cf0095517548286f182eae8524e7530 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,7 +48,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KAUTH
+ 
+ find_package(KF6CoreAddons ${KF_DEP_VERSION} REQUIRED)
+ 
+-set(KAUTH_HELPER_INSTALL_DIR "${KDE_INSTALL_LIBEXECDIR}/kauth")
++set(KAUTH_HELPER_INSTALL_DIR "${KDE_INSTALL_LIBEXECDIR_KF}/kauth")
+ 
+ if(IS_ABSOLUTE ${KAUTH_HELPER_INSTALL_DIR})
+     set(KAUTH_HELPER_INSTALL_ABSOLUTE_DIR ${KAUTH_HELPER_INSTALL_DIR})
+diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
+index d96c511917c945d70a829711ebd30809ce9b46b0..01271d9c9858c31294796b885f4f8e4c3153b834 100644
+--- a/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
+@@ -7,7 +7,7 @@ if(NOT TARGET Qt6::Test)
+ endif()
+ 
+ qt_add_dbus_adaptor(kauth_dbus_adaptor_tests_SRCS
+-                     ../src/backends/dbus/org.kde.kf5auth.xml
++                     ../src/backends/dbus/org.kde.kf6auth.xml
+                      ../src/backends/dbus/DBusHelperProxy.h
+                      KAuth::DBusHelperProxy)
+ 
+diff --git a/autotests/HelperTest.cpp b/autotests/HelperTest.cpp
+index 99a7b46304ba4a5bcb10c513b0c067c1cfee0c42..5a340beb1354fbf6bde431528ad5186af431f319 100644
+--- a/autotests/HelperTest.cpp
++++ b/autotests/HelperTest.cpp
+@@ -106,7 +106,7 @@ void HelperHandler::init()
+     // The timer is here just to prevent the app from crashing.
+     QTimer *timer = new QTimer(nullptr);
+ 
+-    QVERIFY(m_helperProxy->initHelper(QLatin1String("org.kde.kf5auth.autotest")));
++    QVERIFY(m_helperProxy->initHelper(QLatin1String("org.kde.kf6auth.autotest")));
+ 
+     m_helperProxy->setHelperResponder(m_helper);
+ 
+@@ -142,8 +142,8 @@ void HelperTest::testBasicActionExecution()
+ {
+     Q_EMIT changeCapabilities(KAuth::AuthBackend::AuthorizeFromHelperCapability);
+ 
+-    KAuth::Action action(QLatin1String("org.kde.kf5auth.autotest.standardaction"));
+-    action.setHelperId(QLatin1String("org.kde.kf5auth.autotest"));
++    KAuth::Action action(QLatin1String("org.kde.kf6auth.autotest.standardaction"));
++    action.setHelperId(QLatin1String("org.kde.kf6auth.autotest"));
+     QVERIFY(action.isValid());
+ 
+     QCOMPARE(action.status(), KAuth::Action::AuthRequiredStatus);
+@@ -157,8 +157,8 @@ void HelperTest::testBasicActionExecution()
+ 
+ void HelperTest::testExecuteJobSignals()
+ {
+-    KAuth::Action action(QLatin1String("org.kde.kf5auth.autotest.longaction"));
+-    action.setHelperId(QLatin1String("org.kde.kf5auth.autotest"));
++    KAuth::Action action(QLatin1String("org.kde.kf6auth.autotest.longaction"));
++    action.setHelperId(QLatin1String("org.kde.kf6auth.autotest"));
+     QVERIFY(action.isValid());
+ 
+     QCOMPARE(action.status(), KAuth::Action::AuthRequiredStatus);
+@@ -190,8 +190,8 @@ void HelperTest::testExecuteJobSignals()
+ 
+ void HelperTest::testTwoCalls()
+ {
+-    KAuth::Action action(QLatin1String("org.kde.kf5auth.autotest.standardaction"));
+-    action.setHelperId(QLatin1String("org.kde.kf5auth.autotest"));
++    KAuth::Action action(QLatin1String("org.kde.kf6auth.autotest.standardaction"));
++    action.setHelperId(QLatin1String("org.kde.kf6auth.autotest"));
+     QVERIFY(action.isValid());
+ 
+     QCOMPARE(action.status(), KAuth::Action::AuthRequiredStatus);
+@@ -204,8 +204,8 @@ void HelperTest::testTwoCalls()
+ 
+ void HelperTest::testActionData()
+ {
+-    KAuth::Action action(QLatin1String("org.kde.kf5auth.autotest.echoaction"));
+-    action.setHelperId(QLatin1String("org.kde.kf5auth.autotest"));
++    KAuth::Action action(QLatin1String("org.kde.kf6auth.autotest.echoaction"));
++    action.setHelperId(QLatin1String("org.kde.kf6auth.autotest"));
+ 
+     QVariantMap args;
+     // Fill with random data (and test heavy structures while we're at it)
+@@ -228,8 +228,8 @@ void HelperTest::testActionData()
+ 
+ void HelperTest::testHelperFailure()
+ {
+-    KAuth::Action action(QLatin1String("org.kde.kf5auth.autotest.failingaction"));
+-    action.setHelperId(QLatin1String("org.kde.kf5auth.autotest"));
++    KAuth::Action action(QLatin1String("org.kde.kf6auth.autotest.failingaction"));
++    action.setHelperId(QLatin1String("org.kde.kf6auth.autotest"));
+     QVERIFY(action.isValid());
+     QCOMPARE(action.status(), KAuth::Action::AuthRequiredStatus);
+     KAuth::ExecuteJob *job = action.execute();
+diff --git a/autotests/TestBackend.cpp b/autotests/TestBackend.cpp
+index b438eb399646f211a0b9f161806cb064b9a8ccdd..0bf835af28e53bc177e4987e60d28d1fdf50ff59 100644
+--- a/autotests/TestBackend.cpp
++++ b/autotests/TestBackend.cpp
+@@ -40,7 +40,7 @@ void TestBackend::setupAction(const QString &action)
+         m_actionStatuses.insert(action, Action::AuthRequiredStatus);
+     } else if (action == QLatin1String("always.authorized")) {
+         m_actionStatuses.insert(action, Action::AuthorizedStatus);
+-    } else if (action.startsWith(QLatin1String("org.kde.kf5auth.autotest"))) {
++    } else if (action.startsWith(QLatin1String("org.kde.kf6auth.autotest"))) {
+         m_actionStatuses.insert(action, Action::AuthRequiredStatus);
+     }
+ }
+@@ -75,7 +75,7 @@ bool TestBackend::isCallerAuthorized(const QString &action, const QByteArray &ca
+         return false;
+     } else if (action == QLatin1String("always.authorized")) {
+         return true;
+-    } else if (action.startsWith(QLatin1String("org.kde.kf5auth.autotest"))) {
++    } else if (action.startsWith(QLatin1String("org.kde.kf6auth.autotest"))) {
+         qDebug() << "Caller ID:" << callerId;
+         if (callerId == callerID()) {
+             m_actionStatuses.insert(action, Action::AuthorizedStatus);
+diff --git a/examples/client.cpp b/examples/client.cpp
+index 1db51855118eac129e89357f772fa8b40654e36d..49f5a6c33c307e643978cb732abfb713ed8e5b3b 100644
+--- a/examples/client.cpp
++++ b/examples/client.cpp
+@@ -23,8 +23,8 @@ int main(int argc, char **argv)
+     //! [client_how_to_call_helper]
+     QVariantMap args;
+     args["filename"] = filename;
+-    Action readAction("org.kde.kf5auth.example.read");
+-    readAction.setHelperId("org.kde.kf5auth.example");
++    Action readAction("org.kde.kf6auth.example.read");
++    readAction.setHelperId("org.kde.kf6auth.example");
+     readAction.setArguments(args);
+     ExecuteJob *job = readAction.execute();
+     if (!job->exec()) {
+diff --git a/examples/helper.cpp b/examples/helper.cpp
+index 7689b26fdf4badd9b4841e44ac51aecf01fbe3ec..fd159867824c0b42a52e89a5290cad6fa7833f6d 100644
+--- a/examples/helper.cpp
++++ b/examples/helper.cpp
+@@ -66,7 +66,7 @@ ActionReply MyHelper::longaction(const QVariantMap &)
+ //! [helper_longaction]
+ 
+ //! [helper_main]
+-KAUTH_HELPER_MAIN("org.kde.kf5auth.example", MyHelper)
++KAUTH_HELPER_MAIN("org.kde.kf6auth.example", MyHelper)
+ //! [helper_main]
+ 
+ #include "helper.moc"
+diff --git a/src/AuthBackend.h b/src/AuthBackend.h
+index 4e41a121b0bd9a6ffbc9106a2278516102421aec..e38df96eb5e5aa50fa22386c04fdbc7c20a87313 100644
+--- a/src/AuthBackend.h
++++ b/src/AuthBackend.h
+@@ -64,6 +64,6 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(AuthBackend::Capabilities)
+ 
+ } // namespace Auth
+ 
+-Q_DECLARE_INTERFACE(KAuth::AuthBackend, "org.kde.kf5auth.AuthBackend/0.1")
++Q_DECLARE_INTERFACE(KAuth::AuthBackend, "org.kde.kf6auth.AuthBackend/0.1")
+ 
+ #endif
+diff --git a/src/ConfigureChecks.cmake b/src/ConfigureChecks.cmake
+index bd6b63cb69829400651181ab9905bd5ad832922e..52738da38fc1dce746f1c92daf206b511cac0875 100644
+--- a/src/ConfigureChecks.cmake
++++ b/src/ConfigureChecks.cmake
+@@ -154,7 +154,7 @@ set(KAUTH_HELPER_BACKEND_NAME ${KAUTH_HELPER_BACKEND} CACHE STRING "Specifies th
+ # Add the correct libraries/files depending on the backend
+ if(KAUTH_HELPER_BACKEND_NAME STREQUAL "DBUS")
+     qt_add_dbus_adaptor(kauth_dbus_adaptor_SRCS
+-                        backends/dbus/org.kde.kf5auth.xml
++                        backends/dbus/org.kde.kf6auth.xml
+                         backends/dbus/DBusHelperProxy.h
+                         KAuth::DBusHelperProxy)
+ 
+@@ -166,7 +166,7 @@ if(KAUTH_HELPER_BACKEND_NAME STREQUAL "DBUS")
+     set(KAUTH_HELPER_BACKEND_LIBS Qt6::DBus KF6::AuthCore)
+ 
+     # Install some files as well
+-    install(FILES backends/dbus/org.kde.kf5auth.conf
++    install(FILES backends/dbus/org.kde.kf6auth.conf
+              DESTINATION ${KDE_INSTALL_DBUSDIR}/system.d)
+ 
+     install(FILES backends/dbus/dbus_policy.stub
+diff --git a/src/HelperProxy.h b/src/HelperProxy.h
+index 1b1969bc9ca4ca031416df842ac3b48251a2f32e..3874c8dcec001bf08dbf713e80b31237a6f8a0f2 100644
+--- a/src/HelperProxy.h
++++ b/src/HelperProxy.h
+@@ -50,6 +50,6 @@ Q_SIGNALS:
+ 
+ } // namespace KAuth
+ 
+-Q_DECLARE_INTERFACE(KAuth::HelperProxy, "org.kde.kf5auth.HelperProxy/0.1")
++Q_DECLARE_INTERFACE(KAuth::HelperProxy, "org.kde.kf6auth.HelperProxy/0.1")
+ 
+ #endif
+diff --git a/src/actionreply.h b/src/actionreply.h
+index 17bcfe3df07a0531054156c9812a87ed44eb811f..6e2d4820a1b6262dc2e29e32a8f7074fe164a0ac 100644
+--- a/src/actionreply.h
++++ b/src/actionreply.h
+@@ -126,9 +126,9 @@
+ 
+  The slot names are the last part of the action name, without the helper's ID if
+  it's a prefix, with all the dots replaced by underscores. In this case, the
+- helper ID is "org.kde.kf5auth.example", so those three slots implement the
+- actions "org.kde.kf5auth.example.read", "org.kde.kf5auth.example.write" and
+- "org.kde.kf5auth.example.longaction". The helper ID doesn't have to appear at
++ helper ID is "org.kde.kf6auth.example", so those three slots implement the
++ actions "org.kde.kf6auth.example.read", "org.kde.kf6auth.example.write" and
++ "org.kde.kf6auth.example.longaction". The helper ID doesn't have to appear at
+  the beginning of the action name, but it's good practice. If you want to extend
+  MyHelper to implement also a different action like
+  "org.kde.datetime.changetime", since the helper ID doesn't match you'll have to
+@@ -203,7 +203,7 @@
+  definition for the read action is:
+ 
+  @verbatim
+- [org.kde.kf5auth.example.read]
++ [org.kde.kf6auth.example.read]
+  Name=Read action
+  Description=Read action description
+  Policy=auth_admin
+@@ -262,7 +262,7 @@
+  @section kauth_async Asynchronous calls, data reporting, and action termination
+ 
+  For a more advanced example, we look at the action
+- "org.kde.kf5auth.example.longaction" in the example helper. This is an action
++ "org.kde.kf6auth.example.longaction" in the example helper. This is an action
+  that takes a long time to execute, so we need some features:
+  - The helper needs to regularly send data to the application, to inform about
+    the execution status.
+diff --git a/src/backends/dbus/DBusHelperProxy.cpp b/src/backends/dbus/DBusHelperProxy.cpp
+index 681f522bac03c4b070e7357fdab6624416da4bbd..12a12b2f8642499e2b17895443d1f14adef5bdec 100644
+--- a/src/backends/dbus/DBusHelperProxy.cpp
++++ b/src/backends/dbus/DBusHelperProxy.cpp
+@@ -9,7 +9,7 @@
+ #include "DBusHelperProxy.h"
+ #include "BackendsManager.h"
+ #include "kauthdebug.h"
+-#include "kf5authadaptor.h"
++#include "kf6authadaptor.h"
+ 
+ #include <QDBusConnectionInterface>
+ #include <QDBusMessage>
+@@ -46,7 +46,7 @@ DBusHelperProxy::~DBusHelperProxy()
+ void DBusHelperProxy::stopAction(const QString &action, const QString &helperID)
+ {
+     QDBusMessage message;
+-    message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf5auth"), QLatin1String("stopAction"));
++    message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf6auth"), QLatin1String("stopAction"));
+ 
+     QList<QVariant> args;
+     args << action;
+@@ -74,7 +74,7 @@ void DBusHelperProxy::executeAction(const QString &action, const QString &helper
+ 
+     const bool connected = m_busConnection.connect(helperID,
+                                                    QLatin1String("/"),
+-                                                   QLatin1String("org.kde.kf5auth"),
++                                                   QLatin1String("org.kde.kf6auth"),
+                                                    QLatin1String("remoteSignal"),
+                                                    this,
+                                                    SLOT(remoteSignalReceived(int, QString, QByteArray)));
+@@ -89,7 +89,7 @@ void DBusHelperProxy::executeAction(const QString &action, const QString &helper
+     }
+ 
+     QDBusMessage message;
+-    message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf5auth"), QLatin1String("performAction"));
++    message = QDBusMessage::createMethodCall(helperID, QLatin1String("/"), QLatin1String("org.kde.kf6auth"), QLatin1String("performAction"));
+ 
+     QList<QVariant> args;
+     args << action << BackendsManager::authBackend()->callerID() << BackendsManager::authBackend()->backendDetails(details) << blob;
+@@ -129,7 +129,7 @@ void DBusHelperProxy::executeAction(const QString &action, const QString &helper
+ 
+ bool DBusHelperProxy::initHelper(const QString &name)
+ {
+-    new Kf5authAdaptor(this);
++    new Kf6authAdaptor(this);
+ 
+     if (!m_busConnection.registerService(name)) {
+         qCWarning(KAUTH) << "Error registering helper DBus service" << name << m_busConnection.lastError().message();
+diff --git a/src/backends/dbus/org.kde.kf5auth.conf b/src/backends/dbus/org.kde.kf6auth.conf
+similarity index 67%
+rename from src/backends/dbus/org.kde.kf5auth.conf
+rename to src/backends/dbus/org.kde.kf6auth.conf
+index 5aea1cdd44d8b19f05b7efc93f66f27a48d739c7..7f12f0d72e3fef3d05dd070286116446bf3b86ed 100644
+--- a/src/backends/dbus/org.kde.kf5auth.conf
++++ b/src/backends/dbus/org.kde.kf6auth.conf
+@@ -5,9 +5,9 @@
+  
+ <!-- Allow anyone to call into the service - we'll reject callers using Polkit -->
+   <policy context="default">
+-    <allow send_interface="org.kde.kf5auth"/>
+-    <allow receive_sender="org.kde.kf5auth"/>
+-    <allow receive_interface="org.kde.kf5auth"/>
++    <allow send_interface="org.kde.kf6auth"/>
++    <allow receive_sender="org.kde.kf6auth"/>
++    <allow receive_interface="org.kde.kf6auth"/>
+   </policy>
+  
+ </busconfig>
+diff --git a/src/backends/dbus/org.kde.kf5auth.xml b/src/backends/dbus/org.kde.kf6auth.xml
+similarity index 96%
+rename from src/backends/dbus/org.kde.kf5auth.xml
+rename to src/backends/dbus/org.kde.kf6auth.xml
+index 34207730181602bfe41bad18828713d18a9e38ea..2194acf9b61bf660d50098e1e59983f66fc46818 100644
+--- a/src/backends/dbus/org.kde.kf5auth.xml
++++ b/src/backends/dbus/org.kde.kf6auth.xml
+@@ -1,6 +1,6 @@
+ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+ <node>
+-    <interface name="org.kde.kf5auth">
++    <interface name="org.kde.kf6auth">
+         <method name="performAction" >
+             <arg name="action" type="s" direction="in" />
+             <arg name="callerID" type="ay" direction="in" />
diff --git a/debian/patches/series b/debian/patches/series
index 5e1ff39..054b8cd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 make_kauth-gen-policy_useful_for_crosscompiling.path
+kf6_coinstall
\ No newline at end of file


More information about the Neon-commits mailing list