While trying find-my-way with Silverblue I have had issues understanding why a driver install for an Epson scanner using rpm-ostree is failing. The install fails with an error reporting that /var/lib is not writable, but it looks like it is (and isn’t it supposed to be in SilverBlue or I am just getting this all wrong?). The problem appears to be specific to this rpm, but I am not sure how to diagnose that (or even maybe put a case to the vendor) in an rpm-ostree context.
This is what I am trying to do
$ sudo rpm-ostree install iscan-plugin-perfection-v370-1.0.0-2.x86_64.rpm
Which returns this error after running the rpm’s post script
error: Running %post for iscan-plugin-perfection-v370: Executing bwrap(/bin/sh): Child process killed by signal 1; run
journalctl -t 'rpm-ostree(iscan-plugin-perfection-v370.post)'
for more information
Journalctl shows
Aug 16 07:14:23 silverblue30 rpm-ostree(iscan-plugin-perfection-v370.post)[1481]: mkdir: cannot create directory ‘/var/lib/iscan’: Read-only file system
Aug 16 07:14:23 silverblue30 rpm-ostree(iscan-plugin-perfection-v370.post)[1481]: /usr/sbin/iscan-registry: line 155: /var/lib/iscan/interpreter: No such file or directory
A listing of /var/lib shows that /var/lib/iscan has not been created and hence the interpreter file cannot be written there.
I can manually create the directory.
$ sudo mkdir /var/lib/iscan
$ ls -aol /var/lib/iscan*
/var/lib/iscan:
total 8
drwxr-xr-x. 2 root 4096 Aug 16 07:28 .
drwxr-xr-x. 50 root 4096 Aug 16 07:28 …/var/lib/iscan-data:
total 8
drwxr-xr-x. 2 root 4096 Aug 15 06:03 .
drwxr-xr-x. 50 root 4096 Aug 16 07:28 …
Looking at the rpm’s the post script
$ rpm -qp --scripts iscan-plugin-perfection-v370-1.0.0-2.x86_64.rpm
postinstall scriptlet (using /bin/sh):
iscan-registry --add interpreter usb 0x04b8 0x014a
/usr/lib64/iscan/libiscan-plugin-perfection-v370
/usr/share/iscan/esfwdd.bin
preuninstall scriptlet (using /bin/sh):
iscan-registry --remove interpreter usb 0x04b8 0x014a
/usr/lib64/iscan/libiscan-plugin-perfection-v370
/usr/share/iscan/esfwdd.bin
Manually executing the command in the post script works and creates the interpreter file.
$ sudo rm -r /var/lib/iscan
$ sudo iscan-registry --add interpreter usb 0x04b8 0x014a /usr/lib64/iscan/libiscan-plugin-perfection-v370 /usr/share/iscan/esfwdd.bin
$ ls -l /var/lib/iscan*
/var/lib/iscan:
total 4
-rw-r–r–. 1 root root 107 Aug 16 07:35 interpreter/var/lib/iscan-data:
total 0
Because of this I am wondering if the error reported is a “true” message, in that it really relates some to other permissions that are required in an os-tree context. For example using bwrap to spawn the iscan-registry command.
Previous to installing this rpm I was successfully able to install (with rpm-ostree) 2 other packages required to install the scanner, including the one that creates the directory /var/lib/iscan-data. I have used these rpms to sucessfully install and use the Epson scanner in a Toolbox using dnf commands. Currently this is how I am scanning, but for me it seems a bit of a clunky way to do it, and I can’t use flatpak’ed scanning apps (Vuescan etc).
I will probably have a go at editing and re-building the rpm so I can get my scanner setup the way I want (another learning curve for me), but also want to understand a bit about what is the correct approach to dealing and diagnosing with system drivers in a containerized environment. Also Epson is a common scanner brand so it would be good to understand things from a Silverblue point-of-view as well. Any suggestions are very welcome, cheers Joe.