site  contact  subhomenews

Device node owner:group setup

May 02, 2011 — BarryK
Ok, it has taken me awhile, but I have got some important device node infrastructure setup in Woof.

I got confused for quite some time, as /etc/rc.d/rc.sysinit had this:

UDEV_LOG=2 /sbin/udevd --daemon --resolve-names=never

...and I eventually discovered that the "never" meant that the rules for creation of device nodes with correct owner:group are ignored. I changed it to "early".

udev 167
I have bumped udev from 151 to 167. No particular reason, presumably 167 is better for kernels 2.6.31 and later.
The PETs are uploaded to the quirky repo, and although compiled in Wary should also work in all puppies. I created static and shared-lib PETs. To use the shared-lib PET in Woof:

udev rules
The udev PETs do not have any rules. Instead they are provided in rootfs-skeleton. They are very much cut-down.

To /etc/udev/rules.d/50-udev-puppy-basic.rules I have inserted this:

# ---------------------------------------

# sound
# note, /lib/udev/rules.d/50-udev-default.rules is from udev 167, has rules for
# ownership:group and permissions when device nodes are created.

# from kirk, fatdog64...
KERNEL=="audio0", SYMLINK+="audio"
KERNEL=="dsp0", SYMLINK+="dsp"
KERNEL=="mixer0", SYMLINK+="mixer"

# sound devices (oss) -- got this from gentoo rules --needed?
SUBSYSTEM=="snd", GROUP="audio"

# ---------------------------------------

I copied this full file from udev 167 into rootfs-skeleton:


...this causes all dynamically generated device nodes to have particular groups.

Device node groups
/etc/group now has this, to match 50-udev-default.rules:


I have removed all of the static sound device nodes from /dev, so they all get dynamically generated. The same will be done for some others in the future.


fido and spot
Username: BarryK
I should add the note that I have set things up so that both the fido and spot solutions can be implemented. In the same distro, the user could be offered to run as root with browser (etc.) running as root or spot, or to switch the entire save-file to fido.

Username: mavrothal
"Very good news! I was wondering if all these (busybox, udev, fido/spot script) could be offered as a single pet that could update existing builds without the need of remastering/rebuilding.

Paintball2? reCAPTCHA.
Username: abushcrafter
"Does this mean Paintball2 will work under spot? Could you replace the "Security Code" part of the comment form with recaptcha, it would be useful to society?

Username: scottman
"I can already use the following to run paintball2 in puppy4 (puplite, guess its standard)... su spot paintball2 It works fine.. Can you not do this? Also, personally, I like the security code thing, more than reCaptcha, which i use on my site, its a pain in the ass..

RE: Paintball2
Username: abushcrafter
"No I can't do this. See the links I posted. What's the pain(s) with reCaptcha? I haven't used it on a site my self.

Tags: woof