Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 09:22:38 -0400
From:      Nikolai Lifanov <lifanov@mail.lifanov.com>
To:        Matthias Apitz <guru@unixarea.de>, freebsd-ports@freebsd.org
Subject:   Re: installing packages into a mounted system
Message-ID:  <53ECB81E.8040308@mail.lifanov.com>
In-Reply-To: <20140814131850.GA28408@sh4-5.1blu.de>
References:  <20140814131850.GA28408@sh4-5.1blu.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/14/14 09:18, Matthias Apitz wrote:
> 
> Hello,
> 
> I've compiled ~1300 packages with poudriere 3.1pre on a 'head' system;
> went fine;
> 
> mounted below /mnt is a complete new system (an USB key) which boots
> fine alreaday; the 1300 resulting *.txz file are copied into /mnt/PKGDIR
> 
> in the past, using the pkg_* tools, I could just install the packages
> with:
> 
> # PKG_PATH=/PKGDIR
> # export PKG_PATH
> # chroot /mnt pkg_add xorg-7.7
> # chroot /mnt pkg_add kde-4.10.5
> ...
> 
> How this can be done now with pkg(8)? I thought I will compile a
> pkg-static and move this to into the /mnt system too with
> 
> # chroot /mnt mkdir -p /usr/local/sbin
> # cp -p /usr/local/sbin/pkg-static /mnt/usr/local/sbin
> 
> pkg-static(8) works there, bringing up the help with:
> 
> # chroot /mnt /usr/local/sbin/pkg-static help
> 
> But, how do I specify that it should install for example xorg-7.7
> having its file (and all others) in /mnt/PKGDIR/xorg-7.7.txz 
> 
> It seems to look for some files digests.txz or repo.txz which I do not
> have:
> 
> # PACKAGESITE=file://PKGDIR export PACKAGESITE
> # chroot /mnt /usr/local/sbin/pkg-static install xorg-7.7
> Updating repository catalogue
> pkg-static: file://PKGDIR/digests.txz: No such file or directory
> pkg-static: No digest falling back on legacy catalog format
> pkg-static: file://PKGDIR/repo.txz: No such file or directory 
> 
> Any hints?
> 
> Thx
> 
> 	matthias
> 
> 

>From the man page:
     pkg [-v] [-d] [-l] [-N] [-j <jail name or id> | -c <chroot path>]

You could try copying pkg-static inside the chroot and use pkg-static -c
(from the host, don't invoke the chroot command manually).

I have been installing packages to jails this way for a while.

- Nikolai Lifanov





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53ECB81E.8040308>