Page MenuHomeFreeBSD

release: Sort keys in generate-ucl.lua
ClosedPublic

Authored by markj on Jun 24 2025, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 28, 5:11 PM
Unknown Object (File)
Thu, Nov 27, 3:45 PM
Unknown Object (File)
Sun, Nov 23, 12:58 PM
Unknown Object (File)
Sat, Nov 22, 12:45 PM
Unknown Object (File)
Sat, Nov 22, 11:34 AM
Unknown Object (File)
Fri, Nov 14, 12:38 PM
Unknown Object (File)
Sat, Nov 8, 4:03 PM
Unknown Object (File)
Fri, Nov 7, 11:21 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