Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 12:17:12 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Nathan Whitehorn <nwhitehorn@freebsd.org>
Cc:        Baptiste Daroussin <bapt@freebsd.org>, FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: [Patch] Using MACHINE_ARCH identifiers in pkg
Message-ID:  <23CAE061-7DAF-4388-A35D-2286ADADD3F3@bsdimp.com>
In-Reply-To: <53A31C56.90401@freebsd.org>
References:  <5383EEB6.6010703@freebsd.org> <538614AB.4070803@freebsd.org> <20140528170440.GA80273@ivaldir.etoilebsd.net> <53A31C56.90401@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_9B5524B4-93CC-4A30-8A4A-B4126E5E0E1E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=iso-8859-1

Hey Baptiste,

Any word on this?

Warner

On Jun 19, 2014, at 10:22 AM, Nathan Whitehorn <nwhitehorn@freebsd.org> =
wrote:

>=20
>=20
> On 05/28/14 10:04, Baptiste Daroussin wrote:
>> On Wed, May 28, 2014 at 09:54:03AM -0700, Nathan Whitehorn wrote:
>>> The following was in a deep and increasingly branched thread on the =
SVN
>>> list. I've forwarded the relevant part here. The discussion was on =
using
>>> MACHINE_ARCH codes for package architectures in pkg instead of the
>>> existing ones (which are equivalent) to make script-writing easier =
and
>>> improve consistency with the way the src and ports trees work. The
>>> patches below are designed to make transitioning the architecture
>>> identifiers as painless as possible.
>>> -Nathan
>>>=20
>>> =
------------------------------------------------------------------------
>>>=20
>>> I've written two patches today. The first
>>> (http://people.freebsd.org/~nwhitehorn/pkg_machinearch.diff) is to =
pkg
>>> itself and the second
>>> =
(http://people.freebsd.org/~nwhitehorn/pkg_bootstrap_machinearch.diff)
>>> is to the pkg bootstrapper in base. These switch pkg from using
>>> identifiers like "freebsd:11:arm:32:eb:eabi:softfp" to identifiers =
like
>>> "FreeBSD:11:armeb", matching the canonical FreeBSD platform =
identifiers.
>>> The strings it uses can be predicted easily from scripts, as they =
are
>>> identical in all cases to the output of `uname -s`:`uname -r | cut =
-f 1
>>> -d .`:`uname -p`.
>>>=20
>>> I tried to avoid changing much, so the patches are pretty short.
>>> Internally, the patch introduces a translation table to pkg that
>>> contains all extant FreeBSD and Dragonfly BSD architectures and =
moves
>>> between the ELF-based coding and MACHINE_ARCH values. This is kind =
of
>>> gross, but has the least possibility for regression, and can easily =
be
>>> changed behind the scenes later. Platform detection uses the same
>>> ELF-parsing code as before. The current/previous values are also =
kept so
>>> that the patched pkg can install a package marked either with an =
x86:64
>>> or amd64-type architecture ID (symlinks will be needed for a little =
bit
>>> on the package server to allow both clients to work). Limited =
testing
>>> suggests it works well -- I can fetch and install packages fine. =
More
>>> testing would be great.
>>>=20
>>> One small issue is how to bootstrap the change for existing binary
>>> package users. The modified pkg can use packages with either
>>> architecture ID just fine, but the current one will barf on the
>>> FreeBSD:11:amd64 package containing its own update. There are a =
couple
>>> of options: manual instructions, marking that one package with the
>>> old-style architecture ID, etc. None should be more than slightly
>>> irritating, though. The least bumpy route, I think, is making
>>> directories with both the old and new names, but putting only one
>>> package in the old-named directory: a special intermediate version =
of
>>> pkg marked with the old architecture ID but able to install from the =
new
>>> one. Then you just have to deal with two rounds of updates without =
any
>>> other intervention, which is not so bad.
>>> -Nathan
>>>=20
>>>=20
>>>=20
>> Thanks I'll be away for a couple of days, but I'll have a look and =
test your
>> patch in all situation we need to support and come back to you if =
needed or
>> directly commit;
>>=20
>> regards,
>> Bapt
>=20
> Have you had a chance to look at this yet? I'm happy to help with any =
testing if you need.
> -Nathan


--Apple-Mail=_9B5524B4-93CC-4A30-8A4A-B4126E5E0E1E
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJTrHG4AAoJEGwc0Sh9sBEArDEQALI7PCnk8+gbv4c0eMrZNDb/
PtPtobkl5xbZ2unYUTNYdX45h5A1+Wq7Pi6sQBrzMDUsbp9aZvSGWL1jY3asKUKp
NN2gENPc4kIYMqltjkCCmOvRjT/nSfLYfIHbUWIkZUBbLNA7PS1/i1WvigyV2Eju
wx2WxHNA7CMIX7rirfpnlR3Ox63ZlVkjXT/To+nEusM3G3S+Y6heDAIQ5pjWwYb8
K3JZX9io3aXeyBzgRvpXcVaxG45GZr36nltGOvdEkmzB8EpAygPb9flySfBI/9s9
fqyyaEfgCnqk9W9FLXamHuOe+THXHzHRTu1SFdayIzEL/K3uRDdHJjMsguzxKElp
kyX74ttwBtVVTrKRm2P9MP+pBBzpgsY8s9OQYReNI5vH14ZOBrxmbf2caopCjuDk
nFvBAj3APezpzjQm+UJoE5gtMwjyFobhLSyLCQZ0QoHjfnZ/oXHj17se6aqTpQMh
C8J28wJtDWNOr/gNM6CObQH6oKSz9z7EHira8hq1pvF6+OmdwplD3h0JI0EVgF7x
oFrEAgCPHHrcn8GifiKjCZ0Ls1tKN0Ri76xdz61ZchTh3yLkjmal80MXIjxV91Iw
Pz4TwiAza+pgg/+Wmw+4jWOzi/FsVpxsMMFZhFkn+1JDffSEPKpsXKQmMBMrXQBi
SrC3TXR4zdLtTB1jTb0I
=ttfy
-----END PGP SIGNATURE-----

--Apple-Mail=_9B5524B4-93CC-4A30-8A4A-B4126E5E0E1E--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23CAE061-7DAF-4388-A35D-2286ADADD3F3>