From owner-freebsd-ports@FreeBSD.ORG Thu Aug 14 22:06:05 2014 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 139975A8; Thu, 14 Aug 2014 22:06:05 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D959B487C; Thu, 14 Aug 2014 22:06:04 +0000 (UTC) Received: from zeppelin.tachypleus.net ([169.228.188.124]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s7EM61eo031900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 14 Aug 2014 15:06:02 -0700 Message-ID: <53ED32C9.2020204@freebsd.org> Date: Thu, 14 Aug 2014 15:06:01 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Bryan Drewery , ports@FreeBSD.org Subject: Re: [Patch] Using MACHINE_ARCH identifiers in pkg References: <5383EEB6.6010703@freebsd.org> <538614AB.4070803@freebsd.org> <53ECCF7F.3040107@FreeBSD.org> <53ECD741.5090703@freebsd.org> <53ED1044.80302@gmx.de> <53ED110C.1040500@FreeBSD.org> In-Reply-To: <53ED110C.1040500@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbTl2RHxgNvCX1MH8XxBBHXRnaf67wZYcCGImOmcJIJt4R6U3HlQkwZpCUqgn2oD3Uwa/PFumhttBosQWqmihmEOAp3+poc5cM= X-Sonic-ID: C;Ct2gLf8j5BGezc2354E5FQ== M;gjvPLf8j5BGezc2354E5FQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: Baptiste Daroussin , Warner Losh , FreeBSD Mailing List X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2014 22:06:05 -0000 On 08/14/14 12:42, Bryan Drewery wrote: > On 8/14/2014 2:38 PM, olli hauer wrote: >> On 2014-08-14 17:35, Nathan Whitehorn wrote: >>> On 08/14/14 08:02, Bryan Drewery wrote: >>>> On 5/28/2014 11:54 AM, Nathan Whitehorn wrote: >>>>> 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. >>>> Symlinks are now setup to make testing of this easier. >>>> >>>> I'll let Bapt signoff on this patch officially and its timeframe. It >>>> seems reasonable to me. The use of 'x86' almost caused a regression >>>> recently due to its ambiguity. >>>> >>>> Cheers, >>>> Bryan >>>> >>> Thanks Bryan! If anyone is interested in testing the adapted pkg, there is a patch that can be applied to ports at http://people.freebsd.org/~nwhitehorn/pkg-new-abi.diff. It tries to make this transition as painless as possible by doing the following things: >>> 1. Have pkg use e.g. FreeBSD:11:amd64 instead of freebsd:11:x86:64 as an ABI string. >>> 2. Maintain the freebsd:11:x86:64-type strings as the "altabi" config variable. >>> 3. pkg will install packages where the architecture ID matches either the ABI or ALTABI value, which means that new pkg can install packages made with the older version. >>> 4. Patches the ports-mgmt/pkg Makefile so that the package for pkg itself is given a freebsd:11:x86:64-type architecture. This prevents pkg from choking on an update to itself and should, with the symlinks discussed above, make the transition painless and transparent. >>> >>> Especially point (4) I'd appreciate testing on if anyone is generating private package repositories. >>> -Nathan >> Hi Nathan, >> >> Thanks for the patch, but there is a possible chicken <-> egg issue. >> >> I removed old pkg packages from the last build and running a new build so pkg was build with the patch. >> The first client complains about wrong architecture and there was no way to reinstall pkg (even not with force) >> Quick solution was to distribute pkg-static to the client and reinstall pkg with the new pkg-static. >> After the upgrade everything is running as usual ;) >> >> Are there better upgrade paths then my quick workaround ? >> >> Output after pd build was finished on the first client. >> >> # pkg update -f >> Updating repository catalogue >> Fetching meta.txz: 100% of 584 B >> Fetching digests.txz: 100% of 43 kB >> Fetching packagesite.txz: 100% of 138 kB >> >> Adding new entries: 34% >> pkg: wrong architecture: FreeBSD:8:amd64 instead of freebsd:8:x86:64 >> >> pkg: repository str contains packages with wrong ABI: FreeBSD:8:amd64 >> Adding new entries: 100% >> pkg: Unable to update repository str >> >> >> Update with help of the patched pkg >> >> # ~/pkg-static update -f >> Updating repository catalogue >> pkg-static: Repository str has a wrong packagesite, need to re-create database >> Fetching meta.txz: 100% of 584 B >> Fetching digests.txz: 100% of 43 kB >> Fetching packagesite.txz: 100% of 138 kB >> >> Adding new entries: 100% >> Incremental update completed, 500 packages processed: >> 0 packages updated, 0 removed and 500 added. >> >> -- >> olli >> > Something I've mentioned to Bapt a few times is that pkg needs a way to > have a list of accepted ABI strings. Then we could add both the old and > the new style as accepted (internally) so that old and new repositories > will continue to work. > That's one thing this patch does internally, so that the patched version accepts either. Of course, it can't alter previous versions of pkg... -Nathan