Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430900

Summary: sys-fs/mdadm-3.2.3-r1 - set udev rule install path using pkg-config
Product: Gentoo Linux Reporter: Nikolay S. Rybaloff <dairinin>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Get rules path from pkgconfig
use udevlibdir for udev rule
use udevdir from pkgconfig for rules.d path

Description Nikolay S. Rybaloff 2012-08-11 09:32:58 UTC
sys-fs/mdadm-3.2.3-r1, and probably all other versions, have fixed path for udev rules. There is a patch attached which can solve the problem, but I doubt upstream can use such an approach, as it probably breaks cross-compiling.

Reproducible: Always
Comment 1 Nikolay S. Rybaloff 2012-08-11 09:33:28 UTC
Created attachment 320984 [details, diff]
Get rules path from pkgconfig
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-08-12 15:29:51 UTC
Does anyone know where mdadm bugs/patches should be sent? The upstream site only has links to webgit and that's pretty much it
Comment 4 Nikolay S. Rybaloff 2012-08-12 15:36:21 UTC
I believe, linux-raid at vger.kernel.org is the right place
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-08-12 15:41:00 UTC
I've reverted the patch because the ifndef logic doesn't work. Move 'udev.pc' away and files end up in root filesystem /rules.d/

Fixed by sed in ebuild now
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-08-12 15:43:34 UTC
Comment on attachment 320984 [details, diff]
Get rules path from pkgconfig

If udev.pc is not available or is missing udevdir= the UDEVDIR gets set to empty value and files end up in /rules.d/ instead of /lib/udev/rules.d/ or /usr/lib/udev/rules.d/
Comment 7 Nikolay S. Rybaloff 2012-08-12 16:42:39 UTC
My bad. Need to use simple expansion...
Comment 8 Nikolay S. Rybaloff 2012-08-12 16:43:12 UTC
Created attachment 321134 [details]
use udevlibdir for udev rule
Comment 9 Nikolay S. Rybaloff 2012-08-12 16:48:10 UTC
Created attachment 321136 [details, diff]
use udevdir from pkgconfig for rules.d path
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2012-08-12 17:53:42 UTC
(In reply to comment #9)
> Created attachment 321136 [details, diff] [details, diff]
> use udevdir from pkgconfig for rules.d path

This works. I've imported it with a minor change to let PKG_CONFIG settable too.
Only to 3.2.5-r1.