Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#13197 - [PATCH] initscripts/udev: Use the /lib/udev/devices/
Attached to Project:
Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Wednesday, 11 February 2009, 02:56 GMT
Last edited by Thomas Bächler (brain0) - Monday, 09 March 2009, 08:17 GMT
Opened by Gerardo Exequiel Pozzi (djgera) - Wednesday, 11 February 2009, 02:56 GMT
Last edited by Thomas Bächler (brain0) - Monday, 09 March 2009, 08:17 GMT
|
DetailsHi
The udev documentation recommend to use the directory /lib/udev/devices/ for initial, static and custom devices. Citation from README: - The content of /lib/udev/devices/ directory which contains the nodes, symlinks and directories, which are always expected to be in /dev, should be copied over to the tmpfs mounted /dev, to provide the required nodes to initialize udev and continue booting. Also, this work with this rule defined at /lib/udev/rules.d/50-udev-default.rules: # do not delete static device nodes ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove" I modified the rc.sysinit to complain with this, the patch is attached. Also script is attached to make /lib/udev/devices/* these files maybe created at the udev "install scriptlet" or in "PKGBUILD". I tested in my system and its work fine ;) |
This task depends upon
rc.sysinit.patch
a) check if the node exists first, for each node
b) create the actual dir if it doesn't exist
b) use the mount trick the current install script does - because a tmpfs is mounted on top of /dev
Then we can use that in place of the current install scriptlet
Otherwise, I like this
I created a patch for the actual udev.install to create the special files under /lib/udev/devices at the post_install()
Please note that the udev.install create the chars devices "null" and "zero" with the incorrect permission "0644" should be "0666".
Need a post_remove() to delete these files under /lib/udev/devices/* in udev.install ? Then also provide a patch with it ;)
* fixed the "uninstall phase", post_remove() -> pre_remove().
* when upgrade create the devices if version < 135-2 in post_upgrade()
* create a funtion _make_devices_install() in the udev.install (this is good or bad practice in these files?)
The patch is attached
Other than that, I like it - tpowa, what do you think?
And yes, is better to create in the PKGBUILD "mkdir /lib/udev/devices/{pts,shm}" :)
so we could test this too :).
im pretty busy at the moment, so i don't expect to have time for doing this now.
I commited the required change to initscripts.git and I am going to add some more magic to the udev package that is now possible with this trick.
I followed the line to put them on .install, because I thought maybe it was a philosophical question not put special files in a tar.gz
About special files in the package: You should not put files into a package that will go to /dev/, but special files in general seem to work fine. This should all be implemented and working fine, closing now.