Skip to content

Commit df9c4bc

Browse files
committed
mdevd: update to 0.6.1.2, add conf and service
1 parent ca463cf commit df9c4bc

3 files changed

Lines changed: 80 additions & 3 deletions

File tree

srcpkgs/mdevd/files/mdev.conf

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Configuration based on 'mdev-like-a-boss'.
2+
# https://github.com/slashbeast/mdev-like-a-boss/blob/master/mdev.conf
3+
4+
null root:root 666 @chmod 666 $MDEV
5+
zero root:root 666
6+
full root:root 666
7+
random root:root 444
8+
urandom root:root 444
9+
hwrandom root:root 444
10+
grsec root:root 660
11+
kmem root:root 640
12+
mem root:root 640
13+
14+
port root:root 640
15+
console root:tty 600 @chmod 600 $MDEV
16+
ptmx root:tty 666
17+
pty.* root:tty 660
18+
tty root:tty 666
19+
tty[0-9]* root:tty 660
20+
vcsa*[0-9]* root:tty 660
21+
22+
# Kernel based virtual machine.
23+
kvm root:kvm 660
24+
vhost-net root:kvm 660
25+
26+
# Block devices.
27+
ram([0-9]*) root:disk 660 >rd/%1
28+
loop([0-9]+) root:disk 660 >loop/%1
29+
sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom
30+
fd[0-9]* root:floppy 660
31+
32+
net/tun[0-9]* root:kvm 660
33+
net/tap[0-9]* root:root 600
34+
fuse root:root 666
35+
agpgart root:root 660 >misc/
36+
psaux root:root 660 >misc/
37+
rtc root:root 664 >misc/
38+
39+
# Audio stuff.
40+
adsp root:audio 660 >sound/
41+
audio root:audio 660 >sound/
42+
dsp root:audio 660 >sound/
43+
mixer root:audio 660 >sound/
44+
sequencer.* root:audio 660 >sound/
45+
snd/.* root:audio 660
46+
47+
# Raid controllers.
48+
cciss!(.*) root:disk 660 =cciss/%1
49+
ida!(.*) root:disk 660 =ida/%1
50+
rd!(.*) root:disk 660 =rd/%1
51+
52+
# Input stuff.
53+
SUBSYSTEM=input;.* root:input 660
54+
55+
# Video stuff.
56+
card[0-9] root:video 660 =dri/
57+
vbi[0-9] root:video 660 >v4l/
58+
video[0-9] root:video 660 >v4l/
59+
dri/.* root:video 660
60+
61+
# Don't create old usbdev* devices.
62+
usbdev[0-9].[0-9]* root:root 660 !
63+
64+
# Stop creating x:x:x:x which looks like /dev/dm-*.
65+
[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 !
66+
67+
# /dev/cpu support.
68+
microcode root:root 600 =cpu/
69+
cpu([0-9]+) root:root 600 =cpu/%1/cpuid
70+
msr([0-9]+) root:root 600 =cpu/%1/msr

srcpkgs/mdevd/files/mdevd/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
exec 2>&1
4+
exec mdevd -f /etc/mdev.conf -D 3 -b 200000 -O4

srcpkgs/mdevd/template

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Template file for 'mdevd'
22
pkgname=mdevd
3-
version=0.1.6.0
3+
version=0.1.6.2
44
revision=1
55
build_style=configure
66
configure_args="--includedir=/usr/include --bindir=/usr/bin --libdir=/usr/lib
@@ -14,9 +14,10 @@ license="ISC"
1414
homepage="https://skarnet.org/software/mdevd/"
1515
changelog="https://skarnet.org/software/mdevd/upgrade.html"
1616
distfiles="https://skarnet.org/software/mdevd/mdevd-${version}.tar.gz"
17-
checksum=33cf2b118634538fd24f302b30f52cc8aa28ea68b414916ce482b54a4ee57283
18-
17+
checksum=ac2fcf9004f07904592c5894e2c401e15bb027ecf37bcb8ea661e2a7993447be
18+
conf_files="/etc/mdev.conf"
1919
build_options="static"
20+
make_check=no # no tests
2021

2122
case "$XBPS_TARGET_MACHINE" in
2223
*-musl)
@@ -29,6 +30,8 @@ post_install() {
2930
vlicense COPYING
3031
vdoc README
3132
vcopy "doc/*" usr/share/doc/${pkgname}
33+
vsv mdevd
34+
vcopy ${FILESDIR}/mdev.conf etc/mdev.conf
3235
}
3336

3437
mdevd-doc_package() {

0 commit comments

Comments
 (0)