Date: Sun, 22 May 2016 13:43:13 -0700 From: Tim Kientzle <tim@kientzle.com> To: "K. Macy" <kmacy@freebsd.org> Cc: FreeBSD current <freebsd-current@freebsd.org> Subject: Re: pkg chroot issues? Message-ID: <471497D9-2B97-42B4-9C59-EBABEEED77C9@kientzle.com> In-Reply-To: <CAHM0Q_M7qg_jr6eV5f2=raD2ZqEpG5gro70gn1A9MBWWnTRsiQ@mail.gmail.com> References: <9BC1A0E1-696D-4C00-B8C8-B57C4DB3A8EF@kientzle.com> <CAHM0Q_M7qg_jr6eV5f2=raD2ZqEpG5gro70gn1A9MBWWnTRsiQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On May 22, 2016, at 1:28 PM, K. Macy <kmacy@freebsd.org> wrote: >=20 >=20 >=20 > 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). >=20 > There's some further discussion on github: >=20 > https://github.com/freebsd/crochet/issues/141 >=20 > Any suggestions? >=20 > Cheers, >=20 > Tim >=20 >=20 > 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. Tim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?471497D9-2B97-42B4-9C59-EBABEEED77C9>