From owner-freebsd-current@FreeBSD.ORG Tue Mar 20 10:20:16 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BF22106566C; Tue, 20 Mar 2012 10:20:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BE3178FC14; Tue, 20 Mar 2012 10:20:15 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2KAK89j071860; Tue, 20 Mar 2012 12:20:08 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q2KAK84E034380; Tue, 20 Mar 2012 12:20:08 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2KAK8c1034379; Tue, 20 Mar 2012 12:20:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Mar 2012 12:20:08 +0200 From: Konstantin Belousov To: Baptiste Daroussin Message-ID: <20120320102008.GH2358@deviant.kiev.zoral.com.ua> References: <20120319213508.GA1692@azathoth.lan> <20120320091935.GF1692@azathoth.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OpLPJvDmhXTZE4Lg" Content-Disposition: inline In-Reply-To: <20120320091935.GF1692@azathoth.lan> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org Subject: Re: ABI/architecture identification for packages X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 10:20:16 -0000 --OpLPJvDmhXTZE4Lg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 20, 2012 at 10:19:36AM +0100, Baptiste Daroussin wrote: > On Mon, Mar 19, 2012 at 10:35:08PM +0100, Baptiste Daroussin wrote: > > Hi all, > >=20 > > In order to identify architectures I need to find a uniq id for every > > possibilities (for pkgng) > >=20 > > here is the identification I propose: > >=20 > > arch-class-os-majorversion(-archi_specific_extension) > >=20 > > arch can be one of the following: > >=20 > > - x86 for i386 and amd64 (discussed with kib) > > - powerpc for powerpc and powerpc64 > > - arm > > - mips > > - sparc > >=20 > > class may be: > > - 32 bits > > - 64 bits > >=20 > > os will always be freebsd :) (lower case) > >=20 > > majorversion the freebsd major version (10 9 8) > >=20 > > achi_specific_extension currently only mips and arm are concerned, > > for arm could be: > > el_oabi > > eb_oabi > > el_eabi > > eb_eabi > >=20 > > (I don't know how to get arm version or hardfp/softfp from the elf) > >=20 > > for mips I don't know much. > >=20 > > for ia64, I have strictly no idea what I should set. > >=20 > > Everything is read from the elf file > >=20 > > for example: > > x86-64-freebsd-10 > > x86-32-freebsd-8 > > arm-32-freebsd-10-el_oabi > >=20 > > Please help me to improve this to get the better identification to have= the best > > possible to determine which package can be installed where. > >=20 > > while proposing information please tell me how to get the information > > (dynamically) > >=20 > > regards, > > Bapt >=20 > Another question (by rwatson) that comes here is should we keep the archi= tecture > names that freebsd uses to avoid confusion or should we try to use more a= ccurate > names? >=20 > powerpc-64-freebsd-9 -> powerpc64-64-freebsd-9 > x86-32-freebsd-9 -> i386-32-freebsd-9 > x86-64-freebsd-9 -> amd64-64-freebsd-9 i386-32 and amd64-64 is weird and confusing. IMO, you should go either with x86-{32,64} names, or with i386/amd64, not with a mix. > etc. >=20 > An example of implementation can be find here: > https://github.com/pkgng/pkgng/blob/master/libpkg/pkg_elf.c#L157 >=20 > PS: Feel free to submit fixes/improvements to the code :) >=20 > regards, > Bapt --OpLPJvDmhXTZE4Lg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9oWdgACgkQC3+MBN1Mb4jNYwCeM9Ix5uOwe5Gzm9N4A9ahb/oT HokAoLiou5Eh5eTj6r4uW73rIx2ajs4p =nE1a -----END PGP SIGNATURE----- --OpLPJvDmhXTZE4Lg--