Skip to content

cls,osd: do not version the object class libraries - #72484

Open
tchaikov wants to merge 4 commits into
ceph:mainfrom
tchaikov:wip-remove-soversion-in-plugin
Open

tchaikov wants to merge 4 commits into
ceph:mainfrom
tchaikov:wip-remove-soversion-in-plugin

Conversation

@tchaikov

@tchaikov tchaikov commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

On Darwin, libcls_foo.1.dylib also ends in .dylib, so the OSD loads it as a class named foo.1. Nothing needs the versioned names: the OSD only dlopen()s libcls_<name> plus the suffix, and nothing links against these libraries. So stop versioning them, and drop the lintian overrides that still named the versioned files.

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.

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.

🟡 Changes recommended

The lintian suppressions need replacement or a stripping fix, and the unrelated Boost change should be separated or justified.

1 open finding
What changed in this PR

Removes versioned object-class library names so Darwin’s OSD does not misidentify version suffixes as class names.

Changes:

  • Builds object-class libraries without VERSION or SOVERSION.
  • Simplifies class filename parsing using std::string_view.
  • Removes related lintian overrides and changes bundled Boost feature propagation.
File Description
src/​cls/​CMakeLists.txt Removes versioning from object-class targets.
src/​cls/​cmpomap/​CMakeLists.txt Removes cmpomap library versioning.
src/​osd/​ClassHandler.cc Modernizes class filename parsing.
src/​test/​librados_test_stub/​TestClassHandler.cc Aligns stub class discovery logic.
debian/​ceph-base.lintian-overrides Removes versioned-file lintian overrides.
cmake/​modules/​BuildBoost.cmake Changes Boost variant option propagation.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread cmake/modules/BuildBoost.cmake Resolved
On Darwin, libcls_foo.1.dylib also ends in .dylib, so the OSD loads it
as a class named "foo.1". Nothing needs the versioned names anyway: the
OSD only dlopen()s libcls_<name> plus the suffix, and nothing links
against these libraries.

Signed-off-by: Kefu Chai <[email protected]>
They name the "ceph" package and the versioned files, neither of which
ships the rados classes any more, and ceph-base is stripped anyway.

Signed-off-by: Kefu Chai <[email protected]>
name.substr(7, name.size() - 10) assumes ".so", so on Darwin
libcls_lock.dylib becomes the class "lock.dy".

Signed-off-by: Kefu Chai <[email protected]>
The strlen()/strncmp()/strncpy() arithmetic over sizeof(CLS_PREFIX) and
sizeof(CLS_SUFFIX) is hard to follow and easy to get wrong, so replace
it. The accepted names do not change.

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-remove-soversion-in-plugin branch from e3486ea to 25ee486 Compare October 8, 2026 08:23
@tchaikov
tchaikov requested a balanced review from Copilot October 8, 2026 09:13

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.

🟢 Approval recommended

The build, loader, test stub, and packaging changes consistently eliminate versioned object-class filenames.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@tchaikov

Copy link
Copy Markdown
Contributor Author

@ceph/build-sig hello maintainers, could you help review this change?

1 similar comment
@tchaikov

tchaikov commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@ceph/build-sig hello maintainers, could you help review this change?

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

Approved for RGW.

@anrao19

anrao19 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao9-testing-2026-11-13-0841-main.

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.

4 participants