From owner-freebsd-ports@freebsd.org Wed Feb 3 02:30:21 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2DB9A9A900 for ; Wed, 3 Feb 2016 02:30:21 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 869AE1EA2 for ; Wed, 3 Feb 2016 02:30:21 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 85CE5A9A8FF; Wed, 3 Feb 2016 02:30:21 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B865A9A8FD for ; Wed, 3 Feb 2016 02:30:21 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 395861EA1; Wed, 3 Feb 2016 02:30:21 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: by mail-ig0-x22b.google.com with SMTP id 5so26284608igt.0; Tue, 02 Feb 2016 18:30:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LGYdhcyGFXLn1KEOq8TNy2y+fWnG5X8U0Ry4PC63uWg=; b=YaGXWKfNU7ZvkQUoBJwmcbD3tSkU3veC4m86xBe8PT7ez8OyU0MSkSneZyrqXX0kHX UG9ae5EA4URiqhtw9J+G7KBvEBHTx6m1NWQelcepcXLUaDCU9jGD9rJHL78CRi2V/RK3 Gx+Qp2NScWz4niK8Gt1C1pGjZaFZRgGpH9g3rUKOwwsTsIuy6phtGqrKvMckrfx+NW8T ry9gl6qrcHzdpjQDr3+LgEdYKJG41xAaaNxElQztiVn6y5Uz7ecctNWJxDQBGx9PtbZ7 ZE6gsWCgyHBo0Q+KKQfO40hyFp5WH/3pA3roYDRj94gz2A92Yyy3Yguoym7Un1GH2nig hN4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=LGYdhcyGFXLn1KEOq8TNy2y+fWnG5X8U0Ry4PC63uWg=; b=jceHhtkc+DUHf02c9OZHL5eOvNYD1mP508C7xVtWIOnMvBwDL0QIj4SkA9SBgOjQSY b6zQgeznKiz1JcPymnOIBVonj7c00UmAA6xYG7wEgND+o1UEeSumlBDexT5S2wTIxpDO tFvHPUKU83MQeIv512RqtnqiHyxlVZPed8p++nHlVxUygJ4jJi5nOSBxAWxQyyMyq8fF vNyd8pUVB5X4Spz8F/c96opKNc2ZTlQUhUvNT/GX9t9WQqN8h0wSn01Mc9oI/lte1Dau 9JE70qanNSCIwKif27Q5oUPNc99yQ/4ySDpg/rL6QUqt54ShlXgxl/H/jhFM92i+3xuo wcog== X-Gm-Message-State: AG10YOSV31YfjRd+3q4SF6yedEM8JJUvYB3wNm5OZ9w59mGorsSErXVjX2DvIk+AptW9MsoNgvz9FDkChS1xdg== MIME-Version: 1.0 X-Received: by 10.50.72.48 with SMTP id a16mr954485igv.73.1454466620572; Tue, 02 Feb 2016 18:30:20 -0800 (PST) Received: by 10.36.16.2 with HTTP; Tue, 2 Feb 2016 18:30:20 -0800 (PST) In-Reply-To: References: Date: Tue, 2 Feb 2016 21:30:20 -0500 Message-ID: Subject: Re: Using pkg to fetch packages for different ABI From: Jason Unovitch To: Daniel Eischen Cc: ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2016 02:30:21 -0000 On Tue, Feb 2, 2016 at 8:21 PM, Daniel Eischen wrote: > I want to use pkg to maintain a set of packages for nanobsd > systems that are a different OS version and ABI than the > host system. Basically, I want to be able to do: > > # pkg fetch -d -r FreeBSD_10x_32 -o ./ > > and have it fetch all the required packages for . > > The host system is 10.2-RELEASE-p9 amd64, the target system > in this case is similar, but just x86, not amd64. pkg is > version 1.6.2. > > Trying to initially update the repo catalog gives this: > > # cat /usr/local/etc/pkg/repos/FreeBSD_10x_32.conf > FreeBSD_10x_32: { > ABI: "FreeBSD:x86:32" > url: "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:32/latest", > mirror_type: "srv", > signature_type: "fingerprints", > fingerprints: "/usr/share/keys/pkg", > enabled: yes > } > > # pkg update -r FreeBSD_10x_32 > Updating FreeBSD_10x_32 repository catalogue... > Fetching meta.txz: 100% 944 B 0.9kB/s 00:01 > Fetching packagesite.txz: 100% 5 MiB 2.8MB/s 00:02 > Processing entries: 0% > pkg: wrong architecture: freebsd:10:x86:32 instead of FreeBSD:10:amd64 > pkg: repository FreeBSD_10x_32 contains packages with wrong ABI: > freebsd:10:x86:32 > Processing entries: 100% > Unable to update repository FreeBSD_10x_32 > > Why does 'pkg' care what the ABI is unless we try to actually > install the packages? > > -- > DE Set it via an environmental variable: setenv ABI freebsd:10:x86:32 ABI can be overridden with environmental variables or via `-o ABI=freebsd:10:x86:32'. I'm actually using environmental variables on a CentOS box with a locally compiled pkg to do a pkg fetch and pkg repo to store a couple packages for internal use.