Page MenuHomeFreeBSD

release: Sort keys in generate-ucl.lua
ClosedPublic

Authored by markj on Jun 24 2025, 9:31 PM.
Tags
None
Referenced Files
F165833501: D51021.id157600.diff
Mon, Aug 10, 2:38 AM
Unknown Object (File)
Sun, Aug 9, 8:15 AM
Unknown Object (File)
Sat, Aug 8, 4:22 PM
Unknown Object (File)
Sat, Aug 8, 2:50 PM
Unknown Object (File)
Fri, Aug 7, 1:23 PM
Unknown Object (File)
Mon, Aug 3, 2:46 AM
Unknown Object (File)
Sun, Aug 2, 12:46 AM
Unknown Object (File)
Thu, Jul 30, 11:50 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