Gentoo Archives: gentoo-dev

From: Evan Powers <powers.161@×××.edu>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] proposed md5sum change
Date: Thu, 12 Jun 2003 07:53:02
Message-Id: 200306120353.00387.powers.161@osu.edu
In Reply to: Re: [gentoo-dev] proposed md5sum change by Seemant Kulleen
1 On Thursday 12 June 2003 02:56 am, Seemant Kulleen wrote:
2 > Anyway, the current approach keeps it simple in that the md5sum is off the
3 > *item(s) that is/are downloaded*. The first reason I can see is what I
4 > stated above. There are other reasons I can see as well. You know,
5 > immediately upon fetching the set of source items that they are bad. So,
6 > no disk i/o or cpu cycles are spent in the unpacking; and no potentially
7 > nasty code is even untarred on the system, yet.
8
9 Well, I can think of a way to address this part of the issue, anyway.
10
11 * The portage tree still has MD5 digests for the item(s) which is/are
12 downloaded.
13
14 * After downloading, emerge executes a (user specified?) program on the newly
15 downloaded file. This program applies some transform to the file; maybe it
16 decompresses whatever format the file is in and re-compresses it with bzip2,
17 or maybe it only format-shifts files which are over a certain size threshold,
18 whatever.
19
20 * Next, emerge adds a new record to a database (text, one record per line, for
21 example) somewhere in /var. This database has the original name of the
22 downloaded file, the original MD5 digest, the new name, and the new MD5
23 digest.
24
25 * When emerge wants a new file, it checks the database to see if the desired
26 file has been mapped to a new transformed name and MD5.
27
28 You'd probably want to make the digest file readable only by the portage user
29 or something.
30
31 With infrastructure like this you could even add more interesting
32 functionality to portage pretty easily. Like maybe the transform program
33 uploads the file to the corporate internal FTP mirror, and the database maps
34 the original name to the URI which locates it.
35
36 Or, if emerge exported sufficient context to the transform program, you could
37 fix the case where a particular braindead package is available only as
38 package.tar.gz, not package-version.tar.gz. The transform program would add
39 the version to the filename, and the database would be allowed to have
40 multiple entries for each original file name (provided they had different MD5
41 digests). Then emerge would just pick the record with both the desired
42 original name and the desired original MD5 digest.
43
44 Evan
45
46
47 --
48 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] proposed md5sum change Paul de Vrieze <pauldv@g.o>