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 at 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 at 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 at 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 at 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 at dolphin.meraka.csir.co.za:/usr/obj/arm.armeb/snaps/arm/11-tst/src/sys/CAMBRIA arm root at cambria-build:/usr/ports/ports-mgmt/pkg # uname -p armeb root at cambria-build:/usr/ports/ports-mgmt/pkg # uname -m arm root at 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 at 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 at meraka.csir.co.za / jhay at 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]);
On 07/24/14 23:56, John Hay wrote:> 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: > >[snip] Would it make sense to get the architecture from the kernel, with a manual override for cross-installs? It seems like that would prevent cases like this permanently. -Nathan
On Sat, Jul 26, 2014 at 11:39:46AM -0700, Nathan Whitehorn wrote:> On 07/24/14 23:56, John Hay wrote: > > 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: > > > > > [snip] > > Would it make sense to get the architecture from the kernel, with a > manual override for cross-installs? It seems like that would prevent > cases like this permanently.If a file has to be checked, what about the same mechanism that file (libmagic) use? It seems to get it right: root@cambria-build # file /bin/sh /bin/sh: ELF 32-bit MSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked (uses shared libs), FreeBSD-style, for FreeBSD 11.0 (1100028), stripped John -- John Hay -- jhay@meraka.csir.co.za / jhay@meraka.org.za _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
On Sat, Jul 26, 2014 at 11:39:46AM -0700, Nathan Whitehorn wrote:> On 07/24/14 23:56, John Hay wrote: > > 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: > > > > > [snip] > > Would it make sense to get the architecture from the kernel, with a > manual override for cross-installs? It seems like that would prevent > cases like this permanently. > -NathanTHis will be completely rework including the patch you already sent me for pkg 1.4.0. regards, Bapt