ifm / ifm3d

Library and Utilities for working with ifm pmd-based 3D ToF Cameras
https://api.ifm3d.com
Apache License 2.0
106 stars 69 forks source link

Bash completions file from modules/tools/contrib not installed into installation prefix #434

Closed mhuijgen closed 5 months ago

mhuijgen commented 7 months ago

Describe the bug When installing into a prefix with make DESTDIR=/my/custom/path install the bash completion script will still be copied to the systems root /etc/bash_completion.d instead of $DESTDIR/etc/bash_completion.d This fails the install because the system is not writable.

To Reproduce Steps to reproduce the behavior. For example: Build and then run make install with DESTDIR set to a writeable path.

Expected behavior The bash script should be installedinto the installation prefix

Output/Screenshots

-- Installing: /etc/bash_completion.d/ifm3d_completions
CMake Error at modules/tools/contrib/cmake_install.cmake:54 (file):
  file INSTALL cannot copy file
  "/home/builder/workspace/ifm-ifm3d/build-debian-bullseye-x86_64/ifm3d-prefix/src/ifm3d-build/modules/tools/ifm3d_completions"
  to "/etc/bash_completion.d/ifm3d_completions": Permission denied.
Call Stack (most recent call first):
  modules/tools/cmake_install.cmake:52 (include)
  cmake_install.cmake:60 (include)

Proposed Solution Per cmake docs https://cmake.org/cmake/help/latest/command/install.html a relative path will be interpreted relative to the installation prefix.

On line https://github.com/ifm/ifm3d/blob/70971db4213a00bebf01a8da1e1fdb8a3645d052/modules/tools/contrib/CMakeLists.txt#L14 the leading / from the DESTINATION path /etc/bash_completion.d should be removed.

inbangsa commented 6 months ago

@mhuijgen Thanks for this, I confirm the issue and will be resolved in next release.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 5 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.