mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
release: Sort keys in generate-ucl.lua
When writing out the UCL file containing a package's metadata, metadata
values consisting of key-value pairs were not sorted. For instance, in
the certctl package we could have either
"deps": {
"FreeBSD-openssl": {
...
},
"FreeBSD-caroot": {
...
},
}
or
"deps": {
"FreeBSD-caroot": {
...
},
"FreeBSD-openssl": {
...
},
}
This breaks reproducibility.
Use the undocumented third parameter to libucl's to_format() to request
recursive sorting of keys.
Reviewed by: manu, bapt
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D51021
This commit is contained in:
parent
32f9c9699a
commit
df84bd484c
1 changed files with 1 additions and 1 deletions
|
|
@ -31,5 +31,5 @@ if not f then
|
|||
os.exit(1)
|
||||
end
|
||||
local obj = parser:get_object()
|
||||
f:write(ucl.to_format(obj, 'ucl'))
|
||||
f:write(ucl.to_format(obj, 'ucl', true))
|
||||
f:close()
|
||||
|
|
|
|||
Loading…
Reference in a new issue