Hi. When I try to use --installroot, I get the following: --- [root at machine ~]# yum --installroot=/data/xchg-2.0/ install apache2 You have enabled checking of packages via GPG keys. This is a good thing. However, you do not have any GPG public keys installed. You need to download the keys for packages you wish to install and install them. You can do that by running the command: rpm --import public.gpg.key Alternatively you can specify the url to the key you would like to use for a repository in the 'gpgkey' option in a repository section and yum will install it for you. For more information contact your distribution or package provider. --- Where is the GPG key I need to import? I've tried: [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY [root at machine ~]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY [root at machine ~]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY-centos4 But no such luck... Anyone know where to look? Thanks, Morten
On Sat, 2005-09-10 at 16:22 +0200, Morten wrote:> Hi. > > When I try to use --installroot, I get the following: > > --- > [root at machine ~]# yum --installroot=/data/xchg-2.0/ install apache2 > > You have enabled checking of packages via GPG keys. This is a good thing. > However, you do not have any GPG public keys installed. You need to download > the keys for packages you wish to install and install them. > You can do that by running the command: > rpm --import public.gpg.key > > > Alternatively you can specify the url to the key you would like to use > for a repository in the 'gpgkey' option in a repository section and yum > will install it for you. > > For more information contact your distribution or package provider. > --- > > Where is the GPG key I need to import? I've tried: > > [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora > [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY > [root at machine ~]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY > [root at machine ~]# rpm --import > /usr/share/doc/centos-release-4/RPM-GPG-KEY-centos4 > > But no such luck... Anyone know where to look?The problem is that inside your chroot (the installroot) you don't have a key installed yet. installroot might not be what you want to do ... it is going to create a chroot. If that is what, you should create a custom yum.conf for the chroot ... for the initial part of the install, set the repos to gpgcheck=0. You can then chroot into the location and install the key inside the chroot, copy your yum.conf into the chroot and change it to gpgcheck=1 again. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20050910/96d81dc0/attachment.sig>
>>But no such luck... Anyone know where to look? > > > The problem is that inside your chroot (the installroot) you don't have > a key installed yet. > > installroot might not be what you want to do ... it is going to create a > chroot.What I would like to do, is to be able to install "my environment" consisting of Apache2, MySQL and others in a clean "sandbox" (a new directory) in a reproductive manner. I want to be able to create any number of such sandboxes, each having their own config files and so forth. I assumed that installroot could help me do this, but will read up on it. Are there any other approaches to accomplish this using yum? So far, I've used ./configure --prefix=$SANDBOXDIR and compiled from source.> If that is what, you should create a custom yum.conf for the chroot ... > for the initial part of the install, set the repos to gpgcheck=0. > > You can then chroot into the location and install the key inside the > chroot, copy your yum.conf into the chroot and change it to gpgcheck=1 > again.It may be what I'm trying to do - but I'll need to read more about it. It seems awfully complicated though :-) Thanks, Morten
> [root at machine ~]# yum --installroot=/data/xchg-2.0/ install apache2> [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora > [root at machine ~]# rpm --import /usr/share/rhn/RPM-GPG-KEY > [root at machine ~]# rpm --import /usr/share/doc/centos-release-4/RPM-GPG-KEY > [root at machine ~]# rpm --import > /usr/share/doc/centos-release-4/RPM-GPG-KEY-centos4rpm also has a root parameter: $ rpm --help | grep root -r, --root=ROOT use ROOT as top level directory (default: "/") so you'd want to use "rpm -r /data/xchg-2.0/ --import ..." however, you'll also need to install of apache's dependcies in this chroot directory, probably not exactly what you want... you might also want to look at rpm's --prefix=<dir> relocate the package to <dir>, if relocatable parameter (though I've never used it). Cheers, MaZe.