(unknown charset) Re: [ANNOUNCEMENT] pkg 1.3.0 out!

From: (unknown charset) John Hay <jhay_at_meraka.org.za>
Date: Fri, 25 Jul 2014 08:56:41 +0200
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_at_

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
_at__at_ -636,6 +636,12 _at__at_
 	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",
_at__at_ -643,7 +649,7 _at__at_
 		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);
_at__at_ -687,6 +693,7 _at__at_
 			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");
_at__at_ -698,7 +705,10 _at__at_
 		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]);
 
Received on Fri Jul 25 2014 - 04:56:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC