Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP r2] Gentoo binary package container format
Date: Wed, 21 Nov 2018 14:21:59
Message-Id: 1542810108.4480.2.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [pre-GLEP r2] Gentoo binary package container format by Fabian Groffen
1 On Wed, 2018-11-21 at 14:10 +0100, Fabian Groffen wrote:
2 > On 20-11-2018 21:33:17 +0100, Michał Górny wrote:
3 > > The volume label
4 > > ----------------
5 > >
6 > > The volume label provides an easy way for users to identify the binary
7 > > package without dedicated tooling or specific format knowledge.
8 > >
9 > > The implementations should include a volume label consisting of fixed
10 > > string ``gpkg:``, followed by a single space, followed by full package
11 > > identifier. However, the implementations must not rely on the volume
12 > > label being present or attempt to parse its value when it is.
13 > >
14 > > Furthermore, since the volume label is included in the .tar archive
15 > > as the first member, it provides a magic string at a fixed location
16 > > that can be used by tools such as file(1) to easily distinguish Gentoo
17 > > binary packages from regular .tar archives.
18 >
19 > Just for clarity on this point.
20 > Are you proposing that we patch file(1) to print the Volume Header here?
21 > file-5.35 seems to not say much but "tar archive" or "POSIX tar archive"
22 > for tar-files containing a Volume Header as shown by tar -tv.
23
24 I'm wondering about that as well, yes. However, my main idea is to
25 specifically detect 'gpkg:' there and use it to explicitly identify
26 the file as Gentoo binary package (and print package name).
27
28 >
29 > > Container and archive formats
30 > > -----------------------------
31 > >
32 > > During the debate, the actual archive formats to use were considered.
33 > > The .tar format seemed an obvious choice for the image archive since
34 > > it is the only widely deployed archive format that stores all kinds
35 > > of file metadata on POSIX systems. However, multiple options for
36 > > the outer format has been debated.
37 >
38 > You mention POSIX, which triggered me. I think it would be good to
39 > specify which tar format to use.
40 >
41 > POSIX.1-2001/pax format doesn't have a 100/256 char filename length
42 > restriction, which is good but it is not (yet) used by default by GNU
43 > tar. busybox tar can read pax tars, it seems.
44 >
45
46 I think the modern GNU tar format is the obvious choice here. I think
47 it doesn't suffer any portability problems these days, and is more
48 compact than the PAX format.
49
50
51 --
52 Best regards,
53 Michał Górny

Attachments

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