7 This file is intended to provide a few tips for anyone doing development on nmh.
8 Developers who learn things "the hard way" about the nmh codebase (as opposed to
9 local info best encoded in a comment) are encouraged to share their wisdom here.
11 The topics are organized alphabetically.
18 If you wish to change the `configure' script or its related files, you'll need
19 to first install GNU m4, available from <ftp://ftp.gnu.org/pub/gnu/m4/> and then
20 GNU autoconf (<ftp://ftp.gnu.org/pub/gnu/autoconf/>).
22 Most of the configure-related files are automatically generated. The only files
23 you should need to manually edit are acconfig.h and configure.in. Don't, for
24 instance, edit config.h.in. Though it is an input file from the point of view
25 of the users (and the configure script) it is an output file from the point of
26 view of the developers (and the autoconf script).
28 If you do change acconfig.h or configure.in and want to `cvs commit' them, be
29 sure to regenerate the output files and commit them as well. The easiest way to
30 regenerate the files is to simply run `make' -- it'll do the necessary calls of
31 autoconf and autoheader and will do a `./config.status --recheck', which will
32 exercise your new configure script.
34 When you commit the configure-related files, it's very important to commit them
35 in the right order. The timestamps on the files in the CVS archive are based on
36 the current time at the moment they were committed -- the timestamps from the
37 local files you commit are not copied over. If you commit the files in the
38 wrong order, you'll cause unnecessary calls of `autoconf' to occur when people
39 try to `make' their copies of the latest CVS source. These people may be
40 end-users who don't have any interest in changing the configure-related files
41 and don't have autoconf installed. They'll be unable to make without playing
44 The correct procedure to commit the configure-related files is:
46 % cvs commit acconfig.h aclocal.m4 configure.in
47 % autoconf && autoheader # or simply "make"
48 % cvs commit config.h.in configure
49 % make stamp-h.in # or simply "make"
50 % cvs commit stamp-h.in
52 The reason that the commits need to be split up is that the RCS Id strings
53 in the files change when you commit, which can apparently mess up the
54 dependencies. [How? -- Dan Harkless <dan-nmh@dilvish.speed.net> // CVS
55 updates the strings to have the new version number, the modification time
56 of the file gets updated by the OS. -- Kimmo Suominen <kim@tac.nyc.ny.us>]
57 If this were not the case, you could commit with a single make followed by a
58 cvs commit acconfig.h aclocal.m4 config.h.in configure.in configure stamp-h.in.
59 [But since we have the RCS Id strings in the files, isn't it useless to even
60 mention this? The fix would be to remove the strings, and I don't think that
61 would be good. -- Kimmo Suominen <kim@tac.nyc.ny.us>]
63 If you haven't changed all the files noted above, just commit the ones you have,
64 in the stated order (for instance, configure.in, then configure, then
72 Following is a list of nmh's directories along with a brief description of the
73 purpose of each one. Meanings are given for the abbreviations, but note that
74 these meanings are just informed guesses as to what the MH developers were
78 The top-level directory. Contains files like README and INSTALL.
81 Contains utility files for the `configure' process. Ordinarily nothing in
82 here needs to be messed with.
85 Contains files, file templates, and scripts to generate files that will be
86 installed in the ${prefix}/etc directory. Stuff like replcomps.
89 Most of nmh's header (.h) files are kept not in the individual source
90 directories, but in this central location.
93 Contains all the input files that are processed to generate nmh's manual
97 "mts" stands for "Message Transfer Service". Source files specific to the
98 different MTSs go in the subdirectories.
101 "mmdf" stands for "Multichannel Memorandum Distribution Facility". It is an
102 alternative to sendmail used primarily on SCO UNIX.
105 When nmh is configured --with-mts=sendmail, the files in this directory are
109 When nmh is configured to just talk to an SMTP server over TCP/IP, the
110 source in this directory is compiled.
113 "sbr" stands for "subroutine(s)". For the most part, each source file in
114 this directory contains a single function with the same name as the source
115 file. These functions are of general use and are called from throughout
119 "uip" stands for "User Interface Programs". Most nmh commands have a file
120 in this directory named <command>.c containing the code for that command
121 (e.g. repl.c). In some cases there is also an auxiliary file called
122 <command>sbr.c which contains additional subroutines called from <command>.c
123 (which would contain not much else besides main()).
126 Files in this hierarchy were either written by or moved here by UCI
127 (University of California, Irvine) after they took over MH from the Rand
128 Corporation. "Zot!" is the sound effect made by the anteater in the "B.C."
129 comic strip when its tongue lashes out at ants. The anteater is UCI's
130 official mascot. Not sure whether UCInet was once called ZotNet...
133 UCI added Bulletin Board functionality to MH with the `bbc' command. This
134 functionality has been removed from nmh but apparently files in this
135 directory are still needed for other purposes.
138 "mf" stands for "Mail Filter". The filtering in this case apparently refers
139 to translation between different address and mailbox formats.
142 MTS code not specific to any single MTS apparently goes here.
145 No idea what "tws" stands for, other than 't' almost certainly standing for
146 "time". Date and time manipulation routines go here.
149 -------------------------------------------------------
150 nmh-local functions to use in preference to OS versions
151 -------------------------------------------------------
153 For some system functions whose availability or behavior varies from OS to OS,
154 nmh conditionally uses a local definition with the same name as the OS function
155 (e.g. snprintf()). For other functions, developers need to avoid the OS
156 versions and always use the nmh-supplied function. Here is a list of such
159 OS function nmh-local version to use instead
160 =========== ================================
161 getpass() nmh_getpass()
168 To make a public release of nmh (we'll use version 1.0.4 and my mhost.com
169 account, danh, as examples here):
171 1. % echo 1.0.4 > VERSION
173 2. Put a comment like "Released nmh-1.0.4." in the ChangeLog.
175 3. % cvs commit ChangeLog VERSION
177 4. % cvs tag nmh-1_0_4
178 (cvs treats dots specially, so underscores are substituted here.)
182 6. Untar nmh-1.0.4.tar.gz and `diff -r' it vs. your CVS tree. Make sure no
183 files got left out of the distribution that should be in it (due to someone
184 forgetting to update the DIST variables in the Makefiles).
186 7. If you have root access on your machine, it's good at this point to do:
188 % chown -R 0:0 nmh-1.0.4
189 % tar cvf nmh-1.0.4.tar nmh-1.0.4
192 If you leave the files in the archive as being owned by yourself, your UID
193 may coincide with one of a user on a machine where nmh is being installed,
194 making it possible for that user to Trojan the nmh code before the system
195 administrator finishes installing it.
197 8. Make sure your new tarball uncompresses and untars with no problem. Make
198 sure you can configure, make, and install nmh from it.
200 9. If all is well and your tarball is final, go back to your CVS tree and do:
202 % echo 1.0.4+dev > VERSION
204 10. Put a comment like "Upped the version number to 1.0.4+dev until the next nmh
205 release." in the ChangeLog.
207 11. % cvs commit ChangeLog VERSION
209 12. If possible, make an MD5 hash and/or a PGP signature of nmh-1.0.4.tar.gz.
211 13. % scp -p nmh-1.0.4.tar.gz* danh@mhost.com:/var/ftp/pub/nmh
213 14. Send an announcement to exmh-users@redhat.com, exmh-workers@redhat.com,
214 mh-users@ics.uci.edu, and nmh-announce@mhost.com. If the release fixes
215 significant security holes, also send an announcement to
216 bugtraq@securityfocus.com. The exmh lists require you to be subscribed in
217 order to post. Note that you don't need to post separately to comp.mail.mh,
218 as the mh-users mailing list is apparently bidirectionally gatewayed to it.
220 Preferably, the announcement should contain the MD5 hash generated above,
221 and should be PGP-signed. It should include the FTP URL for the tarball as
222 well as the URL of the website. It should contain a brief summary of
223 visible changes, as well as the URL of the cvsweb diff page that would show
224 a detailed list of changes. The changes between 1.0.3 and 1.0.4 would be
227 http://www.mhost.com/cgi-bin/cvsweb/nmh/ChangeLog?r1=1.40&r2=1.71