Bug 448719 - Install process does not respect prefix
Summary: Install process does not respect prefix
Status: RESOLVED UPSTREAM
Alias: None
Product: kalarm
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-18 14:54 UTC by Snehit Sah
Modified: 2022-01-19 12:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
build_log.txt : output of flatpak's build process including only the log from installing/building kalarm (15.42 KB, text/plain)
2022-01-18 14:54 UTC, Snehit Sah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Snehit Sah 2022-01-18 14:54:43 UTC
Created attachment 145617 [details]
build_log.txt : output of flatpak's build process including only the log from installing/building kalarm

SUMMARY

When installing KAlarm from source, it does not respect prefix for all install directives, and hence fails trying to access /usr/lib when installing to a user directory.

I am trying to package KAlarm for Flathub which requires installing it to a user folder and packaging. The above mentioned issue is preventing me from doing so.

STEPS TO REPRODUCE
Install KAlarm in a user directory without superuser privileges.

OBSERVED RESULT
Install fails with following message
```
-- Installing: /usr/lib/x86_64-linux-gnu/libexec/kauth/kalarm_helper
CMake Error at src/cmake_install.cmake:119 (file):
  file INSTALL cannot copy file "/run/build/kalarm/bin/kalarm_helper" to
  "/usr/lib/x86_64-linux-gnu/libexec/kauth/kalarm_helper": Read-only file
  system.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)


FAILED: CMakeFiles/install.util 
cd /run/build/kalarm && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
Error: module kalarm: Child process exited with code 1
```

EXPECTED RESULT
KAlarm should install to user directory without accessing root


ADDITIONAL INFORMATION
Source tarball obtained from : https://download.kde.org/stable/release-service/21.12.1/src/kalarm-21.12.1.tar.xz
Build log attached with bug report.
Comment 1 David Jarvie 2022-01-19 12:16:50 UTC
It may be possible to alter the installation directory by setting KAUTH_HELPER_INSTALL_DIR when executing cmake. If that doesn't work, you'll need to consider re-filing this bug, for the following reasons.

The kauth_install_* commands in src/CMakeLists.txt, which are producing this error, are standard ECM commands, and the same problem will exist with all other KDE modules which use them. Since this is standard KDE cmake installation code (shared with, among others, frameworks/ktexteditor, multimedia/k3b, plasma/powerdevil), if you have a problem with it, this should be filed as a bug against extra-cmake-modules or kauth.

Please see a discussion of this issue on the kde-core-devel mailing list at https://kde.markmail.org/search/?q=list%3Akde-core-devel+kauth_install_helper_files#query:list%3Akde-core-devel%20kauth_install_helper_files+page:1+mid:3ysbv6yzugzbut6h+state:results
Comment 2 David Jarvie 2022-01-19 12:35:55 UTC
Correction: The cmake macros are defined in frameworks/kauth, so that would be the Bugzilla product to re-file against (not extra-cmake-modules), if you still think this is appropriate after reading the mailing list thread.