Gentoo Archives: gentoo-dev

From: Kacper Kowalik <xarthisius@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Establishing Gentoo patch policy to keep our patches consistent and clean
Date: Sun, 07 Apr 2013 06:53:48
Message-Id: 516117EF.3010007@gentoo.org
In Reply to: [gentoo-dev] [RFC] Establishing Gentoo patch policy to keep our patches consistent and clean by "Michał Górny"
1 On 06.04.2013 20:08, Michał Górny wrote:
2 > Hello,
3 >
4 > As far as I'm aware, we don't really have much of a patch maintenance
5 > policy in Gentoo. There a few loose rules like «don't put awfully big
6 > files into FILESDIR» or the common sense «use unified diff», but no
7 > complete and clear policy.
8 >
9 > Especially considering the late discussion related to the needless
10 > and semi-broken functionality in epatch, I'd like to propose
11 > setting the following rules for patches in tree and in Gentoo-sourced
12 > patchsets:
13 >
14 > 1. Patches have to be either in unified or context diff format. Unified
15 > diff is preferred.
16 >
17 > 2. Patches have to apply to the top directory of the source tree with
18 > 'patch -p1'. If patches are applied to sub-directories, necessary '-p'
19 > argument shall be passed to 'epatch' explicitly. Developers are
20 > encouraged to create patches which are compatible with 'git am'.
21 >
22 > 3. Patches have to end with either '.patch' or '.diff' suffix.
23 >
24 > 4. If possible, patches shall be named in a way allowing them to be
25 > applied in lexical order. However, this one isn't necessary if patches
26 > from an older ebuild are applied to a newer one.
27 >
28 > 5. The patch name shall shortly summarize the changes done by it.
29 >
30 > 6. Patch files shall start with a brief description of what the patch
31 > does. Developers are encouraged to use git-style tags like 'Fixes:' to
32 > point to the relevant bug URIs.
33 >
34 > 7. Patch combining is discouraged. Developers shall prefer multiple
35 > patches following either the upstream commits or a logical commit
36 > sequence (if changes are not committed upstream).
37 >
38 > The above-listed policy will apply to the patches kept in the gx86 tree
39 > (in FILESDIRs) and patch archives created by Gentoo developers. They
40 > will not apply to the patch archives created upstream.
41 >
42
43 Hi,
44 there's at least one guideline written by the Ancient Ones that I know
45 [1] It roughly follows the ideas that you've described. I think it'd be
46 enough if people read it and used as a suggestion not a strict ruling.
47 Imposing things like lexical order or git-style heading is a bit too
48 much for me.
49
50 Do we really need rules for everything?
51
52 Cheers,
53 Kacper
54
55 [1] http://dev.gentoo.org/~vapier/clean-patches

Attachments

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

Replies