From: Kefu Chai Date: Thu, 11 Jun 2026 03:29:05 +0000 (+0800) Subject: ceph.spec.in: use %{_sbindir} instead of ${_sbindir} in osd %preun X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b571051663fc4a0160aac618f8113b8664aeba79;p=ceph.git ceph.spec.in: use %{_sbindir} instead of ${_sbindir} in osd %preun a37b5b5bde8c 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 --- diff --git a/ceph.spec.in b/ceph.spec.in index 30028a2c7cd..9876fe5813b 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -2750,7 +2750,7 @@ fi %preun osd-crimson if [ $1 -eq 0 ]; then - ${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-crimson + %{_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-crimson fi %endif @@ -2760,7 +2760,7 @@ fi %preun osd-classic if [ $1 -eq 0 ]; then - ${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-classic + %{_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-classic fi %files volume