Subject: [alpine-aports] [PATCH] main/eudev: make sure that the group for /dev/kvm is set to 'kvm'

From: Sören Tempel <[email-masked]>
Date: Mon, 10 Oct 2016 21:47:28 +0200

This group is also used by the default mdev configuration file for
/dev/kvm thus for the sake of consistency eudev should also use the
same group for that device.
---
 main/eudev/10-kvm.rules |  2 ++
 main/eudev/APKBUILD     | 21 +++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)
 create mode 100644 main/eudev/10-kvm.rules

diff --git a/main/eudev/10-kvm.rules b/main/eudev/10-kvm.rules
new file mode 100644
index 0000000..60c4319
--- /dev/null
+++ b/main/eudev/10-kvm.rules
@@ -0,0 +1,2 @@
+# Make sure that the group for /dev/kvm is set to kvm.
+KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"
diff --git a/main/eudev/APKBUILD b/main/eudev/APKBUILD
index 80ff36a..59be8c3 100644
--- a/main/eudev/APKBUILD
+++ b/main/eudev/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=eudev
 pkgver=3.2
-pkgrel=0
+pkgrel=1
 pkgdesc="OpenRC compatible fork of systemd-udev"
 url="https://wiki.gentoo.org/wiki/Project:Eudev"
 arch="all"
@@ -17,6 +17,8 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-netifnames"
 source="http://dev.gentoo.org/~blueness/$pkgname/$pkgname-$pkgver.tar.gz
 	udev-postmount.initd
 	setup-udev
+
+	10-kvm.rules
 	"
 
 builddir="$srcdir"/$pkgname-$pkgver
@@ -51,6 +53,14 @@ package() {
 		"$pkgdir"/etc/init.d/udev-postmount || return 1
 	install -Dm755 "$srcdir"/setup-udev \
 		"$pkgdir"/sbin/setup-udev || return 1
+
+	local file=
+	for file in $source; do
+		case "$file" in
+		*.rules) install -Dm644 "$srcdir"/"$file" \
+			"$pkgdir"/etc/udev/rules.d/"$file" || return 1 ;;
+		esac
+	done
 }
 
 dev() {
@@ -79,10 +89,13 @@ netifnames() {
 
 md5sums="7e42d9b9ed8162021665139520676367  eudev-3.2.tar.gz
 17ca36a764f5e8a89454344cde828740  udev-postmount.initd
-6fe6a4b05f2768e240c3a20caa0f0cee  setup-udev"
+6fe6a4b05f2768e240c3a20caa0f0cee  setup-udev
+b7be3d87a2ec433d9fd3c3fededb9973  10-kvm.rules"
 sha256sums="d84a5f7942393a009afc6af0bf31e98841147a0521b91ffbed161dccac303c25  eudev-3.2.tar.gz
 b0327069dbb57b39600079b87df80915dabb77c2fa298d6ae109ca04f8ba08b5  udev-postmount.initd
-7c961c05700e881677249d3aa0ac3a4b489d203cab7464d38f1a78c3692026be  setup-udev"
+7c961c05700e881677249d3aa0ac3a4b489d203cab7464d38f1a78c3692026be  setup-udev
+a01d38f9bd7208fd4aa35b8df299b87e21ae8e8f03e24e92ce93d8a8d433232e  10-kvm.rules"
 sha512sums="84c4dc6683531a3efb1e6b4e3ce4108c1747a7d7f07519d46009a9d1b77323d4e0331aa4c2870a4b571bfb01f6bec3444f1bf0d4ed0a524118b32ded49c3eb7c  eudev-3.2.tar.gz
 8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88  udev-postmount.initd
-aa8a040ad503633bf751e8cab34535715f0db2a8b4b716a1dc0b00a6f9c6a78fabc0652daba3e43df91d4d80c68563c00a27b7bc6f419573bc7704a5c7f76ee1  setup-udev"
+aa8a040ad503633bf751e8cab34535715f0db2a8b4b716a1dc0b00a6f9c6a78fabc0652daba3e43df91d4d80c68563c00a27b7bc6f419573bc7704a5c7f76ee1  setup-udev
+bbaa798c8f1e727072863dfbc8af04fe75bdb7e2bef1dea4dc9eefc88a113103b46e4df5e5037d2c860531b8f316db4e36ad5651ab9f7877100b3884b4e420ee  10-kvm.rules"
-- 
2.10.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---