diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b7728c7..88f66b39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Update `update-ldcache` hook to only update ldcache if it exists. * Update `update-ldcache` hook to create `/etc/ld.so.conf.d` folder if it doesn't exist. * Fix failure when libcuda cannot be located during XOrg library discovery. +* Fix CDI spec generation on systems that use `/etc/alternatives` (e.g. Debian) ## v1.13.0 diff --git a/internal/ldcache/ldcache.go b/internal/ldcache/ldcache.go index 5ea1d527..5493dc31 100644 --- a/internal/ldcache/ldcache.go +++ b/internal/ldcache/ldcache.go @@ -307,11 +307,7 @@ func (c *ldcache) resolve(target string) (string, error) { link = filepath.Join(filepath.Dir(target), link) } - // Ensure that the returned path is relative to the root. - link = filepath.Join(c.root, link) - - c.logger.Debugf("Resolved link: '%v' => '%v'", name, link) - return link, nil + return c.resolve(link) } // bytesToString converts a byte slice to a string. diff --git a/internal/lookup/cuda/cuda.go b/internal/lookup/cuda/cuda.go index 5c06a72c..35688eea 100644 --- a/internal/lookup/cuda/cuda.go +++ b/internal/lookup/cuda/cuda.go @@ -94,7 +94,8 @@ func (l *cudaLocator) Locate(pattern string) ([]string, error) { "/usr/lib64", "/usr/lib/x86_64-linux-gnu", "/usr/lib/aarch64-linux-gnu", - "/usr/lib/current", + "/usr/lib/x86_64-linux-gnu/nvidia/current", + "/usr/lib/aarch64-linux-gnu/nvidia/current", ), lookup.WithCount(1), )