Skip to content

RDKMVE-1815: add support for populating DAC AppStore URL in RFC from DAC_APPSTORE_URL#93

Open
arun-madhavan-013 wants to merge 2 commits intodevelopfrom
feature/RDKMVE-1815-dacstore-url-rfc-support
Open

RDKMVE-1815: add support for populating DAC AppStore URL in RFC from DAC_APPSTORE_URL#93
arun-madhavan-013 wants to merge 2 commits intodevelopfrom
feature/RDKMVE-1815-dacstore-url-rfc-support

Conversation

@arun-madhavan-013
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 17:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a build-time hook in the community RFC defaults installation step to optionally populate a DAC AppStore ConfigURL from the DAC_APPSTORE_URL BitBake variable, so images can embed a deployment-specific URL without modifying the checked-in community-rfc-configs.ini.

Changes:

  • When installing community-rfc-configs.ini into the rootfs, append Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=<value> if DAC_APPSTORE_URL is non-empty.

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

Copy link

Copilot AI left a comment

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


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

bbnote "Installing community RFC configs..."
install -D -m 0644 ${MANIFEST_PATH_RDK_IMAGES}/conf/community-rfc-configs.ini ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
if [ -n "${DAC_APPSTORE_URL}" ]; then
echo "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=${DAC_APPSTORE_URL}" >> ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The DAC_APPSTORE_URL variable is used directly in the echo command without validation or quoting. If the URL contains special shell characters (like semicolons, pipes, backticks, or dollar signs), this could lead to command injection or malformed configuration. Consider validating the URL format or properly quoting the variable expansion to prevent potential security issues.

Suggested change
echo "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=${DAC_APPSTORE_URL}" >> ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
# Validate DAC_APPSTORE_URL to avoid unsafe shell characters that could trigger command substitution.
if printf '%s' "${DAC_APPSTORE_URL}" | grep -q '[$`]' ; then
bbwarn "DAC_APPSTORE_URL contains unsafe characters (\$ or \`). Skipping DAC configuration."
else
printf 'Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=%s\n' "${DAC_APPSTORE_URL}" >> ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
fi

Copilot uses AI. Check for mistakes.
Comment on lines 25 to +27
install -D -m 0644 ${MANIFEST_PATH_RDK_IMAGES}/conf/community-rfc-configs.ini ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
if [ -n "${DAC_APPSTORE_URL}" ]; then
echo "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=${DAC_APPSTORE_URL}" >> ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

The code appends to the configuration file without ensuring the file ends with a newline. If the source file community-rfc-configs.ini doesn't end with a newline, the appended line will be concatenated to the last line of the file, potentially creating an invalid configuration. Consider adding a newline before appending, or checking if the file ends with a newline first.

Suggested change
install -D -m 0644 ${MANIFEST_PATH_RDK_IMAGES}/conf/community-rfc-configs.ini ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
if [ -n "${DAC_APPSTORE_URL}" ]; then
echo "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=${DAC_APPSTORE_URL}" >> ${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
config_file=${IMAGE_ROOTFS}/etc/rfcdefaults/community-rfc-configs.ini
install -D -m 0644 ${MANIFEST_PATH_RDK_IMAGES}/conf/community-rfc-configs.ini "${config_file}"
if [ -n "${DAC_APPSTORE_URL}" ]; then
# Ensure the config file ends with a newline before appending
if [ -s "${config_file}" ] && [ -n "$(tail -c1 "${config_file}" 2>/dev/null)" ]; then
echo >> "${config_file}"
fi
echo "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.DAC.ConfigURL=${DAC_APPSTORE_URL}" >> "${config_file}"

Copilot uses AI. Check for mistakes.
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.

2 participants