From owner-freebsd-ports@freebsd.org Fri Mar 11 11:16:17 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 68F5DACC779 for ; Fri, 11 Mar 2016 11:16:17 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (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 EBD8B619 for ; Fri, 11 Mar 2016 11:16:16 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from ox-dell39.ox.adestra.com (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id B095D83EA for ; Fri, 11 Mar 2016 11:16:11 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/B095D83EA; dkim=none; dkim-atps=neutral Subject: Re: pkg: fetching binary packages to a local dumpdir for a different ABI To: freebsd-ports@freebsd.org References: <20160311104226.35a9e17d@freyja.zeit4.iv.bundesimmobilien.de> <56E2973C.8070703@quip.cz> From: Matthew Seaman X-Enigmail-Draft-Status: N1110 Message-ID: <56E2A8EF.8000705@freebsd.org> Date: Fri, 11 Mar 2016 11:15:59 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E2973C.8070703@quip.cz> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gMSi12dJTH2MrgGuWPwXJUjuW7SoMGlSa" X-Virus-Scanned: clamav-milter 0.99 at smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=2.2 required=5.0 tests=RDNS_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 11:16:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gMSi12dJTH2MrgGuWPwXJUjuW7SoMGlSa Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/11/16 10:00, Miroslav Lachman wrote: > O. Hartmann wrote on 03/11/2016 10:42: >=20 > [...] >=20 >> The ABI is also unclear. Some documents say it is freebsd:10:x86:64 >> (which >> looks more the Intel/Linux dominated terminology) and also this one is= >> considered correct: FreeBSD:10:amd64 (looks more FreeBSD'ish). It is >> said that >> the variable ABI is derived from "sh" - how? >=20 > It is freebsd:10:x86:64. You can look at http://pkg.freebsd.org/ > The full URL is http://pkg.freebsd.org/freebsd:10:x86:64/ Actually, ${ABI} *used* to be freebsd:10:x86:64. It changed to FreeBSD:10:amd64 quite some time and numerous releases of pkg(8) ago now.= The ABI is usually determined by examining the binary of /bin/sh -- chosen because /bin/sh is likely to be present even on the most cut-down jail. It works vaguely similarly to the way file(1) does: % file /bin/sh /bin/sh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 10.2 (1002509), stripped although there's no common code history between file(1) and pkg(8). If you feel like reading some C code, look at https://github.com/freebsd/pkg/blob/master/libpkg/pkg_elf.c#L691 -- the functions pkg_get_myarch_elfparse() and pkg_get_myarch() at line 964 are what does the job. Cheers, Matthew --gMSi12dJTH2MrgGuWPwXJUjuW7SoMGlSa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJW4qj1AAoJEABRPxDgqeTnqO4QAJHjT+NjIBqG8COL4QDZ9g7W JcP87zietfyHy8KXJbfBrmcSGjmXhxxsXy8Y9CDZxrBS8lRqySvl7GV2tvqwldeX NtOS6vWdxzvglLLIBey4oJBwnFtQTA8X6nqhDCt5VQTK6UacEQp/7A6+uH+0TgYH P26uP3lvrr5UvASpJQbAx2YF2Qv1vnO+PXn80aArNjS2EUhctHxEmAPS/V1HUcDm Ktaz43e9/MfYZEaHow0n2fZyBb/DUkyFoZY3CovoL3ISS8pl/7HluhPcB9Vry03Z BzY3+4WqB526loumVm0rbDtV/9lMRN1Z0ODghBGl84WZIwJWiCs+AwUwwKDG95l5 H4sW8Dv+UUzrqW6SOgjWn0QCOMxgYGXUd1OuyZyqsuEBsCc6WuHzoRsyyksEbGhG onC8wNoYbq2m/LsRe09reZ8oQ85B9SddbjyJXvJmUCb4SfRyNWRs3si73wgOfC7A AEP3T817Bqw7hWgqRZcJVYoSFr1BG1lu4rOGB3Z7WT9XUP5PWW0D9KPagqlNHEWA FzbbgK/j+H0cTCFESo9/khB45ucFqVQHaj6A4pACcjWbWRDpCSOmDPJFl5X7e2kB dkBOOLz87fLKJVgbIguaqn4KSZNgDvC0TQgya7dzKfr70q+GwZuU5Njvt4nKt/yq PUdb1Ua6J0+qcPjTgfiX =4uXc -----END PGP SIGNATURE----- --gMSi12dJTH2MrgGuWPwXJUjuW7SoMGlSa--