Bug 235239

Summary: [devd.conf] syntax broken by base r343249
Product: Base System Reporter: Helge Oldach <freebsd>
Component: binAssignee: Andriy Voskoboinyk <avos>
Status: Closed FIXED    
Severity: Affects Many People CC: cem, freebsd, imp
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Helge Oldach 2019-01-27 11:29:44 UTC
base r343249 changed the "subsystem" match case of a notify statement in order to fix bug #153594. Unfortunately the regex presented there is broken.

"(?!usbus[0-9]+|?!wlan[0-9]+)" is not proper regex syntax - at minimum the question marks are wrong.

Further, devd.cc implements a special handling of the negation case (first regex character is a '!'). See the match::match function in devd.cc starting at line 289. According to this logic (which BTW matches with the devd.conf manpage), it is imperative that the exclamation mark must be the first character.

Hence the  correct regex for implementing the effect intended by base r343249 would be:

"!(usbus|wlan)[0-9]+"
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2019-01-27 17:58:21 UTC
avos@ has committed a fix in r343497.
Comment 2 Helge Oldach 2019-01-27 18:35:10 UTC
Yes - as "simplification" but it had been actually wrong. Anyway, waiting for MFC...
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-02-01 03:04:26 UTC
A commit references this bug:

Author: avos
Date: Fri Feb  1 03:01:19 UTC 2019
New revision: 343640
URL: https://svnweb.freebsd.org/changeset/base/343640

Log:
  MFC r343497:
  Unbreak devd.conf(5) regex after r343249

  PR:		235239
  Submitted by:	Helge Oldach <freebsd@oldach.net>

Changes:
_U  stable/12/
  stable/12/sbin/devd/devd.conf
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-02-01 03:05:31 UTC
A commit references this bug:

Author: avos
Date: Fri Feb  1 03:02:53 UTC 2019
New revision: 343641
URL: https://svnweb.freebsd.org/changeset/base/343641

Log:
  MFC r343497:
  Unbreak devd.conf(5) regex after r343249

  PR:		235239
  Submitted by:	Helge Oldach <freebsd@oldach.net>

Changes:
_U  stable/11/
  stable/11/etc/devd.conf
Comment 5 Andriy Voskoboinyk freebsd_committer freebsd_triage 2019-02-01 03:15:50 UTC
Fixed, thanks!