Bug 1082044 - CentOS 6.4: Supermin fails to detect RPM based distro
CentOS 6.4: Supermin fails to detect RPM based distro
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: supermin (Show other bugs)
rawhide
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-28 10:30 EDT by Tom Duckering
Modified: 2016-02-25 10:34 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-06 12:04:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom Duckering 2014-03-28 10:30:36 EDT
Description of problem:

When we run supermin --list-drivers it fails to detect that we're a RPM based distro.

We're running Centos 6.4 - which has a symlink at /etc/redhat-release - which see in rpm.ml is a file you're looking for.

Version-Release number of selected component (if applicable):

5.1.5

How reproducible:

On centos 6.4 run: supermin --list-drivers

Additional info:

We feel it would be beneficial to have the ability to specify the packager irrespective of OS. For example creating a RPM based supermin appliance on a deb based system.

Perhaps we've misread the man page so any help would be appreciated.

PS. We like the idea of this tool. :)
Comment 1 Richard W.M. Jones 2014-03-28 11:18:32 EDT
I tested this on RHEL 6.5 before release, and it works there:

$ ./src/supermin --version
supermin 5.1.5
$ ./src/supermin --list-drivers
arch/pacman	not-detected
debian/dpkg	not-detected
mageia/rpm	not-detected
opensuse/rpm	not-detected
fedora/rpm	detected

On RHEL, /etc/redhat-release is a real file not a symlink.

These patches should fix the problem.  However I did not try
them specifically on CentOS:

https://www.redhat.com/archives/libguestfs/2014-March/msg00270.html
Comment 2 Richard W.M. Jones 2014-03-28 11:22:34 EDT
(In reply to Tom Duckering from comment #0)
> We feel it would be beneficial to have the ability to specify the packager
> irrespective of OS. For example creating a RPM based supermin appliance on a
> deb based system.

I suspect this wouldn't do what you might think it's should do.
Basically cross-builds of any sort don't work on supermin, not
even between different versions of the same distro.
Comment 3 Richard W.M. Jones 2014-04-06 12:04:46 EDT
These patches are included in supermin 5.1.7.
Comment 4 Greg 2014-10-29 06:31:17 EDT
Hi guys, I'm afraid this is not fixed:

[root@hive libguestfs-1.28.2]# supermin --version
supermin 5.1.11
[root@hive libguestfs-1.28.2]# supermin --list-drivers
arch/pacman     not-detected
debian/dpkg     not-detected
mageia/rpm      not-detected
opensuse/rpm    not-detected
fedora/rpm      not-detected
[root@hive libguestfs-1.28.2]# ls -l /etc/redhat-release
lrwxrwxrwx. 1 root root 14 Nov  3  2013 /etc/redhat-release -> centos-release


Centos 6.4
Comment 5 Richard W.M. Jones 2014-10-29 07:54:32 EDT
With supermin 5.1.11, you will need to install 'rpm-devel' (librpm),
since it no longer uses rpm commands, but uses librpm instead (much
faster).

BTW supermin doesn't need to be run as root.
Comment 6 Greg 2014-10-29 08:09:47 EDT
Sorry to bother, but installation of rpm-devel does not change a thing.
Comment 7 Richard W.M. Jones 2014-10-29 08:16:23 EDT
You need to recompile it in order to pick up the new dependency.
Take a look at the configure output to see if it finds librpm.
Comment 8 Greg 2014-10-29 08:57:00 EDT
Now it throws the following:

librpm-c.c:315: error: ‘RPMDBI_PROVIDENAME’ undeclared (first use in this functi
on)
librpm-c.c:315: error: (Each undeclared identifier is reported only once
librpm-c.c:315: error: for each function it appears in.)
librpm-c.c:319: error: ‘RPMDBI_INSTFILENAMES’ undeclared (first use in this func
tion)
make[1]: *** [supermin-librpm-c.o] Error 1
Comment 9 Greg 2014-10-29 09:00:01 EDT
the previous was make output

[root@hive supermin-5.1.11]# ./configure | grep rpm
checking whether rpmatch is declared without a macro... yes
checking for rpm... /bin/rpm
checking for rpm2cpio... /usr/bin/rpm2cpio
checking for urpmi... /usr/local/sbin/urpmi

Looks like rpm should be functional, but no mention of librpm, though.
Comment 10 xiaoqing 2015-11-29 07:45:49 EST
i use the centos 6.7 to compile supermin 5.1.13 has same problem in make.



checking for rpm... /bin/rpm
checking for rpm2cpio... /usr/bin/rpm2cpio
checking for yumdownloader... /usr/bin/yumdownloader
checking for dnf... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBRPM... yes

librpm-c.c: In function 'createProvidesIterator':
librpm-c.c:327: error: 'RPMDBI_PROVIDENAME' undeclared (first use in this function)
librpm-c.c:327: error: (Each undeclared identifier is reported only once
librpm-c.c:327: error: for each function it appears in.)
librpm-c.c:331: error: 'RPMDBI_INSTFILENAMES' undeclared (first use in this function)
make[2]: *** [supermin-librpm-c.o] Error 1
make[2]: Leaving directory `/root/supermin/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/supermin'
make: *** [all] Error 2
Comment 11 Pino Toscano 2015-11-30 04:30:27 EST
(In reply to Greg from comment #8)
> Now it throws the following:
> 
> librpm-c.c:315: error: ‘RPMDBI_PROVIDENAME’ undeclared (first use in this
> function)
> librpm-c.c:315: error: (Each undeclared identifier is reported only once
> librpm-c.c:315: error: for each function it appears in.)
> librpm-c.c:319: error: ‘RPMDBI_INSTFILENAMES’ undeclared (first use in this
> function)
> make[1]: *** [supermin-librpm-c.o] Error 1

This is a different issue than this bug, and has been reported as bug #1286432.
Comment 12 ryan 2016-02-25 10:21:32 EST
Is there a resolution for the bug #1286432?  It seems to be private.
Comment 13 Pino Toscano 2016-02-25 10:34:12 EST
(In reply to ryan from comment #12)
> Is there a resolution for the bug #1286432?  It seems to be private.

Unfortunately xiaoqing made it private, and we so far couldn't open it. Its title is:

  librpm handler does not build with rpm < 4.9

and it is not fixed yet.

Note You need to log in before you can comment on or make changes to this bug.