xref: /plan9/sys/src/cmd/gs/doc/Maintain.htm (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
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.50 2005/10/20 19:46:23 ray Exp $ -->
6<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
7</head>
8
9<body>
10<!-- [1.0 begin visible header] ============================================ -->
11
12<!-- [1.1 begin headline] ================================================== -->
13
14<h1>AFPL Ghostscript maintenance procedures</h1>
15
16<!-- [1.1 end headline] ==================================================== -->
17
18<!-- [1.2 begin table of contents] ========================================= -->
19
20<h2>Table of contents</h2>
21
22<blockquote><ul>
23<li><a href="#Introduction">Introduction</a>
24<li><a href="#Problem_reporting">Problem reporting</a>
25<ul>
26<li><a href="#Uploading_test_data">Uploading test data</a>
27</ul>
28<li><a href="#CVS">Rules for CVS commits</a>
29<li><a href="#Adding_or_removing_files">Adding or Removing Files</a>
30</ul></blockquote>
31
32<!-- [1.2 end table of contents] =========================================== -->
33
34<!-- [1.3 begin hint] ====================================================== -->
35
36<p>For other information, see the <a href="Readme.htm">Ghostscript
37overview</a> and the instructions on how to <a href="Make.htm">build
38Ghostscript</a>.
39
40<!-- [1.3 end hint] ======================================================== -->
41
42<hr>
43
44<!-- [1.0 end visible header] ============================================== -->
45
46<!-- [2.0 begin contents] ================================================== -->
47
48<h2><a name="Introduction"></a>Introduction</h2>
49
50<p>
51This document describes various maintenance procedures associated with AFPL
52Ghostscript.  It is only meant for developers actively working on AFPL
53Ghostscript; some parts of it are only relevant to developers who have
54commit access to the source repository.
55
56<hr>
57
58<h2><a name="Problem_reporting"></a>Problem reporting</h2>
59
60<h3><a name="#Uploading_test_data"></a>Uploading test data</h3>
61
62<p>
63If a test file can't be attached to the report in the public
64bug tracking system, put it in <tt>casper:/home/support/<bug number>/</tt>.
65This is a good place to collect test files of all kinds.
66
67<hr>
68
69<h2><a name="CVS"></a>Rules for CVS Commits</h2>
70
71<p>
72The primary repository for Ghostscript code is
73<a href="http://cvs.ghostscript.com" class="offsite">cvs.ghostscript.com</a>
74This section describes a few rules intended to make life easier
75for people working with this code base.
76
77<p>
78At any given time, there are usually two active branches: a stable
79branch and a development branch. The development branch is HEAD, which
80is the default when doing a checkout without a -r flag. The stable
81branch is tagged after the previous major release. For example:
82GS_8_0x, GS_7_0x, GS_6_5.
83
84<p>
85A concise and useful document for working with CVS branches is Jeff
86Semke's <a href="http://www.psc.edu/~semke/cvs_branches.html"
87class="offsite">CVS
88Branch and Tag Primer</a>. A
89somewhat more detailed explanation is the <a
90href="http://www.loria.fr/~molli/cvs/doc/cvs_5.html"
91class="offsite">Branching and
92merging</a> section from the CVS documentation by Pascal Molli.
93
94<p>
95For new development commits, you can basically ignore the
96branches. Just commit to the HEAD branch. For bug fixes for the stable
97branch, it is your responsibility to commit to both the stable branch
98and, if appropriate, HEAD.
99
100<p>
101When modifying a number of files for a single issue, please group them
102together as a single commit. For two separate sets of changes dealing
103with two different issues, there should be two commits.
104
105<p>
106You should strive not to introduce any new bugs with your
107commit. Always make sure the code compiles before committing. Test the
108changes with several files, including the problem file in the case of
109a bug fix, and other files that may have been affected by the
110changes.
111
112<p>
113Always supply a descriptive log message for your commits. These log
114messages are used to automatically generate the <a
115href="News.htm">News.htm</a> file and History changelogs, and are also
116crucial for navigating the change history. Please try to
117keep the style of the descriptions similar to those in the current
118History#.htm files.
119
120<p>
121Log messages beginning with 'Fix' are treated specially. Such messages are
122put under the "Fixes problems" heading when the History files are
123generated. Additionally, if the first four characters are 'Fix:' this is removed
124(i.e., "Fix: The xyz" becomes "The xyz", but "Fixes xyz" is copied unchanged).
125This feature is intended for explicit bugfixes and should be avoided for
126enhancements or commits with long explanations.
127
128<p>
129Information about who changed what, when, and why is maintained in the
130CVS logs. In general, a file should be a clean representation of the
131current version rather than a history trail of how it got
132there. Keeping old code around for reference is usually not necessary,
133as it is stored in the CVS diffs. When necessary, use #if / #endif, or
134descriptive conditionals such as #ifdef OLD_CMAP_TABLES. Do not
135comment out old code. (A very few files that are distributed separate
136from Ghostscript have a change log at the beginning, which should be
137maintained: currently, only ansiknr.c and md5.[ch].)
138
139<p>
140Additionally, if your patch removes a feature, changes an interface or
141otherwise creates an incompatibility with the last release, you
142must add an entry to the "Incompatible changes" section of <tt>News.htm</tt>
143as this information can only be generated manually.
144This admonition applies to api changes that might
145affect other developers as well as user issues like switch behavior.
146Upon release, the accumulated incompatible changes will be moved to the
147relevant History file, and the News collection in cvs will be wiped clean
148for the next version.
149
150<p>
151All patches should be reviewed before being committed. Please email your
152patch to <a
153href="mailto:gs-code-review@ghostscript.com">gs-code-review@ghostscript.com</a>.
154Make sure to include your commit comment and any other information
155that would be helpful for the review. Also, please identify which
156branches the patch is intended for. The code review list is also
157a good place to put extensive documentation on changes (motivation and
158associated reasoning for example) that are too verbose for the cvs
159changelog.
160
161<p>
162If you are not an employee or consultant of Artifex or artofcode, then
163we need a copyright assignment form so we can incorporate your
164changes. Please email Raph Levien &lt;<a
165href="mailto:raph@artofcode.com">raph@artofcode.com</a>&gt; and
166include your snailmail address for a hardcopy assignment form.
167
168<h2><a name="Adding_or_removing_files"></a>Adding or removing files</h2>
169
170<p>
171When adding or removing files, don't forget to invoke <b><tt>cvs
172add</tt></b> or <b><tt>cvs rm</tt></b>.
173
174<p>
175When adding files, update the file roadmap in
176<b><tt>doc/Develop.htm</tt></b>.
177
178<p>
179When adding or removing files other than .c or .h: If the files will be
180used at runtime, check the install list in <b><tt>unixinst.mak</tt></b>.
181
182<p>
183When adding .c files, update the relevant <b><tt>.mak</tt></b> file
184(usually <b><tt>devs.mak</tt></b>, <b><tt>int.mak</tt></b>, or
185<b><tt>lib.mak</tt></b>).
186
187<p>
188When adding new documentation, add a link to <tt>doc/Readme.htm</tt> and
189a short blurb describing the contents of the file.
190
191<p>
192When adding or changing fonts, update <b><tt>lib/Fontmap.GS</tt></b>,
193<b><tt>fonts.mak</tt></b>, and possibly the compiled fonts in
194<b><tt>gs.mak</tt></b> and the examples in
195<b><tt>doc/Fonts.htm</tt></b>.
196
197<p>
198When adding .ps files, update <b><tt>doc/Psfiles.htm</tt></b>.
199
200<p>
201Likewise, you will want to delete any references for a file you
202remove from Ghostscript.
203
204<!-- [2.0 end contents] ==================================================== -->
205
206<!-- [3.0 begin visible trailer] =========================================== -->
207<hr>
208
209<p>
210<small>Copyright &copy; 2000-2002 artofcode LLC.
211All rights reserved.</small>
212
213<p>
214This software is provided AS-IS with no warranty, either express or
215implied.
216
217This software is distributed under license and may not be copied,
218modified or distributed except as expressly authorized under the terms
219of the license contained in the file LICENSE in this distribution.
220
221For more information about licensing, please refer to
222http://www.ghostscript.com/licensing/. For information on
223commercial licensing, go to http://www.artifex.com/licensing/ or
224contact Artifex Software, Inc., 101 Lucas Valley Road #110,
225San Rafael, CA  94903, U.S.A., +1(415)492-9861.
226
227<p>
228<small>Ghostscript version 8.53, 20 October 2005
229
230<!-- [3.0 end visible trailer] ============================================= -->
231
232</body>
233</html>
234