Skip to content

ceph.spec.in: add update-alternatives as runtime dep and correct macro call - #69408

Merged
djgalloway merged 2 commits into
ceph:mainfrom
tchaikov:wip-spec-update-alternatives
Jun 11, 2026
Merged

djgalloway merged 2 commits into
ceph:mainfrom
tchaikov:wip-spec-update-alternatives

Conversation

@tchaikov

@tchaikov tchaikov commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

in a37b5b5, we split ceph-osd into ceph-classic-osd and ceph-crimson-osd. but we failed to add alternative to the runtime dep of these two packages, and we used shell syntax to reference _sbindir macro. in this changeset, we fix both issues.

Fixes: https://tracker.ceph.com/issues/77323

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.

@tchaikov
tchaikov requested a review from a team as a code owner June 11, 2026 03:38
@tchaikov
tchaikov requested a review from djgalloway June 11, 2026 03:39
@tchaikov
tchaikov requested a review from Matan-B June 11, 2026 05:26
tchaikov added 2 commits June 11, 2026 13:32
a37b5b5 added %preun scriptlets that use ${_sbindir}, which is
shell syntax rather than an rpm macro, so it expands to empty at run
time and the scriptlet runs "/update-alternatives", failing on
uninstall/upgrade with:

  /var/tmp/rpm-tmp.K1fvm3: line 2: /update-alternatives: No such file or directory
  error: %preun(ceph-osd-crimson-2:20.3.0-5054.g33c1d671.el9.x86_64) scriptlet failed, exit status 127
  Error in PREUN scriptlet in rpm package ceph-osd-crimson.

use %{_sbindir}, like the %posttrans --install lines already do, so it
expands to /usr/sbin/update-alternatives at build time.

Fixes: https://tracker.ceph.com/issues/77323
Signed-off-by: Kefu Chai <[email protected]>
ceph-osd-crimson and ceph-osd-classic call update-alternatives in their
%posttrans and %preun scriptlets but don't depend on it. declare it as a
scriptlet dependency so the binary is there when they run.

Fixes: https://tracker.ceph.com/issues/77323
Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-spec-update-alternatives branch from 4961890 to 7fc3a9e Compare June 11, 2026 05:32

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

LGTM

@djgalloway
djgalloway merged commit b6f8147 into ceph:main Jun 11, 2026
9 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.

3 participants