From nobody Fri May 3 23:34:28 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VWRwN5V5Fz5Jll7; Fri, 3 May 2024 23:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VWRwN4r9Fz4lBM; Fri, 3 May 2024 23:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714779268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYOGtJYGM8vw65ywulh4uMeHN47enJMS4nqZPMYYoCw=; b=s3dYM/K2vNgBjkozSf6pAu1QINRMNDYjXCvuPo9VCZrFgkHNQYjt+Zpdk6TFcvouV4HpXR BlRY9Mdb00HMuiNl1Ji/yUfdlkWy0gQcnTVx+7/hr6DzeVzFyYIMKS+uhFeUzjiTYI3J/G UcGZaXH3ss5jrCwOI81RPwA1S9XjOgYAhrYJ0QQZimGwGd4C/FiWmDojripJrw2PwA3BLc 2V9Py5meR4TacuhdCd8/SUi6mLyYOuk6DVzmKCYvs48uVRD3BckT8QidOVMAp+HmKmNNgv d/mmUM2p7p2+lfjDKgLuV97QgYFY1ftdGlVLJai+sGBVRJTW3Y7foqS5tVnz7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1714779268; a=rsa-sha256; cv=none; b=j7Z6A97cBk7WH8/qLFOnNvpwSJmRkR7SLg1BrjQJlf1RPYa6qAwQsQSpsrl9cbh0zXVH/7 eV/rfXZACO1DKjBHSZHxEUwYWwhlXzbrlIidbFC1x9FZHEq6MVxVbcI+11Jtbaj2wxDTog ndtRnrboNVMFpdmGt8LDd3QCZ4/u0UeRNPNNPFNyKypdG28dt7uHpP0C9zR4FwfjFaxDen nXc84tKh1RP6g7jqg4+lVt5M1x6Dl8X35749UCU2qpC6NJVuUeoTzo30h+UJIYXFn8kZD/ L7zsWZn6A/ARh0vnAfJazsK2luUQ8OrM1BB5CJPNieJ968dyDk16sJJa4dmocA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1714779268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYOGtJYGM8vw65ywulh4uMeHN47enJMS4nqZPMYYoCw=; b=AJvWO34zm2InLdk8fO2N2LOH5Kkd0xgCQ8tqvQIrwbkr1Qpwz/UJE09wK9y/nS7EUIUOa6 3KS5NiEU5TjhZB4JZppaYBmHMv1V7N1OcD2G1lxhN5iCwArCUAaIxbj5mnP9+yJmA/0LJh HUQWfE4NsmkzXV+rmhJtE12xFWAxRSyH2U+Bam9u1m8gqSvStOrZMh18DTa3rQFFu/7+hQ pyPck+rfqwdyAAflJ3BkE5f+wFkxTt6KczCD3BPkGZ9krB2qWj5JG28mG8WqNS2NaoqDKX dLJcITwZmmrCs0refThHWBNFiEjtPlqhGMZMaTlB4t+0JK7jRDANrJNivyDPbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VWRwN4K5Dz15Y1; Fri, 3 May 2024 23:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 443NYShE051174; Fri, 3 May 2024 23:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 443NYSiR051171; Fri, 3 May 2024 23:34:28 GMT (envelope-from git) Date: Fri, 3 May 2024 23:34:28 GMT Message-Id: <202405032334.443NYSiR051171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: abd872540f24 - main - libcbor: vendor update to 0.11.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abd872540f24cfc7dbd1ea29b6918c7082a22108 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=abd872540f24cfc7dbd1ea29b6918c7082a22108 commit abd872540f24cfc7dbd1ea29b6918c7082a22108 Merge: b27eb9ce96b8 5f50d6b344f0 Author: Ed Maste AuthorDate: 2024-05-03 23:33:50 +0000 Commit: Ed Maste CommitDate: 2024-05-03 23:33:50 +0000 libcbor: vendor update to 0.11.0 Sponsored by: The FreeBSD Foundation contrib/libcbor/.circleci/config.yml | 30 ++-- contrib/libcbor/.cirrus.yml | 26 +++ contrib/libcbor/.readthedocs.yaml | 21 +++ contrib/libcbor/CHANGELOG.md | 15 +- contrib/libcbor/CMakeLists.txt | 18 +- contrib/libcbor/CONTRIBUTING.md | 2 +- contrib/libcbor/Doxyfile | 2 +- contrib/libcbor/README.md | 7 +- contrib/libcbor/appveyor.yml | 14 -- contrib/libcbor/doc/source/api/item_types.rst | 2 +- contrib/libcbor/doc/source/conf.py | 18 +- contrib/libcbor/doc/source/development.rst | 6 +- contrib/libcbor/doc/source/index.rst | 8 +- contrib/libcbor/doc/source/internal.rst | 4 +- contrib/libcbor/doc/source/requirements.txt | 52 +++--- ...fc_conformance.rst => standard_conformance.rst} | 6 +- contrib/libcbor/examples/CMakeLists.txt | 4 + .../bazel/third_party/libcbor/cbor/configuration.h | 4 +- contrib/libcbor/examples/cbor2cjson.c | 123 +++++++++++++ contrib/libcbor/examples/cjson2cbor.c | 4 +- contrib/libcbor/examples/data/all_types.cbor | Bin 0 -> 354 bytes contrib/libcbor/examples/readfile.c | 2 +- contrib/libcbor/oss-fuzz/build.sh | 2 +- contrib/libcbor/src/CMakeLists.txt | 21 ++- contrib/libcbor/src/cbor.c | 82 +++++---- contrib/libcbor/src/cbor/common.h | 2 +- .../libcbor/src/cbor/internal/builder_callbacks.c | 27 +-- contrib/libcbor/src/cbor/internal/loaders.c | 2 +- contrib/libcbor/src/cbor/internal/memory_utils.h | 2 +- contrib/libcbor/src/cbor/internal/unicode.c | 6 +- contrib/libcbor/src/cbor/internal/unicode.h | 6 +- contrib/libcbor/src/cbor/maps.c | 1 + contrib/libcbor/src/cbor/streaming.c | 43 ++--- contrib/libcbor/src/cbor/strings.c | 10 ++ contrib/libcbor/src/cbor/strings.h | 19 +- contrib/libcbor/src/libcborConfig.cmake.in | 8 + contrib/libcbor/test/callbacks_test.c | 25 +++ contrib/libcbor/test/cbor_serialize_test.c | 32 ++++ contrib/libcbor/test/cbor_stream_decode_test.c | 8 +- contrib/libcbor/test/float_ctrl_test.c | 6 +- contrib/libcbor/test/pretty_printer_test.c | 197 +++++++++++++++++++-- contrib/libcbor/test/string_test.c | 67 +++++++ contrib/libcbor/test/tag_test.c | 23 +++ contrib/libcbor/test/test_allocator.c | 2 +- 44 files changed, 746 insertions(+), 213 deletions(-) diff --cc contrib/libcbor/.cirrus.yml index 000000000000,000000000000..948ae23b4a98 new file mode 100644 --- /dev/null +++ b/contrib/libcbor/.cirrus.yml @@@ -1,0 -1,0 +1,26 @@@ ++freebsd_task: ++ install_script: ++ - ASSUME_ALWAYS_YES=yes pkg bootstrap -f && pkg install -y cmocka cmake ninja ++ build_script: ++ - mkdir build ++ - cd build ++ - cmake -GNinja -DWITH_TESTS=ON ++ -DCBOR_CUSTOM_ALLOC=ON ++ -DCMAKE_BUILD_TYPE=Debug ++ -DSANITIZE=OFF ++ .. ++ - ninja -j $(sysctl -n hw.ncpu) ++ test_script: ++ - cd build ++ - ctest -VV ++ matrix: ++ # From gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images ++ - name: freebsd-13-2 ++ freebsd_instance: ++ image_family: freebsd-13-2 ++ - name: freebsd-14-0 ++ freebsd_instance: ++ image_family: freebsd-14-0 ++ - name: freebsd-15-0-snap ++ freebsd_instance: ++ image_family: freebsd-15-0-snap diff --cc contrib/libcbor/.readthedocs.yaml index 000000000000,f2514ffae113..f2514ffae113 mode 000000,100644..100644 --- a/contrib/libcbor/.readthedocs.yaml +++ b/contrib/libcbor/.readthedocs.yaml diff --cc contrib/libcbor/CONTRIBUTING.md index cc834d21a46b,000000000000..9bd42a06b6dc mode 100644,000000..100644 --- a/contrib/libcbor/CONTRIBUTING.md +++ b/contrib/libcbor/CONTRIBUTING.md @@@ -1,35 -1,0 +1,35 @@@ +# Contributing to libcbor + +libcbor is maintained by [@PJK](https://github.com/PJK) in his spare time on a best-effort basis. + - Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described belows. ++Community contributions are welcome as long as they align with the [project priorities](https://github.com/PJK/libcbor#main-features) and [goals](https://libcbor.readthedocs.io/en/latest/development.html#goals) and follow the guidelines described below. + +## Principles + +**Bug reports and questions:** Bug reports and specific technical questions are always welcome. Feel free to open an [issue](https://github.com/PJK/libcbor/issues). + +**Incremental improvements:** Bug fixes (including build scripts, examples, test, typos, CI/CD config, etc.) and documentation improvements (fixes of typos, inaccuracies, out of date content, etc.) are always welcome. Feel free to open a [PR](https://github.com/PJK/libcbor/pulls). + +**New features:** I am looking to keep the scope of libcbor small. If you would like to add a feature, please open an issue with your proposal (or reach out to me privately) to discuss if the feature fits into libcbor before opening a PR. + +**Major changes:** Please open an issue with your proposal (or reach out to me privately) to discuss if the improvement fits into cbor before opening a PR. + +## Pull Request Process + +1. Ensure that all CI checks pass +2. Check that the PR is complete and of good quality + - Include a descriptive summary of the change. If the PR addresses an open issue, please link it. + - Code changes: Add tests + - If necessary: Update documentation, including any links +3. Code changes: Update [the changelog](https://github.com/PJK/libcbor/blob/master/CHANGELOG.md). Do *not* change the version number. + +## Interactions + +I work on libcbor on a best effort basis. The typical response time is a few days. + +If you do not receive a response in a few weeks, feel free to ping the PR or issue. + +## Resources + +- [Development documentation](https://libcbor.readthedocs.io/en/latest/development.html) + diff --cc contrib/libcbor/README.md index 6d34ba9d4dcb,000000000000..ea54bed9437b mode 100644,000000..100644 --- a/contrib/libcbor/README.md +++ b/contrib/libcbor/README.md @@@ -1,122 -1,0 +1,121 @@@ +# [libcbor](https://github.com/PJK/libcbor) + +[![CircleCI](https://circleci.com/gh/PJK/libcbor/tree/master.svg?style=svg)](https://circleci.com/gh/PJK/libcbor/tree/master) - [![Build status](https://ci.appveyor.com/api/projects/status/8kkmvmefelsxp5u2?svg=true)](https://ci.appveyor.com/project/PJK/libcbor) +[![Documentation Status](https://readthedocs.org/projects/libcbor/badge/?version=latest)](https://readthedocs.org/projects/libcbor/?badge=latest) +[![latest packaged version(s)](https://repology.org/badge/latest-versions/libcbor.svg)](https://repology.org/project/libcbor/versions) +[![codecov](https://codecov.io/gh/PJK/libcbor/branch/master/graph/badge.svg)](https://codecov.io/gh/PJK/libcbor) + - **libcbor** is a C library for parsing and generating [CBOR](https://tools.ietf.org/html/rfc7049), the general-purpose schema-less binary data format. ++**libcbor** is a C library for parsing and generating [CBOR](https://cbor.io/), the general-purpose schema-less binary data format. + +## Main features - - Complete RFC conformance - - Robust C99 implementation ++ - Complete [IETF RFC 8949 (STD 94)](https://www.rfc-editor.org/info/std94) conformance ++ - Robust platform-independent C99 implementation + - Layered architecture offers both control and convenience + - Flexible memory management + - No shared global state - threading friendly + - Proper handling of UTF-8 + - Full support for streams & incremental processing + - Extensive documentation and test suite + - No runtime dependencies, small footprint + +## Getting started + +### Compile from source + +```bash +git clone https://github.com/PJK/libcbor +cmake -DCMAKE_BUILD_TYPE=Release libcbor +make +make install +``` + +### Homebrew + +```bash +brew install libcbor +``` + +### Ubuntu 18.04 and above + +```bash +sudo add-apt-repository universe +sudo apt-get install libcbor-dev +``` + +### Fedora & RPM friends + +```bash +yum install libcbor-devel +``` + +### Others + +
+ Packaged libcbor is available from 15+ major repositories. Click here for more detail + + [![Packaging status](https://repology.org/badge/vertical-allrepos/libcbor.svg)](https://repology.org/project/libcbor/versions) +
+ +## Usage example + +```c +#include +#include + +int main(void) { + /* Preallocate the map structure */ + cbor_item_t* root = cbor_new_definite_map(2); + /* Add the content */ + bool success = cbor_map_add( + root, (struct cbor_pair){ + .key = cbor_move(cbor_build_string("Is CBOR awesome?")), + .value = cbor_move(cbor_build_bool(true))}); + success &= cbor_map_add( + root, (struct cbor_pair){ + .key = cbor_move(cbor_build_uint8(42)), + .value = cbor_move(cbor_build_string("Is the answer"))}); + if (!success) return 1; + /* Output: `length` bytes of data in the `buffer` */ + unsigned char* buffer; + size_t buffer_size; + cbor_serialize_alloc(root, &buffer, &buffer_size); + + fwrite(buffer, 1, buffer_size, stdout); + free(buffer); + + fflush(stdout); + cbor_decref(&root); +} +``` + +## Documentation +Get the latest documentation at [libcbor.readthedocs.org](http://libcbor.readthedocs.org/) + +## Contributions + +Bug reports and contributions are welcome. Please see [CONTRIBUTING.md](https://github.com/PJK/libcbor/blob/master/CONTRIBUTING.md) for more info. + +Kudos to all the [contributors](https://github.com/PJK/libcbor/graphs/contributors)! + +## License +The MIT License (MIT) + +Copyright (c) Pavel Kalvoda, 2014-2020 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --cc contrib/libcbor/examples/cbor2cjson.c index 000000000000,99ddc9ee09e1..99ddc9ee09e1 mode 000000,100644..100644 --- a/contrib/libcbor/examples/cbor2cjson.c +++ b/contrib/libcbor/examples/cbor2cjson.c diff --cc contrib/libcbor/examples/data/all_types.cbor index 000000000000,00d66a0e667e..00d66a0e667e mode 000000,100644..100644 Binary files differ diff --cc contrib/libcbor/src/libcborConfig.cmake.in index 000000000000,565bed365e24..565bed365e24 mode 000000,100644..100644 --- a/contrib/libcbor/src/libcborConfig.cmake.in +++ b/contrib/libcbor/src/libcborConfig.cmake.in