Skip to content

RDKB-63154 RDKB-63013 Native Build Integration - #10

Merged
GoutamD2905 merged 10 commits into
developfrom
feature/coverity_native_bld
Feb 23, 2026
Merged

RDKB-63154 RDKB-63013 Native Build Integration#10
GoutamD2905 merged 10 commits into
developfrom
feature/coverity_native_bld

Conversation

@Suganya-Sugumar

@Suganya-Sugumar Suganya-Sugumar commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

RDKB-63154 RDKB-63013 Native Build Integration
image

Successful compilation log attached.
Jst_compilation_log.txt

Copilot AI review requested due to automatic review settings January 30, 2026 11:46
@Suganya-Sugumar
Suganya-Sugumar requested a review from a team as a code owner January 30, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds native build integration for RDKB components to enable Coverity static analysis and non-Yocto builds. It provides wrapper scripts that clone build tools from a separate repository and orchestrate dependency setup and component builds.

Changes:

  • Added wrapper scripts (run_setup_dependencies.sh, run_native_build.sh) that manage build tool repository cloning and execute build processes
  • Created configuration files (component_config.json, configure_options.conf) defining dependencies and build flags
  • Added comprehensive README.md with usage instructions, troubleshooting guides, and architecture documentation

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
cov_docker_script/run_setup_dependencies.sh Wrapper script that clones build_tools_workflows repo and executes dependency setup
cov_docker_script/run_native_build.sh Wrapper script that verifies build tools exist and executes native component build
cov_docker_script/component_config.json JSON configuration defining external dependencies (rbus, trower-base64, common-library, dbus) and component build settings
cov_docker_script/configure_options.conf Autotools configuration file with CPPFLAGS, CFLAGS, and LDFLAGS for the build
cov_docker_script/README.md Comprehensive documentation covering build pipeline, configuration format, troubleshooting, and workflow integration
.gitignore Excludes build_tools_workflows/ and build/ directories from version control

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cov_docker_script/component_config.json Outdated
Comment thread cov_docker_script/component_config.json Outdated
Comment thread cov_docker_script/component_config.json
Comment thread cov_docker_script/component_config.json
Comment thread cov_docker_script/component_config.json Outdated
Comment thread cov_docker_script/component_config.json
Comment thread cov_docker_script/component_config.json
Comment thread cov_docker_script/component_config.json Outdated
Comment thread cov_docker_script/README.md Outdated
Comment thread cov_docker_script/component_config.json Outdated
Copilot AI review requested due to automatic review settings February 5, 2026 11:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cov_docker_script/run_external_build.sh Outdated
Comment thread cov_docker_script/run_external_build.sh Outdated
Comment thread cov_docker_script/run_native_build.sh Outdated
Comment thread cov_docker_script/README.md Outdated
Comment thread cov_docker_script/component_config.json Outdated
Copilot AI review requested due to automatic review settings February 19, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cov_docker_script/run_native_build.sh Outdated
Comment thread cov_docker_script/run_setup_dependencies.sh Outdated
Comment thread cov_docker_script/run_external_build.sh Outdated
Comment thread cov_docker_script/README.md Outdated
Comment thread cov_docker_script/README.md Outdated
Comment thread cov_docker_script/configure_options.conf
Comment thread cov_docker_script/configure_options.conf Outdated
Copilot AI review requested due to automatic review settings February 23, 2026 07:18
Comment on lines +11 to +33
name: Build javascript-templates component in github rdkcentral
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-rdk-ci:latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: native build
run: |
# Trust the workspace
git config --global --add safe.directory '*'
# Pull the latest changes for the native build system
git submodule update --init --recursive --remote
# Build and install dependencies
chmod +x build_tools_workflows/cov_docker_script/setup_dependencies.sh
./build_tools_workflows/cov_docker_script/setup_dependencies.sh ./cov_docker_script/component_config.json
# Build component
chmod +x build_tools_workflows/cov_docker_script/build_native.sh
./build_tools_workflows/cov_docker_script/build_native.sh ./cov_docker_script/component_config.json "$(pwd)"
env:
GITHUB_TOKEN: ${{ secrets.RDKCM_RDKE }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

In general, this issue is fixed by explicitly specifying a permissions block for the workflow or for individual jobs, restricting the GITHUB_TOKEN to the least privileges needed (often just contents: read for build/test workflows). This avoids inheriting potentially broad organization or repository defaults.

For this specific workflow, the safest and simplest fix without changing behavior is to add a permissions block at the workflow root level (just under name: and before on:) or at the jobs.build-jst-on-pr level. Since the job only checks out code and runs build scripts, it does not need write privileges to the repository; a minimal contents: read permission is sufficient. Adding it at the root will apply to all jobs (currently only build-jst-on-pr). No imports or additional methods are needed because this is a YAML configuration change only.

Concretely, in .github/workflows/native-build.yml, insert:

permissions:
  contents: read

between line 1 (name: ...) and line 3 (on:). This will constrain the default GITHUB_TOKEN (if used in the future) to read-only repository contents, while leaving the existing use of secrets.RDKCM_RDKE unchanged.

Suggested changeset 1
.github/workflows/native-build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/native-build.yml b/.github/workflows/native-build.yml
--- a/.github/workflows/native-build.yml
+++ b/.github/workflows/native-build.yml
@@ -1,5 +1,8 @@
 name: Build javascript-templates Component in Native Environment
 
+permissions:
+  contents: read
+
 on:
   push:
     branches: [ main, 'sprint/**', 'release/**', develop ]
EOF
@@ -1,5 +1,8 @@
name: Build javascript-templates Component in Native Environment

permissions:
contents: read

on:
push:
branches: [ main, 'sprint/**', 'release/**', develop ]
Copilot is powered by AI and may make mistakes. Always verify output.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cov_docker_script/component_config.json Outdated
Comment on lines +95 to +96
"type": "cmake",
"cmake_flags": "-DBUILD_RDK=ON -DCMAKE_C_FLAGS=\"-I$HOME/usr/include/rdkb -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -DBUILD_RBUS\" -DCMAKE_EXE_LINKER_FLAGS='-Wl,--allow-shlib-undefined -Wl,--unresolved-symbols=ignore-all' -DCMAKE_C_STANDARD_LIBRARIES=\"-L$HOME/usr/local/lib\""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the native build, we should pass the direct flags using the .conf file. If CMake is not available in the native build, then we should introduce flexibility in the core scripts and use it accordingly.

@GoutamD2905
GoutamD2905 merged commit d9090d6 into develop Feb 23, 2026
11 of 13 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants