summaryrefslogtreecommitdiff
path: root/repo/eudev
diff options
context:
space:
mode:
Diffstat (limited to 'repo/eudev')
-rw-r--r--repo/eudev/default-rules.patch9
-rw-r--r--repo/eudev/eudev.xibuild41
-rw-r--r--repo/eudev/load-fbcon.patch10
-rw-r--r--repo/eudev/udev.initd22
-rw-r--r--repo/eudev/udev_retry.initd31
5 files changed, 113 insertions, 0 deletions
diff --git a/repo/eudev/default-rules.patch b/repo/eudev/default-rules.patch
new file mode 100644
index 0000000..0786a98
--- /dev/null
+++ b/repo/eudev/default-rules.patch
@@ -0,0 +1,9 @@
+--- a/rules/50-udev-default.rules
++++ b/rules/50-udev-default.rules
+@@ -73,5 +73,6 @@ KERNEL=="rfkill", MODE="0664"
+ KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
+
+ KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
++KERNEL=="kvm", GROUP="kvm", MODE="0660"
+
+ LABEL="default_end"
diff --git a/repo/eudev/eudev.xibuild b/repo/eudev/eudev.xibuild
new file mode 100644
index 0000000..983d112
--- /dev/null
+++ b/repo/eudev/eudev.xibuild
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+MAKEDEPS="make autoconf automake"
+DEPS="gperf udev-rules kmod"
+
+PKG_VER=3.2.10
+SOURCE=https://dev.gentoo.org/~blueness/eudev/eudev-$PKG_VER.tar.gz
+DESC="Programs for dynamic creation of device nodes"
+ADDITIONAL="
+ default-rules.patch
+ load-fbcon.patch
+ udev.initd
+ udev_retry.initd
+"
+
+prepare () {
+ #apply_patches
+ autoreconf -fiv
+ sed -i 's/\$(LN_S) -n -f/\$(LN_S) -f/' src/udev/Makefile.in
+}
+
+build () {
+ ./configure --prefix=/usr \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --enable-manpages \
+ --disable-static
+ make
+}
+
+package () {
+ make DESTDIR=$PKG_DEST install
+
+ install -Dm 754 udev.initd $PKG_DEST/etc/init.d/udev
+ install -Dm 754 udev_retry.initd $PKG_DEST/etc/init.d/udev_retry
+ mkdir -p $PKG_DEST/etc/runlevels/boot/
+ ln -s /etc/init.d/udev $PKG_DEST/etc/runlevels/boot/udev
+ ln -s /etc/init.d/udev_retry $PKG_DEST/etc/runlevels/boot/udev_retry
+}
diff --git a/repo/eudev/load-fbcon.patch b/repo/eudev/load-fbcon.patch
new file mode 100644
index 0000000..e5e404a
--- /dev/null
+++ b/repo/eudev/load-fbcon.patch
@@ -0,0 +1,10 @@
+--- eudev-3.2.1/rules/80-drivers.rules.orig 2017-01-24 11:00:53.174192908 +0200
++++ eudev-3.2.1/rules/80-drivers.rules 2017-01-24 11:04:01.886714118 +0200
+@@ -8,6 +8,7 @@
+ SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block"
+ SUBSYSTEM=="i2o", RUN{builtin}+="kmod load i2o_block"
+ SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}+="kmod load ppdev"
++SUBSYSTEM=="graphics", RUN{builtin}+="kmod load fbcon"
+ KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}+="kmod load sm_ftl"
+
+ LABEL="drivers_end"
diff --git a/repo/eudev/udev.initd b/repo/eudev/udev.initd
new file mode 100644
index 0000000..5ce2354
--- /dev/null
+++ b/repo/eudev/udev.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+
+start () {
+ # Start the udev daemon to continually watch for, and act on,
+ # uevents
+ /sbin/udevd --daemon
+
+ # Now traverse /sys in order to "coldplug" devices that have
+ # already been discovered
+ /sbin/udevadm trigger --action=add --type=subsystems
+ /sbin/udevadm trigger --action=add --type=devices
+ /sbin/udevadm trigger --action=change --type=devices
+
+ # Now wait for udevd to process the uevents we triggered
+ if ! is_true "$OMIT_UDEV_SETTLE"; then
+ /sbin/udevadm settle
+ fi
+
+ # If any LVM based partitions are on the system, ensure they
+ # are activated so they can be used.
+ if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi
+}
diff --git a/repo/eudev/udev_retry.initd b/repo/eudev/udev_retry.initd
new file mode 100644
index 0000000..cfe077c
--- /dev/null
+++ b/repo/eudev/udev_retry.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+start () {
+ echo "Retrying failed uevents, if any..."
+
+ # As of udev-186, the --run option is no longer valid
+ #rundir=$(/sbin/udevadm info --run)
+ rundir=/run/udev
+ # From Debian: "copy the rules generated before / was mounted
+ # read-write":
+
+ for file in ${rundir}/tmp-rules--*; do
+ dest=${file##*tmp-rules--}
+ [ "$dest" = '*' ] && break
+ cat $file >> /etc/udev/rules.d/$dest
+ rm -f $file
+ done
+
+ # Re-trigger the uevents that may have failed,
+ # in hope they will succeed now
+ /bin/sed -e 's/#.*$//' /etc/sysconfig/udev_retry | /bin/grep -v '^$' | \
+ while read line ; do
+ for subsystem in $line ; do
+ /sbin/udevadm trigger --subsystem-match=$subsystem --action=add
+ done
+ done
+
+ # Now wait for udevd to process the uevents we triggered
+ if ! is_true "$OMIT_UDEV_RETRY_SETTLE"; then
+ /sbin/udevadm settle
+ fi
+}