Skip to content

fix(azurelinux-release): use CPE 2.3 binding with correct vendor for OS CPE#17685

Open
anphel31 wants to merge 1 commit into
4.0from
anphel/fix-oscpe
Open

fix(azurelinux-release): use CPE 2.3 binding with correct vendor for OS CPE#17685
anphel31 wants to merge 1 commit into
4.0from
anphel/fix-oscpe

Conversation

@anphel31

@anphel31 anphel31 commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Updates the CPE identifier shipped by azurelinux-release to use the CPE 2.3
formatted-string binding
with the correct Microsoft vendor and azure_linux
product name. This affects both places the CPE is emitted:

  • CPE_NAME= in /etc/os-release (via /usr/lib/os-release)
  • the standalone /usr/lib/system-release-cpe file (and its /etc/system-release-cpe symlink)

Before

Location Value
os-release CPE_NAME cpe:/o:azurelinuxproject:azurelinux:4.0
system-release-cpe cpe:/o:microsoft:azurelinux:4.0

After

Location Value
os-release CPE_NAME cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*
system-release-cpe cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*

Both files now carry an identical, consistent value.

Motivation

The two CPE strings were inconsistent with each other (azurelinuxproject vs
microsoft vendor) and both used the legacy CPE 2.2 URI binding (cpe:/o:...).
This change standardizes on:

  • CPE 2.3 formatted-string binding (cpe:2.3:o:...), the current spec
  • microsoft as the vendor
  • azure_linux as the product name

Changes

  • base/comps/azurelinux-release/azurelinux-release.spec
    • CPE_NAME in the generated os-release block → cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*
    • system-release-cpe content → cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*
    • Release: bump 17 → 18 + changelog entry
  • Re-rendered specs/a/azurelinux-release/azurelinux-release.spec
  • Refreshed locks/azurelinux-release.lock

Testing

  • azldev comp build -p azurelinux-release succeeds; all subpackages produced.
  • Extracted the built RPMs and verified:
    • azurelinux-release-identity-basic/usr/lib/os-release contains
      CPE_NAME="cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*"
    • azurelinux-release-common/usr/lib/system-release-cpe contains
      cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*
  • azldev comp render reports no drift post-commit.

@anphel31 anphel31 marked this pull request as ready for review June 10, 2026 23:46
Copilot AI review requested due to automatic review settings June 10, 2026 23: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 updates the CPE identifier emitted by azurelinux-release so that both /usr/lib/os-release (CPE_NAME=) and /usr/lib/system-release-cpe use a consistent CPE 2.3 formatted-string with the microsoft vendor and azure_linux product.

Changes:

  • Bump azurelinux-release Release: from 1718 and add a changelog entry.
  • Change system-release-cpe content to a CPE 2.3 formatted-string.
  • Change os-release CPE_NAME to a CPE 2.3 formatted-string and re-render the spec + refresh the lock fingerprint.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
base/comps/azurelinux-release/azurelinux-release.spec Updates the emitted OS CPE strings and bumps Release/changelog in the source spec.
specs/a/azurelinux-release/azurelinux-release.spec Re-rendered spec reflecting the updated CPE strings and release bump.
locks/azurelinux-release.lock Updated input-fingerprint after the spec change.
Comments suppressed due to low confidence (1)

base/comps/azurelinux-release/azurelinux-release.spec:302

  • CPE_NAME is being switched to CPE 2.3 formatted-string binding, but the string is truncated. For compliance/interoperability, include all 13 components and use * for unspecified fields.
ANSI_COLOR="0;38;2;60;110;180"
LOGO=azurelinux-logo-icon
CPE_NAME="cpe:2.3:o:microsoft:azure_linux:%{dist_version}"
DEFAULT_HOSTNAME="azurelinux"
HOME_URL="%{dist_home_url}"
DOCUMENTATION_URL="https://aka.ms/azurelinux"
SUPPORT_URL="https://aka.ms/azurelinux"

Comment thread base/comps/azurelinux-release/azurelinux-release.spec
Comment thread base/comps/azurelinux-release/azurelinux-release.spec

@reubeno reubeno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes look good (thanks for fixing the inconsistency!), but will you please squash the 2 commits and make sure they have a conventional commit prefix?

Both /etc/os-release CPE_NAME and /usr/lib/system-release-cpe now emit a
consistent, well-formed CPE 2.3 formatted string with the correct
Microsoft vendor and azure_linux product name:

  cpe:2.3:o:microsoft:azure_linux:4.0:*:*:*:*:*:*:*

Previously the two values had drifted (os-release used the legacy CPE 2.2
URI 'cpe:/o:azurelinuxproject:azurelinux:4.0' while system-release-cpe
used 'cpe:/o:microsoft:azurelinux:4.0'). A CPE 2.3 formatted string must
bind all 11 attributes, so the 7 unspecified trailing attributes are set
to '*' wildcards to keep the string valid (13 components total).
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.

3 participants