Re: [gentoo-portage-dev] Re: does emerge verify arch compatibility when merging a binary package?

2009-04-22 Thread Amit Dor-Shifer
Following suggestion, I've written a paragraph about the xpak payload. I 
think it helps clear things. I think it can be added to the portage(5) 
manpage, but would be happy to hear  other suggestions.

BEGIN
Binary packages
A binary package is an image of a pre-built installation. The merging 
process of such a package skipps building from source on the target 
host. Portage supports the creation and installation of binary packages. 
See emerge(1) for more information.


A binary package is stored as a .tbz file. Format consists of a bzip2 
archive of the installation, with an extra chunk of data appended at the 
end. This extra binary data is called the 'xpak' archive (add: origin of 
name). It is a binary dump of the package's database entry (under 
/var/db/pkg). When a binary package is installed, the xpak payload is 
used to generate the entry in the package database. It is also used by 
emerge in the installation process (e.g. verifying arch compatibility). 
For more information about the  format of the xpak archive, see xpak(5).


Extracting the xpak archive from the .tbz file can be achieved with 
qtbz2. Reading the xpak archive can be done using qxpak. See qtbz2(1) 
and qxpak(1) for more info.

END
Comments, please.
Amit

Zac Medico wrote:

Amit Dor-Shifer wrote:
 I don't think I would have realized this implementation myself. Is this
 xpak piggybacking documented somewhere?Can you refer me?
 BTW:
 amit0 Installation # man xpak
 No manual entry for xpak
 amit0 Installation # man 5 xpak
 No entry for xpak in section 5 of the manual
 amit0 Installation # eix -S xpak
 No matches found.

The xpak.5 man page is included with =portage-2.1.6.11. Here's a copy:

 http://dev.gentoo.org/~zmedico/portage/doc/man/xpak.5.html

Zac





Re: [gentoo-portage-dev] Re: does emerge verify arch compatibility when merging a binary package?

2009-04-21 Thread Amit Dor-Shifer
I don't think I would have realized this implementation myself. Is this 
xpak piggybacking documented somewhere?Can you refer me?

BTW:
amit0 Installation # man xpak
No manual entry for xpak
amit0 Installation # man 5 xpak
No entry for xpak in section 5 of the manual
amit0 Installation # eix -S xpak
No matches found.

Amit

Zac Medico wrote:

Amit Dor-Shifer wrote:
 When you say ut checks CHOST/keywording, where are those definitions
 stored for the binary pkg?

It's appended to the tail end of the tbz2, in xpak format (see `man
5 xpak`).

 I see one instance of CHOST in the 'Packages' index on the BINHOST. Is
 that the variable emerge is comparing against? If not, where is it? the
 tbz itself holds just the binaries.

Yes, for remote packages, the Package index contains equivalent data
to the actual xpak segments from the remote packages. The CHOST for
individual packages is only shown in cases when it differs from the
CHOST in the header of the Packages file.

 Manually modifying a/m CHOST to 'ppc'  didn't stop emerge from
 successfully merging a package on an amd64 target (I've removed
 /usr/portage/packages from target before emerging).

The CHOST from your local configuration (typically from make.conf or
inherited from your profile) is compared to the CHOST of the binary
package. You can also use ACCEPT_CHOSTS if you want to accept more
than one CHOST (see `man 5 make.conf`).





Re: [gentoo-portage-dev] Re: does emerge verify arch compatibility when merging a binary package?

2009-04-21 Thread Zac Medico
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amit Dor-Shifer wrote:
 I don't think I would have realized this implementation myself. Is this
 xpak piggybacking documented somewhere?Can you refer me?
 BTW:
 amit0 Installation # man xpak
 No manual entry for xpak
 amit0 Installation # man 5 xpak
 No entry for xpak in section 5 of the manual
 amit0 Installation # eix -S xpak
 No matches found.

The xpak.5 man page is included with =portage-2.1.6.11. Here's a copy:

 http://dev.gentoo.org/~zmedico/portage/doc/man/xpak.5.html

Zac
- --
Thanks,
Zac
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAkntdbgACgkQ/ejvha5XGaMz2QCfYpPxjtrMjVOogYsJKONybax6
d3wAnAqO6gL7F1OqnEhD/v2XLVoO839c
=Lxgm
-END PGP SIGNATURE-



Re: [gentoo-portage-dev] Re: does emerge verify arch compatibility when merging a binary package?

2009-04-20 Thread Amit Dor-Shifer
When you say ut checks CHOST/keywording, where are those definitions 
stored for the binary pkg?


I see one instance of CHOST in the 'Packages' index on the BINHOST. Is 
that the variable emerge is comparing against? If not, where is it? the 
tbz itself holds just the binaries.


Manually modifying a/m CHOST to 'ppc'  didn't stop emerge from 
successfully merging a package on an amd64 target (I've removed 
/usr/portage/packages from target before emerging).


Amit

Duncan wrote:

Andrew Gaffney agaff...@gentoo.org posted 49eb3b9f.1050...@gentoo.org,
excerpted below, on  Sun, 19 Apr 2009 09:56:31 -0500:

  

Amit Dor-Shifer wrote:


E.G: would portage block an attempt to install a ppc binary on an
amd64?
  

I believe it checks the CHOST in the binpkg and compares it against the
configured CHOST for the system.



Doesn't it also still check keywording, at least on newer portage (I 
guess it was hard-masking that it didn't used to check for binpkgs, I'm 
not sure about keywording)?  Of course it is possible to deliberately 
confound the keywording check by setting an incorrect ACCEPT_KEYWORDS 
globally or using package.keywords to do so by package.


  


Re: [gentoo-portage-dev] Re: does emerge verify arch compatibility when merging a binary package?

2009-04-20 Thread Zac Medico
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Amit Dor-Shifer wrote:
 When you say ut checks CHOST/keywording, where are those definitions
 stored for the binary pkg?

It's appended to the tail end of the tbz2, in xpak format (see `man
5 xpak`).

 I see one instance of CHOST in the 'Packages' index on the BINHOST. Is
 that the variable emerge is comparing against? If not, where is it? the
 tbz itself holds just the binaries.

Yes, for remote packages, the Package index contains equivalent data
to the actual xpak segments from the remote packages. The CHOST for
individual packages is only shown in cases when it differs from the
CHOST in the header of the Packages file.

 Manually modifying a/m CHOST to 'ppc'  didn't stop emerge from
 successfully merging a package on an amd64 target (I've removed
 /usr/portage/packages from target before emerging).

The CHOST from your local configuration (typically from make.conf or
inherited from your profile) is compared to the CHOST of the binary
package. You can also use ACCEPT_CHOSTS if you want to accept more
than one CHOST (see `man 5 make.conf`).
- --
Thanks,
Zac
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (GNU/Linux)

iEYEARECAAYFAknsPqIACgkQ/ejvha5XGaNnEgCfVB8ricVhKBQY/S2g1aYLvpkT
L2wAn3CtsAnFwJ0h/mArfdDJk4hMvNBD
=AH2B
-END PGP SIGNATURE-