NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.21k stars 14.21k forks source link

brscan5's udev rule contains deprecated key "SYSFS" #332307

Open leana8959 opened 3 months ago

leana8959 commented 3 months ago

Describe the bug

When using the hardware.sane.brscan5 option, the udev rule supplied by the upstream contains the deprecated key "SYSFS".

This cause systemd.udevd.service to fail.

Aug 04 19:57:29 carbon systemd-udevd[2092554]: /nix/store/dknjp9p11iwwjxqywhs8cpy9ss2gj0qs-udev-rules/49-brother-mfp-brscan5-1.0.2-2.rules:17 Invalid key 'SYSFS'.

Steps To Reproduce

Steps to reproduce the behavior: First set

hardware.sane = {
  enable = true;
  brscan5.enable = true;
};

Then run

sudo systemd status systemd-udevd.service

Expected behavior

brscan5's udev rule shouldn't fail systemd-udevd.service.

Additional context

I did a quick grep on the latest (brscan5-1.3.5-0.amd64.deb) upstream package, the offending "SYSFS" key is still present. Maybe we need to patch this ourselves for now ?

Notify maintainers

@mattchrist

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.43, NixOS, 24.05 (Uakari), 24.05.20240730.cf05eea`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.21.4`
 - nixpkgs: `/nix/store/z3vrsz16ypv60m2pp0gi7x7gpx40gfh1-source`

Add a :+1: reaction to issues you find important.

mattchrist commented 3 months ago

I don't believe this is causing systemd-udev to fail, but does cause an error message in the logs.

On my system, systemctl status systemd-udevd shows the service is active (running). I do see those errors in the journal as well.

leana8959 commented 3 months ago

Thank you for your quick reply !

In fact, I noticed that when I run scanimage -L, my scanner isn't detected. However, running the same command with sudo works. I suspect that there might be something wrong with the udev file, I filed the bug report when I saw that it's not recognizing the SYSFS key.

Is it expected for scanimage -L to only work when run as root or is it somehow related to this issue ?

Thanks :)

eclairevoyant commented 3 months ago

You probably need the scanner and possibly lp group as stated in the desc for hardware.sane.enable