please move udev rules to /lib/udev/rules.d

Bug #880847 reported by Jiri Popelka
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Amarnath Chitumalla
Gentoo Linux
Fix Released
Medium

Bug Description

udev rules should be placed in /lib/udev/rules.d/, not in /etc.
/etc is reserved for admins to overwrite udev config shipped by packages.
It should not be used by packages directly.

Revision history for this message
In , Ben Sagal (bensagal) wrote :

udev looks for rules in 2 locations /etc/udev/rules.d/ and /lib/udev/rules.d/.
system defined rules are supposed to be installed in /lib/udev/rules.d/ and not in etc, however hplip installs the rules into /etc/udev/rules.d/.

Reproducible: Always

checked with virstion 3.10.9

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Please open a bug upstream at https://launchpad.net/hplip about this issue and report the bug number here. Thank you.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Seems like there is already a bug [1] with a comment from you.

[1] https://bugs.launchpad.net/hplip/+bug/500086

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

Created attachment 254547
hplip-3.10.9-udev-rules-install-path.patch

Attached patch to the current hplip ebuild should replace all occurrences of "/etc/udev/rules.d" with "/lib/udev/rules.d".

Revision history for this message
In , Ben Sagal (bensagal) wrote :

Created attachment 254991
update patch

the patch should really use $(get_libdir) instead of lib (as amd64 use lib64 not lib), fixed in update patch.

Apart from tat original patch works, thanks.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

(In reply to comment #4)
> the patch should really use $(get_libdir) instead of lib (as amd64 use lib64
> not lib), fixed in update patch.
>
> Apart from tat original patch works, thanks.

You are correct. My sed was more a quick hack to test if it works. I don't think I will add it to the ebuild. This should be fixed in an upstream release.

Revision history for this message
In , Diego Elio Pettenò (flameeyes) wrote :

I'm partial at adding this to the ebuild already, given that right now on update we're asking users to ack the changes.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

(In reply to comment #6)
> I'm partial at adding this to the ebuild already, given that right now on
> update we're asking users to ack the changes.
>

If you want to add it just uncomment the relevant lines in the ebuilds, as the sed is already there. If you prefer a patch feel free to create one. I became a bit cautious about adding unconfirmed patches (which are not that important), as upstream is tad slow with integrating them, and I don't want to recreate them with every new release. Especially when upstream is switching eol-markers from LF to CRLF back and forth.

Revision history for this message
In , Diego Elio Pettenò (flameeyes) wrote :

Can I ask you please to enable the sed then? I'm unable to connect to CVS :(

And totally agree about avoiding patch files.

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

(In reply to comment #8)
> Can I ask you please to enable the sed then? I'm unable to connect to CVS :(
>
> And totally agree about avoiding patch files.
>

+*hplip-3.11.1-r1 (26 Jan 2011)
+
+ 26 Jan 2011; Daniel Pielmeier <email address hidden> -hplip-3.11.1.ebuild,
+ +hplip-3.11.1-r1.ebuild:
+ Revision bump to fix bug #345725. Thanks to Ben Sagal for reporting.

Fixed in cvs for hplip-3.11.1-r1. Closing this one for now. I will watch the upstream bug. Let's see how long it takes until they fix it.

Revision history for this message
Jiri Popelka (jpopelka) wrote :
Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi Jiri Popelka,

Thank you for providing the information.
As per the udev man page, /etc/udev/rules.d is the package or custom rules directory. So we don't see any issue in this.

Please let us know if you have any further information.

Thanks & Regards,
Amarnath

Revision history for this message
Daniel Pielmeier (daniel-pielmeier) wrote :

I second this. Udev rules installed by packages should go to /lib/udev/rules.d/. /etc/udev/rules.d/ is for the user/administrator where she can overwrite the rules from /lib.

PS:There is already bug #500086 open about this topic. It deals with the rules installed by hplip and the plugin package.

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in hplip:
assignee: nobody → Amarnath Chitumalla (amarnath-chitumalla)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.