coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
861 stars 195 forks source link

rpm-ostree fails to install Epson image scanner drivers #1925

Open joefidler opened 5 years ago

joefidler commented 5 years ago

Epson sell some popular models of image scanner and provide Linux drivers for them. Many of these scanners do not have open-source equivalents for their drivers, but do integrate with the SANE open-source scanning framework.

A scanner driver installer from Epson typically contains three rpm files (all of which are required to complete the install): iscan (scanning application), iscan-data (scanner model data) and a plugin which contains firmware and a binary plugin to iscan for the specific scanner model being installed.

rpm-ostree can successfully install the iscan and iscan-data rpms but fails to install the plugin rpm. I am using a v370 model scanner but suspect this problem will occur with other models.

$ sudo rpm-ostree install iscan-plugin-perfection-v370-1.0.0-2.x86_64.rpm

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

The plugin rpm post install script contains:

$ 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

It is possible to manually create /var/lib/iscan and execute the command used in the post-install script - without error and get the expected results.

File contents of the plugin rpm:

[joe@kyrano-silverblue-vm plugins]$ rpm2cpio iscan-plugin-perfection-v370-1.0.1-1.x86_64.rpm | cpio -idmv ./usr/lib64/iscan/libiscan-plugin-perfection-v370.so ./usr/lib64/iscan/libiscan-plugin-perfection-v370.so.0 ./usr/lib64/iscan/libiscan-plugin-perfection-v370.so.0.0.0 ./usr/share/doc/iscan-plugin-perfection-v370-1.0.1 ./usr/share/doc/iscan-plugin-perfection-v370-1.0.1/COPYING.EPSON.en.txt ./usr/share/doc/iscan-plugin-perfection-v370-1.0.1/COPYING.EPSON.ja.txt ./usr/share/doc/iscan-plugin-perfection-v370-1.0.1/NEWS ./usr/share/doc/iscan-plugin-perfection-v370-1.0.1/README ./usr/share/iscan-data/device/47542d46373430.xml ./usr/share/iscan-data/device/47542d53363430.xml ./usr/share/iscan/esfwdd.bin

The problem can be worked around by installing the scanner drivers in a toolbox and installing whatever scanning apps (simple-scan, vuescan, etc) are required into the same toolbox.

Issue effects Silverblue 29/30/31.

I have opened this bug to replace https://github.com/projectatomic/rpm-ostree/issues/1891 so as to hopefully better describe the issue.

Extarys commented 4 hours ago

Encountered same issue using Fedora Kinoite a couple of days ago :sob: Not sure if I'll go over the trouble of installing it manually like OP did in #1891 or just switch back to traditional image to avoid another surprise in 6 months :/