Gentoo Archives: gentoo-portage-dev

From: Rafael Goncalves Martins <rafaelmartins@g.o>
To: gentoo-portage-dev@l.g.o
Cc: robbat2@g.o, Denis Dupeyron <calchan@g.o>
Subject: [gentoo-portage-dev] [PATCH] Distfile Patching Support for Portage
Date: Thu, 11 Aug 2011 08:12:44
Message-Id: CAHgY3qc0Dj=BZe=g-Qd4VUnXf0r4Dfx=6d1XJ5Qp0RoaK-wjug@mail.gmail.com
1 Hi,
2
3 I'm sending attached a patch that does the basic implementation of
4 Distfile Patching Support for Portage. This is part of my GSoC project
5 [1].
6
7 It relies on the tools provided by app-portage/distpatch, commited to
8 the tree today, and is able to get an old tarball, plus a XZ
9 compressed binary delta and reconstruct the needed tarball, if a delta
10 is available.
11
12 You may find a few sample deltas and a delta.db in my public page in
13 soc.dev.gentoo.org [2]. More deltas will be available soon. These ones
14 are just for tests.
15
16 Basic steps to test: (be careful with the commands! :)
17
18 # echo 'DELTAS_ROOT_URL="http://soc.dev.gentoo.org/~rafaelmartins/"'
19 >> /etc/make.conf
20 # echo 'FEATURES="${FEATURES} distpatch"' >> /etc/make.conf
21 # wget -O $(portageq distdir)/delta.db
22 http://soc.dev.gentoo.org/~rafaelmartins/delta.db
23 # emerge --fetchonly =grep-2.8
24 # rm $(portageq distdir)/grep-2.9.tar.xz
25 # emerge -av1 =grep-2.9
26
27 You'll see that the fetch size reported is pretty smaller than the
28 full tarball (80kB X >1MB). If you hit return, a delta will be fetched
29 and saved to $DISTDIR/deltas, the tarball will be reconstructed, the
30 checksums will be verified and the package will be installed. The
31 reconstructed tarball will be saved to $DISTDIR, if the checksums
32 match with the original tarball, ofrto $DISTDIR/delta-reconstructed,
33 if the checksums from compressed files unmatched but the checksums for
34 the uncompressed files matched. This is handled in a secure way by the
35 distpatch tools and the delta.db file.
36
37 Currently the delta.db file is fetched manually and placed in $DISTDIR
38 because we don't decided yet about how it will be shipped to users.
39 Probably through rsync, but we can't say this before have a "real"
40 deployment of the delta generators. This will require a little patch
41 soon.
42
43 This patch isn't obtrusive, and shouldn't affect any users with
44 FEATURES="-distpatch".
45
46 All the variable names can be changed, if wanted. I'm not very good at
47 choose names :)
48
49 That's it.
50
51 [1] - http://www.gentoo.org/proj/en/infrastructure/distpatch/
52 [2] - http://soc.dev.gentoo.org/~rafaelmartins/
53
54 Regards,
55
56 --
57 Rafael Goncalves Martins
58 Gentoo Linux developer
59 http://rafaelmartins.eng.br/

Attachments

File name MIME type
0001-distpatch-basic-implementation-of-Distfile-Patching-.patch text/x-patch

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] Distfile Patching Support for Portage Arfrever Frehtes Taifersar Arahesis <arfrever.fta@×××××.com>