indi-3rdparty icon indicating copy to clipboard operation
indi-3rdparty copied to clipboard

[COMPILATION] setting capabilities on cmake install fails

Open MattBlack85 opened this issue 1 year ago • 1 comments

Describe the bug while compiling indi drivers, I got the following output

-- Installing: /home/XXXX/astroarch-pkgs/packages/indi-3rdparty-drivers/pkg/indi-3rdparty-drivers/usr/bin/indi_pentax
[sudo] password for XXXX: 
Failed to set capabilities on file '/usr/bin/indi_pentax': No such file or directory

this does not fail the build but probably renders the driver unusable? I fail to see unfortunately in which build step the capabilities are set. The failure is due to the path being wrong when building using arch (should be a local path until it gets shipped), how can I manipulate the path for setting the capabilities so that it will find the executable?

To Reproduce Exact steps to reproduce the behavior.

mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr \
	-DUDEVRULES_INSTALL_DIR=/usr/lib/udev/rules.d \
	-DFIRMWARE_INSTALL_DIR=/usr/lib/firmware \
	../indi-3rdparty-$pkgver
make
make DESTDIR="$pkgdir" install

Expected behavior No messages

Screenshots can send them but are probably not useful

Desktop (please complete the following information):

  • OS: ArchLinuxARM (aarch64)
  • Version: kernel 6.6.54

Log Files not needed

MattBlack85 avatar Oct 09 '24 11:10 MattBlack85

In the indi-pentax CMakelists.txt, you have this:

install(CODE "execute_process(COMMAND ${SUDO} -S ${SETCAP} cap_sys_rawio+ep ${CMAKE_INSTALL_PREFIX}/bin/indi_pentax)")

knro avatar Oct 09 '24 17:10 knro