Re: Initializing a new chroot with yum

seth vidal <[email protected]>
Newsgroups gmane.linux.rpm.yum
Message-ID <1235423623.17620.4.camel@rosebud>
On Mon, 2009-02-23 at 22:05 +0100, Felix Schwarz wrote:
> Hi,
> 
> I try to install some packages completely separated from my normal rpmdb/yum 
> setup (just install them in a separate root directory). Ideally this should be 
> possible without being root.
> 
> So I initialized a new rpmdb using 'rpm --initdb --root /home/fs/bar'. Then I 
> put a yum.conf in the bar directory, pointing to a separate yum.repos.d (using 
> the 'reposdir' directive).
> 
> I hoped that
>    'yum --installroot=/home/fs/bar -c yum.conf install <pkg>'
> would actually install a package locally but yum only says:
> 'Error: Cannot retrieve repository metadata (repomd.xml) for repository: 
> foobar. Please verify its path and try again'.
> 
> When I add a new repository config to fedora, yum will automatically download 
> repomd.xml from the server. So what am I doing wrong?
> 

You won't really be able to do an install of software to another path as
non-root. There are a lot of things that will require root - like
ownerships on files, for example.

You should look at the 'mock' program
https://fedorahosted.org/mock/

it uses yum to make chroots.

-sv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.