diff options
Diffstat (limited to 'repos/extra/mdevd')
| -rw-r--r-- | repos/extra/mdevd/.checksum | 3 | ||||
| -rw-r--r-- | repos/extra/mdevd/.files | 14 | ||||
| -rw-r--r-- | repos/extra/mdevd/abuild | 22 | ||||
| -rw-r--r-- | repos/extra/mdevd/mdevd.conf | 70 | ||||
| -rw-r--r-- | repos/extra/mdevd/mdevd.run | 5 |
5 files changed, 114 insertions, 0 deletions
diff --git a/repos/extra/mdevd/.checksum b/repos/extra/mdevd/.checksum new file mode 100644 index 00000000..065f61c4 --- /dev/null +++ b/repos/extra/mdevd/.checksum @@ -0,0 +1,3 @@ +0a4d3d9af5e39d79ce20371c09df98d541c8fd72ce2e1e6b91021ada15b2bc15 mdevd-v0.1.6.5.tar.gz +2e60d9f1a12c1b5332b7e49d0698ec1091c97fbd4fa68bb9dd712054844d1c09 mdevd.conf +462a2ffcd9fdea2416dedff9b385bc3ddcc3a9e4e02b2134a77285e79ce54fa4 mdevd.run diff --git a/repos/extra/mdevd/.files b/repos/extra/mdevd/.files new file mode 100644 index 00000000..339dd5d8 --- /dev/null +++ b/repos/extra/mdevd/.files @@ -0,0 +1,14 @@ +drwxr-xr-x root/root etc/ +-rw-r--r-- root/root etc/mdevd.conf.new +-rw-r--r-- root/root etc/rc.boot.new +drwxr-xr-x root/root etc/sv/ +drwxr-xr-x root/root etc/sv/mdevd/ +-rwxr-xr-x root/root etc/sv/mdevd/run.new +lrwxrwxrwx root/root etc/sv/mdevd/supervise -> ../../../run/runit/supervise.mdevd +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/mdevd +-rwxr-xr-x root/root usr/bin/mdevd-coldplug +drwxr-xr-x root/root usr/include/ +drwxr-xr-x root/root usr/include/mdevd/ +-rw-r--r-- root/root usr/include/mdevd/config.h diff --git a/repos/extra/mdevd/abuild b/repos/extra/mdevd/abuild new file mode 100644 index 00000000..d904a52f --- /dev/null +++ b/repos/extra/mdevd/abuild @@ -0,0 +1,22 @@ +name=mdevd +version=master +version=0.1.6.5 +release=1 +source="https://github.com/skarnet/${name}/archive/v${version}/${name}-v${version}.tar.gz + mdevd.conf + mdevd.run" +sv="mdevd.run" +keep_static=1 + +build() { + ./configure \ + --prefix=/usr \ + --enable-static-libc #\ + #--disable-shared + make + make install + + mkdir "$PKG/etc" + mv "$SRC/mdevd.conf" "$PKG/etc/mdevd.conf" + sed '/mdev/ { /#/! s/^/#/; }' /etc/rc.boot >"$PKG/etc/rc.boot" +} diff --git a/repos/extra/mdevd/mdevd.conf b/repos/extra/mdevd/mdevd.conf new file mode 100644 index 00000000..0c88a022 --- /dev/null +++ b/repos/extra/mdevd/mdevd.conf @@ -0,0 +1,70 @@ +# Configuration based on 'mdev-like-a-boss'. +# https://github.com/slashbeast/mdev-like-a-boss/blob/master/mdev.conf + +null root:root 666 @chmod 666 $MDEV +zero root:root 666 +full root:root 666 +random root:root 444 +urandom root:root 444 +hwrandom root:root 444 +grsec root:root 660 +kmem root:root 640 +mem root:root 640 + +port root:root 640 +console root:tty 600 @chmod 600 $MDEV +ptmx root:tty 666 +pty.* root:tty 660 +tty root:tty 666 +tty[0-9]* root:tty 660 +vcsa*[0-9]* root:tty 660 + +# Kernel based virtual machine. +kvm root:kvm 660 +vhost-net root:kvm 660 + +# Block devices. +ram([0-9]*) root:disk 660 >rd/%1 +loop([0-9]+) root:disk 660 >loop/%1 +sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom +fd[0-9]* root:floppy 660 + +net/tun[0-9]* root:kvm 660 +net/tap[0-9]* root:root 600 +fuse root:root 666 +agpgart root:root 660 >misc/ +psaux root:root 660 >misc/ +rtc root:root 664 >misc/ + +# Audio stuff. +adsp root:audio 660 >sound/ +audio root:audio 660 >sound/ +dsp root:audio 660 >sound/ +mixer root:audio 660 >sound/ +sequencer.* root:audio 660 >sound/ +snd/.* root:audio 660 + +# Raid controllers. +cciss!(.*) root:disk 660 =cciss/%1 +ida!(.*) root:disk 660 =ida/%1 +rd!(.*) root:disk 660 =rd/%1 + +# Input stuff. +SUBSYSTEM=input;.* root:input 660 + +# Video stuff. +card[0-9] root:video 660 =dri/ +vbi[0-9] root:video 660 >v4l/ +video[0-9] root:video 660 >v4l/ +dri/.* root:video 660 + +# Don't create old usbdev* devices. +usbdev[0-9].[0-9]* root:root 660 ! + +# Stop creating x:x:x:x which looks like /dev/dm-*. +[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 ! + +# /dev/cpu support. +microcode root:root 600 =cpu/ +cpu([0-9]+) root:root 600 =cpu/%1/cpuid +msr([0-9]+) root:root 600 =cpu/%1/msr diff --git a/repos/extra/mdevd/mdevd.run b/repos/extra/mdevd/mdevd.run new file mode 100644 index 00000000..2088c604 --- /dev/null +++ b/repos/extra/mdevd/mdevd.run @@ -0,0 +1,5 @@ +#!/bin/sh + +# Null the legacy hotplugger as the service will take over from here. +printf '\n' 2>/dev/null > /proc/sys/kernel/hotplug +exec mdevd -f /etc/mdevd.conf -O 4 -C |