You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We also considered ordering with sort.Strings, but Matthew rejected
that because it uses a byte-by-byte UTF-8 comparison [1] which would
fail many language-specific conventions [2].
There's some more discussion of the localeToLanguage mapping in [3].
Currently language.Parse does not handle either 'C' or 'POSIX',
returning:
und, language: tag is not well-formed
for both.
[1]: #686 (comment)
[2]: https://en.wikipedia.org/wiki/Alphabetical_order#Language-specific_conventions
[3]: golang/go#25340
Signed-off-by: W. Trevor King <[email protected]>
Closes: #686
Approved by: mheon
Copy file name to clipboardExpand all lines: pkg/hooks/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,10 @@ For both `crio` and `podman`, hooks are read from `/usr/share/containers/oci/hoo
23
23
For `crio`, hook JSON is also read from `/etc/containers/oci/hooks.d/*.json`.
24
24
If files of with the same name exist in both directories, the one in `/etc/containers/oci/hooks.d` takes precedence.
25
25
26
+
Hooks MUST be injected in the JSON filename case- and width-insensitive collation order.
27
+
Collation order depends on your locale, as set by [`LC_ALL`][LC_ALL], [`LC_COLLATE`][LC_COLLATE], or [`LANG`][LANG] (in order of decreasing precedence).
28
+
For example, in the [POSIX locale][LC_COLLATE-POSIX], a matching hook defined in `01-my-hook.json` would be injected before matching hooks defined in `02-another-hook.json` and `01-UPPERCASE.json`.
29
+
26
30
Each JSON file should contain an object with the following properties:
0 commit comments