|
Packit Service |
cbd1e2 |
# HACKING -*- org -*-
|
|
Packit Service |
cbd1e2 |
#+TITLE: Hacking notes for Libassuan
|
|
Packit Service |
cbd1e2 |
#+STARTUP: showall
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
* How to contribute
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
The following stuff explains some basic procedures you need to
|
|
Packit Service |
cbd1e2 |
follow if you want to contribute code or documentation.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
** No more ChangeLog files
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Do not modify any of the ChangeLog files in Libassuan. Starting
|
|
Packit Service |
cbd1e2 |
on December 1st, 2011 we put change information only in the GIT
|
|
Packit Service |
cbd1e2 |
commit log, and generate a top-level ChangeLog file from logs at
|
|
Packit Service |
cbd1e2 |
"make dist" time. As such, there are strict requirements on the
|
|
Packit Service |
cbd1e2 |
form of the commit log messages. The old ChangeLog files have all
|
|
Packit Service |
cbd1e2 |
be renamed to ChangeLog-2011
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
** Coding standards
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Please follow the GNU coding standards. If you are in doubt consult
|
|
Packit Service |
cbd1e2 |
the existing code as an example. Do no re-indent code without a
|
|
Packit Service |
cbd1e2 |
need. If you really need to do it, use a separate commit for such a
|
|
Packit Service |
cbd1e2 |
change. See below for the required commit log format.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
** Commit log requirements
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Your commit log should always start with a one-line summary, the
|
|
Packit Service |
cbd1e2 |
second line should be blank, and the remaining lines are usually
|
|
Packit Service |
cbd1e2 |
ChangeLog-style entries for all affected files. However, it's fine
|
|
Packit Service |
cbd1e2 |
-- even recommended -- to write a few lines of prose describing the
|
|
Packit Service |
cbd1e2 |
change, when the summary and ChangeLog entries don't give enough of
|
|
Packit Service |
cbd1e2 |
the big picture. Omit the leading TABs that you're used to seeing
|
|
Packit Service |
cbd1e2 |
in a "real" ChangeLog file, but keep the maximum line length at 72
|
|
Packit Service |
cbd1e2 |
or smaller, so that the generated ChangeLog lines, each with its
|
|
Packit Service |
cbd1e2 |
leading TAB, will not exceed 80 columns.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Here is an example of a commit message:
|
|
Packit Service |
cbd1e2 |
#+begin_example
|
|
Packit Service |
cbd1e2 |
Make new functions also visible on non-W32.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
* src/system-posix.c (__assuan_read, __assuan_write, __assuan_recvmsg)
|
|
Packit Service |
cbd1e2 |
(__assuan_sendmsg, __assuan_waitpid): Make functions global.
|
|
Packit Service |
cbd1e2 |
* src/libassuan.vers: Add above functions.
|
|
Packit Service |
cbd1e2 |
* configure.ac: Set version to 2.1.0-git.
|
|
Packit Service |
cbd1e2 |
--
|
|
Packit Service |
cbd1e2 |
Note that everything after the above tear off marker will not be
|
|
Packit Service |
cbd1e2 |
copied to the ChangeLog during a "make dist". You may use this to add
|
|
Packit Service |
cbd1e2 |
extra information about this commit which are mostly relevant for your
|
|
Packit Service |
cbd1e2 |
co-hackers. Recall that the ChangeLog itself fulfills requirements of
|
|
Packit Service |
cbd1e2 |
the GPL and is useful for quick history checks of a released version.
|
|
Packit Service |
cbd1e2 |
Developers will use the git log.
|
|
Packit Service |
cbd1e2 |
#+end_example
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
If you don't want a ChangeLog entry at all, use this:
|
|
Packit Service |
cbd1e2 |
#+begin_example
|
|
Packit Service |
cbd1e2 |
Give examples for commit logs.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
--
|
|
Packit Service |
cbd1e2 |
Because the tear off line is the first line of the body, not even the
|
|
Packit Service |
cbd1e2 |
summary line will be copied to the ChangeLog. Using only the tear off
|
|
Packit Service |
cbd1e2 |
line without any text is often useful for commits like "Typo and
|
|
Packit Service |
cbd1e2 |
grammar fixes."
|
|
Packit Service |
cbd1e2 |
#+end_example
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
** License policy
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Libassuan is currently licensed under the LGPLv2+ with tools and the
|
|
Packit Service |
cbd1e2 |
manual being under the GPLv3+. We may eventually update to a newer
|
|
Packit Service |
cbd1e2 |
version of the licenses or a combination of them. It is thus
|
|
Packit Service |
cbd1e2 |
important, that all contributed code allows for an update of the
|
|
Packit Service |
cbd1e2 |
license; in particular we can't accept code under the GPL or LGPL
|
|
Packit Service |
cbd1e2 |
without the "or any later version" term.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Being developed as part of GnuPG-2, Libassuan used to have a strict
|
|
Packit Service |
cbd1e2 |
policy of requiring copyright assignments to the FSF. To avoid this
|
|
Packit Service |
cbd1e2 |
major organizational overhead and to allow inclusion of code, not
|
|
Packit Service |
cbd1e2 |
copyrighted by the FSF, this policy has been relaxed. It is now
|
|
Packit Service |
cbd1e2 |
also possible to contribute code by asserting that the contribution
|
|
Packit Service |
cbd1e2 |
is in accordance to the "Libassuan Developer's Certificate of
|
|
Packit Service |
cbd1e2 |
Origin" as found in the file "DCO". (Except for a slight wording
|
|
Packit Service |
cbd1e2 |
change, this DCO is identical to the one used by the Linux kernel.)
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
If your want to contribute code or documentation to Libassuan and
|
|
Packit Service |
cbd1e2 |
you didn't signed a copyright assignment with the FSF in the past,
|
|
Packit Service |
cbd1e2 |
you need to take these simple steps:
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
- Decide which mail address you want to use. Please have your real
|
|
Packit Service |
cbd1e2 |
name in the address and not a pseudonym. Anonymous contributions
|
|
Packit Service |
cbd1e2 |
can only be done if you find a proxy who certifies for you.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
- If your employer or school might claim ownership of code written
|
|
Packit Service |
cbd1e2 |
by you; you need to talk to them to make sure that you have the
|
|
Packit Service |
cbd1e2 |
right to contribute under the DCO.
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
- Send an OpenPGP signed mail to the gnupg-devel@gnupg.org mailing
|
|
Packit Service |
cbd1e2 |
list from your mail address. Include a copy of the DCO as found
|
|
Packit Service |
cbd1e2 |
in the official master branch. Insert your name and email address
|
|
Packit Service |
cbd1e2 |
into the DCO in the same way you want to use it later. Example:
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
Signed-off-by: Joe R. Hacker <joe@example.org>
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
(If you really need it, you may perform simple transformations of
|
|
Packit Service |
cbd1e2 |
the mail address: Replacing "@" by " at " or "." by " dot ".)
|
|
Packit Service |
cbd1e2 |
|
|
Packit Service |
cbd1e2 |
- That's it. From now on you only need to add a "Signed-off-by:"
|
|
Packit Service |
cbd1e2 |
line with your name and mail address to the commit message. It is
|
|
Packit Service |
cbd1e2 |
recommended to send the patches using a PGP/MIME signed mail.
|