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

--7uYPyRQQ5N0D02nI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, May 22, 2016 at 02:18:07PM -0700, Matthew Macy wrote:
>=20
>=20
>=20
>  ---- On Sun, 22 May 2016 13:43:13 -0700 Tim Kientzle <tim@kientzle.com> =
wrote ----=20
>  > =20
>  > > On May 22, 2016, at 1:28 PM, K. Macy <kmacy@freebsd.org> wrote:=20
>  > > =20
>  > > =20
>  > > =20
>  > > On Sunday, May 22, 2016, Tim Kientzle <tim@kientzle.com> wrote:=20
>  > > Crochet has some experimental hooks to install packages onto the sys=
tem being built, but this seems to be hitting problems due to limitations i=
n '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 comple=
te system environment (which it cannot be when you're building an image for=
 another system).=20
>  > > =20
>  > > There's some further discussion on github:=20
>  > > =20
>  > >   https://github.com/freebsd/crochet/issues/141=20
>  > > =20
>  > > Any suggestions?=20
>  > > =20
>  > > Cheers,=20
>  > > =20
>  > > Tim=20
>  > > =20
>  > > =20
>  > > Just like you need to mount devfs you should have a resolv.conf in y=
our chroot first. Just copy it over before running pkg. This works for me i=
n my image creation script.=20
>  > =20
>  > Sometimes the image does already have a resolv.conf, but if it does, i=
t'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 bu=
ilt.=20
> =20
> Setting NAMESERVER to "10.0.1.1" crashed pkg for me. Maybe it's been fixe=
d in the meantime. If a resolv.conf already exists I would just rename it b=
efore and then rename it back after the call to pkg -c.
>=20
Setting nameserver will inject this name server directly via the libc resol=
v api
so it won't touch the resolv.conf at all no need to back it up

Best regards,
Bapt

--7uYPyRQQ5N0D02nI
Content-Type: application/pgp-signature; name="signature.asc"

-----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-----

--7uYPyRQQ5N0D02nI--



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