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)
Wed, May 20, 5:03 PM
Unknown Object (File)
Mon, May 11, 2:46 PM
Unknown Object (File)
Thu, May 7, 2:48 PM
Unknown Object (File)
Wed, May 6, 10:20 AM
Unknown Object (File)
Wed, May 6, 9:47 AM
Unknown Object (File)
Sun, May 3, 6:40 AM
Unknown Object (File)
Tue, Apr 28, 9:40 PM
Unknown Object (File)
Tue, Apr 28, 9:33 PM
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