Maintain.htm 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <title>AFPL Ghostscript maintenance procedures</title>
  5. <!-- $Id: Maintain.htm,v 1.23.2.2 2002/02/01 05:31:25 raph Exp $ -->
  6. <link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
  7. </head>
  8. <body>
  9. <!-- [1.0 begin visible header] ============================================ -->
  10. <!-- [1.1 begin headline] ================================================== -->
  11. <h1>AFPL Ghostscript maintenance procedures</h1>
  12. <!-- [1.1 end headline] ==================================================== -->
  13. <!-- [1.2 begin table of contents] ========================================= -->
  14. <h2>Table of contents</h2>
  15. <blockquote><ul>
  16. <li><a href="#Introduction">Introduction</a>
  17. <li><a href="#Problem_reporting">Problem reporting</a>
  18. <ul>
  19. <li><a href="#Uploading_test_data">Uploading test data</a>
  20. </ul>
  21. <li><a href="#CVS">Rules for CVS commits</a>
  22. <li><a href="#Adding_or_removing_files">Adding or Removing Files</a>
  23. </ul></blockquote>
  24. <!-- [1.2 end table of contents] =========================================== -->
  25. <!-- [1.3 begin hint] ====================================================== -->
  26. <p>For other information, see the <a href="Readme.htm">Ghostscript
  27. overview</a> and the instructions on how to <a href="Make.htm">build
  28. Ghostscript</a>.
  29. <!-- [1.3 end hint] ======================================================== -->
  30. <hr>
  31. <!-- [1.0 end visible header] ============================================== -->
  32. <!-- [2.0 begin contents] ================================================== -->
  33. <h2><a name="Introduction"></a>Introduction</h2>
  34. <p>
  35. This document describes various maintenance procedures associated with AFPL
  36. Ghostscript. It is only meant for developers actively working on AFPL
  37. Ghostscript; some parts of it are only relevant to developers who are
  38. members of the ghostscript group on SourceForge.
  39. <hr>
  40. <h2><a name="Problem_reporting"></a>Problem reporting</h2>
  41. <h3><a name="#Uploading_test_data"></a>Uploading test data</h3>
  42. <p>
  43. SourceForge currently provides no supported method for associating test data
  44. files with a problem report. Submitters can always include a URL in their
  45. public report, but sometimes the test files need to remain private.
  46. <p>
  47. To allow uploading of private test files, we have set up a CVS tree on a
  48. SourceForge server, accessible only to members of the ghostscript group.
  49. The simplest way to access this tree is to place the following script in
  50. <b><tt>/usr/local/bin</tt></b> under the name (say) <b><tt>cvs3</tt></b>:
  51. <blockquote><pre>
  52. #!/bin/sh
  53. exec env CVS_RSH=ssh cvs -z3 -d<em>{username}</em>@ghostscript.sourceforge.net:/home/groups/ghostscript/cvs "$@"
  54. </pre></blockquote>
  55. <p>
  56. where <em>{username}</em> is your SourceForge user name. The relevant
  57. directories in this tree are called
  58. <blockquote><pre>
  59. bug-data/<em>{bug#}</em>/<em>{file}</em>
  60. </pre></blockquote>
  61. The file named <tt>report</tt> should contain any bug report information
  62. (such as the name or company of the original submitter) that shouldn't be
  63. included in the public bug posting, if needed. For example, the contents of
  64. <tt>bug-data/102146/</tt> are
  65. <blockquote><pre>
  66. bp-dist.pdf bp-gs.pdf bp.ps report
  67. </pre></blockquote>
  68. <p>
  69. Assuming you keep a local checked-out copy of the private CVS tree under a
  70. directory named <b><tt>sf</tt></b>, the procedure for creating the structure
  71. for bug # 109999 with an uploaded data file might look like this:
  72. <blockquote><pre>
  73. cd sf/bug-data
  74. mkdir 109999
  75. cvs3 add 109999
  76. <em>If a report file is required:</em>
  77. <em>Create report file as </em><tt>109999/report</tt>
  78. cvs3 add 109999/report
  79. <em>If test files are required:</em>
  80. <em>Copy test file to </em><tt>109999/xyz</tt>
  81. cvs3 add 109999/xyz
  82. <em>etc.</em>
  83. cvs3 commit
  84. </pre></blockquote>
  85. <hr>
  86. <h2><a name="CVS"></a>Rules for CVS Commits</h2>
  87. <p>
  88. <a href="http://sourceforge.net/cvs/?group_id=1897"
  89. class="offsite">Sourceforge
  90. CVS</a> is the primary repository for Ghostscript code changes. This
  91. section describes a few rules intended to make life easier
  92. for people working with this code base.
  93. <p>
  94. At any given time, there are usually two active branches: a stable
  95. branch and a development branch. The development branch is HEAD, which
  96. is the default when doing a checkout without a -r flag. At the time of
  97. this writing (6 October 2000), the stable branch is tagged
  98. GS_6_5.
  99. <p>
  100. A concise and useful document for working with CVS branches is Jeff
  101. Semke's <a href="http://www.psc.edu/~semke/cvs_branches.html"
  102. class="offsite">CVS
  103. Branch and Tag Primer</a>. A
  104. somewhat more detailed explanation is the <a
  105. href="http://www.loria.fr/~molli/cvs/doc/cvs_5.html"
  106. class="offsite">Branching and
  107. merging</a> section from the CVS documentation by Pascal Molli.
  108. <p>
  109. For new development commits, you can basically ignore the
  110. branches. Just commit to the HEAD branch. For bug fixes for the stable
  111. branch, it is your responsibility to commit to both the stable branch
  112. and, if appropriate, HEAD. Commits to HEAD are appropriate if they are
  113. in an area not being actively reworked, if the development version
  114. exhibits the same bug symptoms, and if the patch fixes these
  115. symptoms.
  116. <p>
  117. When modifying a number of files for a single issue, please group them
  118. together as a single commit. For two separate sets of changes dealing
  119. with two different issues, there should be two commits.
  120. <p>
  121. You should strive not to introduce any new bugs with your
  122. commit. Always make sure the code compiles before committing. Test the
  123. changes with several files, including the problem file in the case of
  124. a bug fix, and other files that may have been affected by the
  125. changes.
  126. <p>
  127. Always supply a descriptive log message for your commits. These log
  128. messages are used to automatically generate the <a
  129. href="News.htm">News.htm</a> file and History changelogs, and are also
  130. crucial for navigating CVS using the CVSweb gateway. Please try to
  131. keep the style of the descriptions similar to those in the current
  132. History#.htm files.
  133. <p>
  134. Log messages beginning with 'Fix' are treated specially. Such messages are
  135. put under the "Fixes problems" heading when the History files are
  136. generated. Additionally, if the first four characters are 'Fix:' this is removed
  137. (i.e., "Fix: The xyz" becomes "The xyz", but "Fixes xyz" is copied unchanged).
  138. This feature is intended for explicit bugfixes and should be avoided for
  139. enhancements or commits with long explanations.
  140. <p>
  141. Information about who changed what, when, and why is maintained in the
  142. CVS logs. In general, a file should be a clean representation of the
  143. current version rather than a history trail of how it got
  144. there. Keeping old code around for reference is usually not necessary,
  145. as it is stored in the CVS diffs. When necessary, use #if / #endif, or
  146. descriptive conditionals such as #ifdef OLD_CMAP_TABLES. Do not
  147. comment out old code. (A very few files that are distributed separate
  148. from Ghostscript have a change log at the beginning, which should be
  149. maintained: currently, only ansiknr.c and md5.[ch].)
  150. <p>
  151. Additionally, if your patch removes a feature, changes an interface or
  152. otherwise creates an incompatibility with the last release, you
  153. must add an entry to the "Incompatible changes" section of <tt>News.htm</tt>
  154. as this information can only be generated manually.
  155. This admonition applies to api changes that might
  156. affect other developers as well as user issues like switch behavior.
  157. Upon release, the accumulated incompatible changes will be moved to the
  158. relevant History file, and the News collection in cvs will be wiped clean
  159. for the next version.
  160. <p>
  161. All patches must be reviewed before being committed. Please email your
  162. patch to <a
  163. href="mailto:gs-code-review@ghostscript.com">gs-code-review@ghostscript.com</a>.
  164. Make sure to include your commit comment and any other information
  165. that would be helpful for the review. Also, please identify which
  166. branches the patch is intended for.
  167. <p>
  168. If you are not an employee or consultant of Artifex or artofcode, then
  169. we need a copyright assignment form so we can incorporate your
  170. changes. Please email Raph Levien &lt;<a
  171. href="mailto:raph@artofcode.com">raph@artofcode.com</a>&gt; and
  172. include your snailmail address for a hardcopy assignment form.
  173. <h2><a name="Adding_or_removing_files"></a>Adding or removing files</h2>
  174. <p>
  175. When adding or removing files, don't forget to invoke <b><tt>cvs
  176. add</tt></b> or <b><tt>cvs rm</tt></b>.
  177. <p>
  178. When adding files, update the file roadmap in
  179. <b><tt>doc/Develop.htm</tt></b>.
  180. <p>
  181. When adding or removing files other than .c or .h: If the files will be
  182. used at runtime, check the install list in <b><tt>unixinst.mak</tt></b>.
  183. <p>
  184. When adding .c files, update the relevant <b><tt>.mak</tt></b> file
  185. (usually <b><tt>devs.mak</tt></b>, <b><tt>int.mak</tt></b>, or
  186. <b><tt>lib.mak</tt></b>).
  187. <p>
  188. When adding new documentation, add a link to <tt>doc/Readme.htm</tt> and
  189. a short blurb describing the contents of the file.
  190. <p>
  191. When adding or changing fonts, update <b><tt>lib/Fontmap.GS</tt></b>,
  192. <b><tt>fonts.mak</tt></b>, and possibly the compiled fonts in
  193. <b><tt>gs.mak</tt></b> and the examples in
  194. <b><tt>doc/Fonts.htm</tt></b>.
  195. <p>
  196. When adding .ps files, update <b><tt>doc/Psfiles.htm</tt></b>.
  197. <p>
  198. Likewise, you will want to delete any references for a file you
  199. remove from Ghostscript.
  200. <!-- [2.0 end contents] ==================================================== -->
  201. <!-- [3.0 begin visible trailer] =========================================== -->
  202. <hr>
  203. <p>
  204. <small>Copyright &copy; 2000 artofcode LLC.
  205. All rights reserved.</small>
  206. <p>
  207. <small>This file is part of AFPL Ghostscript. See the <a
  208. href="Public.htm">Aladdin Free Public License</a> (the "License") for full
  209. details of the terms of using, copying, modifying, and redistributing
  210. AFPL Ghostscript.</small>
  211. <p>
  212. <small>Ghostscript version 7.04, 31 January 2002
  213. <!-- [3.0 end visible trailer] ============================================= -->
  214. </body>
  215. </html>