3 <META NAME="DOCNUMBER" CONTENT="CUPS-CMP-1.1">
4 <META NAME="COPYRIGHT" CONTENT="Copyright 1997-2001, All Rights Reserved">
5 <META NAME="Author" CONTENT="Easy Software Products">
6 <TITLE>CUPS Configuration Management Plan</TITLE>
12 <H2>Identification</H2>
14 This configuration management plan document provides the guidelines for
15 development and maintenance of the Common UNIX Printing System ("CUPS")
18 <EMBED SRC="system-overview.shtml">
20 <H2>Document Overview</H2>
22 This configuration management document is organized into the following
27 <LI>2 - References</LI>
28 <LI>3 - File Management</LI>
29 <LI>4 - Trouble Report Processing</LI>
30 <LI>5 - Software Releases</LI>
32 <LI>B - Coding Requirements</LI>
35 <EMBED SRC="references.shtml">
37 <H1>File Management</H1>
39 <H2>Directory Structure</H2>
41 Each source file shall be placed a sub-directory corresponding to the software
42 sub-system it belongs to ("scheduler", "cups", etc.) To remain compatible
43 with older UNIX filesystems, directory names shall not exceed 16 characters
48 Source files shall be documented and formatted as described in Appendix
49 B, Coding Requirements.
51 <H2>Configuration Management</H2>
53 Source files shall be placed under the control of the Concurrent Versions
54 System ("CVS") software. Source files shall be "checked in" with each change
55 so that modifications can be tracked.
57 <P>Documentation on the CVS software is included with the whitepaper, "CVS
58 II: Parallelizing Software Development".
60 <H1>Trouble Report Processing</H1>
62 A Software Trouble Report ("STR") shall be submitted every time a user
63 or vendor experiences a problem with the CUPS software. Trouble reports
64 are maintained in a database with one of the following states:
67 <LI>STR is closed with complete resolution</LI>
68 <LI>STR is closed without resolution</LI>
69 <LI>STR is active</LI>
70 <LI>STR is pending (new STR or additional information available)</LI>
73 Trouble reports shall be processed using the following steps.
75 <H2>Classification</H2>
77 When a trouble report is received it must be classified at one of the following
81 <LI>Request for enhancement</LI>
82 <LI>Documentation error</LI>
83 <LI>Unable to print a file</LI>
84 <LI>Unable to print to a printer</LI>
85 <LI>Unable to print at all</LI>
88 The scope of the problem should also be determined as:
91 <LI>Specific to a machine</LI>
92 <LI>Specific to an operating system</LI>
93 <LI>Applies to all machines and operating systems</LI>
96 <H2>Identification</H2>
98 Once the level and scope of the trouble report is determined the software
99 sub-system(s) involved with the problem are determined. This may involve
100 additional communication with the user or vendor to isolate the problem
103 <P>When the sub-system(s) involved have been identified, an engineer will
104 then determine the change(s) needed and estimate the time required for
109 Corrections are scheduled based upon the severity and complexity of the
110 problem. Once all changes have been made, documented, and tested successfully
111 a new software release snapshot is generated. Additional tests are added
112 as necessary for proper testing of the changes.
114 <H2>Notification</H2>
116 The user or vendor is notified when the fix is available or if the problem
117 was caused by user error.
119 <H1>Software Releases</H1>
121 <H2>Version Numbering</H2>
123 CUPS uses a three-part version number separated by periods to represent
124 the major, minor, and patch release numbers:
133 Beta-test releases are indentified by appending the letter B followed by
138 major.minor.patchbbuild
143 A CVS snapshot is generated for every beta and final release and uses
144 the version number preceded by the letter "v" and with the decimal
145 points replaced by underscores:
154 Each change that corrects a fault in a software sub-system increments the
155 patch release number. If a change affects the software design of CUPS then
156 the minor release number will be incremented and the patch release number
157 reset to 0. If CUPS is completely redesigned the major release number will
158 be incremented and the minor and patch release numbers reset to 0:
162 1.1.0b1 First beta release
163 1.1.0b2 Second beta release
164 1.1.0 First production release
165 1.1.1b1 First beta of 1.1.1
166 1.1.1 Production release of 1.1.1
167 1.1.1b1 First beta of 1.1.1
168 1.1.1 Production release of 1.1.1
169 2.0.0b1 First beta of 2.0.0
170 2.0.0 Production release of 2.0.0
176 Software releases shall be generated for each successfully completed software
177 trouble report. All object and executable files shall be deleted prior
178 to performing a full build to ensure that source files are recompiled.
182 Software testing shall be conducted according to the CUPS Software Test
183 Plan, CUPS-STP-1.1. Failed tests cause STRs to be generated to correct
188 When testing has been completed successfully a new distribution image is
189 created from the current CVS code "snapshot". No production release shall
190 contain software that has not passed the appropriate software tests.
192 <EMBED SRC="glossary.shtml">
194 <H1>Coding Requirements</H1>
196 These coding requirements provide detailed information on source file
197 formatting and documentation content. These guidelines shall be applied
198 to all C and C++ source files provided with CUPS.
200 <H2>Source Files</H2>
204 All source files names shall be 16 characters or less in length to
205 ensure compatibility with older UNIX filesystems. Source files
206 containing functions shall have an extension of ".c" for ANSI C and
207 ".cxx" for C++ source files. All other "include" files shall have an
210 <H3>Documentation</H3>
212 The top of each source file shall contain a header giving the name of the
213 file, the purpose or nature of the source file, the copyright and licensing
214 notice, and the functions contained in the file. The file name and revision
215 information is provided by the CVS "$Id$" tag:
222 * Description of file contents.
224 * Copyright 1997-2001 by Easy Software Products, all rights
227 * These coded instructions, statements, and computer programs are
228 * the property of Easy Software Products and are protected by
229 * Federal copyright law. Distribution and use rights are outlined
230 * in the file "LICENSE.txt" which should have been included with
231 * this file. If this file is missing or damaged please contact
232 * Easy Software Products at:
234 * Attn: CUPS Licensing Information
235 * Easy Software Products
236 * 44141 Airport View Drive, Suite 204
237 * Hollywood, Maryland 20636-3111 USA
239 * Voice: (301) 373-9600
240 * EMail: cups-info@cups.org
241 * WWW: http://www.cups.org
245 * function1() - Description 1.
246 * function2() - Description 2.
247 * function3() - Description 3.
252 The bottom of each source file shall contain a trailer giving the name
253 of the file using the CVS "$Id$" tag. The primary purpose of this is to
254 mark the end of a source file; if the trailer is missing it is possible
255 that code has been lost near the end of the file:
269 Functions with a global scope shall be capitalized ("DoThis", "DoThat",
270 "DoSomethingElse", etc.) The only exception to this rule shall be the
271 CUPS interface library functions which may begin with a prefix word in
272 lowercase ("cupsDoThis", "cupsDoThat", etc.)
274 <P>Functions with a local scope shall be declared "static" and be lowercase
275 with underscores between words ("do_this", "do_that", "do_something_else",
278 <H3>Documentation</H3>
280 Each function shall begin with a comment header describing what the function
281 does, the possible input limits (if any), and the possible output values
282 (if any), and any special information needed:
287 * 'do_this()' - Compute y = this(x).
292 static float /* O - Inverse power value, 0.0 <= y <= 1.1 */
293 do_this(float x) /* I - Power value (0.0 <= x <= 1.1) */
305 Methods shall be in lowercase with underscores between words ("do_this",
306 "do_that", "do_something_else", etc.)
308 <H3>Documentation</H3>
310 Each method shall begin with a comment header describing what the method
311 does, the possible input limits (if any), and the possible output values
312 (if any), and any special information needed:
317 * 'class::do_this()' - Compute y = this(x).
322 float /* O - Inverse power value, 0.0 <= y <= 1.0 */
323 class::do_this(float x) /* I - Power value (0.0 <= x <= 1.0) */
335 Variables with a global scope shall be capitalized ("ThisVariable",
336 "ThatVariable", "ThisStateVariable", etc.) The only exception to this
337 rule shall be the CUPS interface library global variables which must
338 begin with the prefix "cups" ("cupsThisVariable", "cupsThatVariable",
339 etc.) Global variables shall be replaced by function arguments whenever
342 <P>Variables with a local scope shall be lowercase with underscores between
343 words ("this_variable", "that_variable", etc.) Any local variables shared
344 by functions within a source file shall be declared "static".
346 <H3>Documentation</H3>
348 Each variable shall be declared on a separate line and shall be immediately
349 followed by a comment block describing the variable:
352 int this_variable; /* The current state of this */
353 int that_variable; /* The current state of that */
360 All type names shall be lowercase with underscores between words and
361 "_t" appended to the end of the name ("this_type_t", "that_type_t",
364 <H3>Documentation</H3>
366 Each type shall have a comment block immediately before the typedef:
371 * This type is for CUPS foobar options.
373 typedef int cups_this_type_t;
381 All structure names shall be lowercase with underscores between words and
382 "_str" appended to the end of the name ("this_struct_str", "that_struct_str",
385 <H3>Documentation</H3>
387 Each structure shall have a comment block immediately before the struct
388 and each member shall be documented in accordance with the variable naming
394 * This structure is for CUPS foobar options.
396 struct cups_this_struct_str
398 int this_member; /* Current state for this */
399 int that_member; /* Current state for that */
408 All class names shall be lowercase with underscores between words
409 ("this_class", "that_class", etc.)
411 <H3>Documentation</H3>
413 Each class shall have a comment block immediately before the class
414 and each member shall be documented in accordance with the variable naming
420 * This class is for CUPS foobar options.
422 class cups_this_class
424 int this_member; /* Current state for this */
425 int that_member; /* Current state for that */
434 All constant names shall be uppercase with underscored between words
435 ("THIS_CONSTANT", "THAT_CONSTANT", etc.) Constants defined for the CUPS
436 interface library must begin with an uppercase prefix
437 ("CUPS_THIS_CONSTANT", "CUPS_THAT_CONSTANT", etc.)
439 <P>Typed enumerations shall be used whenever possible to allow for type
440 checking by the compiler.
442 <H3>Documentation</H3>
444 Comment blocks shall immediately follow each constant:
450 CUPS_THIS_TRAY, /* This tray */
451 CUPS_THAT_TRAY /* That tray */
458 <H3>Documentation</H3>
460 All source code shall utilize block comments within functions to describe
461 the operations being performed by a group of statements:
466 * Clear the state array before we begin...
469 for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
470 array[i] = STATE_IDLE;
473 * Wait for state changes...
478 for (i = 0; i < (sizeof(array) / sizeof(sizeof(array[0])); i ++)
479 if (array[i] != STATE_IDLE)
482 if (i == (sizeof(array) / sizeof(array[0])))
484 } while (i == (sizeof(array) / sizeof(array[0])));
490 <H4 TYPE="a">Indentation</H4>
492 All code blocks enclosed by brackets shall begin with the opening brace
493 on a new line. The code then follows starting on a new line after the brace
494 and is indented 2 spaces. The closing brace is then placed on a new line
495 following the code at the original indentation:
500 int i; /* Looping var */
503 * Process foobar values from 0 to 999...
506 for (i = 0; i < 1000; i ++)
515 Single-line statements following "do", "else", "for", "if", and "while"
516 shall be indented 2 spaces as well. Blocks of code in a "switch" block
517 shall be indented 4 spaces after each "case" and "default" case:
536 A space shall follow each reserved word ("if", "while", etc.) Spaces shall
537 not be inserted between a function name and the arguments in parenthesis.
539 <H4>Return Values</H4>
541 Parenthesis shall surround values returned from a function using "return":
551 Whenever convenient loops should count downward to zero to improve program
556 for (i = sizeof(array) / sizeof(array[0]) - 1; i >= 0; i --)
557 array[i] = STATE_IDLE;
561 <H1 ALIGN=RIGHT>Software Trouble Report Form</H1>
563 <CENTER><TABLE WIDTH="80%">
565 <TH ALIGN=RIGHT>Summary of Problem:</TH>
566 <TD ALIGN=LEFT>________________________________________</TD>
570 <TH ALIGN=RIGHT>Problem Severity:</TH>
571 <TD ALIGN=LEFT>__1=RFE
572 <BR>__2=Documentation-Error
573 <BR>__3=Unable-to-Print-a-File
574 <BR>__4=Unable-to-Print-to-a-Printer
575 <BR>__5=Unable-to-Print-at-All</TD>
579 <TH ALIGN=RIGHT>Problem Scope:</TH>
580 <TD ALIGN=LEFT>__1=Machine __2=Operating-System __3=All</TD>
584 <TH ALIGN=RIGHT VALIGN=TOP>Detailed Description of Problem:</TH>
585 <TD ALIGN=LEFT>________________________________________
586 <BR>________________________________________
587 <BR>________________________________________
588 <BR>________________________________________
589 <BR>________________________________________
590 <BR>________________________________________</TD>