Bug 1082044 - CentOS 6.4: Supermin fails to detect RPM based distro
Summary: CentOS 6.4: Supermin fails to detect RPM based distro
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: supermin
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-28 14:30 UTC by Tom Duckering
Modified: 2016-02-25 15:34 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-06 16:04:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tom Duckering 2014-03-28 14:30:36 UTC
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 15:18:32 UTC
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 15:22:34 UTC
(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 16:04:46 UTC
These patches are included in supermin 5.1.7.

Comment 4 Greg 2014-10-29 10:31:17 UTC
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 11:54:32 UTC
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 12:09:47 UTC
Sorry to bother, but installation of rpm-devel does not change a thing.

Comment 7 Richard W.M. Jones 2014-10-29 12:16:23 UTC
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 12:57:00 UTC
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 13:00:01 UTC
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 12:45:49 UTC
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 09:30:27 UTC
(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 15:21:32 UTC
Is there a resolution for the bug #1286432?  It seems to be private.

Comment 13 Pino Toscano 2016-02-25 15:34:12 UTC
(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.