Debian Codegraph @

doc/HACKING

raw
1 # HACKING -*- org -*-
2 #+TITLE: Hacking notes for Libassuan
3 #+STARTUP: showall
4
5 * How to contribute
6
7 The following stuff explains some basic procedures you need to
8 follow if you want to contribute code or documentation.
9
10 ** No more ChangeLog files
11
12 Do not modify any of the ChangeLog files in Libassuan. Starting
13 on December 1st, 2011 we put change information only in the GIT
14 commit log, and generate a top-level ChangeLog file from logs at
15 "make dist" time. As such, there are strict requirements on the
16 form of the commit log messages. The old ChangeLog files have all
17 be renamed to ChangeLog-2011
18
19
20 ** Coding standards
21
22 Please follow the GNU coding standards. If you are in doubt consult
23 the existing code as an example. Do no re-indent code without a
24 need. If you really need to do it, use a separate commit for such a
25 change. See below for the required commit log format.
26
27 ** Commit log requirements
28
29 Your commit log should always start with a one-line summary, the
30 second line should be blank, and the remaining lines are usually
31 ChangeLog-style entries for all affected files. However, it's fine
32 -- even recommended -- to write a few lines of prose describing the
33 change, when the summary and ChangeLog entries don't give enough of
34 the big picture. Omit the leading TABs that you're used to seeing
35 in a "real" ChangeLog file, but keep the maximum line length at 72
36 or smaller, so that the generated ChangeLog lines, each with its
37 leading TAB, will not exceed 80 columns.
38
39 Here is an example of a commit message:
40 #+begin_example
41 Make new functions also visible on non-W32.
42
43 * src/system-posix.c (__assuan_read, __assuan_write, __assuan_recvmsg)
44 (__assuan_sendmsg, __assuan_waitpid): Make functions global.
45 * src/libassuan.vers: Add above functions.
46 * configure.ac: Set version to 2.1.0-git.
47 --
48 Note that everything after the above tear off marker will not be
49 copied to the ChangeLog during a "make dist". You may use this to add
50 extra information about this commit which are mostly relevant for your
51 co-hackers. Recall that the ChangeLog itself fulfills requirements of
52 the GPL and is useful for quick history checks of a released version.
53 Developers will use the git log.
54 #+end_example
55
56 If you don't want a ChangeLog entry at all, use this:
57 #+begin_example
58 Give examples for commit logs.
59
60 --
61 Because the tear off line is the first line of the body, not even the
62 summary line will be copied to the ChangeLog. Using only the tear off
63 line without any text is often useful for commits like "Typo and
64 grammar fixes."
65 #+end_example
66
67
68 ** License policy
69
70 Libassuan is currently licensed under the LGPLv2+ with tools and the
71 manual being under the GPLv3+. We may eventually update to a newer
72 version of the licenses or a combination of them. It is thus
73 important, that all contributed code allows for an update of the
74 license; in particular we can't accept code under the GPL or LGPL
75 without the "or any later version" term.
76
77 Being developed as part of GnuPG-2, Libassuan used to have a strict
78 policy of requiring copyright assignments to the FSF. To avoid this
79 major organizational overhead and to allow inclusion of code, not
80 copyrighted by the FSF, this policy has been relaxed. It is now
81 also possible to contribute code by asserting that the contribution
82 is in accordance to the "Libassuan Developer's Certificate of
83 Origin" as found in the file "DCO". (Except for a slight wording
84 change, this DCO is identical to the one used by the Linux kernel.)
85
86 If your want to contribute code or documentation to Libassuan and
87 you didn't signed a copyright assignment with the FSF in the past,
88 you need to take these simple steps:
89
90 - Decide which mail address you want to use. Please have your real
91 name in the address and not a pseudonym. Anonymous contributions
92 can only be done if you find a proxy who certifies for you.
93
94 - If your employer or school might claim ownership of code written
95 by you; you need to talk to them to make sure that you have the
96 right to contribute under the DCO.
97
98 - Send an OpenPGP signed mail to the [email protected] mailing
99 list from your mail address. Include a copy of the DCO as found
100 in the official master branch. Insert your name and email address
101 into the DCO in the same way you want to use it later. Example:
102
103 Signed-off-by: Joe R. Hacker <[email protected]>
104
105 (If you really need it, you may perform simple transformations of
106 the mail address: Replacing "@" by " at " or "." by " dot ".)
107
108 - That's it. From now on you only need to add a "Signed-off-by:"
109 line with your name and mail address to the commit message. It is
110 recommended to send the patches using a PGP/MIME signed mail.