summaryrefslogtreecommitdiff
path: root/subprojects
AgeCommit message (Collapse)AuthorFilesLines
2024-04-18Update nghttp2 1.60->1.61Ed Tanous1-4/+4
They seem to have gotten rid of the nghttp2_static target, so go back to relying on the "normal" target. Change-Id: Ic44d9ffe5fa2d88f38c018756738197371b0dc89 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-04-17Reformat meson filesEd Tanous1-9/+0
Meson has a style guide, we should follow it. This includes: 4 space indents on new scopes. Trailing commas on the final entry in a list/array Tested: Whitespace only. Code compiles. Change-Id: Ib7f96a2bd722b55410818c766c0261f5d44cb84d Signed-off-by: Ed Tanous <ed@tanous.net>
2024-04-01Update nghttp2 1.54->1.60Ed Tanous1-4/+4
This is the same version Yocto uses. [1] https://github.com/openbmc/openbmc/blob/8c1713b6664523ff7a5bc300ca00c9cde8e5b2c1/poky/meta/recipes-support/nghttp2/nghttp2_1.60.0.bb Change-Id: I71485c559f37dc21cabeab6b95e38c8a30073af5 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-03-16Update boost 1.83->1.84Ed Tanous1-4/+4
This is the same version yocto uses. Tested: Code compiles Change-Id: I3bf7be18ecd0e5863ab8afd57748f918837ba5a3 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-02-06Update gtest to 1.14.0Ed Tanous1-8/+14
This file is directly downloaded from wrapdb. Tested: Code compiles, unit tests pass. Change-Id: I2fb3dc7f89b9d39d31cc494533519196cfc401d1 Signed-off-by: Ed Tanous <ed@tanous.net>
2023-12-09Add mutual tls unit testEd Tanous1-0/+16
Mutual TLS paths were not tested. Add some unit tests. Because CI doesn't actually compile dependent libraries with ASAN enabled, and these tests call into openssl, we need to add a check for if we're compiling with asan enabled. Tested: unit tests pass. Change-Id: I02dcb69708619cc00fffd840738c608db3ae8bdf Signed-off-by: Ed Tanous <ed@tanous.net>
2023-10-05Update to boost 1.83.0Ed Tanous2-15/+4
In boost 1.83.0, the boost::url maintainers deprecated the header only usage of the library without warning. A discussion with the maintainers[1] made it clear that they removed the abiliy on purpose, and they're not going to add it back or add a deprecation strategy (they did say they would update the documentation to actually match the intent), and that from here on in we should be using the cmake boost project to pull in the non-header-only boost libraries we use (which at this point is ONLY boost url). This commit updates to remove the usage of boost::urls::result typedef, which was deprecated in this release (which causes a compile error) and moves it to boost::system::result. In addition, it updates our meson files to pull in the boost project as a cmake dependency. [1] https://cpplang.slack.com/archives/C01JR6C9C4U/p1696441238739129 Tested: Not yet. Change-Id: Ia7adfc0348588915440687c3ab83a1de3e6b845a Signed-off-by: Ed Tanous <edtanous@google.com>
2023-06-28HTTP/2 supportEd Tanous1-0/+5
HTTP/2 gives a number of optimizations, while keeping support for the protocol. HTTP/2 support was recently added to the Redfish specification. The largest performance increase in bmc usage is likely header compression. Almost all requests reuse the same header values, so the hpack based compression scheme in HTTP/2 allows OpenBMC to be more efficient as a transport, and has the potential to significantly reduce the number of bytes we're sending on the wire. This commit adds HTTP2 support to bmcweb through nghttp2 library. When static linked into bmcweb, this support adds 53.4KB to the bmcweb binary size. nghttp2 is available in meta-oe already. Given the experimental nature of this option, it is added under the meson option "experimental-http2" and disabled by default. The hope is to enable it at some point in the future. To accomplish the above, there a new class, HTTP2Connection is created. This is intended to isolate HTTP/2 connections code from HttpConnection such that it is far less likely to cause bugs, although it does duplicate about 20 lines of code (async_read_some, async_write_some, buffers, etc). This seems worth it for the moment. In a similar way to Websockets, when an HTTP/2 connection is detected through ALPN, the HTTP2Connection class will be instantiated, and the socket object passed to it, thus allowing the Connection class to be destroyed, and the HTTP2Connection to take over for the user. Tested: Redfish service validator passes with option enabled With option disabled GET /redfish/v1 in curl shows ALPN non negotiation, and fallback to http1.1 With the option enable GET /redfish/v1 in curl shows ALPN negotiates to HTTP2 Change-Id: I7839e457e0ba918b0695e04babddd0925ed3383c Signed-off-by: Ed Tanous <edtanous@google.com>
2023-06-06Change nlohmann to nlohmann_jsonEd Tanous2-3/+11
c9374ff613b6836010877f8083e75657abc78343 Was recently checked in that adds subproject files for nlohmann. It opted for the name "nlohmann" when the upstream project installs itself as "nlohmann_json". This mismatch causes a yocto build failure. Fix it. Tested: Code compiles Change-Id: I2df5f473a61172593e9a1045fc5a229e06e3afc2 Signed-off-by: Ed Tanous <edtanous@google.com>
2023-05-25Bump nlohmann version to 3.11.2 from 3.9.1Carson Labrado1-1/+1
The current version of nlohmann is not able to compile https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62278. This is supported in the latest version of the library. Tested: Was able to locally build bmcweb after the bump. Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: I6820c3678a0ec23854b8db55a39fd802dc461793
2023-05-16Boost::urls::formatEd Tanous1-4/+4
Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot like our urlFromPieces method, but better in that it makes the resulting uris more readable, and allows doing things like fragments in a single line instead of multiple. We should prefer it in some cases. Tested: Redfish service validator passes. Spot checks of URLs work as expected. Unit tests pass. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c
2022-12-20Correct boost 1.81.0 expected hashCarson Labrado1-1/+1
The expected hash value is incorrect resulting in meson failing when downloading boost 1.81.0. Updates the expcted value to be the actual hash value. Tested: Boost 1.81.0 is downloaded by meson when it does not exist on the local machine. All tests pass. Run-time dependency Boost found: NO (tried system) Downloading boost source from https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 Download size: 118797750 Downloading: .......... Executing subproject boost Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: I36f26ec883bd08922fda3e5dc3a272bc4ef496a6
2022-12-15Prepare for boost::url upgradeEd Tanous2-10/+4
The new boost URL now interops properly with std::string_view, which is great, and cleans up a bunch of mediocre code to convert one to another. It has also been pulled into boost-proper, so we no longer need a boost-url dependency that's separate. Unfortunately, boost url makes these improvements by changing boost::string_view for boost::urls::const_string, which causes us to have some compile errors on the missing type. The bulk of these changes fall into a couple categories, and have to be executed in one commit. string() is replaced with buffer() on the url and url_view types boost::string_view is replaced by std::string_view for many times, in many cases removing a temporary that we had in the code previously. Tested: Code compiles with boost 1.81.0 beta. Redfish service validator passes. Pretty good unit test coverage for URL-specific use cases. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I8d3dc89b53d1cc390887fe53605d4867f75f76fd
2022-11-01Fix meson warningsEd Tanous4-0/+28
As written, when we pull in the boost and boost-url subprojects, we hit problems in the meson files. ``` ../meson.build:291: WARNING: include_directories sandbox violation! ``` This commit resolves this issue, by adding explicit meson.build files for both boost and boost-url. Tested: meson buildlocal No longer returns the above error, and shows Subprojects boost : YES boost-url : YES Whereas previously those two dependencies showed up as NO. Code compiles. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib25340723c8cb7d6139e3e51db023e9d90e30aab
2022-08-29Upgrade boost 1.78->1.80Ed Tanous1-3/+3
Pretty trivial move. No breaking changes between these two versions. Tested: Code compiles Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icdd0c47cab42f1f6c420856d2dc3f685bce6bd8f
2022-02-25subproject: boost-url & boost: update revisionNan Zhou2-5/+5
Update the revision of boost-url to d740a92d38e3a8f4d5b2153f53b82f1c98e312ab as per https://github.com/openbmc/openbmc/blob/595f63084d313c9708cb435470e6c6dcbbbbe646/meta-openembedded/meta-oe/recipes-devtools/boost-url/boost-url_git.bb Update the release version of boost to 1.78.0, as per https://github.com/openbmc/openbmc/blob/595f63084d313c9708cb435470e6c6dcbbbbe646/poky/meta/recipes-support/boost/boost_1.78.0.bb and https://github.com/openbmc/openbmc-build-scripts/blob/ca8c4a8b9728714c9a07f7940a4d31b89c3ecf9f/scripts/build-unit-test-docker#L94 This is neccessary since the current bmcweb HEAD doesn't compile with the specified boost-url. This failure can be verified by cloning the repo on an x86 unix desktop without boost-url and let meson clone subprojects. Tested: 1. it compiled on an x86 unix desktop without boost-url and boost 2. yocto build also worked with this patch in Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ib8356667b3fb74ae87c8bf32d21cd834ef061a47
2021-10-25Update Boost subproject to 1.77Ed Tanous1-3/+3
This is done to match yocto. Tested: meson build cd build ninja Compiles properly. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic0d9ffbb9e6d243dd3f929f880dbeead63114a7a
2021-10-17meson: upgrade tinyxml wrap filePatrick Williams1-8/+6
Use `meson wrap update tinyxml` to get the latest version (9.0.0) and simplify the corresponding meson directives. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7513c2dca11ad9728c530e2f44986916594b2407
2021-10-05Boost uri updateEd Tanous1-1/+1
Update to the latest version of boost::uri The newest version of boost uri makes some breaking changes that we need to account for. At the same time, we take the opportunity to move to the error code based parse methods that don't rely on exceptions. The biggest changes are: The standalone build is no longer present. A discussion with the boost::url maintainers shows that our best option is to do a simple copy of the headers, and compile boost/url/src.hpp in a separate file. This is intended to allow people to pull the library in "standalone" and not have to rely on the build machinery in boost-url, which we don't really need. Interestingly, this file doesn't have a newline at the end, which clang correctly flags. OpenBMC doesn't really need that warning, as we rely on clang-format to do that, so we add -Wno-newline-eof clang to get the code to compile there. All url parsers are moved to the parse_uri, or parse_relative_uri equivalents. This slightly tightens the requirements around what URLs are accepted, but in no ways that should break anything. (Ie, "/redfish/v1" is no longer accepted for a virtual media endpoint. boost::urls::url_view::params_type has been renamed to query_params_type, and the relevant methods have been updated. Because of the missing standalone mode, we now need to use boost::string_view which doesn't implicitly construct from std::string_view. Some discussion on the boost list shows that this is coming soon, so that cruft can eventually be cleaned up, but for now we need the construction. Tested: Loaded in qemu, and ran some URLs (/redfish/v1 and /redfish/v1/Chassis) to ensure that the url handler functions as intended. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5843776d4ec01b4d92af2ee3a9cf1ebb1d920ae7
2021-09-07Don't clang-format or clang-tidy subprojectsEd Tanous2-0/+3
It's undesirable to try to format or tidy up subprojects for which we aren't the authority on. Making this change seems to allow one to use "ninja clang-format" within a repo, and not have it reformat all the subprojects. More testing needed, but it's unlikely to hurt things. Tested: Ran "ninja clang-format" and observed _only_ the files in the repo get formatted, not the subproject files. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ifda7dd02b114e404f33c51919a14ca1a2bbd2352
2021-06-04change source URL for boostJohn Edward Broadbent1-3/+3
The old URL does not work, so this changes it to a yoctoproject url. Tested: Clean build after deleting subprojects/boost_1_75_0/ Signed-off-by: John Edward Broadbent <jebr@google.com> Change-Id: I58e71035af018e9efc7e08f83e61716f561ea455
2021-02-18Add back rttiEd Tanous1-3/+3
The bug mentioned in the comment has been resolved in boost 1.75. Reenable this to drop our binary size again. As a consequence of this, this commit also upgrades the subproject dependencies to 1.75 from 1.73. They technically weren't updated to 1.74, so I'm not sure if anyone really uses these anymore. Tested: Code builds with this enabled. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id86a6358dc5a73a8b5e386661f9317f24cdbe21c
2020-10-03Enable Meson Build System & remove cmake supportManojkiran Eda6-0/+34
- This commit enables the support for meson build system for bmcweb and also remove the cmake support - The inital thought of migrating to meson build system was based on [link](https://mesonbuild.com/Simple-comparison.html) - Other things to praise about meson are its simplicity and userfriendly ness. It also have native support for modern tools such as precompiled headers, coverage, Valgrind , unity builds e.t.c - This commit also support the automatic download and setup of dependencies if they are not found in usual places using meson wraps that are already available in [wrap db](https://wrapdb.mesonbuild.com/) - For few dependencies like boost, boost-url which does not have meson wrap support yet, i have misused the meson subproject command to download boost & boot-url and build against them if they are not found in usual places. - For boost & boost-url the subproject command will always fail as meson supports other meson projects as subprojects but it will always download the source, and since we dont actually build boost/boost-url but just use the the source headers this should not be a problem. - Cmake options removed: - BUILD_STATIC_LIBS has been removed as it is not being used any where as per the review comments. - By default the meson wraps are enabled and it downloads the dependencies if they are not found, and via bitbake this behaviour is disabled by default as download fallback feature is disabled. - This commit also adds the README, changes for bmcweb as well. - The meta-* layer changes are also pushed and marked as WIP under bmcweb_meson_port topic. Tested By : =========== 1. Compilation is passed without error or warning in both arm & x86 sdks that are populated by yocto. 2. The unittests are also passed on both x86 & arm machines. 3. Compilation passed with various build types supported by meson (debug,debugoptimized, relase) 4. modified the meta-phosphor & meta-ibm to leverage meson build for bmcweb, and loaded the resulted image on qemu & real machine, checked the bmcweb status and was also able to pull the web-gui on both. 5. Tested few common commands related to session service & network service manually on a real machine and also also had run a CT regression bucket, and it looked clean. The binary sizes when bmcweb is compiled via bitbake(using meta-ibm) are : cmake: 3100080 bytes approx (3 MB) meson: 2822596 bytes approx (2.7 MB) 1:1 equivalent hash is not possible due to couple of things: 1. The build types in meson does not have a 1:1 mapping with cmake build types. 2. Meson adds below mentioned compiler & linker flags than cmake as a part of warning_level & build types CXXFLAGS :' -O2 -pipe -g -feliminate-unused-debug-types -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Winvalid-pch -DNDEBUG' LDFLAGS : ' -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--no-undefined,-Wl,--end-group' Tried to match the compile commands in both cmake & meson as much as possible and this is what i could get.I have attached the compile_commands.json for both duing an yocto full build in the [link](https://gofile.io/d/gM80fw) for reference. Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Change-Id: Ia65689fdacb8c398dd0a019258369b2442fad2f3