Commit f4dcb2f2 authored by Mart Raudsepp's avatar Mart Raudsepp

thumbnail: bind mount /etc/ to the sandbox

This is especially important for libstdc++ on distributions that
don't have it directly in a libdir and the runtime linker doesn't
look where needed without /etc/ (e.g. if libstdc++ is
in a GCC per-version subdirectory handled via /etc/

If /etc/ is not available, the runtime linker will look
only at a set of predetermined paths - as seen with LD_DEBUG=libs
added to the bwrap call with "--setenv LD_DEBUG libs":

find [0]; searching
 search cache=/etc/
 search path=/lib64:/usr/lib64		(system search path)
  trying file=/lib64/
  trying file=/usr/lib64/

followed by:

/usr/bin/totem-video-thumbnailer: error while loading shared libraries: cannot open shared object file: No such file or directory

If /etc/ is available, it will use that for the paths:

find [0]; searching
 search cache=/etc/
  trying file=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/

By bind mounting just that file out of /etc, we get it to work on
such a system.

Closes: #81
parent 9efd5d62
Pipeline #45868 passed with stage
in 5 minutes and 42 seconds
......@@ -538,6 +538,7 @@ add_bwrap (GPtrArray *array,
add_args (array,
"--ro-bind", "/usr", "/usr",
"--ro-bind", "/etc/", "/etc/",
/* These directories might be symlinks into /usr/... */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment