Page MenuHomeFreeBSD

MAC/do: Rules: From and to parts now separated by '>'
ClosedPublic

Authored by olce on Tue, Apr 1, 5:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 17, 2:45 AM
Unknown Object (File)
Mon, Apr 14, 8:06 PM
Unknown Object (File)
Fri, Apr 4, 6:20 AM
Unknown Object (File)
Thu, Apr 3, 2:48 PM
Unknown Object (File)
Thu, Apr 3, 2:02 PM
Unknown Object (File)
Thu, Apr 3, 9:39 AM
Subscribers

Details

Summary

Previously, we would accept only ':' as the separator, which makes
parsing of the rule specification harder for humans, especially those
people that are used to UNIX systems where ':' is used as the separator
in PATH. With ':', the <from> and <to> parts can look like two
different elements that are unrelated, especially to these eyes.

Change parse_single_rule() so that '>' is also accepted as a separator
between <from> and <to>, and promote it as the one to use. During
a transition period, in -CURRENT only, we will still allow the use of
':' for backwards compatibility.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 63270
Build 60154: arc lint + arc unit

Event Timeline

olce requested review of this revision.Tue, Apr 1, 5:24 PM

I think you will need to make the transition period longer than current as it is already in 14.x or this should be merged in 14.3 as well. It might be interesting to issue a warning when ':' is encountered so users know they should upgrade their setup (could be in a separate commit)

This revision is now accepted and ready to land.Wed, Apr 2, 11:31 AM

I think you will need to make the transition period longer than current as it is already in 14.x or this should be merged in 14.3 as well. It might be interesting to issue a warning when ':' is encountered so users know they should upgrade their setup (could be in a separate commit)

I was thinking that, as the new implementation (to be MFCed soon to 14.x, probably today) already has partially incompatible syntax with the initial one, trying to keep backwards compatibility was not that useful. But OK, I'll MFC this revision as is.

Yes, issuing a warning on ':' would be great. Will do that in a separate revision later.

Thanks!