intel / linux-sgx

Intel SGX for Linux*
https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html
Other
1.3k stars 535 forks source link

Impossible to install to a buildroot #384

Open thiagomacieira opened 5 years ago

thiagomacieira commented 5 years ago

See #383 for the lack of a make install target. In working around that, I created the installer using make sdk_install_pkg then installed that.

I installed the SDK to a temporary directory so I could package it with RPM. However, the following files had the temporary root hardcoded.

<BUILDROOT>/usr/bin/sgx-gdb:GDB_SGX_PLUGIN_PATH=<BUILDROOT>/sgxsdk/lib64/gdb-sgx-plugin
<BUILDROOT>/usr/bin/sgx-gdb:SGX_LIBRARY_PATH=<BUILDROOT>/sgxsdk/lib64
<BUILDROOT>/usr/pkgconfig/libsgx_uae_service_sim.pc:prefix=<BUILDROOT>/sgxsdk
<BUILDROOT>/usr/pkgconfig/libsgx_urts_sim.pc:prefix=<BUILDROOT>/sgxsdk
<BUILDROOT>/usr/pkgconfig/libsgx_uae_service.pc:prefix=<BUILDROOT>/sgxsdk
<BUILDROOT>/usr/pkgconfig/libsgx_urts.pc:prefix=<BUILDROOT>/sgxsdk
<BUILDROOT>/usr/uninstall.sh:rm -fr <BUILDROOT>/sgxsdk 2> /dev/null
<BUILDROOT>/usr/environment:export SGX_SDK=<BUILDROOT>/sgxsdk

Please provide a way to make a buildroot installation. Preferrably, fix #383.

thiagomacieira commented 5 years ago

The following symlinks also have hardcoded paths:

<BUILDROOT>/sdk_libs/libsgx_uae_service_sim.so -> <BUILDROOT>/linux-sgx-sgx.2.4-1.x86_64/sgxsdk/lib64/libsgx_uae_service_sim.so
<BUILDROOT>/sdk_libs/libsgx_urts_sim.so -> <BUILDROOT>/linux-sgx-sgx.2.4-1.x86_64/sgxsdk/lib64/libsgx_urts_sim.so
ghost commented 5 years ago

Are you going to build a RPM installer with SDK content? Why not using the .bin installer?

thiagomacieira commented 5 years ago

Yes, I am building an RPM.

The reason I am not using the installer is because I maintain the distribution (Clear Linux). If you want me to provide the SDK as content to our users, I need to build an RPM.