Project

General

Profile

Bug #20052

build/ops: librbd1 %post script might run before coreutils package is installed

Added by Nathan Cutler 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
05/23/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

Description

Quoting from https://bugzilla.suse.com/show_bug.cgi?id=1040230

After I perform a standard installation that includes also the pattern:
Xen Virtual Machine Host Server
I found this error in /var/log/zypp/history:

# 2017-05-19 12:31:14 librbd1-12.0.2+git.1493341348.9148e53-1.1.x86_64.rpm installed ok
# Additional rpm output:
# /var/tmp/rpm-tmp.yL4XQg: line 2: mkdir: command not found
# /var/tmp/rpm-tmp.yL4XQg: line 3: ln: command not found
# warning: %post(librbd1-12.0.2+git.1493341348.9148e53-1.1.x86_64) scriptlet failed, exit status 127
# 
2017-05-19 12:31:14|install|librbd1|12.0.2+git.1493341348.9148e53-1.1|x86_64||openSUSE-Leap-42.3-0|61db55746657d38626e1a190d5681bb066d865a1|

The problem is that librbd1 is installed before coreutils and at that time the binaries mkdir and ln used in the postinstall scriptlet, are not available yet.

A possible fix is to add this line in ceph.spec:

 %package -n librbd1
 Summary:        RADOS block device client library
 Group:          System Environment/Libraries
 License:        LGPL-2.0
 Requires:       librados2 = %{version}-%{release}
+Requires(post): coreutils
 %if 0%{?rhel} || 0%{?fedora}
 Obsoletes:      ceph-libs < %{version}-%{release}
 %endif

History

#1 Updated by Nathan Cutler 6 months ago

  • Description updated (diff)

#2 Updated by Ken Dreyer 6 months ago

  • Status changed from In Progress to Need Review

#3 Updated by Nathan Cutler 6 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF