[CentOS] Installing RPM using --prefix and possible libvirt patch

Trey Dockendorf

treydock at gmail.com
Mon Sep 12 23:03:41 UTC 2011


I'm trying to install libvirt to /opt/libvirt, in order to test a patch I've
worked into the current release, but it seems RPM is ignoring the --prefix
command.

The RPM I built has "Prefix: /opt/libvirt" in the spec, and correctly shows
as relocatable by RPM...

# rpm -qpi libvirt-0.8.1-27.el6.6.x86_64.rpm
Name        : libvirt                      Relocations: /opt/libvirt
Version     : 0.8.1                             Vendor: (none)
Release     : 27.el6.6                      Build Date: Fri 09 Sep 2011
07:30:28 PM CDT
Install Date: (not installed)               Build Host:
itsclinuxdev.tamu.edu
Group       : Development/Libraries         Source RPM:
libvirt-0.8.1-27.el6.6.src.rpm
Size        : 2538412                          License: LGPLv2+
Signature   : (none)
URL         : http://libvirt.org/
Summary     : Library providing a simple API virtualization
Description :
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). The main package includes
the libvirtd server exporting the virtualization support.


However when I issue the RPM command it will throw errors about conflicting
with the current install of libvirt.

# rpm -ivh --prefix /opt/libvirt libvirt-client-0.8.1-27.el6.6.x86_64.rpm
Preparing...                ###########################################
[100%]
file /usr/lib64/libvirt.so.0.8.1 from install of
libvirt-client-0.8.1-27.el6.6.x86_64 conflicts with file from package
libvirt-client-0.8.1-27.el6_0.6.x86_64
file /usr/share/man/man1/virsh.1.gz from install of
libvirt-client-0.8.1-27.el6.6.x86_64 conflicts with file from package
libvirt-client-0.8.1-27.el6_0.6.x86_64
file /usr/share/man/man1/virt-pki-validate.1.gz from install of
libvirt-client-0.8.1-27.el6.6.x86_64 conflicts with file from package
libvirt-client-0.8.1-27.el6_0.6.x86_64
file /usr/share/man/man1/virt-xml-validate.1.gz from install of
libvirt-client-0.8.1-27.el6.6.x86_64 conflicts with file from package
libvirt-client-0.8.1-27.el6_0.6.x86_64

The patch I worked into libvirt is here,
http://www.redhat.com/archives/libvir-list/2010-July/msg00480.html (not my
posting), to add ESXi and ESX 4.1 support , in my case to virt-v2v.  I'd
like to install it without possibly breaking my current install of libvirt
and just use the patched virt-v2v binary.

As a side note, where should I direct my patch to possibly have it put into
the official centos release?  I had to slightly modify what was posted in
the above link to make it work with 0.8.1.

Thanks
- Trey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20110912/c9ecdd0b/attachment.html>


More information about the CentOS mailing list