Subject: Re: [vserver] Error with vserver build and "yum" method on CentOS
From: Jeff Jansen <jeff.jansen@kkoncepts.net>
Date: Thu, 27 Aug 2009 16:16:41 +0800

Xavier Montagutelli <xavier.montagutelli@unilim.fr> wrote on 2009-Aug-27:
> You are using a version of yum which is insecure and broken in chroot
> related operations; either apply the patches shipped in the 'contrib/'
> [..]
> Transaction Summary
> ===================================================================================================================================================
> Install      8 Package(s)
> Update       0 Package(s)
> Remove       0 Package(s)
> 
> Total download size: 28 M
> warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
> Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) 
> <centos-5-key@centos.org>" from http://mirror.centos.org/centos/RPM-GPG-KEY-
> CentOS-5

First I would definitely patch your version of yum.  Details can be found here.

http://linux-vserver.org/Yum-patch

Find the one that most closely matches your version of yum and try it.  I have
yum 3.2.12 and the 3.2.19 patch applied cleanly.

Then here's what I did on my debian lenny host to get it working.  Find the
CentOS-Base.repo" for CentOS 5 that came with your util-versers package.  Mine
is at:

/usr/lib/util-vserver/distributions/centos5/yum.repos.d/CentOS-Base.repo

Edit the file and change each instance of the '$basearch' variable to be your
actual architecture  - 'x86_64' in my case.  Then UN-comment all the "baseurl"
lines. Finally change all the "gpgcheck=1" lines to be "=0".  (I don't actually
know if that's necessary, but I did it and it worked.  Feel free to try it
without the change and see what happens.)

Then try the build command again.  As I said, I can build CentOS 5 guests on my
debian lenny host after those changes.  But YMMV, as they say.

HTH

Jeff Jansen