From owner-freebsd-ports@FreeBSD.ORG Thu Jun 26 19:17:22 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 8B051D52 for ; Thu, 26 Jun 2014 19:17:22 +0000 (UTC) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (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 586E72E1B for ; Thu, 26 Jun 2014 19:17:21 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id lf10so3571029pab.30 for ; Thu, 26 Jun 2014 12:17:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=Kr/LA6YLwW3bVnkDjpmBP1WlRwYUFTQKIRtEtOLVyfY=; b=Fwa2o0X4nWOqrm2mTjvJJL+0ImrqEyXU/WKu2Z5pC68nFMdsFCAP5ZwNu9BGOtCNU+ UCWSR51Yh7RNOeHAcuhXor7SHo9kcEUarAvBa1FsZveqM1RgFrkK0k4bKgiEwCR6ZhPB ciGMoAQxNmqV7dmt37SGjwTnHpN4V7FHGg4c6j6C6P9s6VvGjhebSW3pV/dakbUv9tAr 8b4jIpE1wQlmkgsuPjj3G1Pb11ryFCyR9wgbh1YSBcxi1xz6zZWqoN9ubIAsTfKkQKpi A0Z2Lqbv7S3GPZQ3PKqD0cEz8mFjS/GtCHtfWs/0voUHD1wXROwl3VubQkPijQxnZdrF VLUw== X-Gm-Message-State: ALoCoQmLXfDGVb7MnBvdAe1oa7kRDNYhDwNwKucxXa+arUsC7Zm4lEVXkqloJPzl3WOy7zYD3Mye X-Received: by 10.66.176.196 with SMTP id ck4mr25082144pac.154.1403810235184; Thu, 26 Jun 2014 12:17:15 -0700 (PDT) Received: from [172.31.44.104] ([216.9.110.8]) by mx.google.com with ESMTPSA id tf10sm11222621pbc.70.2014.06.26.12.17.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Jun 2014 12:17:14 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_9B5524B4-93CC-4A30-8A4A-B4126E5E0E1E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: [Patch] Using MACHINE_ARCH identifiers in pkg From: Warner Losh In-Reply-To: <53A31C56.90401@freebsd.org> Date: Thu, 26 Jun 2014 12:17:12 -0700 Message-Id: <23CAE061-7DAF-4388-A35D-2286ADADD3F3@bsdimp.com> References: <5383EEB6.6010703@freebsd.org> <538614AB.4070803@freebsd.org> <20140528170440.GA80273@ivaldir.etoilebsd.net> <53A31C56.90401@freebsd.org> To: Nathan Whitehorn X-Mailer: Apple Mail (2.1878.2) Cc: Baptiste Daroussin , 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 19:17:22 -0000 --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 = 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--