Bug 1297606

Summary: supermin cannot detect package manager on Centos 7.2
Product: [Fedora] Fedora Reporter: Mason Jones <mason.jones>
Component: superminAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: mason.jones, ptoscano, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Other   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-14 13:59:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Output from running ./configure none

Description Mason Jones 2016-01-12 01:24:25 UTC
Description of problem:
Attempting to run supermin on Centos 7.2 fails because it cannot determine package manager.

Version-Release number of selected component (if applicable):
supermin 5.1.14 (built from source)
Centos 7.2.1511

How reproducible:
Easily

Steps to Reproduce:
1. Setup Centos 7.2.1511 Vagrant image
2. Download and build supermin 5.1.14
3. Run './src/supermin --list-drivers'

Actual results:
arch/pacman	not-detected
debian/dpkg	not-detected
mageia/rpm	not-detected
opensuse/rpm	not-detected
ibm_powerkvm/rpm	not-detected
fedora/rpm	not-detected

Expected results:
Should detect fedora/rpm, I assume.

Additional info:
None.

Comment 1 Richard W.M. Jones 2016-01-12 09:03:31 UTC
This usually happens because you don't have all the dependencies
installed.  I think in this case you're likely to be missing
`rpm-devel'.  (The messaging could be a bit better though).

What's the full output from ./configure?

Comment 2 Mason Jones 2016-01-12 17:31:38 UTC
Created attachment 1114056 [details]
Output from running ./configure

This is the output from running ./configure in the Centos 7.2 Vagrant, after additionally installing rpm-devel.

Comment 3 Mason Jones 2016-01-12 17:33:03 UTC
Thanks for the response. I tried again after installing rpm-devel, but it didn't change anything, unfortunately. The full yum install command I'm running prior to building supermin is:

yum install -y gcc ocaml ocaml-findlib e2fsprogs-devel glibc-static rpm-devel

I've attached the output from running ./configure. Thanks again for the help.

Comment 4 Mason Jones 2016-01-13 00:28:02 UTC
Okay, I figured it out, though it took a bit since I'm totally new to ocaml! The problem was that although it detected rpm and rpm2cpio, it wasn't finding yumdownload in the fedora_detect() function in rpm.ml. I hadn't installed yum-utils, which turns out to be needed. I added that to the yum install list, and it's working now. Thanks for the pointer to investigate the dependencies more fully. Probably some additional documentation on those wouldn't hurt.

Comment 5 Richard W.M. Jones 2016-01-14 13:59:44 UTC
A useful command is:

  # yum-builddep supermin

which will install all the build deps automatically.

This is mentioned in the README file already, but I have improved
the documentation to reference RHEL.

https://github.com/libguestfs/supermin/commit/d763aa475d15b1ec5edb368039244ca21ff08928

Closing this bug per comment 4 and comment 5.

Comment 6 Mason Jones 2016-01-14 16:41:59 UTC
Right, I tried using that yum-builddep command, but got a message that it didn't know about supermin or couldn't get the information (I don't recall the exact message now). I'm not a yum expert so I'm not sure if there was something more to do there. In any case, problem solved this time, thanks very much.