FS#72312 - [qemu] brltty should be set as an optional dependency (it breaks many usb devices)

Attached to Project: Arch Linux
Opened by Niklas (nikisalli) - Thursday, 30 September 2021, 22:28 GMT
Last edited by David Runge (dvzrv) - Thursday, 14 October 2021, 16:36 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Anatol Pomozov (anatolik)
David Runge (dvzrv)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
by installing the qemu package, brltty gets automatically installed as a dependency.
the udev rules being installed alongside this package break the functionality of many usb devices based on the ch341 family of usb-serial chips.
I think brltty should be set as an optional dependency because from what I understood, brltty isn't necessary for the vast majority of people but for the small percentage of its userbase this behavior is actually useful because it enables the braille keyboard to be plug and play which is a good thing for blind users.

Additional info:
package version: qemu 6.1.0-2

Steps to reproduce:
- install the qemu package
- brltty gets automatically installed as a dependency
- every usb device based on a ch341 family chip instantly stops working due to automatically installed udev rules in the brltty package
This task depends upon

Closed by  David Runge (dvzrv)
Thursday, 14 October 2021, 16:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with qemu 6.1.0-5
Comment by Toolybird (Toolybird) - Friday, 01 October 2021, 04:09 GMT
This should be feasible now as AFAICT the only reference to brlapi is in a loadable module (dlopen'able):

$ readelf -d /usr/lib/qemu/chardev-baum.so | grep brl
0x0000000000000001 (NEEDED) Shared library: [libbrlapi.so.0.8]

Someone should test it out by removing that file and ensuring everything still works.

If all good then there are lots of other modules/deps for potential conversion to optional too.
Comment by Toolybird (Toolybird) - Friday, 01 October 2021, 07:15 GMT
> Someone should test it out by removing that file and ensuring everything still works.

Facepalm, I must be getting old! Of course I meant to say:

Someone should test it out by force removing the brltty pkg and ensure everything still works.
Comment by Toolybird (Toolybird) - Friday, 01 October 2021, 22:57 GMT
Ok did a little bit of testing / research. As a sighted person it shames me to admit I know very little about braille devices.

It seems that braille support in QEMU is only triggered when using specific command line switches. e.g. the USB convenience option:

-usbdevice braille

or the more generic character device option:

-chardev braille,id=id

In other words, the `chardev-baum.so' module is only loaded when specifically requested. Therefore it should be safe to make brltty optional. i.e. remove from "depends", add to "makedepends" and "optdepends". namcap becomes slightly unhappy but that's kind of expected. A more technically correct approach would be to split out the module into a separate pkg, but Arch is not Debian blah blah..

It would be great if someone familiar with Accessibility issues in Arch could confirm the above.
Comment by David Runge (dvzrv) - Sunday, 10 October 2021, 20:34 GMT
@Toolybird: Thanks for the investigation! I will ping alex19EP about this and look into making it optional.
Comment by Alexander Epaneshnikov (alex19EP) - Monday, 11 October 2021, 14:43 GMT
ok. I tested qemu with optional brltty. braille output is working if brltty isn't installed -usbdevice braille
gives:
Failed to open module: libbrlapi.so.0.8: cannot open shared object file: No such file or directory
qemu-system-x86_64: -usbdevice braille: 'braille' is not a valid char driver name
qemu-system-x86_64: -usbdevice braille: Failed to create USB device 'usb-braille'
qemu-system-x86_64: -usbdevice braille: could not add USB device 'braille'

so I think we can safely move brltty to optdepends.
Comment by David Runge (dvzrv) - Tuesday, 12 October 2021, 08:14 GMT
@alex19EP: Thanks for testing.

I will include this in an upcoming pkgrel.
Comment by David Runge (dvzrv) - Wednesday, 13 October 2021, 21:00 GMT
Please test qemu 6.1.0-3 in [testing].
Comment by David Runge (dvzrv) - Wednesday, 13 October 2021, 21:33 GMT
My apologies, I messed that one up. Please try 6.1.0-4 in [testing].
Comment by David Runge (dvzrv) - Wednesday, 13 October 2021, 22:20 GMT
This is getting embarrassing... x_x
6.1.0-5 in [testing] should work though.

Loading...