From owner-freebsd-ports@FreeBSD.ORG Thu Jun 26 21:30:51 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 943F7A9B; Thu, 26 Jun 2014 21:30:51 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 049662AB1; Thu, 26 Jun 2014 21:30:50 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id r20so1765684wiv.16 for ; Thu, 26 Jun 2014 14:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=esF0XXS/8/VqU+4iMpLq+YPGOmKO2Cfb1++DntDMrp0=; b=iyneI54lpdYpxY8cTApM/2Zf2uZIlqbG9B0Ys9xHeEensSX2beNWdyvnCjF/R2xAF1 poLpN6H+3cCIAHcpxt16TVvBj2oASh3ookfeEXomVACGjKNVv82X1CXwTh0SM9KvujHA IIDBvZjmnqOpF23AeMNzfJBQMN/gEpdrscLXryu9fA2Y51r1Bdd0m48UeLtz+kK823nK m2ePp6JD3QnJCSfJ+uhx2uN2bBft9iAvdy5EKdJck3eiX8aIpBmGPhYblgQFKAUZLLsU OJvuyIHeXSJb7lzUyVQyPeaOsn3LBErhuA3u3dq1EH2ZHgvPl+MOrQKObMsb4JaLdCfB MxTg== X-Received: by 10.180.184.36 with SMTP id er4mr7013642wic.37.1403818249318; Thu, 26 Jun 2014 14:30:49 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id gh16sm8653636wic.3.2014.06.26.14.30.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jun 2014 14:30:48 -0700 (PDT) Sender: Baptiste Daroussin Date: Thu, 26 Jun 2014 23:30:45 +0200 From: Baptiste Daroussin To: Nathan Whitehorn Subject: Re: [Patch] Using MACHINE_ARCH identifiers in pkg Message-ID: <20140626213045.GF24440@ivaldir.etoilebsd.net> References: <5383EEB6.6010703@freebsd.org> <538614AB.4070803@freebsd.org> <20140528170440.GA80273@ivaldir.etoilebsd.net> <53A31C56.90401@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GLp9dJVi+aaipsRk" Content-Disposition: inline In-Reply-To: <53A31C56.90401@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Warner Losh , FreeBSD Mailing List X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 21:30:51 -0000 --GLp9dJVi+aaipsRk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 19, 2014 at 10:22:30AM -0700, Nathan Whitehorn 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 usi= ng > >> 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 > >> > >> ----------------------------------------------------------------------= -- > >> > >> 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 identifier= s. > >> 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`. > >> > >> 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. > >> > >> 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 n= ew > >> one. Then you just have to deal with two rounds of updates without any > >> other intervention, which is not so bad. > >> -Nathan > >> > >> > >> > > 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 neede= d or > > directly commit; > > > > regards, > > Bapt >=20 > Have you had a chance to look at this yet? I'm happy to help with any=20 > testing if you need. > -Nathan I do like the appraoch but I haven't yet had time to study the side effect,= it is already complicated to get pkg 1.3 out, I are quite close now so this wi= ll wait for 1.4, but I'll push it on top of my TODO list for 1.4. regards, Bapt --GLp9dJVi+aaipsRk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlOskQUACgkQ8kTtMUmk6ExLjgCePcyvIOqTdVyrxUm2lwYwc8ZF M48An3mgaQ32iiU+1J+kD6UrAX1MW9Lo =TFuJ -----END PGP SIGNATURE----- --GLp9dJVi+aaipsRk--