aboutsummaryrefslogtreecommitdiff
path: root/contrib/libcbor/misc
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-03-23 15:41:51 +0000
committerEd Maste <emaste@FreeBSD.org>2026-04-22 14:24:02 +0000
commit967186fe0a54faf0681a49f78701c20afb3aa0ff (patch)
treef2ac0ec63057189a45fd05d6ab4acceeee3ba141 /contrib/libcbor/misc
parent9b8f4cfea45631b3c236e5b8e69e21ec085bd0be (diff)
libcbor: Update to 0.13.0
Sponsored by: The FreeBSD Foundation (cherry picked from commit b5b9517bfe394e55088f5a05882eabae7e9b7b29)
Diffstat (limited to 'contrib/libcbor/misc')
-rw-r--r--contrib/libcbor/misc/asan_suppressions.osx.supp3
-rwxr-xr-xcontrib/libcbor/misc/hooks/pre-commit9
-rwxr-xr-xcontrib/libcbor/misc/update_version.py14
3 files changed, 17 insertions, 9 deletions
diff --git a/contrib/libcbor/misc/asan_suppressions.osx.supp b/contrib/libcbor/misc/asan_suppressions.osx.supp
new file mode 100644
index 000000000000..5503d9412a53
--- /dev/null
+++ b/contrib/libcbor/misc/asan_suppressions.osx.supp
@@ -0,0 +1,3 @@
+leak:initializeNonMetaClass
+# via _cmocka_run_group_tests
+leak:tlv_get_addr \ No newline at end of file
diff --git a/contrib/libcbor/misc/hooks/pre-commit b/contrib/libcbor/misc/hooks/pre-commit
index f3ac9f483799..16d6c37a94d7 100755
--- a/contrib/libcbor/misc/hooks/pre-commit
+++ b/contrib/libcbor/misc/hooks/pre-commit
@@ -2,10 +2,16 @@
set -e
-# Run clang-format and add modified files
+# Run cmake-lint, clang-format, and add modified files
MODIFIED_UNSTAGED=$(git -C . diff --name-only)
MODIFIED_STAGED=$(git -C . diff --name-only --cached --diff-filter=d)
+CMAKE_FILES=$(echo "${MODIFIED_STAGED} ${MODIFIED_UNSTAGED}" | grep -oE '(\S*)CMakeLists.txt' | cat)
+if ! cmake-lint --line-width 140 ${CMAKE_FILES} > /dev/null; then
+ echo "cmake-lint failed:"
+ cmake-lint --line-width 140 ${CMAKE_FILES}
+fi
+
./clang-format.sh
git add ${MODIFIED_STAGED}
@@ -15,4 +21,3 @@ if [[ ${MODIFIED_UNSTAGED} != $(git -C . diff --name-only) ]]; then
"them"
fi
-
diff --git a/contrib/libcbor/misc/update_version.py b/contrib/libcbor/misc/update_version.py
index 475953021cc4..22d175b4bc06 100755
--- a/contrib/libcbor/misc/update_version.py
+++ b/contrib/libcbor/misc/update_version.py
@@ -35,16 +35,16 @@ replace('Doxyfile', DOXY_VERSION + '.*', DOXY_VERSION + version)
# Update CMakeLists.txt
replace('CMakeLists.txt',
- '''SET\\(CBOR_VERSION_MAJOR "\d+"\\)
-SET\\(CBOR_VERSION_MINOR "\d+"\\)
-SET\\(CBOR_VERSION_PATCH "\d+"\\)''',
- f'''SET(CBOR_VERSION_MAJOR "{major}")
-SET(CBOR_VERSION_MINOR "{minor}")
-SET(CBOR_VERSION_PATCH "{patch}")''')
+ r'''set\(CBOR_VERSION_MAJOR "\d+"\)
+set\(CBOR_VERSION_MINOR "\d+"\)
+set\(CBOR_VERSION_PATCH "\d+"\)''',
+ f'''set(CBOR_VERSION_MAJOR "{major}")
+set(CBOR_VERSION_MINOR "{minor}")
+set(CBOR_VERSION_PATCH "{patch}")''')
# Update Basel build example
replace('examples/bazel/third_party/libcbor/cbor/configuration.h',
- '''#define CBOR_MAJOR_VERSION \d+
+ r'''#define CBOR_MAJOR_VERSION \d+
#define CBOR_MINOR_VERSION \d+
#define CBOR_PATCH_VERSION \d+''',
f'''#define CBOR_MAJOR_VERSION {major}