From owner-freebsd-current@FreeBSD.ORG Fri Jul 25 06:56:45 2014 Return-Path: Delivered-To: current@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 CEB99BED; Fri, 25 Jul 2014 06:56:45 +0000 (UTC) Received: from zibbi.meraka.csir.co.za (zibbi.meraka.csir.co.za [IPv6:2001:4200:7000:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 185C12B6C; Fri, 25 Jul 2014 06:56:45 +0000 (UTC) Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973) id 0B69EB84D; Fri, 25 Jul 2014 08:56:42 +0200 (SAST) Date: Fri, 25 Jul 2014 08:56:41 +0200 From: John Hay To: Baptiste Daroussin Subject: Re: [ANNOUNCEMENT] pkg 1.3.0 out! Message-ID: <20140725065641.GA88239@zibbi.meraka.csir.co.za> References: <20140723144249.GD69907@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140723144249.GD69907@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: ports@FreeBSD.org, stable@FreeBSD.org, current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 06:56:46 -0000 On Wed, Jul 23, 2014 at 04:42:51PM +0200, Baptiste Daroussin wrote: > Hi all, > > I'm very please to announce the release of pkg 1.3.0 > This version is the result of almost 9 month of hard work > ... > Thank you to all contributors: > Alberto Villa, Alexandre Perrin, Andrej Zverev, Antoine Brodin, Brad Davis, > Bryan Drewery, Dag-Erling Sm?rgrav, Dmitry Marakasov, Elvira Khabirova, Jamie > Landeg Jones, Jilles Tjoelker, John Marino, Julien Laffaye, Mathieu Arnold, > Matthew Seaman, Maximilian Ga?, Michael Gehring, Michael Gmelin, Nicolas Szalay, > Rodrigo Osorio, Roman Naumann, Rui Paulo, Sean Channel, Stanislav E. Putrya, > Vsevolod Stakhov, Xin Li, coctic > > Regards, > Bapt on behalf of the pkg@ Version 1.3 does better on armeb. It does not crash while installing itself, but still complains and get the architecture wrong: ################ root@cambria-build:/usr/ports/ports-mgmt/pkg # make install ===> Installing for pkg-1.3.0 ===> Checking if ports-mgmt/pkg already installed pkg-static: failed to find the version elf note ===> Registering installation for pkg-1.3.0 pkg-static: failed to find the version elf note pkg-static: failed to find the version elf note If you are upgrading from the old package format, first run: # pkg2ng root@cambria-build:/usr/ports/ports-mgmt/pkg # pkg info pkg pkg: failed to find the version elf note pkg-1.3.0 Name : pkg Version : 1.3.0 Installed on : Fri Jul 25 06:36:42 UTC 2014 Origin : ports-mgmt/pkg Architecture :  ¸ Prefix : /usr/local Categories : ports-mgmt Licenses : BSD2CLAUSE Maintainer : portmgr@FreeBSD.org WWW : http://wiki.freebsd.org/pkgng Comment : Package manager Flat size : 7.14MiB Description : Package management tool WWW: http://wiki.freebsd.org/pkgng root@cambria-build:/usr/ports/ports-mgmt/pkg # uname -a FreeBSD cambria-build 11.0-CURRENT FreeBSD 11.0-CURRENT #13 r269057M: Thu Jul 24 15:54:38 SAST 2014 jhay@dolphin.meraka.csir.co.za:/usr/obj/arm.armeb/snaps/arm/11-tst/src/sys/CAMBRIA arm root@cambria-build:/usr/ports/ports-mgmt/pkg # uname -p armeb root@cambria-build:/usr/ports/ports-mgmt/pkg # uname -m arm root@cambria-build:/usr/ports/ports-mgmt/pkg ################### On the previous pkg, I used a small crow-bar patch (attached) then it did install properly and its architecture looked like this: ################### % pkg info pkg pkg-1.2.7_3 Name : pkg Version : 1.2.7_3 Installed on : Thu Jul 17 15:15:05 SAST 2014 Origin : ports-mgmt/pkg Architecture : freebsd:11:arm:32:eb:eabi:softfp Prefix : /usr/local Categories : ports-mgmt Licenses : BSD2CLAUSE Maintainer : portmgr@FreeBSD.org WWW : http://wiki.freebsd.org/pkgng Comment : Package manager Shared Libs required: libpkg.so.1 Flat size : 6.48MiB Description : Package management tool WWW: http://wiki.freebsd.org/pkgng ################### Regards John -- John Hay -- jhay@meraka.csir.co.za / jhay@meraka.org.za --- libpkg/pkg_elf.c.orig 2014-03-15 13:15:46.000000000 +0000 +++ libpkg/pkg_elf.c 2014-06-23 17:41:35.000000000 +0000 @@ -636,6 +636,12 @@ int ret = EPKG_OK; int i; const char *arch, *abi, *endian_corres_str, *wordsize_corres_str, *fpu; + const char *path; + char localname[] = "freebsd"; + + path = getenv("ABI_FILE"); + if (path == NULL) + path = _PATH_BSHELL; if (elf_version(EV_CURRENT) == EV_NONE) { pkg_emit_error("ELF library initialization failed: %s", @@ -643,7 +649,7 @@ return (EPKG_FATAL); } - if ((fd = open(_PATH_BSHELL, O_RDONLY)) < 0) { + if ((fd = open(path, O_RDONLY)) < 0) { pkg_emit_errno("open", _PATH_BSHELL); snprintf(dest, sz, "%s", "unknown"); return (EPKG_FATAL); @@ -687,6 +693,7 @@ break; src += note.n_namesz + note.n_descsz; } +#if 0 if ((uintptr_t)src >= ((uintptr_t)data->d_buf + data->d_size)) { ret = EPKG_FATAL; pkg_emit_error("failed to find the version elf note"); @@ -698,7 +705,10 @@ version = be32dec(src); else version = le32dec(src); - +#else + osname = localname; + version = 11 * 100000; +#endif for (i = 0; osname[i] != '\0'; i++) osname[i] = (char)tolower(osname[i]);