summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--0000-change_shell.patch16
-rw-r--r--PKGBUILD37
-rw-r--r--config.h10
-rw-r--r--hook4
-rw-r--r--install2
-rwxr-xr-xmodprobe_env2
7 files changed, 46 insertions, 42 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9593ee998dc..ff812c7f6b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nldev-phkr
pkgdesc = frontend for mdev, replacing the over-engineered udevd
- pkgver = 0.3
- pkgrel = 7
+ pkgver = 0.4
+ pkgrel = 1
url = http://git.r-36.net/nldev/
arch = i686
arch = x86_64
@@ -9,19 +9,22 @@ pkgbase = nldev-phkr
license = MIT
makedepends = git
depends = mdev
+ depends = libudev-zero
provides = udev
provides = eudev
- source = git://git.r-36.net/nldev#commit=e0713f6
- source = 0000-change_shell.patch
+ source = git://git.r-36.net/nldev#commit=662ba2
source = 0001-increase_buffer.patch
source = config.mk
+ source = config.h
+ source = modprobe_env
source = hook
source = install
md5sums = SKIP
- md5sums = f96e7f40e2f4c5378c93c5cc97d4185d
md5sums = 508367c15bf5117870c7dc0765cba2b9
md5sums = 1c4dcaf94bebdcb8f47a520776fd9ee0
- md5sums = 613a765dc1e0c2f203dbfae452f346ed
- md5sums = 3c76a58298fca8325843639d2a02b5d4
+ md5sums = ea205fb256e238fbbfccf306a9cfad53
+ md5sums = d1b6c44df9341b820580ddca68916bc6
+ md5sums = 08bc0a3a9fdbe7d1da7d04e1cd410de4
+ md5sums = a4d070d365a0d3636f0e28d89beca106
pkgname = nldev
diff --git a/0000-change_shell.patch b/0000-change_shell.patch
deleted file mode 100644
index f69117dafe3..00000000000
--- a/0000-change_shell.patch
+++ /dev/null
@@ -1,16 +0,0 @@
----
- nltrigger | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/nltrigger b/nltrigger
-index b591d32..e09598b 100755
---- a/nltrigger
-+++ b/nltrigger
-@@ -1,4 +1,4 @@
--#!/bin/busybox ash
-+#!/bin/sh
-
- usage() {
- printf "usage: %s [add|list|del|action] [subsystem]\n" "$(basename $1)" >&2
---
-2.20.1
diff --git a/PKGBUILD b/PKGBUILD
index 05be91615cf..29288a71230 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,47 +2,50 @@
pkgbase=nldev-phkr
pkgname=nldev
-pkgver=0.3
-pkgrel=7
+pkgver=0.4
+pkgrel=1
pkgdesc="frontend for mdev, replacing the over-engineered udevd"
url="http://git.r-36.net/nldev/"
arch=('i686' 'x86_64' 'aarch64')
makedepends=(git)
-depends=('mdev')
+depends=('mdev' 'libudev-zero')
license=('MIT')
-_commit=e0713f6
+_commit=662ba2
source=("git://git.r-36.net/nldev#commit=$_commit"
- "0000-change_shell.patch"
"0001-increase_buffer.patch"
'config.mk'
+ 'config.h'
+ 'modprobe_env'
'hook'
'install')
md5sums=('SKIP'
- 'f96e7f40e2f4c5378c93c5cc97d4185d'
'508367c15bf5117870c7dc0765cba2b9'
'1c4dcaf94bebdcb8f47a520776fd9ee0'
- '613a765dc1e0c2f203dbfae452f346ed'
- '3c76a58298fca8325843639d2a02b5d4')
+ 'ea205fb256e238fbbfccf306a9cfad53'
+ 'd1b6c44df9341b820580ddca68916bc6'
+ '08bc0a3a9fdbe7d1da7d04e1cd410de4'
+ 'a4d070d365a0d3636f0e28d89beca106')
provides=('udev' 'eudev')
prepare() {
cd "${srcdir}/${pkgname}"
- patch -Np1 -i ../0000-change_shell.patch
patch -Np1 -i ../0001-increase_buffer.patch
cp ../config.mk ./
+ cp ../config.h ./
}
build() {
- cd "$srcdir/$pkgname"
- make
+ cd "$srcdir/$pkgname"
+ make
}
package() {
- cd "$srcdir/$pkgname"
- make DESTDIR="$pkgdir" PREFIX=/usr install
- install -m644 -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
- cd "$srcdir"
- install -m644 -D hook "$pkgdir/usr/lib/initcpio/hooks/nldev"
- install -m644 -D install "$pkgdir/usr/lib/initcpio/install/nldev"
+ cd "$srcdir/$pkgname"
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+ install -m644 -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ cd "$srcdir"
+ install -m644 -D hook "$pkgdir/usr/lib/initcpio/hooks/nldev"
+ install -m644 -D install "$pkgdir/usr/lib/initcpio/install/nldev"
+ install -m755 -D modprobe_env "$pkgdir/usr/bin/modprobe_env"
}
diff --git a/config.h b/config.h
new file mode 100644
index 00000000000..3718d01e215
--- /dev/null
+++ b/config.h
@@ -0,0 +1,10 @@
+static const Rule rules[] = {
+ /* ACTION SUBSYSTEM other env variables command to run */
+ { "add", NULL, "DEVNAME", "/usr/bin/smdev" },
+ { "remove", NULL, "DEVNAME", "/usr/bin/smdev" },
+ { "add", NULL, "MODALIAS", "/usr/bin/modprobe_env" },
+ { "add", NULL, NULL, "/usr/bin/libudev-helper" },
+ { "remove", NULL, NULL, "/usr/bin/libudev-helper" },
+ { "bind", NULL, NULL, "/usr/bin/libudev-helper" },
+ { "change", NULL, NULL, "/usr/bin/libudev-helper" },
+};
diff --git a/hook b/hook
index 556e58878ed..e964db5b20a 100644
--- a/hook
+++ b/hook
@@ -5,13 +5,13 @@ run_earlyhook() {
ln -sf /proc/self/fd/0 /dev/stdin
ln -sf /proc/self/fd/1 /dev/stdout
ln -sf /proc/self/fd/2 /dev/stderr
- nldev -r /usr/bin/smdev &
+ nldev &
echo $! > /run/nldev.pid
}
run_hook() {
msg ":: Triggering uevents..."
- nltrigger add all
+ nltrigger /sys add 0
sleep 1s
}
diff --git a/install b/install
index 06cff14a9aa..c621ad9d029 100644
--- a/install
+++ b/install
@@ -6,6 +6,8 @@ build() {
add_binary /usr/bin/nldev
add_binary /usr/bin/nltrigger
add_binary /usr/bin/find
+ add_binary /usr/bin/modprobe_env
+ add_binary /usr/bin/libudev-helper
add_file /usr/lib/libm.so.6
for file in /etc/smdev/add/*; do
diff --git a/modprobe_env b/modprobe_env
new file mode 100755
index 00000000000..a2b237b64c7
--- /dev/null
+++ b/modprobe_env
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec modprobe $MODALIAS 2> /dev/null