Page MenuHomeFreeBSD

packages: Fix build with libucl 0.9.3
ClosedPublic

Authored by ivy on Sun, Apr 5, 10:55 PM.
Tags
None
Referenced Files
F153414624: D56266.id.diff
Tue, Apr 21, 1:01 AM
Unknown Object (File)
Sat, Apr 18, 7:34 PM
Unknown Object (File)
Sat, Apr 18, 5:37 PM
Unknown Object (File)
Sat, Apr 18, 5:37 PM
Unknown Object (File)
Sat, Apr 18, 5:37 PM
Unknown Object (File)
Sat, Apr 18, 7:26 AM
Unknown Object (File)
Fri, Apr 17, 11:54 PM
Unknown Object (File)
Fri, Apr 17, 9:43 PM
Subscribers

Details

Summary

In libucl 0.9.3, macros and includes are disabled by default when
creating a new UCL parser. This breaks the package build, which
relies on includes. Fix this by explicitly passing zero flags
to ucl.parser().

Fixes: abda442d92fd ("contrib/libucl: Import libucl 0.9.3")
Reported by: freebsd@walstatt-de.de
Sponsored by: https://www.patreon.com/bsdivy

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 71975
Build 68858: arc lint + arc unit

Event Timeline

ivy requested review of this revision.Sun, Apr 5, 10:55 PM

unfortunately, even if we land this fix, it will be impossible to build any version without the fix (e.g., 15.0 or 14.4) on a version post libucl 0.9.3. this is a rather less than ideal situation, so perhaps someone has a better suggestion.

(we should fix this for the future by using bootstrap flua for pkgbase, but that doesn't fix existing releases.)

I have added @des and @kevans who were mentioning something about this somewhere.

i briefly discussed this with kevans and he suggested we could revert the specific libucl commit which broke this[0] which i would be inclined to support.

[0] https://github.com/vstakhov/libucl/commit/8a0294f9eaa4e70342e562cb92792bbe3df90e70

In D56266#1287504, @ivy wrote:

i briefly discussed this with kevans and he suggested we could revert the specific libucl commit which broke this[0] which i would be inclined to support.

[0] https://github.com/vstakhov/libucl/commit/8a0294f9eaa4e70342e562cb92792bbe3df90e70

CC @bapt -- this is specific to the lua bindings, and I think nuageinit is the only other consumer.

btw, even if we revert that change, i think we should still land this commit: it's backward-compatible with the previous libucl (where flags just defaulted to zero) and it will be useful if we want to un-revert the libucl change later.

nuageinit is not impacted as it only parses json with libucl
I agree we should anyway land this

This revision is now accepted and ready to land.Mon, Apr 6, 3:32 PM

nuageinit is not impacted as it only parses json with libucl
I agree we should anyway land this

My concern with nuageinit is specifically if we revert the libucl change that disables macros in the parser- presumably up until that change one could still inject variables and macros into cloud-init config and do potentially bad things (which we would reintroduce by reverting temporarily), but given that we're using the cloud-init config to drive configuration of the system that's probably not really a concern?

This revision was automatically updated to reflect the committed changes.