git: 817170736b8a - stable/13 - libucl: import snapshot 2024-02-06
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Oct 2025 08:20:56 UTC
The branch stable/13 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=817170736b8a6ab8340b2f8a193a8795d77239bf
commit 817170736b8a6ab8340b2f8a193a8795d77239bf
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-02-29 12:27:03 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-10-02 07:28:55 +0000
libucl: import snapshot 2024-02-06
(cherry picked from commit ddca081d382c7275bb6328c730182a007334c939)
---
contrib/libucl/libucl.pc | 11 ++++
contrib/libucl/python/ucl.pyi | 15 +++++
.../libucl/tests/schema/definitions.json.disabled | 32 +++++++++
.../libucl/tests/schema/refRemote.json.disabled | 76 ++++++++++++++++++++++
4 files changed, 134 insertions(+)
diff --git a/contrib/libucl/libucl.pc b/contrib/libucl/libucl.pc
new file mode 100644
index 000000000000..4878bebafcdd
--- /dev/null
+++ b/contrib/libucl/libucl.pc
@@ -0,0 +1,11 @@
+prefix=/usr/local
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: LibUCL
+Description: Universal configuration library
+Version: 0.9.0
+Libs: -L${libdir} -lucl
+Libs.private:
+Cflags: -I${includedir}/
diff --git a/contrib/libucl/python/ucl.pyi b/contrib/libucl/python/ucl.pyi
new file mode 100644
index 000000000000..79fa2901ba9f
--- /dev/null
+++ b/contrib/libucl/python/ucl.pyi
@@ -0,0 +1,15 @@
+# Stubs for ucl (Python 3.6)
+#
+# NOTE: This dynamically typed stub was automatically generated by stubgen.
+
+UCL_EMIT_CONFIG = ... # type: int
+UCL_EMIT_JSON = ... # type: int
+UCL_EMIT_JSON_COMPACT = ... # type: int
+UCL_EMIT_MSGPACK = ... # type: int
+UCL_EMIT_YAML = ... # type: int
+
+def dump(*args, **kwargs): ...
+def load(*args, **kwargs): ...
+def validate(*args, **kwargs): ...
+
+class SchemaError(Exception): ...
diff --git a/contrib/libucl/tests/schema/definitions.json.disabled b/contrib/libucl/tests/schema/definitions.json.disabled
new file mode 100644
index 000000000000..1ab9b2163c44
--- /dev/null
+++ b/contrib/libucl/tests/schema/definitions.json.disabled
@@ -0,0 +1,32 @@
+[
+ {
+ "description": "valid definition",
+ "schema": {"$ref": "http://highsecure.ru/ucl-schema/schema#"},
+ "tests": [
+ {
+ "description": "valid definition schema",
+ "data": {
+ "definitions": {
+ "foo": {"type": "integer"}
+ }
+ },
+ "valid": true
+ }
+ ]
+ },
+ {
+ "description": "invalid definition",
+ "schema": {"$ref": "http://highsecure.ru/ucl-schema/schema#"},
+ "tests": [
+ {
+ "description": "invalid definition schema",
+ "data": {
+ "definitions": {
+ "foo": {"type": 1}
+ }
+ },
+ "valid": false
+ }
+ ]
+ }
+]
diff --git a/contrib/libucl/tests/schema/refRemote.json.disabled b/contrib/libucl/tests/schema/refRemote.json.disabled
new file mode 100644
index 000000000000..067c666b0ec8
--- /dev/null
+++ b/contrib/libucl/tests/schema/refRemote.json.disabled
@@ -0,0 +1,76 @@
+[
+ {
+ "description": "remote ref",
+ "schema": {"$ref": "http://highsecure.ru/ucl-schema/remotes/integer.json"},
+ "tests": [
+ {
+ "description": "remote ref valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "remote ref invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "fragment within remote ref",
+ "schema": {"$ref": "http://highsecure.ru/ucl-schema/remotes/subSchemas.json#/integer"},
+ "tests": [
+ {
+ "description": "remote fragment valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "remote fragment invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ },
+ {
+ "description": "ref within remote ref",
+ "schema": {
+ "$ref": "http://highsecure.ru/ucl-schema/remotes/subSchemas.json#/refToInteger"
+ },
+ "tests": [
+ {
+ "description": "ref within ref valid",
+ "data": 1,
+ "valid": true
+ },
+ {
+ "description": "ref within ref invalid",
+ "data": "a",
+ "valid": false
+ }
+ ]
+ }
+/*
+ {
+ "description": "change resolution scope",
+ "schema": {
+ "id": "http://highsecure.ru/ucl-schema/remotes/",
+ "items": {
+ "id": "folder/",
+ "items": {"$ref": "folderInteger.json"}
+ }
+ },
+ "tests": [
+ {
+ "description": "changed scope ref valid",
+ "data": [[1]],
+ "valid": true
+ },
+ {
+ "description": "changed scope ref invalid",
+ "data": [["a"]],
+ "valid": false
+ }
+ ]
+ }
+*/
+]