Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o, Zac Medico <zmedico@g.o>
Subject: Re: [RFC] gpkg format proposal v2 (was: Re: [gentoo-portage-dev] [RFC] Improving Gentoo package format)
Date: Tue, 13 Nov 2018 18:18:54
Message-Id: 1542133119.960.0.camel@gentoo.org
In Reply to: Re: [RFC] gpkg format proposal v2 (was: Re: [gentoo-portage-dev] [RFC] Improving Gentoo package format) by Zac Medico
1 On Tue, 2018-11-13 at 10:03 -0800, Zac Medico wrote:
2 > On 11/13/18 9:53 AM, Zac Medico wrote:
3 > > On 11/13/18 9:49 AM, Zac Medico wrote:
4 > > > On 11/11/18 12:53 PM, Michał Górny wrote:
5 > > > > Hi,
6 > > > >
7 > > > > Ok, here's the second version integrating the feedback received.
8 > > > > The format is much simpler, based on nested tarballs inspired by Debian.
9 > > > >
10 > > > > The outer tarball is uncompressed and uses '.gpkg.tar' suffix. It
11 > > > > contains (preferably in order but PM should also handle packages with
12 > > > > mismatched order):
13 > > > >
14 > > > > 1. Optional (but recommended) "gpkg: ${PF}" package label that can be
15 > > > > used to quickly distinguish Gentoo binpkgs from regular tarballs
16 > > > > (for file(1)).
17 > > > >
18 > > > > 2. "metadata.tar${comp}" tarball containing binary package metadata
19 > > > > as files.
20 > > > >
21 > > > > 3. Optional "metadata.tar${comp}.sig" containing detached signature
22 > > > > for the metadata archive.
23 > > > >
24 > > > > 4. "contents.tar${comp}" tarball containing files to be installed.
25 > > > >
26 > > > > 5. Optional "contents.tar${comp}.sig" containing detached signature for
27 > > > > the contents archive.
28 > > >
29 > > > We'll want to access "contents.tar${comp}.sig" very early, but in the
30 > > > absence of an index containing offsets, normally we'd have to read all
31 > > > of "contents.tar${comp}" first. However, I suppose we could search
32 > > > backwards for the "contents.tar${comp}.sig" entry.
33 > >
34 > > We could solve this problem by adding an index file containing offsets
35 > > as the last file in the outer tar file.
36 >
37 > Actually, the tar entry for "contents.tar${comp}" should contain the
38 > length, so we should be able to efficiently seek to the
39 > "contents.tar${comp}.sig" entry. So, an index is not really needed.
40
41 Precisely. Tar is pretty much a linked-list, so seeking is quite
42 efficient, as long as it's not compressed.
43
44 --
45 Best regards,
46 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature