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

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

[-- Attachment #1 --]
On Sun, May 22, 2016 at 02:18:07PM -0700, Matthew Macy wrote:
> 
> 
> 
>  ---- 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.
> 
Setting nameserver will inject this name server directly via the libc resolv api
so it won't touch the resolv.conf at all no need to back it up

Best regards,
Bapt

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXQiOXAAoJEGOJi9zxtz5a+F4P/3I53aCcQSfLmZa/8UMsBevT
j6c5ee1+M/5h4EXzhnV54QztVUoftvx4QVcxURv27O90ick5b0g3w0Od6nIBisHJ
M4CC1FWZVXgLDD+GJSkrSLAS7OqfK1rkCORfkRSn7PpQO+otxuvOK49gGN98UUml
qrpvgKMgA77MkMsP4Xg43o4twU6JJCqrTzb4Wom3E+c/IfSRjg+GbcmLdI6scCT2
8nVp3hCkkVBJg0xS4uD/UsoPCS/ascSXcBYT7vzYbb2Z2i+QvkOCuddAU6ZGYN63
VjPWQoXu3gmr0h8EckPyQCkg0HUlUf1a/T+0YoM1vcjXdml5boH8CFTa+poPktN3
duCcRQGvLTBTB8P85TjldLS2O/CZzumrvQ/ky0vbrm87kn54DfcrEldNiXeQsDI3
G2F1fIEocF/ErCubRu+vpHFUcpE8o5p2Vi3jJUamJJe0JXoKT31clig+HZF1qfQ6
cTH6Qn/JeulMue7GFbbMeSpfKGmNlkao5QYbAMeBBQ+cNrdHMy1QL/VZwVFbfd2k
f5XNuAb2n6of7EZP9ssZvC1woZDwOcWvgWU17dCfBmx1ONYg5H7siPqDyrf3PhGu
TENvrPt2v7aCvkC3E3FpRo9lWGKz0jilCm8z+Z/z2nkD9FqEArkn0LCkZJQa+de3
yyq/LtevVntR85N36EnM
=kAOK
-----END PGP SIGNATURE-----

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