Page MenuHomeFreeBSD

release: Sort keys in generate-ucl.lua
ClosedPublic

Authored by markj on Jun 24 2025, 9:31 PM.
Tags
None
Referenced Files
F131695319: D51021.id157546.diff
Fri, Oct 10, 10:15 AM
F131603504: D51021.id157600.diff
Thu, Oct 9, 4:09 PM
Unknown Object (File)
Wed, Oct 8, 9:30 PM
Unknown Object (File)
Fri, Oct 3, 1:55 PM
Unknown Object (File)
Thu, Oct 2, 1:20 PM
Unknown Object (File)
Thu, Oct 2, 6:58 AM
Unknown Object (File)
Wed, Oct 1, 2:04 PM
Unknown Object (File)
Sat, Sep 27, 2:11 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable