bootstrapping /usr/sbin/pkg inside a jail
Matthew Seaman
matthew at freebsd.org
Wed May 7 14:58:55 UTC 2014
On 05/07/14 15:27, Łukasz Wąsikowski wrote:
> W dniu 2014-05-07 16:07, Fbsd8 pisze:
>
>> It's not a question of getting to the internet which ping shows works.
>> Its that going to
>> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-current/Latest/
>> using a browser or ftp shows that directory path does not exist.
>>
>> So it all boils down to, where is pkg program getting the url from and
>> why is there difference between host and jail?
>>
>> This is more a pkgng question then a jail question.
>
> pkg(8) use location from /usr/local/etc/pkg.conf (before 1.2.x IIRC) and
> from /usr/local/etc/pkg/repos/ directory in 1.2.x and newer.
>
That's true of the actual pkg(8) program. The /usr/sbin/pkg
bootstrapping thinger works a bit differently. It depends on what
version of FreeBSD you're bootstrapping on. Certainly on 10.x or above
it uses the same URL as in /etc/pkg/FreeBSD.conf:
http://pkg.FreeBSD.org/${ABI}/latest. /usr/sbin/pkg had a different
default in older versions of the OS, and you'ld either have to write a
/usr/local/etc/pkg.conf or set PACKAGESITE in the environment --
irrespective of whether the actual pkg(8) you were installing would take
any notice of PACKAGESITE itself.
Basically: set PACKAGESITE in the environment to tell /usr/sbin/pkg
where to get the real pkg fron on 9.x or earlier; otherwise just use the
built-in default on 10.x or above. Once you've got pkg(8) installed you
can write your own repo.conf setup for everything else should you want
to use a custom repo. Don't create a /usr/local/etc/pkg.conf unless you
specifically want to override any of the default global settings.
Cheers,
Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1029 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20140507/2f5c18d7/attachment.sig>
More information about the freebsd-pkg
mailing list