Skip to content
Snippets Groups Projects

Delete more overridden libraries

Merged Simon McVittie requested to merge wip/delete-more-overridden-libraries into master
All threads resolved!

Based on !185 (merged), please review that first. This is working towards !182 (closed). I want to land it relatively soon, partly for correctness, and partly so it won't conflict with refactoring runtime.c to have more/smaller functions - some of them are getting uncomfortably large.

Best reviewed commit-by-commit.

"Record known filenames of ld.so.cache on each architecture" is for !182 (closed), but it's just adding data to our table of known architectures, and if we land it a bit sooner than !182 (closed), it won't cause merge conflicts every time we touch something else in those structs.

/cc @denittis


  • runtime: Defer deletion of overridden libraries

    We need to do this after we have captured glibc-related libraries, otherwise they won't be taken into account while deleting their overridden equivalents.

  • runtime: Don't iterate over directories we already inspected

    If /lib and /usr/lib are the same file, there's no need to iterate over both.

  • runtime: Factor out multiarch_details_get_libdirs

    We return the library directories in most-important-first order here, because that seems like the one that makes most sense (and matches LD_LIBRARY_PATH). When we go looking for DRI drivers, we actually want to take the least important first, but iteration over a GPtrArray in reverse order is easy.

  • runtime: Delete overridden libraries from more directories

    In particular, when using a SDK runtime, we need to delete overridden 32-bit libraries from /lib32 as well as /lib/i386-linux-gnu.

  • runtime: Record known filenames of ld.so.cache on each architecture

  • tests: Assert that libraries are deleted from /usr/lib32 when necessary

Merge request reports

Merge request pipeline #5547 passed

Merge request pipeline passed for 1c5f7223

Merged by Simon McVittieSimon McVittie 4 years ago (Dec 3, 2020 5:27pm UTC)

Loading

Pipeline #5551 passed

Pipeline passed for a3601102 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Apart from the comment that I left, this looks good to me.

  • Simon McVittie added 5 commits

    added 5 commits

    • d23f7f4b - runtime: Don't iterate over directories we already inspected
    • 43cf1112 - runtime: Factor out multiarch_details_get_libdirs
    • 446a7e31 - runtime: Delete overridden libraries from more directories
    • c10e8831 - runtime: Record known filenames of ld.so.cache on each architecture
    • 1c5f7223 - tests: Assert that libraries are deleted from /usr/lib32 when necessary

    Compare with previous version

  • Simon McVittie resolved all threads

    resolved all threads

  • Ludovico de Nittis approved this merge request

    approved this merge request

  • Simon McVittie enabled an automatic merge when the pipeline for 1c5f7223 succeeds

    enabled an automatic merge when the pipeline for 1c5f7223 succeeds

  • Simon McVittie mentioned in commit a3601102

    mentioned in commit a3601102

  • Please register or sign in to reply
    Loading