Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2016 21:30:20 -0500
From:      Jason Unovitch <jason.unovitch@gmail.com>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: Using pkg to fetch packages for different ABI
Message-ID:  <CABW2x9pxeUwk%2BJqf-vFOTEZCThcUUM2gVTBFZxdArZrHB0=_xA@mail.gmail.com>
In-Reply-To: <Pine.GSO.4.64.1602021951080.15768@sea.ntplx.net>
References:  <Pine.GSO.4.64.1602021951080.15768@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 2, 2016 at 8:21 PM, Daniel Eischen <deischen@freebsd.org> wrote:
> I want to use pkg to maintain a set of packages for nanobsd
> systems that are a different OS version and ABI than the
> host system.  Basically, I want to be able to do:
>
>   # pkg fetch -d -r FreeBSD_10x_32 -o ./ <pkgname>
>
> and have it fetch all the required packages for <pkgname>.
>
> The host system is 10.2-RELEASE-p9 amd64, the target system
> in this case is similar, but just x86, not amd64.  pkg is
> version 1.6.2.
>
> Trying to initially update the repo catalog gives this:
>
>   # cat /usr/local/etc/pkg/repos/FreeBSD_10x_32.conf
>   FreeBSD_10x_32: {
>     ABI: "FreeBSD:x86:32"
>     url: "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:32/latest",
>     mirror_type: "srv",
>     signature_type: "fingerprints",
>     fingerprints: "/usr/share/keys/pkg",
>     enabled: yes
>   }
>
>   # pkg update -r FreeBSD_10x_32
>   Updating FreeBSD_10x_32 repository catalogue...
>   Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
>   Fetching packagesite.txz: 100%    5 MiB   2.8MB/s    00:02
>   Processing entries:   0%
>   pkg: wrong architecture: freebsd:10:x86:32 instead of FreeBSD:10:amd64
>   pkg: repository FreeBSD_10x_32 contains packages with wrong ABI:
> freebsd:10:x86:32
>   Processing entries: 100%
>   Unable to update repository FreeBSD_10x_32
>
> Why does 'pkg' care what the ABI is unless we try to actually
> install the packages?
>
> --
> DE

Set it via an environmental variable:
setenv ABI freebsd:10:x86:32

ABI can be overridden with environmental variables or via `-o
ABI=freebsd:10:x86:32'.  I'm actually using environmental variables on
a CentOS box with a locally compiled pkg to do a pkg fetch and pkg
repo to store a couple packages for internal use.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABW2x9pxeUwk%2BJqf-vFOTEZCThcUUM2gVTBFZxdArZrHB0=_xA>