aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-04-08 00:13:37 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-04-11 21:06:14 +0300
commit8787be718b0eda5b1e6ef58cf2e7a2a39c155b34 (patch)
tree5994b91ea1c7c8090e9108ad93b66d6d4f27abb7
parenta51f27f955d0e16b644e7388a015ccc137f4f4c9 (diff)
downloadaports-8787be718b0eda5b1e6ef58cf2e7a2a39c155b34.tar.gz
aports-8787be718b0eda5b1e6ef58cf2e7a2a39c155b34.tar.bz2
aports-8787be718b0eda5b1e6ef58cf2e7a2a39c155b34.tar.xz
main/udev-init-scripts: fix dependencies
Allow depending on udev-settle when udev is not desired. Remove virtual service definition from udev: dev is already provided by udev-trigger.
-rw-r--r--main/udev-init-scripts/0001-init.d-style-fixes.patch167
-rw-r--r--main/udev-init-scripts/0002-udev-settle-fix-timeout-argument-quoting.patch27
-rw-r--r--main/udev-init-scripts/0003-udev-settle-do-not-require-udev.patch31
-rw-r--r--main/udev-init-scripts/APKBUILD12
-rw-r--r--main/udev-init-scripts/modloop.patch10
-rw-r--r--main/udev-init-scripts/udev-init-scripts.patch14
6 files changed, 244 insertions, 17 deletions
diff --git a/main/udev-init-scripts/0001-init.d-style-fixes.patch b/main/udev-init-scripts/0001-init.d-style-fixes.patch
new file mode 100644
index 0000000000..378a737774
--- /dev/null
+++ b/main/udev-init-scripts/0001-init.d-style-fixes.patch
@@ -0,0 +1,167 @@
+From efdd416d20966196cf0ac8dd3231c5919b984ae8 Mon Sep 17 00:00:00 2001
+From: William Hubbs <williamh@gentoo.org>
+Date: Sat, 30 Nov 2019 14:07:34 -0600
+Subject: [PATCH 1/3] init.d: style fixes
+
+Signed-off-by: William Hubbs <williamh@gentoo.org>
+---
+ init.d/udev | 20 +++++++++-----------
+ init.d/udev-settle | 8 +++-----
+ init.d/udev-trigger | 23 +++++++++--------------
+ 3 files changed, 21 insertions(+), 30 deletions(-)
+
+diff --git a/init.d/udev b/init.d/udev
+index d0f9d61..6aea5a5 100644
+--- a/init.d/udev
++++ b/init.d/udev
+@@ -9,17 +9,17 @@ description="udev manages device permissions and symbolic links in /dev"
+ extra_started_commands="reload"
+ description_reload="Reload the udev rules and databases"
+
+-depend()
+-{
++depend() {
+ need sysfs dev-mount
+ before checkfs fsck
+ keyword -lxc -systemd-nspawn -vserver
+ }
+
+ get_udevd_binary() {
+- local bins="/sbin/udevd /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd"
++ local bins
++ bins="/sbin/udevd /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd"
+ for f in ${bins}; do
+- if [ -x "$f" -a ! -L "$f" ]; then
++ if [ -x "$f" ] && [ ! -L "$f" ]; then
+ command="$f"
+ fi
+ done
+@@ -29,8 +29,7 @@ get_udevd_binary() {
+ fi
+ }
+
+-start_pre()
+-{
++start_pre() {
+ # make sure devtmpfs is in the kernel
+ if ! grep -qs devtmpfs /proc/filesystems; then
+ eerror "CONFIG_DEVTMPFS=y is required in your kernel configuration"
+@@ -73,9 +72,9 @@ start_pre()
+ return 0
+ }
+
+-stop()
+-{
+- local rc=0
++stop() {
++ local rc
++ rc=0
+ ebegin "Stopping ${name:-$RC_SVCNAME}"
+ udevadm control --exit
+ rc=$?
+@@ -89,8 +88,7 @@ stop()
+ eend $rc "Failed to stop $RC_SVCNAME"
+ }
+
+-reload()
+-{
++reload() {
+ ebegin "reloading udev rules and databases"
+ udevadm control --reload
+ eend $?
+diff --git a/init.d/udev-settle b/init.d/udev-settle
+index c495769..f6e0707 100644
+--- a/init.d/udev-settle
++++ b/init.d/udev-settle
+@@ -2,18 +2,16 @@
+ # Copyright 2014 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
+
+-depend()
+-{
++depend() {
+ need udev
+ after udev-trigger
+ provide dev-settle
+ keyword -lxc -systemd-nspawn -vserver
+ }
+
+-start()
+-{
++start() {
+ ebegin "Waiting for uevents to be processed"
+ udevadm settle \
+- ${udev_settle_timeout:+--timeout=}$udev_settle_timeout
++ ${udev_settle_timeout:+--timeout=}"${udev_settle_timeout}"
+ eend $?
+ }
+diff --git a/init.d/udev-trigger b/init.d/udev-trigger
+index bdd4884..dfca873 100644
+--- a/init.d/udev-trigger
++++ b/init.d/udev-trigger
+@@ -7,15 +7,13 @@ description="udev Coldplug all Devices"
+ udevmonitor_log=/run/udevmonitor.log
+ udevmonitor_pid=/run/udevmonitor.pid
+
+-depend()
+-{
++depend() {
+ need udev
+ provide dev
+ keyword -lxc -systemd-nspawn -vserver
+ }
+
+-start_pre()
+-{
++start_pre() {
+ if yesno "${udev_monitor:-no}"; then
+ einfo "Running udevadm monitor ${udev_monitor_opts} to log all events"
+ start-stop-daemon --start --stdout "${udevmonitor_log}" \
+@@ -25,9 +23,8 @@ start_pre()
+ return 0
+ }
+
+-display_hotplugged_services()
+-{
+- local svcfile= svc= services=
++display_hotplugged_services() {
++ local svcfile svc services
+ for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
+ svc="${svcfile##*/}"
+ [ -x "${svcfile}" ] || continue
+@@ -38,8 +35,7 @@ display_hotplugged_services()
+ return 0
+ }
+
+-start_post()
+-{
++start_post() {
+ if yesno "${udev_monitor:-no}"; then
+ if yesno "${udev_monitor_keep_running:-no}"; then
+ ewarn "udevmonitor is still writing into ${udevmonitor_log}"
+@@ -56,9 +52,9 @@ start_post()
+ # This is here because some software expects /dev/root to exist.
+ # For more information, see this bug:
+ # https://bugs.gentoo.org/show_bug.cgi?id=438380
+-dev_root_link()
+-{
+- local RULESDIR=/run/udev/rules.d
++dev_root_link() {
++ local RULESDIR
++ RULESDIR=/run/udev/rules.d
+ [ -d $RULESDIR ] || mkdir -p $RULESDIR
+ eval $(udevadm info --export --export-prefix=ROOT_ --device-id-of-file=/ ||
+ true)
+@@ -71,8 +67,7 @@ dev_root_link()
+ return 0
+ }
+
+-start()
+-{
++start() {
+ if yesno ${rc_dev_root_symlink:-yes}; then
+ ebegin "Generating a rule to create a /dev/root symlink"
+ dev_root_link
+--
+2.25.2
+
diff --git a/main/udev-init-scripts/0002-udev-settle-fix-timeout-argument-quoting.patch b/main/udev-init-scripts/0002-udev-settle-fix-timeout-argument-quoting.patch
new file mode 100644
index 0000000000..6ee1f56416
--- /dev/null
+++ b/main/udev-init-scripts/0002-udev-settle-fix-timeout-argument-quoting.patch
@@ -0,0 +1,27 @@
+From 88e06f1c7cfedf21e3af33252defbd189b819274 Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Sat, 11 Apr 2020 16:20:03 +0300
+Subject: [PATCH 2/3] udev-settle: fix timeout argument quoting
+
+empty value resulted in "Extraneous argument" error
+
+Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+---
+ init.d/udev-settle | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/init.d/udev-settle b/init.d/udev-settle
+index f6e0707..a5ceb93 100644
+--- a/init.d/udev-settle
++++ b/init.d/udev-settle
+@@ -12,6 +12,6 @@ depend() {
+ start() {
+ ebegin "Waiting for uevents to be processed"
+ udevadm settle \
+- ${udev_settle_timeout:+--timeout=}"${udev_settle_timeout}"
++ ${udev_settle_timeout:+--timeout="${udev_settle_timeout}"}
+ eend $?
+ }
+--
+2.25.2
+
diff --git a/main/udev-init-scripts/0003-udev-settle-do-not-require-udev.patch b/main/udev-init-scripts/0003-udev-settle-do-not-require-udev.patch
new file mode 100644
index 0000000000..e95cc00209
--- /dev/null
+++ b/main/udev-init-scripts/0003-udev-settle-do-not-require-udev.patch
@@ -0,0 +1,31 @@
+From c8b7cc5d4de0387c8edf51da6a85ab05ca710236 Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Wed, 8 Apr 2020 00:18:38 +0300
+Subject: [PATCH 3/3] udev-settle: do not require udev
+
+The purpose of this service is to ensure all udev events have been processed.
+It is not to be directly added to any runlevel but rather to be required by
+other services. This change allows this service as a dependency even when udev
+is not used but /dev is populated by another service.
+
+Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+---
+ init.d/udev-settle | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/init.d/udev-settle b/init.d/udev-settle
+index a5ceb93..2b5767e 100644
+--- a/init.d/udev-settle
++++ b/init.d/udev-settle
+@@ -3,7 +3,7 @@
+ # Distributed under the terms of the GNU General Public License v2
+
+ depend() {
+- need udev
++ need dev
+ after udev-trigger
+ provide dev-settle
+ keyword -lxc -systemd-nspawn -vserver
+--
+2.25.2
+
diff --git a/main/udev-init-scripts/APKBUILD b/main/udev-init-scripts/APKBUILD
index 41708c925f..593c35dcb5 100644
--- a/main/udev-init-scripts/APKBUILD
+++ b/main/udev-init-scripts/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=udev-init-scripts
pkgver=33
-pkgrel=0
+pkgrel=1
pkgdesc="udev startup scripts for openrc"
url="https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/udev-init-scripts"
arch="noarch"
@@ -12,7 +12,10 @@ replaces="udev"
subpackages="$pkgname-openrc"
install="$pkgname.post-install $pkgname.post-upgrade"
source="https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/snapshot/udev-gentoo-scripts-$pkgver.tar.gz
- $pkgname.patch
+ 0001-init.d-style-fixes.patch
+ 0002-udev-settle-fix-timeout-argument-quoting.patch
+ 0003-udev-settle-do-not-require-udev.patch
+ modloop.patch
"
builddir="$srcdir/udev-gentoo-scripts-$pkgver"
@@ -27,4 +30,7 @@ package() {
}
sha512sums="2119aace937da02f47a5adc9af720587d25c2852cf70a9bcb04138e3ee511308c8f30cf0301fbec58cf0432b7fd6672ae6a02d1740c774703959197b3511fbcc udev-gentoo-scripts-33.tar.gz
-8f4ca4b0c7e2e51ff2e88ea724b55fe3178e5a72dfa8f0624aef5946f95f1b690f517be913bf295462866faa0085dbfac2d024982514a9d1d976ab8b79d29e06 udev-init-scripts.patch"
+72cd3774e27020551f701a74e89d3d32cd378f48f9a602db7fa464b57f44d33769b30c050fb105e0131fc3af3550c8e558d368887b1e1bffa0944ffe476c1aa4 0001-init.d-style-fixes.patch
+e56af9a3450041f4db416ec4d666504e9e288b32a90fecc985d57801da1a024aa172b10e9558fe7910831012f35abc043e9eb56134481d10c5bcdefe832ed5c7 0002-udev-settle-fix-timeout-argument-quoting.patch
+080b709eebe60e36c769fc3dec4ea7d851ab72eaa0f036de45113bcd48fc6909d1c37d052f1dcfc4ad7c380b991e5bd97c4efb694c78011b532bf1fff93274cc 0003-udev-settle-do-not-require-udev.patch
+8ae5b7574bff461006f5f4034313e6e5f3a88d5bb00fbb850c169a4685abafcb592c82283418e2b9dc8a238b460fa1a153d992905b9b8edd1c0949f7c8dfc274 modloop.patch"
diff --git a/main/udev-init-scripts/modloop.patch b/main/udev-init-scripts/modloop.patch
new file mode 100644
index 0000000000..4a9920ba03
--- /dev/null
+++ b/main/udev-init-scripts/modloop.patch
@@ -0,0 +1,10 @@
+--- udev-gentoo-scripts-33/init.d/udev
++++ udev-gentoo-scripts-33.alpine/init.d/udev
+@@ -11,6 +11,7 @@
+
+ depend() {
+ need sysfs dev-mount
++ use modloop
+ before checkfs fsck
+ keyword -lxc -systemd-nspawn -vserver
+ }
diff --git a/main/udev-init-scripts/udev-init-scripts.patch b/main/udev-init-scripts/udev-init-scripts.patch
deleted file mode 100644
index d53b7d3fd7..0000000000
--- a/main/udev-init-scripts/udev-init-scripts.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/init.d/udev
-+++ b/init.d/udev
-@@ -9,9 +9,11 @@
-
- depend()
- {
-+ use modloop
- need sysfs dev-mount
- before checkfs fsck
- keyword -lxc -systemd-nspawn -vserver
-+ provide dev
- }
-
- get_udevd_binary() {