edgelesssys / edgelessrt

Edgeless RT is an SDK and a runtime for Intel SGX. It combines top-notch Go support with simplicity, robustness and a small TCB. Developing confidential microservices has never been easier! C++17 and Rust (experimental) are also supported.
https://edgeless.systems
MIT License
134 stars 20 forks source link

Move shared libraries to subfolder to avoid regenerating symlinks #79

Closed daniel-weisse closed 3 years ago

daniel-weisse commented 3 years ago

Proposed changes

Shared libraries in /usr/lib/x86_64-linux-gnu/ automatically get assigned a symlink. This creates issues when using az-dcap-client and libsgx-dcap-default-qpl, since the first checks if libdcap_quoteprov.so.1 exists, and if so, uses it instead. We previously handled this by renaming libdcap_quoteprov.so.1 to libdcap_quoteprov.so.1.intel, however the .so.1 symlink will get recreated every time a new package is installed, making it extremely tedious to work with.

By moving the libraries from libsgx-dcap-default-qpl into a subfolder and then removing the package, we avoid the self regenerating symlinks. The functionality of the original package can be restored by creating the symlink:

ln -s /usr/lib/x86_64-linux-gnu/dcap/libdcap_quoteprov.so.intel /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so.1