<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>382459</bug_id>
          
          <creation_ts>2017-07-18 08:59:22 +0000</creation_ts>
          <short_desc>Exec line in kiod service file must not have any path prefix on Windows</short_desc>
          <delta_ts>2018-01-07 18:16:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kio</product>
          <component>general</component>
          <version>5.36.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>380136</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter name="Ralf Habacker">ralf.habacker</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>christophe</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>simonandric5</cc>
          
          <cf_commitlink>https://commits.kde.org/kio/105cdd8fb3c433588f799c901dd32ceb99b2cf11</cf_commitlink>
          <cf_versionfixedin>5.43.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1689496</commentid>
    <comment_count>0</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-07-18 08:59:22 +0000</bug_when>
    <thetext>The Exec line in kio/src/kiod/org.kde.kiod5.service.in
[D-BUS Service]
Name=org.kde.kiod5
Exec=@KDE_INSTALL_FULL_LIBEXECDIR@/kf5/kiod5

will not work on Windows (see bug 382458 for details)

Instead the prefix in the Exec line needs to be completly removed on windows e.g.

Exec=@SOME_PREFIX@kiod5

Also on Windows kiod5 need to be installed in bindir</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690023</commentid>
    <comment_count>1</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2017-07-21 06:43:06 +0000</bug_when>
    <thetext>I don&apos;t think these are different issues. This probably has to be fixed somewhere in ECM  (same thing for bug 382460)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690024</commentid>
    <comment_count>2</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-07-21 07:23:36 +0000</bug_when>
    <thetext>(In reply to Christophe Giboudeaux from comment #1)
&gt; I don&apos;t think these are different issues. This probably has to be fixed
&gt; somewhere in ECM  (same thing for bug 382460)

In kio the Exec line needs to be changed to something like

Exec=@NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_PATH@kiod5

ECM is responsible to setup these variable according to related platform e.g.

if(WIN32)
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_PATH)
else()
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_PATH ${KDE_INSTALL_FULL_LIBEXECDIR}/kf5/)
endif()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690028</commentid>
    <comment_count>3</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-07-21 08:34:45 +0000</bug_when>
    <thetext>https://cgit.kde.org/extra-cmake-modules.git/tree/kde-modules/KDEInstallDirs.cmake#n31 states

# ``LIBEXECDIR``
#     executables for internal use by programs and libraries (``BINDIR`` on
#     Windows, ``LIBDIR/libexec`` otherwise) [``LIBEXEC_INSTALL_DIR``]

and at https://cgit.kde.org/extra-cmake-modules.git/tree/kde-modules/KDEInstallDirs.cmake#n440 there is defined LIBEXECDIR_KF5 

which indicates that the ECM part has been done and that LIBEXECDIR_KF5 need to be used inside kio.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690030</commentid>
    <comment_count>4</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-07-21 08:53:06 +0000</bug_when>
    <thetext>(In reply to Ralf Habacker from comment #3)
&gt; https://cgit.kde.org/extra-cmake-modules.git/tree/kde-modules/KDEInstallDirs.
&gt; cmake#n440 there is used

_define_non_cache(LIBEXECDIR_KF5 &quot;${CMAKE_INSTALL_LIBEXECDIR}/kf5&quot;)

which is defined at https://cgit.kde.org/extra-cmake-modules.git/tree/kde-modules/KDEInstallDirs.cmake#n387 which indicates that for kf5 libexec also KDE_INSTALL_FULL_LIBEXECDIR_KF5 could be used on non windows. On windows this variable could not be used because it would have a non empty prefix; instead an empty string or KDE_INSTALL_LIBEXECDIR_KF5 (which should also be empty) should work

The conclusion is that in the services something like the following should be used

Exec=@NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_PATH@kiod5

and in the top level CMakeLists.txt something like 

if(WIN32)
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_KF5_PATH )
else()
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC__KF5_PATH ${KDE_INSTALL_FULL_LIBEXECDIR_KF5})
endif()

or

if(WIN32)
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC_KF5_PATH ${KDE_INSTALL_LIBEXECDIR_KF5})
else()
    set(NEW_VARIABLE_FOR CROSS_PLATTFORM_LIBEXEC__KF5_PATH ${KDE_INSTALL_FULL_LIBEXECDIR_KF5})
endif()




Exec=@SOME_PREFIX@kiod5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690129</commentid>
    <comment_count>5</comment_count>
    <who name="Christophe Marin">christophe</who>
    <bug_when>2017-07-21 21:26:40 +0000</bug_when>
    <thetext>@something@somedir without any separator is not intuitive. I&apos;d really prefer having something to replace the configure_file macro instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690375</commentid>
    <comment_count>6</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-07-23 12:47:22 +0000</bug_when>
    <thetext>(In reply to Christophe Giboudeaux from comment #5)
&gt; @something@somedir without any separator is not intuitive. I&apos;d really prefer
&gt; having something to replace the configure_file macro instead.

You are thinking about something like https://build.opensuse.org/package/view_file/home:rhabacker:branches:windows:mingw:win32:KF536/mingw32-kwallet/0002-Win32-fix-for-installing-kwalletd-dbus-service.patch?expand=1 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1717687</commentid>
    <comment_count>7</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2017-12-20 09:53:31 +0000</bug_when>
    <thetext>review request https://phabricator.kde.org/D9383</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1720678</commentid>
    <comment_count>8</comment_count>
    <who name="Ralf Habacker">ralf.habacker</who>
    <bug_when>2018-01-07 18:16:17 +0000</bug_when>
    <thetext>Git commit 105cdd8fb3c433588f799c901dd32ceb99b2cf11 by Ralf Habacker.
Committed on 07/01/2018 at 18:15.
Pushed by habacker into branch &apos;master&apos;.

Use cmake function &apos;kdbusaddons_generate_dbus_service_file&apos; from kdbusaddons to generate dbus service file

Summary:
Related: bug 388059, bug 388060, bug 388062, bug 388063
FIXED-IN:5.43.0

Test Plan:
compiled against installed HEAD of kdbusaddons git master branch and inspected generated service files;
On Windows only the executable is used, which is expected

Reviewers: dfaure, kfunk, bcooksley

Reviewed By: dfaure

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9669

M  +1    -2    src/ioslaves/http/kcookiejar/CMakeLists.txt
D  +0    -4    src/ioslaves/http/kcookiejar/org.kde.kcookiejar5.service.in
M  +1    -4    src/kiod/CMakeLists.txt
D  +0    -4    src/kiod/org.kde.kiod5.service.in
M  +1    -2    src/kioexec/CMakeLists.txt
D  +0    -3    src/kioexec/org.kde.kioexecd.service.in
M  +1    -2    src/kpasswdserver/CMakeLists.txt
D  +0    -4    src/kpasswdserver/org.kde.kpasswdserver.service.in
M  +1    -2    src/kssld/CMakeLists.txt
D  +0    -4    src/kssld/org.kde.kssld5.service.in

https://commits.kde.org/kio/105cdd8fb3c433588f799c901dd32ceb99b2cf11</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>