From f49af0b03bd94d2137d2d9938e23d81475287958 Mon Sep 17 00:00:00 2001 From: Boian Bonev Date: Thu, 31 Aug 2023 23:46:56 +0000 Subject: [PATCH 1/3] Fix := not preventing further assignments to RUN Closes #256 Suggested by: Aksel Lunde Aase --- src/udev/udev-rules.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 198875bc9..32df8b9cb 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -2601,6 +2601,10 @@ int udev_rules_apply_to_event(struct udev_rules *rules, case TK_A_RUN_PROGRAM: { struct udev_list_entry *entry; + if (event->run_final) + break; + if (cur->key.op == OP_ASSIGN_FINAL) + event->run_final = true; if (cur->key.op == OP_ASSIGN || cur->key.op == OP_ASSIGN_FINAL) udev_list_cleanup(&event->run_list); log_debug("RUN '%s' %s:%u", From e5e4013cb7a5c1b192a044414793f341604d1881 Mon Sep 17 00:00:00 2001 From: Boian Bonev Date: Sat, 30 Sep 2023 16:52:12 +0000 Subject: [PATCH 2/3] Move the changes from udev.7 to udev.xml Commit 0cf14fb changed only the generated udev.7 without touching the source file udev.xml --- man/udev.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/man/udev.xml b/man/udev.xml index 98bfaed2a..eb6d38c3e 100644 --- a/man/udev.xml +++ b/man/udev.xml @@ -55,15 +55,17 @@ Rules Files - The udev rules are read from the files located in the - system rules directory /lib/udev/rules.d, + The udev rules are read from the files located in the system rules + directory /lib/udev/rules.d (additionally + /usr/lib/udev/rules.d when built with --enable-split-usr), the volatile runtime directory /run/udev/rules.d and the local administration directory /etc/udev/rules.d. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live. However, files with identical filenames replace each other. Files in /etc have the highest priority, files in /run take precedence - over files with the same name in /lib. This can be + over files with the same name in /lib (or + /usr/lib). This can be used to override a system-supplied rules file with a local file if needed; a symlink in /etc with the same name as a rules file in /lib, pointing to /dev/null, From 19aa81d9bfeea4e062a65a44cd627d5c5581f974 Mon Sep 17 00:00:00 2001 From: Boian Bonev Date: Sat, 30 Sep 2023 16:55:44 +0000 Subject: [PATCH 3/3] Regenerate according to 0cf14fb and e5e4013 --- man/udev.7 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/udev.7 b/man/udev.7 index 3322676d6..1561878ab 100644 --- a/man/udev.7 +++ b/man/udev.7 @@ -34,7 +34,10 @@ All device information udev processes is stored in the udev database and sent ou .SH "RULES FILES" .PP The udev rules are read from the files located in the system rules directory -/lib/udev/rules\&.d (additionally /usr/lib/udev/rules\&.d when built with --enable-split-usr), the volatile runtime directory +/lib/udev/rules\&.d +(additionally +/usr/lib/udev/rules\&.d +when built with \-\-enable\-split\-usr), the volatile runtime directory /run/udev/rules\&.d and the local administration directory /etc/udev/rules\&.d\&. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in @@ -42,7 +45,9 @@ and the local administration directory have the highest priority, files in /run take precedence over files with the same name in -/lib (or /usr/lib)\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in +/lib +(or +/usr/lib)\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in /etc with the same name as a rules file in /lib, pointing to