5 This file is intended to provide a few tips for anyone doing development on nmh.
6 Developers who learn things "the hard way" about the nmh codebase (as opposed to
7 local info best encoded in a comment) are encouraged to share their wisdom here.
9 The topics are organized alphabetically.
16 If you wish to change the `configure' script or its related files, you'll need
17 to first install GNU m4, available from <ftp://ftp.gnu.org/pub/gnu/m4/> and then
18 GNU autoconf (<ftp://ftp.gnu.org/pub/gnu/autoconf/>). Nmh is currently using
19 a minimum of autoconf 2.54.
21 Most of the configure-related files are automatically generated. The only files
22 you should need to manually edit are acconfig.h and configure.ac. Don't, for
23 instance, edit config.h.in. Though it is an input file from the point of view
24 of the users (and the configure script) it is an output file from the point of
25 view of the developers (and the autoconf script).
27 Note that the automatically generated autoconf files (such as config.h.in,
28 stamp-h.in, and configure), are NOT kept in git. Thus, when you check out
29 a git tree, you need to run the autogen.sh script before you can build
38 Following is a list of nmh's directories along with a brief description of the
39 purpose of each one. Meanings are given for the abbreviations, but note that
40 these meanings are just informed guesses as to what the MH developers were
44 The top-level directory. Contains files like README and INSTALL.
47 Contains utility files for the `configure' process. Ordinarily nothing in
48 here needs to be messed with.
51 Contains more specialized documentation, such as this file and
55 Contains files, file templates, and scripts to generate files that will be
56 installed in the ${prefix}/etc directory. Stuff like replcomps.
59 Most of nmh's header (.h) files are kept not in the individual source
60 directories, but in this central location.
63 Contains all the input files that are processed to generate nmh's manual
67 "sbr" stands for "subroutine(s)". For the most part, each source file in
68 this directory contains a single function with the same name as the source
69 file. These functions are of general use and are called from throughout
73 "uip" stands for "User Interface Programs". Most nmh commands have a file
74 in this directory named <command>.c containing the code for that command
75 (e.g. repl.c). In some cases there is also an auxiliary file called
76 <command>sbr.c which contains additional subroutines called from <command>.c
77 (which would contain not much else besides main()).
84 As of December 2010, nmh has switched to using git for revision control
85 instead of CVS. While the topic of git is beyond the scope of this FAQ,
86 to get started with git & nmh, you can run the following command to checkout
89 % git clone git://git.savannah.nongnu.org/nmh.git
92 -------------------------------------------------------
93 nmh-local functions to use in preference to OS versions
94 -------------------------------------------------------
96 For some system functions whose availability or behavior varies from OS to OS,
97 nmh conditionally uses a local definition with the same name as the OS function
98 (e.g. snprintf()). For other functions, developers need to avoid the OS
99 versions and always use the nmh-supplied function. Here is a list of such
102 OS function nmh-local version to use instead
103 =========== ================================
104 getpass() nmh_getpass()
111 To make a public release of nmh (we'll use version 1.0.4 and my mhost.com
112 account, danh, as examples here; the convention for release candidates
113 is to use something like "1.0.4-RC1"):
115 1. % echo 1.0.4 > VERSION
116 % date +"%e %B %Y" > DATE
117 (DATE should contain something like "30 December 2000")
119 2. Put a comment like "Released nmh-1.0.4." in the ChangeLog.
121 3. % cvs commit ChangeLog VERSION DATE
123 4. % cvs tag nmh-1_0_4
124 (cvs treats dots specially, so underscores are substituted here.)
128 6. Untar nmh-1.0.4.tar.gz and `diff -r' it vs. your CVS tree. Make sure no
129 files got left out of the distribution that should be in it (due to someone
130 forgetting to update the DIST variables in the Makefiles).
132 7. If you have root access on your machine, it's good at this point to do:
134 % chown -R 0:0 nmh-1.0.4
135 % tar cvf nmh-1.0.4.tar nmh-1.0.4
138 If you leave the files in the archive as being owned by yourself, your UID
139 may coincide with one of a user on a machine where nmh is being installed,
140 making it possible for that user to Trojan the nmh code before the system
141 administrator finishes installing it.
143 8. Make sure your new tarball uncompresses and untars with no problem. Make
144 sure you can configure, make, and install nmh from it.
146 9. If all is well and your tarball is final, go back to your CVS tree and do:
148 % echo 1.0.4+dev > VERSION
150 10. Put a comment like "Upped the version number to 1.0.4+dev until the next nmh
151 release." in the ChangeLog.
153 11. % cvs commit ChangeLog VERSION
155 12. If possible, make an MD5 hash and/or a PGP signature of nmh-1.0.4.tar.gz.
156 Assuming you have gpg set up, this should be:
157 % gpg --output nmh-1.0.4.tar.gz.sig --detach-sig nmh-1.0.4.tar.gz
159 You can verify the signature with
160 % gpg --verify nmh-1.0.4.tar.gz.sig nmh-1.0.4.tar.gz
162 13. Upload the files to savannah. First make sure they are mode 664 so
163 they will have the right permissions on the server end
164 (see https://savannah.gnu.org/maintenance/SharedDownloadArea)
165 % chmod 664 nmh-1.0.4.tar.gz*
167 Then scp them across:
168 % scp -p nmh-1.0.4.tar.gz* youruser@dl.sv.nongnu.org:/releases/nmh/
170 14. Update the http://www.nongnu.org/nmh/ homepage. (It lives in the 'webpages
171 repository'; see https://savannah.nongnu.org/cvs/?group=nmh)
173 15. Add a news item to the savannah nmh page. You'll have to submit it first
174 and then separately approve it (under News->Manage).
176 16. Send the release announcement email to the following places:
177 nmh-workers@nongnu.org
178 nmh-announce@nongnu.org
179 exmh-users@redhat.com
180 exmh-workers@redhat.com
181 mh-e-users@lists.sourceforge.net
182 mh-users@ics.uci.edu *or* comp.mail.mh (there is a bidirectional gateway)
184 If the release fixes significant security holes, also send an announcement
185 to bugtraq@securityfocus.com. The exmh lists require you to be subscribed
186 in order to post. Note that you don't need to post separately to
187 comp.mail.mh, as the mh-users mailing list is apparently bidirectionally
190 Preferably, the announcement should contain the MD5 hash generated above,
191 and should be PGP-signed. It should include the URL for the tarball as
192 well as the URL of the website. It should contain a brief summary of
193 visible changes, as well as the URL of the cvsweb diff page that would show
194 a detailed list of changes. The changes between 1.2 and 1.3 would be
197 http://cvs.savannah.gnu.org/viewvc/nmh/ChangeLog?root=nmh&r1=1.215&r2=1.254.2.13