Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package: only constrain library search paths for provides entries #678

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/build/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,6 @@ func generateSharedObjectNameDeps(pc *PackageBuild, generated *config.Dependenci
}

if mode.Perm()&0555 == 0555 {
libDirs := []string{"lib", "usr/lib", "lib64", "usr/lib64"}
if !allowedPrefix(path, libDirs) {
return nil
}

basename := filepath.Base(path)

// most likely a shell script instead of an ELF, so treat any
Expand Down Expand Up @@ -534,6 +529,11 @@ func generateSharedObjectNameDeps(pc *PackageBuild, generated *config.Dependenci
// Ugh: libc.so.6 has an PT_INTERP set on itself to make the `/lib/libc.so.6 --about`
// functionality work. So we always generate provides entries for libc.
if !pc.Options.NoProvides && (interp == "" || strings.HasPrefix(basename, "libc")) {
libDirs := []string{"lib", "usr/lib", "lib64", "usr/lib64"}
if !allowedPrefix(path, libDirs) {
return nil
}

sonames, err := ef.DynString(elf.DT_SONAME)
// most likely SONAME is not set on this object
if err != nil {
Expand Down
Loading