Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 10:19:39 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Ben Woods <woodsb02@gmail.com>
Cc:        "freebsd-pkgbase@freebsd.org" <freebsd-pkgbase@freebsd.org>
Subject:   Re: amd64 vs. x86:64 architecture mismatch in FreeBSD-base repo
Message-ID:  <adb319a0-0c9d-3d37-1216-22e8d6425c05@freebsd.org>
In-Reply-To: <CAOc73CDC-j=vovxj-Z8c7hG9Cig5sf5gy3aXp91tdJT=qntcJQ@mail.gmail.com>
References:  <0295c3e9-a6ed-9081-ae3d-0668138289d3@bluerosetech.com> <4793bae9-9346-300f-b331-96fb54f7d2a0@FreeBSD.org> <CAOc73CDC-j=vovxj-Z8c7hG9Cig5sf5gy3aXp91tdJT=qntcJQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Vq59DPQrXgdN4qimcJ2D6SwLA7K4LTGBL
Content-Type: multipart/mixed; boundary="D3GUlPPh8fik2wmOBIm9wrspSq4gpx96m"
From: Matthew Seaman <matthew@freebsd.org>
To: Ben Woods <woodsb02@gmail.com>
Cc: "freebsd-pkgbase@freebsd.org" <freebsd-pkgbase@freebsd.org>
Message-ID: <adb319a0-0c9d-3d37-1216-22e8d6425c05@freebsd.org>
Subject: Re: amd64 vs. x86:64 architecture mismatch in FreeBSD-base repo
References: <0295c3e9-a6ed-9081-ae3d-0668138289d3@bluerosetech.com>
 <4793bae9-9346-300f-b331-96fb54f7d2a0@FreeBSD.org>
 <CAOc73CDC-j=vovxj-Z8c7hG9Cig5sf5gy3aXp91tdJT=qntcJQ@mail.gmail.com>
In-Reply-To: <CAOc73CDC-j=vovxj-Z8c7hG9Cig5sf5gy3aXp91tdJT=qntcJQ@mail.gmail.com>

--D3GUlPPh8fik2wmOBIm9wrspSq4gpx96m
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 07/27/16 09:17, Ben Woods wrote:
> On Wednesday, 27 July 2016, Matthew Seaman <matthew@freebsd.org> wrote:=

>>
>> Interesting.  I've just seen exactly the same thing when trying to
>> update my CURRENT VM.  It's the transition from FreeBSD:11:amd64 to
>> FreeBSD:12:amd64 which seems to be the root cause.
>>
>> The old 'freebsd:12:x86:64' ABI style is something that pkg(8) moved
>> away from many years ago.  It appears in the package metadata as 'arch=
':
>>
>> # pkg info -RF FreeBSD-lib-12.0.s20160727061717.txz | head -10
>> name: "FreeBSD-lib"
>> origin: "base"
>> version: "12.0.s20160727061717"
>> comment: "lib package"
>> maintainer: "re@FreeBSD.org"
>> www: "https://www.FreeBSD.org"
>> abi: "FreeBSD:12:amd64"
>> arch: "freebsd:12:x86:64"   <<<----***
>> prefix: "/"
>> flatsize: 106186
>>
>> which I believe is more significant for certain ARM and MIPS
>> architectures: i386 and amd64 only have one architecture variant apiec=
e.
>>
>> Still, curious about how to get over this major version number bump.
>>
>>         Cheers,
>>
>>         Matthew
>>
>=20
> Hi Matthew,
>=20
> Please see right at the bottom of the PkgBase wiki page where I have
> explained how to get around the one time ABI bump during major upgrades=
=2E
>=20
> https://wiki.freebsd.org/PkgBase#Major_Version_Upgrades
>=20
> Regards,
> Ben
>=20
>=20

Hmmm... where essentially the command you propose is:

# env ABI=3Dfreebsd:12:x86:64 pkg upgrade -r FreeBSD-base

Unfortunately this doesn't work:

codling:/home/matthew:# env ABI=3Dfreebsd:12:x86:64 pkg upgrade -r
FreeBSD-base
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static
install -f pkg" recommended
Updating FreeBSD-base repository catalogue...
Repository FreeBSD-base has a wrong packagesite, need to re-create databa=
se
pkg: file:///usr/obj/usr/src/repo/freebsd:12:x86:64/latest/meta.txz: No
such file or directory
repository FreeBSD-base has no meta file, using default settings
pkg:
file:///usr/obj/usr/src/repo/freebsd:12:x86:64/latest/packagesite.txz:
No such file or directory
Unable to update repository FreeBSD-base
All repositories are up-to-date.
pkg: Repository FreeBSD-base cannot be opened. 'pkg update' required
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

'freebsd:12:x86:64' is the old-style ABI format that went out in about
pkg-1.5.x or pkg-1.6.x or so and is now known inside pkg(8) as ALTABI.

codling:/home/matthew:# pkg -vv | grep ABI
ABI =3D "FreeBSD:11:amd64";
ALTABI =3D "freebsd:11:x86:64";

The base repo directory is named using the new style ABI:

codling:/home/matthew:# ls -la /usr/obj/usr/src/repo/
total 12
drwxr-xr-x   3 matthew  wheel  512 Jul 27 07:14 ./
drwxr-xr-x  23 matthew  wheel  512 Jul 26 17:43 ../
drwxr-xr-x   3 root     wheel  512 Jul 27 07:32 FreeBSD:12:amd64/

Even so:

codling:/home/matthew:# env ABI=3DFreeBSD:12:amd64 pkg upgrade -r FreeBSD=
-base
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static
install -f pkg" recommended
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100%    264 B   0.3kB/s    00:01
Fetching packagesite.txz: 100%   48 KiB  49.0kB/s    00:01
Processing entries:   0%
pkg: wrong architecture: freebsd:12:x86:64 instead of FreeBSD:12:amd64
pkg: repository FreeBSD-base contains packages with wrong ABI:
freebsd:12:x86:64
Processing entries: 100%
Unable to update repository FreeBSD-base
All repositories are up-to-date.
pkg: Repository FreeBSD-base cannot be opened. 'pkg update' required
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

I think I may need a 'pkg-static' compiled under 12.0 to make this work,
which is an interesting chicken-and-egg problem.

There does seem to be some confusion between 'Architecture' and 'ABI'.

Do we need to introduce a concept of 'Architecture' for some base system
packages?  This would say what sort of system hardware a kernel package
could be installed on, like so: 'x86:64' or 'mips:be' (notice this says
nothing about FreeBSD or FreeBSD's major version level.)  Then we'd need
some sort of additional logic for working for out what ABIs are
compatible with what Architectures and also a new magic variable
${ARCHITECTURE} for the low-level base system bits, analogous to ${ABI}.

	Cheers,

	Matthew








--D3GUlPPh8fik2wmOBIm9wrspSq4gpx96m--

--Vq59DPQrXgdN4qimcJ2D6SwLA7K4LTGBL
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXmHyzAAoJEABRPxDgqeTnVUsP+gOc0uE8brVM1kb1ZwoGKc7W
qDznnJVEHBB8/S5J1ujIqVUN/WwPhG/TBAHav1s4uiDm508Ejbxu8e7as9zpaybh
gPrbbWQgXP3mIOTTzvdeGb4tEEfSvBdZR0B1yYenmx2HJumBNT/FmhIytUQwW6DQ
TMuI6gp/+0Mdkdv03kXNc8IkeXYBSvmrkMaX6Nwh4z2WU2b0it566Zn8zhWR1JF0
ickZ9+blQuVIUuRtSlnezOr/DbKeiQlxBqY+1o0ufqWxw01WFfyQzwFw0F06hc5U
x4QYe8u/DRty+9NsvnxShAUCmuOFrIUqQAeByj2vVJFqgB4x1V1oAgTrFPK4erJS
4Y5MRUhxuXCX2JQO6oGH/o/yq+rYJRDfi60tNiPRjnV7xeuALSBfJW2VPHLo5SDE
pT+EjgmbyTtw++R4RKb31vJhTM/0DjMfgmc8DfYGicrtW+52G9G71nvtpTEYdZGd
5oDH5Lx/fdf8E8iq/pN198FfiN9f8YSo6e1EvKi3wLmzO5OoRjcVUnEG5d0ukKbT
C2RxCFK6efDZwrbsiKWFEKVhF7qjF9u2ezDMUsDKzxnaklROKGC4Y6a94cfpbXeo
kwlmS5w5owOXgcI9/ux9+jpKditEZ6kDcvTh6y+3SYqYJa2GfEG0r2J8pvUeaWGB
a4bx2Vs8t7MO0ergTePF
=Uxns
-----END PGP SIGNATURE-----

--Vq59DPQrXgdN4qimcJ2D6SwLA7K4LTGBL--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?adb319a0-0c9d-3d37-1216-22e8d6425c05>