Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46688 - Tweak udev ebuild to use rules/permissions directory instead of a single file
Summary: Tweak udev ebuild to use rules/permissions directory instead of a single file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-03 07:10 UTC by Andreas Eckstein
Modified: 2004-04-21 16:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Eckstein 2004-04-03 07:10:29 UTC
I would like to have a rules directory in udev.conf rather than udev.rules, so that my custom rules are not clobbered after an update. Since udev already supports to search a directory for *.rules/*.permissions files, a small change in the ebuild and an alterative udev config file in $FILESDIR is all that is needed. I've done a patch against udev-024-r1.ebuild:

[PATCH]
--- udev-024-r1.ebuild	2004-04-03 17:15:55.600424640 +0000
+++ udev-024-r2.ebuild	2004-04-03 17:18:33.538414416 +0000
@@ -101,11 +101,14 @@
 	doexe extras/scsi-devfs.sh
 
 	insinto /etc/udev
-	doins ${FILESDIR}/udev.conf
+#	doins ${FILESDIR}/udev.conf
+	newins ${FILESDIR}/udev_dir.conf udev.conf
 #	newins etc/udev/udev.rules udev.rules.example
 	# For devfs style layout
+	insinto /etc/udev/rules
 	newins etc/udev/udev.rules.gentoo udev.rules
 	# Our own custom udev.permissions
+	insinto /etc/udev/permissions
 	newins etc/udev/udev.permissions.gentoo udev.permissions
 #	doins ${FILESDIR}/udev.permissions
 #	doins etc/udev/udev.permissions
[/PATCH]

Yes I know the patch is quite trivial but I didn't want to submit a feature request without a patch ;)

Assumptions made in this patch:
-rules dir is /etc/udev/rules
-permissions dir is /etc/udev/permissions
-there is a file 'udev_dir.conf' in $FILEDIR with the appropriate configuration changes, namely:
    udev_rules="/etc/udev/rules"
    udev_permissions="/etc/udev/permissions"
    

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-04-21 16:58:15 UTC
I did something like this in the 025 release.  You now have directories for the
permissions and rules.