Skip to content

Use CEPH_VENDOR_RELEASE define to append vendor release version to the version string - #66730

Merged
idryomov merged 3 commits into
ceph:mainfrom
Naveenaidu:wip-naveen-add-downstream-version-define
Oct 22, 2026
Merged

idryomov merged 3 commits into
ceph:mainfrom
Naveenaidu:wip-naveen-add-downstream-version-define

Conversation

@Naveenaidu

@Naveenaidu Naveenaidu commented Dec 24, 2025 •

Copy link
Copy Markdown
Contributor

Closes: https://tracker.ceph.com/issues/76134

This change introduces a build-time mechanism that allows vendors or downstream distributions to append their release version information to the output of the ceph version command. The goal is to make downstream or vendor-specific build metadata visible directly in the version string, without altering the upstream version semantics.

This PR adds a new optional build-time variable, CEPH_VENDOR_RELEASE, which may be specified during the CMake configuration phase.

When set, the value of CEPH_VENDOR_RELEASE is appended to the ceph version output as a release suffix. When unset (the default), the version output remains unchanged from upstream.

This approach treats the vendor release as build metadata, ensuring the version string is fully determined at compile time and does not depend on runtime configuration.

For eg:
If Ceph is built with the following CMake option:

./do_cmake.sh -DCEPH_VENDOR_RELEASE=8.1.0

The version output becomes

> ceph version

ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0

The same suffix is reflected consistently for ceph versions

> ceph versions
{
    "mon": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "mgr": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 1
    },
    "osd": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "mds": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 3
    },
    "overall": {
        "ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0": 10
    }
}

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@Naveenaidu Naveenaidu changed the title Use CEPH_VENDER_RELEASE define to apend vendor release version to the… Use CEPH_VENDOR_RELEASE define to apend vendor release version to the… Jan 8, 2026
@Naveenaidu Naveenaidu changed the title Use CEPH_VENDOR_RELEASE define to apend vendor release version to the… Use CEPH_VENDOR_RELEASE define to apend vendor release version to the version string Jan 8, 2026
@cloudbehl
cloudbehl requested a review from afreen23 January 30, 2026 06:24
@github-actions

github-actions Bot commented Mar 6, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@batrick

batrick commented Jul 18, 2026

Copy link
Copy Markdown
Member

@Naveenaidu @yaarith what's going on with this PR?

@yaarith

yaarith commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

I believe we're still waiting for an ack from the build team about the new approach, @Naveenaidu can specify further details.

@Naveenaidu

Naveenaidu commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @bigjust can we please get any update on the status of the work from the build team. As discussed, there were some changes required in the infrastructure to support building the ceph builds using define/compile time flags. This PR is blocked on that work

@bigjust

bigjust commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@Naveenaidu Ack, this works for us. We're going to patch the ability to use small flavor RPMs to distinct builds downstream while building ceph once, and have started work on that, but nothing will require changes here.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions Bot added the stale label Sep 19, 2026
@Naveenaidu Naveenaidu self-assigned this Oct 5, 2026
@Naveenaidu
Naveenaidu force-pushed the wip-naveen-add-downstream-version-define branch from d7953d5 to 701da47 Compare October 5, 2026 05:11
@Naveenaidu
Naveenaidu marked this pull request as ready for review October 5, 2026 05:11
@Naveenaidu
Naveenaidu requested a review from a team as a code owner October 5, 2026 05:11
@Naveenaidu
Naveenaidu requested review from batrick and idryomov October 5, 2026 05:14
@github-actions github-actions Bot removed the stale label Oct 5, 2026
@dmick dmick changed the title Use CEPH_VENDOR_RELEASE define to apend vendor release version to the version string Use CEPH_VENDOR_RELEASE define to append vendor release version to the version string Oct 5, 2026

@idryomov idryomov 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.

The version output becomes

> ceph version
ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0

What about ceph --version? I don't think it's covered here because src/ceph.in doesn't have access to pretty_version_to_str().

Comment thread src/common/version.cc Resolved
Naveen Naidu added 3 commits October 8, 2026 17:02
Downstream builds need a way to identify their own release on top of
the upstream ceph version. Add an optional CEPH_VENDOR_RELEASE string
define.

When it is non-empty, pretty_version_to_str() appends:
    " release <CEPH_VENDOR_RELEASE>" to the version string.

It defaults to "", which leaves the output unchanged.

Signed-off-by: Naveen Naidu <[email protected]>
Expose CEPH_VENDOR_RELEASE as a CMake cache variable so that downstream
builds can set the vendor release with -DCEPH_VENDOR_RELEASE=<release>.

Signed-off-by: Naveen Naidu <[email protected]>
`ceph --version` is printed by the python CLI from values substituted
at build time, so it does not go through pretty_version_to_str() and
was missing the vendor release that every other binary's --version
now shows.

Substitute CEPH_VENDOR_RELEASE into ceph.in and append
" release <CEPH_VENDOR_RELEASE>" when it is non-empty.

Signed-off-by: Naveen Naidu <[email protected]>
@Naveenaidu
Naveenaidu force-pushed the wip-naveen-add-downstream-version-define branch from 701da47 to 4b4f070 Compare October 8, 2026 11:32
@Naveenaidu
Naveenaidu requested a review from a team as a code owner October 8, 2026 11:32
@github-actions github-actions Bot added the core label Oct 8, 2026
@Naveenaidu

Copy link
Copy Markdown
Contributor Author

The version output becomes

> ceph version
ceph version 8d7daada90 (98d7daada90c6585c6724f69793e804a5e23cb24) tentacle (dev - Debug) release 8.1.0

What about ceph --version? I don't think it's covered here because src/ceph.in doesn't have access to pretty_version_to_str().

@idryomov Thanks for much for catching this. This missed my mind. I have now implemented it!

@Naveenaidu
Naveenaidu requested a review from idryomov October 8, 2026 11:34

@idryomov idryomov 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.

This looks acceptable to me. I know @batrick had some thoughts on possibly introducing a separate command (ceph vendor?) for this, so please wait for his ack.

@idryomov

idryomov commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@idryomov

idryomov commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

jenkins test windows

@Naveenaidu

Copy link
Copy Markdown
Contributor Author

This looks acceptable to me. I know @batrick had some thoughts on possibly introducing a separate command (ceph vendor?) for this, so please wait for his ack.

Thanksss for the review! Regarding a new command, during previous RADOS call discussions - the general consensus was that we would not like to create a new command for maintainability issues

@batrick

batrick commented Oct 12, 2026

Copy link
Copy Markdown
Member

jenkins test windows

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath15-testing-20261014.082226-main.

@Jayaprakash-ibm

Copy link
Copy Markdown
Contributor

@idryomov
idryomov merged commit f5e516f into ceph:main Oct 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants