eudev-project / eudev

Repository for eudev development
GNU General Public License v2.0
522 stars 147 forks source link

escaped double quotes in udev rules not parsed #187

Closed smcv closed 11 months ago

smcv commented 4 years ago

Newer versions of mainline udev, as included in systemd v235+, support escaped double quotes \" inside the double quotes of a udev rule's value. This is mainly useful for RUN{program}. In simple cases this escaping mechanism can be made unnecessary by replacing the escaped double quotes with a single quote as documented in udev(7) (as in ValveSoftware/steam-devices#11), but in more elaborate udev rules that isn't necessarily straightforward. The merge request that added this is systemd/systemd#6890.

eudev doesn't appear to support this; in ValveSoftware/steam-devices#10, @xrogaan reports that this makes certain rules fail to parse on a system that uses eudev 3.2.7. I haven't confirmed whether the same is true in 3.2.9 (I don't use eudev myself) but none of the commits since 3.2.7 look like they would change this behaviour.

Handling escaped double quotes in the same way as the udev included with systemd would improve eudev's compatibility with third-party udev rules installed to /lib/udev/rules.d by other packages.

blueness commented 4 years ago

Did you try to just apply systemd/systemd#6890 to eudev and test? If it works, go ahead and prepare a pr. Else, if more work is done, I'll try to hack away at it.

smcv commented 4 years ago

Sorry, I don't use eudev myself and don't intend to work on this. I'm only passing on the report from ValveSoftware/steam-devices#10.

ArsenArsen commented 2 years ago

@bbonev you recently merged #208, was this fixed?

bbonev commented 2 years ago

While I have an easy path to install and run eudev on my desktop, I do not have a use case to verify this. That is why I prefer to keep the issue open, my plan is to modify a rule, do the test and then will close this.

bbonev commented 11 months ago

I believe it is fixed (based on feedback from steam users) but did not verify it myself