Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 May 2016 14:18:07 -0700
From:      Matthew Macy <mmacy@nextbsd.org>
To:        "Tim Kientzle" <tim@kientzle.com>
Cc:        "K. Macy" <kmacy@freebsd.org>,  "FreeBSD current" <freebsd-current@freebsd.org>
Subject:   Re: pkg chroot issues?
Message-ID:  <154da550d77.fb9ef0d4130957.4575849336840075088@nextbsd.org>
In-Reply-To: <471497D9-2B97-42B4-9C59-EBABEEED77C9@kientzle.com>
References:  <9BC1A0E1-696D-4C00-B8C8-B57C4DB3A8EF@kientzle.com> <CAHM0Q_M7qg_jr6eV5f2=raD2ZqEpG5gro70gn1A9MBWWnTRsiQ@mail.gmail.com> <471497D9-2B97-42B4-9C59-EBABEEED77C9@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help



 ---- On Sun, 22 May 2016 13:43:13 -0700 Tim Kientzle <tim@kientzle.com> wrote ---- 
 >  
 > > On May 22, 2016, at 1:28 PM, K. Macy <kmacy@freebsd.org> wrote: 
 > >  
 > >  
 > >  
 > > On Sunday, May 22, 2016, Tim Kientzle <tim@kientzle.com> wrote: 
 > > Crochet has some experimental hooks to install packages onto the system being built, but this seems to be hitting problems due to limitations in 'pkg -c'.  In particular, it seems that pkg performs the chroot before it does any network lookups.  This is a problem if the chroot is not a complete system environment (which it cannot be when you're building an image for another system). 
 > >  
 > > There's some further discussion on github: 
 > >  
 > >   https://github.com/freebsd/crochet/issues/141 
 > >  
 > > Any suggestions? 
 > >  
 > > Cheers, 
 > >  
 > > Tim 
 > >  
 > >  
 > > Just like you need to mount devfs you should have a resolv.conf in your chroot first. Just copy it over before running pkg. This works for me in my image creation script. 
 >  
 > Sometimes the image does already have a resolv.conf, but if it does, it's for the target environment (where the image will ultimately be running) and may not be appropriate for the environment where the image is being built. 
 
Setting NAMESERVER to "10.0.1.1" crashed pkg for me. Maybe it's been fixed in the meantime. If a resolv.conf already exists I would just rename it before and then rename it back after the call to pkg -c.

Cheers.

-M




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?154da550d77.fb9ef0d4130957.4575849336840075088>