- Jun 24, 2020
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jun 16, 2020
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jun 12, 2020
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is what was documented to happen. Previously, we did not clear the entry if we failed to open the library fd, or if we succeeded but the library was "unacceptable" (wrong ELF class or machine tag). Normally this results in a minor memory leak, and a fd leak if the library is "unacceptable". However, when called from search_ldcache_cb(), it's particularly important that we do this, because search_ldcache() uses the state of the fd field - valid fd or not - to check whether ld_lib_open() succeeded. One practical symptom is that if your container has an x86_64 libfoo.so.0 that compares newer than the provider's libfoo.so.0, and does not have an i386 libfoo.so.0, then capsule-capture-libs would unexpectedly not capture the i386 libfoo.so.0 from the provider either. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jun 03, 2020
-
-
Simon McVittie authored
The pressure-vessel tool used in the Steam Runtime has an increasingly long list of graphics libraries which might be better as a file than on the command-line. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The file descriptor pointing to the jobserver is not passed through the test script, so passing through a MAKEFLAGS environment variable that refers to it is just going to confuse us. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Mar 13, 2020
-
-
The linker used in Steam Runtime 1 'scout', which is from several years ago, doesn't seem to like a symbol being made an alias for a versioned symbol of the same name. Rename the symbol so that only the versioned aliases get the same basename. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Mar 12, 2020
-
-
Simon McVittie authored
Some libcapsule users and contributors are using Arch Linux or Manjaro rather than a Debian derivative. Many of the tests will be skipped on Gitlab-CI because they need a working bubblewrap, which isn't allowed inside unprivileged Docker; but this provides "executable documentation" for how to do a build and test. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jan 16, 2020
-
-
Simon McVittie authored
This demonstrates the behaviour we want from !23. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Some tests for capsule-capture-libs will need to compile shared libraries, even if libcapsule itself is not built. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Arch Linux's perl complains that system() is an undefined function. I'm not sure why, because it's a standard library facility (and unlike C system(), it takes a list of arguments rather than using the shell), but in any case it's easy to avoid. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
I occasionally compile libcapsule with clang for better diagnostics. Redefining typedefs is a C11 feature, which clang 8 won't allow in C99 mode. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jan 15, 2020
-
-
Simon McVittie authored
--resolve-ld.so would ideally be the equivalent of realpath or readlink -f, but in fact it only has special handling for symlinks in the last position in the pathname (like AT_SYMLINK_NOFOLLOW and O_NOFOLLOW), leading to different results on at least Arch Linux. The pressure-vessel utility for which this option was added does not actually use it any more, so fixing this is not a high priority right now. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This test asserted that libz.so.1 was in /lib/*-linux-gnu* or /usr/lib/*-linux-gnu*, but on non-Debian operating systems it could equally well be in /usr/lib32, /usr/lib, /usr/lib64 or even /usr/libx32. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Nov 14, 2019
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This crashes when tests/capture-libs.pl loads libgobject-2.0.so.0 on Debian 10 'buster' or on Debian unstable: Stack trace of thread 87172: #0 0x00007f6cad431176 g_slice_free1 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.2) #1 0x00007f6cad431bc0 g_slist_remove (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.2) #2 0x00007f6cad43bf47 g_once_init_leave (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6200.2) #3 0x00007f6cad4f8e24 n/a (/tmp/fpzde0iMLo/host/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.6200.2) I suspect this might be because the version of GLib in /usr and the version in /tmp/.../host/usr both get loaded into the same address space? This reverts commit fff84ffb. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Nov 11, 2019
-
-
Simon McVittie authored
I don't know the right predefined macros to detect these, so they're just comments for possible future reference. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We have no plans to support big-endian 64-bit ARM, but since we have a reasonably comprehensive list here, we might as well include it. Reference: <https://wiki.debian.org/Multiarch/Tuples>, <https://sourceware.org/glibc/wiki/ABIList#aarch64 > Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This was probably copy/paste damage from some other architecture. According to https://sourceware.org/glibc/wiki/ABIList these architectures are 32-bit (or technically 31-bit for s390) and install their ld.so in /lib. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
When two libraries have the same numeric tail we were not able to reliably determine which one was the newer. Now we also check the libraries definitions and the symbols to make a more weighted decision. The order of comparison is currently: compare version definitions > compare numeric tail > one has strictly more symbols If even after these three checks we are still not sure which one to choose, we pick the provider as the default.
-
- Oct 02, 2019
-
-
Simon McVittie authored
libcapsule's use with biarch containers like the Steam Runtime will frequently make it necessary to compile it for both x86_64 and i386. On recent Debian-derived OSs this is OK, because the toolchain is provided as a complete set of cross-compiler-style prefixed tools like i686-linux-gnu-gcc; but some OSs, like Arch Linux and very old versions of Debian, rely on 'gcc -m32' for their biarch support. This makes it very easy to do ./configure --build=x86_64-linux-gnu --host=i686-linux-gnu and accidentally produce x86_64 binaries, because there is no i686-linux-gnu-gcc. Give the user a hint towards the correct invocation in this case, which is: ./configure --build=x86_64-linux-gnu --host=i686-linux-gnu CC='gcc -m32' I've implemented this as a reusable macro, in case we want to add it to other projects that are likely to be cross-compiled by inexperienced cross-compiler users. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Sep 26, 2019
-
-
Simon McVittie authored
This verifies that libcapsule compiles and works on Debian 9, Ubuntu 18.04 and Debian 10. To use, change your libcapsule fork's CI/CD settings to include: Custom CI config path: ci/gitlab-ci.yml Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
On at least Debian, Ubuntu and Manjaro, libgcc_s.so.1 is a regular file, not a symlink to a versioned name (libgcc_s.so.1.2.3) like most shared libraries. However, on Fedora 30 it is a symlink to a versioned name like libgcc_s-9-20190827.so.1. The name used in Fedora happens to be less than libgcc_s.so.1 in strverscmp() order, causing capsule-capture-libs to prefer the Debian/Manjaro libgcc_s.so.1, even if the container is older. This can cause problems if an old Debian-derived container like the Steam Runtime is used on a newer Fedora host, with host graphics drivers imported by using capsule-capture-libs: the container's libgcc_s.so.1 does not satisfy the versioned symbol requirements of the graphics driver, causing loading to fail. Treat a regular file libgcc_s.so.1 as indeterminate order (or "equal"), so that we fall back to the default behaviour, which is currently to take the host version of the library in the case of a tie. This is a stopgap solution: ideally we would consider the versioned symbols exported by both libraries, and take whichever one has a superset of the version definitions exported by the other, if there is a strict superset in either direction (in the case of libgcc, in fact there is). Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This reverts commit faf3daa9, which was merged with an outdated commit message. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Sep 19, 2019
-
-
Simon McVittie authored
On at least Debian, Ubuntu and Manjaro, libgcc_s.so.1 is a regular file, not a symlink to a versioned name (libgcc_s.so.1.2.3) like most shared libraries. However, on Fedora 30 it is a symlink to a versioned name like libgcc_s-9-20190827.so.1. This can cause problems if a Debian-derived container is used on a Fedora host, with host graphics drivers. TODO: it isn't clear whether this change makes any practical difference, because strverscmp("libgcc_s.so.1", "libgcc_s-9-20190827.so.1") == 0 anyway.
-
- Sep 18, 2019
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jul 25, 2019
-
-
Simon McVittie authored
They now all take named options (including the -- pseudo-option) for future expansion, and fail with an error if given too many positional parameters. When libcapsule tools are bundled with a larger project, this should make it easier to check which ones they are. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Jul 24, 2019
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
On Red Hat-derived OSs, /usr/lib/dri contains 32-bit drivers (with their 64-bit equivalents in /usr/lib64/dri), but on Arch Linux-derived OSs it contains 64-bit drivers (with their 32-bit equivalents in /usr/lib32/dri). As a result, we have to run both i386-linux-gnu-capsule-capture-libs and x86_64-linux-gnu-capsule-capture-libs against if-exists:path-match:/usr/lib/dri/*.so, ignoring anything we find that is of the other word-size. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Apr 16, 2019
-
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
- Apr 02, 2019
-
-
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Ideally we should bubble up errors to the caller rather than silently truncating, but if we have to truncate, let's at least be sufficiently explicit about it that gcc 8 doesn't sulk. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Without this, we fall through to the case for DT_BIND_NOW, which will log a misleading debug message before breaking out of the switch. Thanks, gcc 8! Signed-off-by: Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by: Simon McVittie <smcv@collabora.com>
-
GLib 2.38 was the first stable release with TAP output support, and our unit test relies on that. Signed-off-by: Simon McVittie <smcv@collabora.com>
-
We can't just drop in an updated version of pkg.m4, because older versions of pkg.m4 didn't have a serial number, so an older system copy would overwrite our local copy. Signed-off-by: Simon McVittie <smcv@collabora.com>
-