Skip to content

Rebase - #43

Open
AravindanNC wants to merge 110 commits into
topic/nm_dnsmasqfrom
develop
Open

Rebase#43
AravindanNC wants to merge 110 commits into
topic/nm_dnsmasqfrom
develop

Conversation

@AravindanNC

Copy link
Copy Markdown
Contributor

No description provided.

mselva006c and others added 18 commits June 14, 2025 22:54
Reason for the change: Reduce redundant ls-remote calls for same src URL and tag combinations.
Cache SHA values in <DL_DIR>/sha_cache based on src URL and tag.

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Reason for the change: Improve performance by parallelizing parsing tasks

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Reason for the change: Update the cache dir name, added error condition
checks

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
… file system

Allow file:// as well as https://
RDK-58119 Update license_create_manifest_pdf.bbclass to support local file system
…via Settings (#34)

* RDKTV-36648: USB Drive Fails to Launch in Offline Mode After Restart via Settings

* Update post-rootfs-hooks.bbclass

---------

Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
Reason for the change: Update change log for release 1.4.0

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Add support to fetch licensetext tarballs from local file system
RDK-58119: License manifest pdf creation in local RDK-E build
Reason for the change: Systemd-analyze should be included in the debug build variant, as it provides critical insights for troubleshooting service failures and dependencies.
@AravindanNC
AravindanNC requested review from a team as code owners August 6, 2025 14:31
@AravindanNC
AravindanNC requested a review from a team August 6, 2025 14:31
@CLAassistant

CLAassistant commented Aug 6, 2025

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
9 out of 10 committers have signed the CLA.

✅ maniselva006c
✅ scthunderbolt
✅ NareshM1702
✅ satya200
✅ agampa263
✅ AravindanNC
✅ Alan-Ryan
✅ nhanasi
✅ anand-ky
❌ mselva006c


mselva006c seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

NareshM1702 and others added 8 commits August 8, 2025 08:45
…32)

Co-authored-by: maniselva006c <mani.sselvaraj@gmail.com>
Reason for change:
Add default timeout as 1s for le-remote call and update the sha cache to json format

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Co-authored-by: mselva006c <mani_selvaraj@comcast.com>
Reason for change: Update change log for release 1.5.0

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>
Reason for change: Remove the timeout option(1s) from ls-remote call as it fails on some system
Reason for change: Updated change log for Rel 1.5.1

Signed-off-by: mselva006c <mani_selvaraj@comcast.com>

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 24 out of 24 changed files in this pull request and generated 6 comments.

Comment on lines +16 to +22
for filename in os.listdir(workdir):
if filename.endswith(".json"): # Check for .json extension
filepath = os.path.join(workdir, filename)
json_files.append(filepath)

if filename == "remote_debugger_oem.json":
remote_debugger_oem_exists = True
Comment on lines 12 to +22
python () {
import fcntl
import json
import sqlite3
import concurrent.futures
from typing import Optional
class ShaCache:
def __init__(self, cache_dir: str):
self.cache_dir = os.path.join(cache_dir, "git_revision_cache")
os.makedirs(self.cache_dir, exist_ok=True)

Comment on lines 113 to +127
# From below path variable "artifactory_paths" we removed some sensitive strings about IPK server path which need to be reworked or reconstructed after open-sourcing.
artifactory_paths=$(echo $artifactory_paths | tr ' ' '\n' | grep -o 'http[s]*://[^ ]*')
artifactory_paths=$(echo $artifactory_paths | tr ' ' '\n' | grep -o -e 'http[s]*://[^ ]*' -e 'file*:[/][^ ]*')
echo "Final artifactory paths: $artifactory_paths"
for artifactory_path in $artifactory_paths; do
set +e
echo "Downloading licenses from $artifactory_path"
wget -r -np -nd --cut-dirs=3 --reject="index.html*" $artifactory_path/$machine/licenses/
echo "Downloading licenses from $artifactory_path"
if [[ "$artifactory_path" == *"http"* ]]
then
wget -r -np -nd --cut-dirs=3 --reject="index.html*" $artifactory_path/$machine/licenses/
elif [[ "$artifactory_path" == "file://"* ]]
then
# Remove the file prefix. cp does not need it.
copy_path=${artifactory_path#"file://"}
cp $copy_path/licenses/* .
fi
Comment thread classes/coverity.bbclass

# Ignore problematic components
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage"
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage| openssl"
Comment on lines +71 to +91
if not isinstance(path_value, str) or not path_value.strip():
bb.fatal("Invalid install path: path cannot be empty")

raw = path_value.strip()

# Treat FACTORY_APPS_PATH as a target (POSIX) path; reject Windows separators.
if "\\" in raw:
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': backslashes are not allowed")

if not raw.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': must be an absolute path (start with '/')")

# Reject any '..' path elements to avoid escapes when combined with IMAGE_ROOTFS.
parts = [p for p in raw.split("/") if p]
if any(p == ".." for p in parts):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': '..' is not allowed")

normalized = posixpath.normpath(raw)
# normpath can remove trailing slashes; ensure it remains absolute
if not normalized.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': normalization produced a non-absolute path")
Comment on lines +28 to +35
execute_aa_compile_std_profiles() {
install -d ${R}/etc/apparmor.d/
install -d ${R}/etc/apparmor/binprofiles/
install -d ${R}/etc/apparmor/txttmp/

SRCDIR="${R}/etc/apparmor.d"
OUTDIR="${R}/etc/apparmor/txttmp"

nhanasi and others added 4 commits June 5, 2026 11:37
* Update image-classes.inc

* Create legacy_entos_support_patch.bbclass

* Update legacy_entos_support_patch.bbclass
Copilot AI review requested due to automatic review settings June 5, 2026 22:19

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 25 out of 25 changed files in this pull request and generated 10 comments.

Comment on lines +145 to +148
def process_url(type, host, path, user, pswd, parm, url_index):
if not user and "user" in parm:
user = parm[user]
name = parm.get("name",'default')
Comment on lines +15 to +22
if os.path.exists(workdir):
for filename in os.listdir(workdir):
if filename.endswith(".json"): # Check for .json extension
filepath = os.path.join(workdir, filename)
json_files.append(filepath)

if filename == "remote_debugger_oem.json":
remote_debugger_oem_exists = True
Comment on lines +28 to +35
execute_aa_compile_std_profiles() {
install -d ${R}/etc/apparmor.d/
install -d ${R}/etc/apparmor/binprofiles/
install -d ${R}/etc/apparmor/txttmp/

SRCDIR="${R}/etc/apparmor.d"
OUTDIR="${R}/etc/apparmor/txttmp"

Comment thread classes/coverity.bbclass

# Ignore problematic components
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage"
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage| openssl"
echo $artifactory_paths
# From below path variable "artifactory_paths" we removed some sensitive strings about IPK server path which need to be reworked or reconstructed after open-sourcing.
artifactory_paths=$(echo $artifactory_paths | tr ' ' '\n' | grep -o 'http[s]*://[^ ]*')
artifactory_paths=$(echo $artifactory_paths | tr ' ' '\n' | grep -o -e 'http[s]*://[^ ]*' -e 'file*:[/][^ ]*')
Comment on lines +40 to 44
conf.write("create\n")
conf.write("postrotate\n")
conf.write(" syslog-ng-ctl reopen --control=/tmp/syslog-ng/syslog-ng.ctl\n")
conf.write("endscript\n")
conf.write("}\n")
Comment on lines +48 to +50
memconf.write("postrotate\n")
memconf.write(" syslog-ng-ctl reopen --control=/tmp/syslog-ng/syslog-ng.ctl\n")
memconf.write("endscript\n")
# Update device.properties in the rootfs
IMAGE_CLASSES += "update-device-properties"

#Consume Vendor Script for the Legcay ENTOS device
Comment on lines 16 to +18
IMAGE_CLASSES +="logrotate_inconfig"

IMAGE_CLASSES +="remotedebugger_json_merger"
Comment on lines +76 to +91
# Treat FACTORY_APPS_PATH as a target (POSIX) path; reject Windows separators.
if "\\" in raw:
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': backslashes are not allowed")

if not raw.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': must be an absolute path (start with '/')")

# Reject any '..' path elements to avoid escapes when combined with IMAGE_ROOTFS.
parts = [p for p in raw.split("/") if p]
if any(p == ".." for p in parts):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': '..' is not allowed")

normalized = posixpath.normpath(raw)
# normpath can remove trailing slashes; ensure it remains absolute
if not normalized.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': normalization produced a non-absolute path")
* Update logrotate_config.bbclass

* Update syslog-ng-config-gen.bbclass

* Update syslog-ng-config-gen.bbclass

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 13, 2026 12:37

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 26 out of 26 changed files in this pull request and generated 12 comments.

Comment on lines +15 to +24
if os.path.exists(workdir):
for filename in os.listdir(workdir):
if filename.endswith(".json"): # Check for .json extension
filepath = os.path.join(workdir, filename)
json_files.append(filepath)

if filename == "remote_debugger_oem.json":
remote_debugger_oem_exists = True
else:
bb.warn("Directory does not exist!")
#Install performance and debug tools as required in RDK_TOOLS_PACKAGES
IMAGE_INSTALL:append = " ${@d.getVar("RDK_TOOLS_PACKAGES", True) or ""} "

IMAGE_INSTALL:append = "${@bb.utils.contains('BUILD_VARIANT', 'debug', " systemd-analyze", "", d)}"
Comment on lines +13 to +17
import fcntl
import json
import sqlite3
import concurrent.futures
from typing import Optional
Comment on lines +145 to +148
def process_url(type, host, path, user, pswd, parm, url_index):
if not user and "user" in parm:
user = parm[user]
name = parm.get("name",'default')
Comment on lines +37 to +44
for line in ipk_feed_uris.split():
feed = re.match(r"^[ \t]*([^#]+)##(\S+)[ \t]*$", line)
if feed is not None:
arch_name = feed.group(1)
arch_uri = feed.group(2)
if not arch_uri.startswith("file:"):
feed_dict[arch_name] = arch_uri
return feed_dict
# Update device.properties in the rootfs
IMAGE_CLASSES += "update-device-properties"

#Consume Vendor Script for the Legcay ENTOS device

IMAGE_CLASSES +="logrotate_inconfig"

IMAGE_CLASSES +="remotedebugger_json_merger"

fdo_mode = (d.getVar('FDO_PROFILE_MODE') or "").strip().lower()
if fdo_mode not in ("", "generate", "use"):
bb.fatal("[FDO-PROFILING]: FDO_PROFILE_MODE not set")
Comment on lines +76 to +92
# Treat FACTORY_APPS_PATH as a target (POSIX) path; reject Windows separators.
if "\\" in raw:
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': backslashes are not allowed")

if not raw.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': must be an absolute path (start with '/')")

# Reject any '..' path elements to avoid escapes when combined with IMAGE_ROOTFS.
parts = [p for p in raw.split("/") if p]
if any(p == ".." for p in parts):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': '..' is not allowed")

normalized = posixpath.normpath(raw)
# normpath can remove trailing slashes; ensure it remains absolute
if not normalized.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': normalization produced a non-absolute path")

@@ -0,0 +1,34 @@
#
# Vendor provided scripts,properies file will be used as priority
Copilot AI review requested due to automatic review settings July 16, 2026 18:50

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 26 out of 26 changed files in this pull request and generated 9 comments.

Comment on lines +145 to +148
def process_url(type, host, path, user, pswd, parm, url_index):
if not user and "user" in parm:
user = parm[user]
name = parm.get("name",'default')
Comment on lines +177 to +181
with concurrent.futures.ThreadPoolExecutor(max_workers=utils.cpu_count()) as executor:
futures = []
url_index = 0;
for url in urls:
type, host, path, user, pswd, parm = bb.fetch2.decodeurl(url)
Comment on lines +15 to +22
if os.path.exists(workdir):
for filename in os.listdir(workdir):
if filename.endswith(".json"): # Check for .json extension
filepath = os.path.join(workdir, filename)
json_files.append(filepath)

if filename == "remote_debugger_oem.json":
remote_debugger_oem_exists = True
Comment thread classes/lxc.bbclass
Comment on lines +5 to +6
if "container" in d.getVar('MACHINEOVERRIDES', True):
d.appendVar("DEPENDS", " lxc-native")
Comment on lines 2 to +4
IMAGE_INSTALL:append = " ${@d.getVar("RDK_TOOLS_PACKAGES", True) or ""} "

IMAGE_INSTALL:append = "${@bb.utils.contains('BUILD_VARIANT', 'debug', " systemd-analyze", "", d)}"
Comment on lines +124 to +127
# Remove the file prefix. cp does not need it.
copy_path=${artifactory_path#"file://"}
cp $copy_path/licenses/* .
fi
Comment thread classes/coverity.bbclass

# Ignore problematic components
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage"
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage| openssl"
# Update device.properties in the rootfs
IMAGE_CLASSES += "update-device-properties"

#Consume Vendor Script for the Legcay ENTOS device
Comment on lines +76 to +92
# Treat FACTORY_APPS_PATH as a target (POSIX) path; reject Windows separators.
if "\\" in raw:
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': backslashes are not allowed")

if not raw.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': must be an absolute path (start with '/')")

# Reject any '..' path elements to avoid escapes when combined with IMAGE_ROOTFS.
parts = [p for p in raw.split("/") if p]
if any(p == ".." for p in parts):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': '..' is not allowed")

normalized = posixpath.normpath(raw)
# normpath can remove trailing slashes; ensure it remains absolute
if not normalized.startswith("/"):
bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': normalization produced a non-absolute path")

* Update legacy_entos_support_patch.bbclass

* Update legacy_entos_support_patch.bbclass
Copilot AI review requested due to automatic review settings July 20, 2026 15:37

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 26 out of 26 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (13)

classes/perfomance-debug-tools-packages.bbclass:4

  • The BitBake python expansions in IMAGE_INSTALL:append use nested double-quotes, which will break parsing (the string terminates early). Use single quotes inside the Python expression (or escape quotes) and keep spacing consistent.
#Install performance and debug tools as required in RDK_TOOLS_PACKAGES
IMAGE_INSTALL:append = " ${@d.getVar("RDK_TOOLS_PACKAGES", True) or ""} "

IMAGE_INSTALL:append = "${@bb.utils.contains('BUILD_VARIANT', 'debug', " systemd-analyze", "", d)}" 

classes/remotedebugger_json_merger.bbclass:17

  • This block has inconsistent indentation under if os.path.exists(workdir):, which will cause a Python IndentationError at parse time.
    if os.path.exists(workdir):
     for filename in os.listdir(workdir):
        if filename.endswith(".json"):  # Check for .json extension

classes/remotedebugger_json_merger.bbclass:53

  • If a JSON file disappears between os.listdir() and open, the code warns but still attempts to open it, which will raise and fail the postprocess step. This also doesn't handle JSON parse errors.
            if not os.path.exists(json_file):
                bb.warn("JSON files does not exist!")

            with open(json_file, 'r') as f:
                data = json.load(f)

classes/tag_to_sha_converter.bbclass:17

  • ShaCache uses os.path / os.makedirs, but os is never imported in this anonymous Python function, which will raise a NameError during parsing.
    import fcntl
    import json
    import sqlite3
    import concurrent.futures
    from typing import Optional

classes/tag_to_sha_converter.bbclass:148

  • This attempts to index parm with the current user value (parm[user]) instead of reading the 'user' key from the decoded URL params. It will raise KeyError/TypeError and prevents authenticated fetches.
    def process_url(type, host, path, user, pswd, parm, url_index):
        if not  user and "user" in parm:
            user = parm[user]
        name = parm.get("name",'default')

classes/tag_to_sha_converter.bbclass:179

  • process_urls() runs process_url() in multiple threads, but process_url() calls d.setVar(...) on the shared BitBake datastore. BitBake's datastore is not thread-safe, so this can cause non-deterministic metadata corruption. Prefer a serial loop here (git ls-remote is I/O bound anyway) unless you can guarantee thread safety via locking.
    def process_urls(urls):
        import bb.utils as utils
        with concurrent.futures.ThreadPoolExecutor(max_workers=utils.cpu_count()) as executor:
            futures = []
            url_index = 0;

classes/apparmor_binprofiles.bbclass:31

  • execute_aa_compile_std_profiles() uses ${R} but this variable is not defined anywhere in this bbclass, so all install -d ${R}/... and subsequent references will expand to empty and operate on the host filesystem root. Define R locally from IMAGE_ROOTFS before using it.
execute_aa_compile_std_profiles() {
    install -d ${R}/etc/apparmor.d/
    install -d ${R}/etc/apparmor/binprofiles/
    install -d ${R}/etc/apparmor/txttmp/

classes/coverity.bbclass:102

  • The blacklist list item concatenates mkimage| openssl without the usual | separator spacing, which can break any downstream splitting/regex that expects |-delimited tokens.
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage| openssl"

conf/include/image-classes.inc:7

  • Spelling/grammar: "Legcay" should be "Legacy" (and add a space after # for consistency).
#Consume Vendor Script for the Legcay ENTOS device

classes/license_create_manifest_pdf.bbclass:114

  • The grep regex intended to match local file:// feed URIs is incorrect: file*:[/][^ ]* matches fil... patterns, not file://.... This can cause local feeds to be skipped.
    artifactory_paths=$(echo $artifactory_paths | tr ' ' '\n' | grep -o -e 'http[s]*://[^ ]*' -e 'file*:[/][^ ]*')

classes/license_create_manifest_pdf.bbclass:122

  • This shell function uses bash-specific [[ ... ]] tests, but BitBake shell tasks run under /bin/sh by default. That can cause a syntax error on systems where /bin/sh is dash/POSIX sh. Use a POSIX case (and quote URLs/paths) instead.
        echo "Downloading licenses from $artifactory_path"
        if [[ "$artifactory_path" == *"http"* ]]
        then
            wget -r -np -nd --cut-dirs=3 --reject="index.html*" $artifactory_path/$machine/licenses/
        elif [[ "$artifactory_path" == "file://"* ]]

classes/install-factoryapps.bbclass:80

  • The validation helper is used for both the global FACTORY_APPS_PATH and per-entry installpath, but the fatal messages always say FACTORY_APPS_PATH, which is confusing when the error came from an entry's installpath. Use a neutral "install path" wording in these errors.
        # Treat FACTORY_APPS_PATH as a target (POSIX) path; reject Windows separators.
        if "\\" in raw:
            bb.fatal(f"Invalid FACTORY_APPS_PATH '{raw}': backslashes are not allowed")

        if not raw.startswith("/"):

classes/fdo-profiling.bbclass:32

  • When FDO_PROFILE_MODE is set to an unexpected value, the fatal message says "not set". This makes debugging harder; include the invalid value and the accepted options.
    fdo_mode = (d.getVar('FDO_PROFILE_MODE') or "").strip().lower()
    if fdo_mode not in ("", "generate", "use"):
        bb.fatal("[FDO-PROFILING]: FDO_PROFILE_MODE not set")

Copilot AI review requested due to automatic review settings July 23, 2026 18:20

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 26 out of 26 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (11)

classes/tag_to_sha_converter.bbclass:17

  • ShaCache uses os.path/os.makedirs, but os is not imported in this python block, which will raise a NameError at parse time.
    import fcntl
    import json
    import sqlite3
    import concurrent.futures
    from typing import Optional

classes/tag_to_sha_converter.bbclass:148

  • user = parm[user] is indexing the dict with the current value of user (often None) instead of reading the "user" fetch parameter, which can raise KeyError/TypeError and prevents authenticated URLs from working.
    def process_url(type, host, path, user, pswd, parm, url_index):
        if not  user and "user" in parm:
            user = parm[user]
        name = parm.get("name",'default')

classes/tag_to_sha_converter.bbclass:187

  • This code mutates the BitBake datastore (d.setVar) from multiple ThreadPoolExecutor worker threads. The datastore is not thread-safe; concurrent mutation can lead to nondeterministic behavior or intermittent parse failures. Prefer collecting results in threads and applying d.setVar in the main thread, or run the loop serially.
    def process_urls(urls):
        import bb.utils as utils
        with concurrent.futures.ThreadPoolExecutor(max_workers=utils.cpu_count()) as executor:
            futures = []
            url_index = 0;
            for url in urls:
                type, host, path, user, pswd, parm =  bb.fetch2.decodeurl(url)
                if "git" in type:
                    url_index += 1
                    futures.append(executor.submit(process_url, type, host, path, user, pswd, parm, url_index))
            for future in concurrent.futures.as_completed(futures):
                future.result()

classes/remotedebugger_json_merger.bbclass:24

  • The for filename in os.listdir(workdir): loop is misindented under the if os.path.exists(workdir): block, which will raise an IndentationError and break the rootfs postprocess step.
    if os.path.exists(workdir):
     for filename in os.listdir(workdir):
        if filename.endswith(".json"):  # Check for .json extension
            filepath = os.path.join(workdir, filename)
            json_files.append(filepath)

            if filename == "remote_debugger_oem.json":
                remote_debugger_oem_exists = True
    else:
        bb.warn("Directory does not exist!")

classes/perfomance-debug-tools-packages.bbclass:4

  • This file contains nested double-quotes inside BitBake string expressions, which will break parsing (both the existing getVar("RDK_TOOLS_PACKAGES"...) and the newly added contains(..., " systemd-analyze", ...)). Use single quotes inside ${@ ... } and keep the outer BitBake string quoted.
IMAGE_INSTALL:append = " ${@d.getVar("RDK_TOOLS_PACKAGES", True) or ""} "

IMAGE_INSTALL:append = "${@bb.utils.contains('BUILD_VARIANT', 'debug', " systemd-analyze", "", d)}" 

classes/apparmor_binprofiles.bbclass:12

  • execute_aa_compile_std_profiles() uses ${R}, but this class never defines R. If ${R} expands to empty, the install -d/find/mv operations can target the build host filesystem instead of ${IMAGE_ROOTFS}.
DEPENDS:append = " apparmor-native "

ROOTFS_POSTPROCESS_COMMAND:append = " override_apparmor_generic_defaults; execute_aa_compile_std_profiles;"

classes/coverity.bbclass:102

  • The blacklist entry is missing a separator before openssl (mkimage| openssl), which changes the token and may prevent matching/blacklisting mkimage as intended.
COVERITY_BLACKLIST_PATH += "avro-c | graphite2 | zilker | wdmp-c | ctrlm-testapp | wpeframework | mkimage| openssl"

classes/license_create_manifest_pdf.bbclass:127

  • This shell function uses [[ ... ]], which is not POSIX and can fail under /bin/sh (BitBake shell functions are not guaranteed to run under bash). Use a POSIX case/[ test and quote variables/URLs.
        echo "Downloading licenses from $artifactory_path"
        if [[ "$artifactory_path" == *"http"* ]]
        then
            wget -r -np -nd --cut-dirs=3 --reject="index.html*" $artifactory_path/$machine/licenses/
        elif [[ "$artifactory_path" == "file://"* ]]
        then
            # Remove the file prefix. cp does not need it.
            copy_path=${artifactory_path#"file://"}
            cp $copy_path/licenses/* .
        fi

conf/include/image-classes.inc:7

  • Spelling/formatting in comment: "Legcay" -> "legacy", and add a space after # for consistency/readability.
#Consume Vendor Script for the Legcay ENTOS device

classes/lxc.bbclass:7

  • d.getVar('MACHINEOVERRIDES', True) can be None; using the in operator on None raises a TypeError at parse time. Coerce to an empty string before searching.
python __anonymous() {
    if "container" in d.getVar('MACHINEOVERRIDES', True):
        d.appendVar("DEPENDS", " lxc-native")
}

classes/fdo-profiling.bbclass:32

  • The fatal message triggers when FDO_PROFILE_MODE is set to an unsupported value, but the message says it is "not set". This makes misconfiguration harder to diagnose; report the invalid value and the allowed values.
    if fdo_mode not in ("", "generate", "use"):
        bb.fatal("[FDO-PROFILING]: FDO_PROFILE_MODE not set")

Co-authored-by: jthoma442 <jomo_thomas@comcast.com>
Copilot AI review requested due to automatic review settings August 4, 2026 18:10

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 27 out of 27 changed files in this pull request and generated no new comments.

Suppressed comments (7)

classes/tag_to_sha_converter.bbclass:21

  • ShaCache uses os.path.join/os.makedirs but os is never imported in this anonymous Python block, which will raise NameError at parse time.
    import fcntl
    import json
    import sqlite3
    import concurrent.futures
    from typing import Optional
    class ShaCache:
        def __init__(self, cache_dir: str):
            self.cache_dir = os.path.join(cache_dir, "git_revision_cache")
            os.makedirs(self.cache_dir, exist_ok=True)

classes/tag_to_sha_converter.bbclass:187

  • process_urls() uses a ThreadPoolExecutor but each worker calls d.setVar(...) on the shared BitBake datastore. The datastore is not thread-safe, so this can cause non-deterministic parse-time failures/corruption under parallel execution.
    def process_urls(urls):
        import bb.utils as utils
        with concurrent.futures.ThreadPoolExecutor(max_workers=utils.cpu_count()) as executor:
            futures = []
            url_index = 0;
            for url in urls:
                type, host, path, user, pswd, parm =  bb.fetch2.decodeurl(url)
                if "git" in type:
                    url_index += 1
                    futures.append(executor.submit(process_url, type, host, path, user, pswd, parm, url_index))
            for future in concurrent.futures.as_completed(futures):
                future.result()

conf/include/image-classes.inc:7

  • Spelling/wording issue in comment: "Legcay" should be "Legacy", and add a space after # for consistency with surrounding comments.
#Consume Vendor Script for the Legcay ENTOS device

classes/tag_to_sha_converter.bbclass:148

  • The code intended to read the user fetcher parameter is incorrect: user = parm[user] will raise (since user is not a key) and never sets the username from parm.
    def process_url(type, host, path, user, pswd, parm, url_index):
        if not  user and "user" in parm:
            user = parm[user]
        name = parm.get("name",'default')

classes/remotedebugger_json_merger.bbclass:25

  • The for filename in os.listdir(workdir): loop is mis-indented under the if os.path.exists(workdir): block, which will cause an IndentationError and break parsing/execution. Also, if the directory doesn't exist the function should return before using workdir for output paths.
    if os.path.exists(workdir):
     for filename in os.listdir(workdir):
        if filename.endswith(".json"):  # Check for .json extension
            filepath = os.path.join(workdir, filename)
            json_files.append(filepath)

            if filename == "remote_debugger_oem.json":
                remote_debugger_oem_exists = True
    else:
        bb.warn("Directory does not exist!")

classes/perfomance-debug-tools-packages.bbclass:4

  • This file has invalid BitBake quoting: nested double-quotes inside the Python expansions will terminate the string early and cause a parse error.
IMAGE_INSTALL:append = " ${@d.getVar("RDK_TOOLS_PACKAGES", True) or ""} "

IMAGE_INSTALL:append = "${@bb.utils.contains('BUILD_VARIANT', 'debug', " systemd-analyze", "", d)}" 

classes/apparmor_binprofiles.bbclass:12

  • This class uses ${R} in shell functions but never defines R. If R expands to empty, the install/mv/rm operations will target the build host's /etc/... instead of the image rootfs.
ROOTFS_POSTPROCESS_COMMAND:append = " override_apparmor_generic_defaults; execute_aa_compile_std_profiles;"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.