recipes-ni: clean up and fix many bugs in ni-grpc-sideband and ni-grpc-device#1006
recipes-ni: clean up and fix many bugs in ni-grpc-sideband and ni-grpc-device#1006amstewart wants to merge 10 commits into
Conversation
The ni-apis repo contains static definitions of NI API files.
ni-grpc-device uses one of these definitions during the build. Since
ni-apis is only a source repo, it's OK for it to remain a source import
rather than being in its own package.
The current recipe checks it out under ``:git/...``, which is not the
correct path. Instead, use ``:${S}/...``, as it will always contain the
correct source path.
Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The ni-grpc-sideband project doesn't have a proper project version or SONAME set, and so does not properly name the dynamic lib we build for it. Give the project a version and SONAME. Also give the project an 'install' target, so that we don't have to do it manually. Also add an option to properly disable the use of submodule dependencies. We don't use the easyrdma dependency in our build anyway. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The Yocto styleguide has moved from the wiki to the project documentation. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The current grpc-device recipe uses a lot of content from a submodule checkout of the ni-grpc-sideband package, which is already installed to the sysroot. So use the distro copy instead. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
This .patch is apparently not used or needed anymore. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
As of the latest release of ni-grpc-device, the nitlsconfig files from ni-grpc-device are named like ``ni-grpc-device.conf.yml``, and are placed in the build directory. So source them from there. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
There is a syntax error in the ``FILES:ni-grpc-device-dev`` variable that keeps the -dev subpackage from properly capturing the .proto files. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
These out-of-stream modifications to the grpc-device source build are no longer necessary. Remove them. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The grpc-device repo tries to include sources from the grpc-sideband submodule, even though we have a package for it. Add a patch to CMakeLists to instead source from the distro sysroot when we're not using submodules. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
The ni-apis submodule is a source-only submodule that we would not make a package for. So its headers should always be included, even when we assert USE_SUBMODULEP_LIBS=OFF. Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
aa3c969 to
ae63a1b
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Yocto recipes for ni-grpc-sideband and ni-grpc-device to align with upstream fixes, improve versioning/installation behavior, and reduce recipe-side workarounds by pushing fixes into upstream CMake where possible.
Changes:
ni-grpc-sideband: add CMake install targets + SONAME/versioning and install headers/protos under a namespaced include dir; update recipe PV/SRCREV and remove manual.soinstallation.ni-grpc-device: stop vendoring grpc-sideband as a submodule checkout; patch CMake to locate sideband headers + fix ni-apis include handling for non-submodule builds; adjust config installation paths/names.- Docs: update the styleguide’s upstream Yocto styleguide link.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| recipes-ni/ni-grpc-sideband/ni-grpc-sideband_git.bb | Updates sideband source rev/versioning and switches to upstream install() behavior. |
| recipes-ni/ni-grpc-sideband/ni-grpc-sideband/0001-Revert-update-function-to-accept-boolean-trigger-11.patch | Reverts upstream API/behavior for the socket accept loop. |
| recipes-ni/ni-grpc-sideband/ni-grpc-sideband/0002-CMakeLists-optionally-diable-submodule-dependencies.patch | Adds a CMake option to avoid bundled third-party deps (typo in subject). |
| recipes-ni/ni-grpc-sideband/ni-grpc-sideband/0003-CMakeLists-version-project-0.1.0.patch | Adds project version + SONAME and introduces CMake install targets. |
| recipes-ni/ni-grpc-sideband/ni-grpc-sideband/0006-CMakeLists-install-headers-to-namespaced-subdir.patch | Installs headers/protos into ${includedir}/${PROJECT_NAME} to avoid collisions. |
| recipes-ni/ni-grpc-device/ni-grpc-device_git.bb | Drops sideband submodule fetch, adds CMake patches, updates install/RDEPENDS. |
| recipes-ni/ni-grpc-device/files/0001-CMakeLists-honor-USE_SUBMODULE_LIBS-when-including.patch | Makes grpc-device CMake locate sideband includes correctly when not using submodules. |
| recipes-ni/ni-grpc-device/files/0002-CMakeLists-fix-missing-includes-for-distro-builds.patch | Ensures ni-apis include paths are used even when USE_SUBMODULE_LIBS=OFF. |
| recipes-ni/ni-grpc-device/files/0001-Rename-shutdown-variable-to-shutdown_server-to-avoid.patch | Removes an obsolete patch now presumably incorporated upstream. |
| docs/styleguide.md | Updates the referenced upstream Yocto styleguide URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SRCREV_grpc-device = "a1830a7ac5274c34f955046cdc719fbf1648ab90" | ||
| SRCREV_grpc-sideband = "e351b75f2df9d932fb7993520429d7c680031864" | ||
| SRC_URI = "git://github.com/ni/grpc-device.git;name=grpc-device;branch=main;protocol=https \ | ||
| git://github.com/ni/ni-apis.git;name=ni-apis;protocol=https;nobranch=1;destsuffix=${S}/third_party/ni-apis \ |
|
|
||
| SRCREV_grpc-device = "6bfbfa5a83cbeaf7400a409aff168a43d711b5b9" | ||
| SRCREV_ni-apis = "00356cce09dd61d15f6799a87c27460a7d7a0c24" | ||
| SRCREV_FORMAT = "grpc-device" |
| From d03d16bc4320db9854724f1466b6657c89f4e856 Mon Sep 17 00:00:00 2001 | ||
| From: Alex Stewart <alex.stewart@emerson.com> | ||
| Date: Wed, 20 May 2026 16:23:33 -0400 | ||
| Subject: [PATCH] CMakeLists: optionally diable submodule dependencies |
| file://0006-CMakeLists-install-headers-to-namespaced-subdir.patch \ | ||
| " | ||
| SRCREV = "0ce928851df2e335ebdc385cced6d46a662c505e" | ||
|
|
There was a problem hiding this comment.
This project is very weird. grpc is only actually used by the "moniker_src" subproject - which this project exports as a source export and is used by ni/grpc-device downstream to build. So grpc-device needs grpc (for that and other things). But this project only uses the monker protobuf source file, which doesn't actually USE grpc. So this recipe doesn't need it.
That being said, I'll prefer to be defensive here and add the grpc DEPENDS back. Though it isn't used now, I would rather it not catch us offguard in the future. Will fix.
Summary of Changes
This patchset fixes a lot about our grpc-device recipes.
ni-grpc-sideband
ni-grpc-device
Justification
These recipes were just a mess.
Testing
bitbake packagefeed-ni-core)Procedure