Page MenuHomeFreeBSD

release: Sort keys in generate-ucl.lua
ClosedPublic

Authored by markj on Jun 24 2025, 9:31 PM.
Tags
None
Referenced Files
F152619608: D51021.diff
Thu, Apr 16, 1:28 AM
Unknown Object (File)
Tue, Apr 7, 2:42 PM
Unknown Object (File)
Tue, Apr 7, 2:38 PM
Unknown Object (File)
Mon, Apr 6, 5:32 PM
Unknown Object (File)
Mon, Mar 30, 1:40 AM
Unknown Object (File)
Sat, Mar 21, 5:35 AM
Unknown Object (File)
Mar 8 2026, 1:37 AM
Unknown Object (File)
Mar 3 2026, 3:07 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 65063
Build 61946: arc lint + arc unit