Summary: | Exec lines in service files must not have any path prefix | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kwallet | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | general | Assignee: | Valentin Rusu <valir> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christophe, elvis.angelaccio, kdelibs-bugs, simonandric5 |
Priority: | NOR | ||
Version: | 5.36.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Microsoft Windows | ||
Latest Commit: | https://commits.kde.org/kwallet/74ce261240ae6370e508e6f3508c6ff6861de24e | Version Fixed In: | 5.43.0 |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 380136 |
Description
Ralf Habacker
2017-07-18 08:40:39 UTC
Well, the previous commit made the path relative. This broke autostart on linux. Was it working a few commits ago when org.kde.kwalletd5.service.in had : Exec=@CMAKE_INSTALL_PREFIX@/bin/kwalletd5 ? (In reply to Christophe Giboudeaux from comment #1) > Well, the previous commit made the path relative. This broke autostart on > linux. > > Was it working a few commits ago when org.kde.kwalletd5.service.in had : > Exec=@CMAKE_INSTALL_PREFIX@/bin/kwalletd5 ? The short answer is no, for the long see below: According to dbus spawn implementation (see https://cgit.freedesktop.org/dbus/dbus/tree/dbus/dbus-spawn-win.c#n572) and CreateProcess implementation (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx) the search order for executables is only specified deterministic if the file name does not contain a directory path. Having any relative path results into having the current dir be added in front of the relative either if it would be Exec=./bin/kwalletd5 or Exec=../bin/kwalletd5 which is unreliable. mmmh... so : - an absolute path breaks things on windows, - @CMAKE_INSTALL_PREFIX@/bin/foo breaks things for people using something different than 'bin' for binaries and Windows - and a relative path breaks things for every other users. out of curiosity, do services installed in libexec dirs work ? eg : org.kde.kssld5.service & org.kde.kioexecd.service have Exec=@KDE_INSTALL_FULL_LIBEXECDIR@/kf5/kiod5 (In reply to Christophe Giboudeaux from comment #3) > mmmh... so : > - an absolute path breaks things on windows, > - @CMAKE_INSTALL_PREFIX@/bin/foo breaks things for people using something > different than 'bin' for binaries and Windows > - and a relative path breaks things for every other users. > > out of curiosity, do services installed in libexec dirs work ? eg : without source code changes no, see bug 382459 and bug 382460. Source codes changes means if the related tool is only started under control of some library the full path to the executable in libexec needs to be calculated based on the runtime install root path of the application/library. Review request https://phabricator.kde.org/D9383 |