Add support for non-standard ld.so.cache filenames
https://github.com/ValveSoftware/steam-runtime/issues/230 reports that Exherbo, a Gentoo fork, uses non-standard names for
ld.so.cache: instead of combining 32- and 64-bit libraries into one big cache like the Debian and Red Hat families of distributions (and their own parent distribution Gentoo), they use a separate cache file per word size. The pressure-vessel tool used in the Steam Runtime can't deal with this until libcapsule has at least vestigial support for it.
I personally have no interest in Exherbo, but it's probably not a bad example of "this is where you need to patch if you need to support weirder layouts", and iterating through a list of possible ld.so caches is fairly straightforward.
Exherbo also uses unusual library directories, which was breaking the tests (the production code doesn't care).
tests: Make Exherbo architecture-specific ld.so stuff available too
I'm using Exherbo as an example of a host OS with an unusual layout that breaks libcapsule's assumptions, in order to get the framework in place for being able to receive patches from other weirder host OSs.
tests: Use libxml2 instead of libjpeg to test versioned symbols
This avoids worrying about which SONAME we're dealing with, and is maybe more common in smallish containers (in particular Exherbo's Docker container has it, which was useful for testing).
tests: Allow even more variations of what a
Exherbo uses the traditional-cross-compilation-style prefix,
/usr/<tuple>, which broke the tests' assumptions.
ld-libs: Call ld_libs_load_cache instead of reimplementing it
This is mostly just a simplification; it also improves the error handling a little.
ldlibs: Try loading Exherbo architecture-specific ld.so cache first
I'm using Exherbo as an example of a host OS with an unusual layout that breaks libcapsule's assumptions. Tested in an x86_64 Docker container, but i386 is symmetrical and should also work. This also puts the framework in place to deal with other distributions' architecture-specific ld.so caches.