Bubblewrapped thumbnailing fails if /etc/ld.so.cache doesn't exist
This issue was introduced by !22 (merged). On systems that do not have a file named /etc/ld.so.cache
(I'm running on Exherbo which uses the filename /etc/ld-${CHOST}.cache
instead), all thumbnailing now fails because bwrap can't bind mount that file.
Some thoughts on how this could be fixed:
- Use
--ro-bind-try
instead of--ro-bind
for/etc/ld.so.cache
. This means no cache will be available, but at least it won't fail to launch bwrap. - Allow configuring the path for
/etc/ld.so.cache
. This is not ideal because on Exherbo we actually have multiple cache files - on x86, we have both/etc/ld-i686-pc-linux-gnu.cache
and/etc/ld-x86_64-pc-linux-gnu.cache
. It's unlikely that someone will use 32bit thumbnailers on a 64bit machine tho, so this is workable. - Make the entire
/etc
directory available to thumbnailers
To be honest, I think the entire /etc
directory should really be made available to thumbnailers. There's cases of custom thumbnailers using tools like imagemagick - which often has security mitigations enabled via a configuration file in /etc
! And thumbnailers that render text should be able to load fontconfig settings. This would also solve the problem with alternatives in #92 (closed) - we use a similar mechanism with symlinks in /etc for this in Exherbo, too.