Debian Codegraph @

winfo/CVSdocs/release-cvs.shtml

raw
1 <!--#config timefmt="%d-%b-%C%y, %I:%M %p" -->
2 <!--#set var="title" value="Management of the Acedb releases" -->
3 <!--#set var="icon" value="acedb.gif" -->
4 <!--#set var="author" value="fw" -->
5 <!--#set var="keywords" value="acedb, CVS, source code control, change management, branch, patches" -->
6 <!--#set var="description" value="Information about how to use the CVS source code repository for making releases and bug-fix patches." -->
7
8 <!--#exec cgi="/cgi-bin/header" -->
9
10 <H1 ALIGN=CENTER> Management of the Acedb releases </H1>
11
12 Ensure these three environmental variables are set correctly.
13
14 <PRE>
15 <B>CVSROOT</B> /nfs/disk100/acedb/CVS_ACEDB
16 <B>CVSEDITOR</B> emacs
17 <B>CVSREAD</B>
18 </PRE>
19
20 <HR>
21
22 <H2>Make a release from the main branch</H2>
23
24 <P>The current development is happening in acedb version "4.8". The
25 number 4 is the version number, and '8' is the release number.
26 We use even release numbers for the inhouse development, and odd release
27 numbers for the public releases. (e.g. 4.5 or 4.7)</P>
28
29 <P>The next public release will carry the acedb-version stamp "4.9", which
30 will be a stable and tested version of our 4.8 development tree.
31 These instructions are for the case that we will officially release
32 that version 4.9 into the public domain. </P>
33
34 <P><B>Note</B>, that the words <I>check in</I> and <I>check out</I> are used in
35 the way RCS used to deal with those actions, under CVS they have
36 slightly different meanings and the names of CVS commands don't match
37 the original meaning from RCS.</P>
38
39 <P>Check the file wnq/aceversion.c and make sure it shows the version
40 number that your release is about to carry. If not, edit the file and
41 check it back in.</P>
42
43 <P>Make sure all collaborators have checked in and tested their last set of changes
44 that are to be present in the release. Ask all of them to stop checking in changes
45 for the day the release is being made.</P>
46
47 <P>Note that they can start checking out files and continue to work on new things
48 for the next release straight away, just keep everybody from checking files back in for
49 a half a day or so.</P>
50
51 <P>All of the following instructions should be carried out on a disk
52 with quite a bit of disk-space left.</P>
53
54 <PRE>
55 % mkdir acedb4_9
56 % cd acedb4_9
57 % cvs checkout `cat $CVSROOT/DIRECTORIES.full-release`
58 % ln -s wmake/makefile .
59 </PRE>
60
61 <P>This will give you a working copy of the up-to-date status of the repository.
62 You are hereby duplicating your working directory in a different directory.</P>
63
64 <P>The advantage is that you'll only be given files that have a current entry in the repository.
65 All those files like emacs leftovers (<CODE>#filename.c#</CODE> or <CODE>filename.c~</CODE>)
66 are thereby excluded from that new working copy.</P>
67
68 <P>You are now ready to freeze the source code tree in the version
69 that you have just retrieved :</P>
70
71 <PRE>
72 % cvs tag RELEASE-4_9 `cat $CVSROOT/DIRECTORIES.full-release`
73 </PRE>
74
75 The CVS manual explains this command as follows:
76
77 <I>
78 <P>Use this command to assign symbolic tags to the nearest repository
79 versions to your working sources. The tags are applied immediately to
80 the repository ...</P>
81
82 <P>One use for tags is to record a snapshot of the current sources
83 when the software freeze date of a project arrives. As bugs are fixed
84 after the freeze, only those changed sources that are to be part of
85 the release need to be re-tagged.</P>
86
87 <P>The symbolic tags are meant to permanently record which revisions
88 of which files were used in creating a software distribution. The
89 <B>checkout</B> and <B>update</B> commands allow you to extract an
90 exact copy of a tagged release at any time in the future, regardless
91 of whether files have been changed, added, or removed since the
92 release was tagged.</P>
93 </I>
94
95 <P>This working copy you have is now exactly what the release is going to
96 contain. Please do not run the tag command on your own everyday working copy
97 as it may contain temporary files or your local versions may not
98 be exactly what's represented in the repository. We have experienced
99 problem with tagging local working copies, so <B>please</B> make
100 sure you tag a working copy that you have just pulled out of the repository.</P>
101
102 <P>The temporary <CODE>acedb4_9/</CODE> working directory can be
103 removed. It was only used to tag the repository more precisely.
104 Now that the tag is in the CVS system, the files for the release can be
105 pulled out of the repository directly based on the
106 version tag in the CVS tree.</P>
107
108 <P>The repository is now in a post-release state, which increases the
109 current minor release number by one to the next even number. The
110 post-release state is therefor reflected by the even number, which
111 marks the latest version of the repository as an inhouse development
112 version.<P>
113
114 <P>Go to your normal working copy and ...
115 <PRE>
116 update your normal working copy from the repository.
117 check out <CODE>wnq/aceversion.c</CODE>
118 edit the ACEDB_RELEASE number to be the next even number ('10' in this example)
119 check the file back in
120 </PRE>
121
122 <P>Now is a good time to ask every collaborator to <B>update their normal working copy</B>
123 of the main-trunk as the tagging is complete now. They are now free to
124 continue working on the tree, but all edits from now on won't be part
125 of this new release.</P>
126
127
128
129 <P>Now tar up the directories and pre-compile the binaries as usual.
130 I will describe a tried and tested way that works for me.</P>
131
132 <P>Log in as user 'acedb'. You will now have access to a set of
133 commands in ~acedb/cvs_scripts/ . I use the script <CODE>makerelease</CODE>
134 which will compile the specified release. Type :</P>
135 <PRE>
136 % makerelease 4_9 4_8 &lt;username&gt;
137 </PRE>
138
139 <P>This command will extract the previously tagged version of the source
140 tree (i.e. <CODE>RELEASE-4_9</CODE>) from the repository and compile
141 a set of given programs. It uses the same script used in the overnight-build
142 to do this. The resulting directories will be
143 <PRE>
144 ~acedb/RELEASE.4_9/bin.ALPHA_4
145 bin.SOLARIS_4
146 ...
147 ~acedb/RELEASE.4_9.BUILD/w1
148 w2
149 w...
150 ...
151 </PRE>
152 <P>The second argument given to <CODE>makerelease</CODE> is the version-id
153 of the last release. This is used to create a file containing changes
154 between the current release and the previous one.<BR>
155 The third argument is your username, which will be used to mail
156 error reports to, if something goes wrong.
157 </P>
158
159
160 <BR>
161 <BR>
162
163 <H2>Applying bugfixes to an existing release</H2>
164
165 <P>Once a version has been frozen and released, you will probably receive
166 bug-reports from users. Without disturbing the main development it is possible
167 to fix those bugs in the released version and re-release a patched version.</P>
168
169 <P>If the bug fix is going to impact the current development code, apply and test the fix
170 there first. You will be working in your normal working directory, which you use with the
171 <A HREF="acedb-cvs.shtml">AC scripts</A>.</P>
172
173 <P>Carefully choose which changes are really necessary to be included in the patch-release,
174 simple changes that otherwise crash the program are a good candidate, but changes in the
175 layout of buttons or new functions should wait till the next major release.</P>
176
177 <P>First you need to create a branch from the main trunk of the tree which is rooted
178 at the previous release tag, in this case <CODE>RELEASE-4_9</CODE>. The commands are:</P>
179
180 <PRE>
181 % cd &lt;anywhere&gt;
182 % cvs rtag -b -r RELEASE-4_9 release-4_9-patches `cat $CVSROOT/DIRECTORIES.full-release`
183 </PRE>
184
185 This is what the CVS manual has to say about the last command :
186
187 <I>
188 <P>The <B>rtag</B> command can be used to create a branch. The
189 <B>rtag</B> command is much like <B>tag</B>, but it does not require
190 that you have a working copy of the module. ...</P>
191 <P>The '<B>-b</B>' flag makes <B>rtag</B> create a branch (rather than a symbolic revision name).
192 '<B>-r RELEASE-4_9</B>' says that this branch should be rooted at the node (in the revision tree) that
193 corresponds to the tag '<B>-r RELEASE-4_9</B>'. Note that the numeric revision number that matches '<B>-r RELEASE-4_9</B>'
194 will probably be different from file to file. The name of the new branch is '<B>-r RELEASE-4_9-patches</B>', ...</P>
195 </I>
196
197 To fix a problem with the public 4.9 release you need a working copy of the branch you've just created :
198
199 <PRE>
200 % mkdir acedb4_9-patches
201 % cd acedb4_9-patches
202 % cvs checkout -r RELEASE-4_9-patches `cat $CVSROOT/DIRECTORIES.full-release`
203 </PRE>
204
205 <P>All patch-level bugfixes happen in this working directory. The state
206 of this branch will be frosen at regular intervals, and the different stages
207 of the patch-branch will get the ACEDB_UPDATE letter 'a', 'b' 'c' etc.</P>
208
209 <P>Assume a user has reported a problem in
210 <CODE>w4/parse.c</CODE>. You know of a quick fix, but you have more
211 elaborate changes in mind for future releases. Apply all those
212 elaborate changes (which may involve restructuring modules, renaming
213 files etc.) in the main trunk of the development. This is the normal
214 working copy of your tree normally accessed by the <A
215 HREF="acedb-cvs.shtml">AC scripts</A>.</P>
216
217 <P>In order to apply the quick-fix version of the fix to the patch-branch, go to the
218 <CODE>acedb4_9-patches</CODE> working copy you've just created.</P>
219
220 <PRE>
221 % cd acedb4_9-patches/w4
222 % cvs edit parse.c
223 % emacs parse.c
224 ----- apply the quick fix in the file ------
225 % cvs commit parse.c
226 </PRE>
227
228 <P>If you want to more or less duplicate a main trunk change in the patch-branch, it is
229 helpful to use the split-screen mode of emacs, when you have a read-only main trunk
230 version in the left screen-half, and you're editing the checked out branch copy in the
231 right half, whilst comparing the two side-by-side.</P>
232
233 <P>Normal rules apply to this working directory of the patch-branch,
234 make sure you are up-to-date with the modifications other people are
235 making to the patch-branch. Communicate to other collaborators which
236 fixes should be applied and when. Keep a record of your fixes for the
237 <B>release notes</B>. It is important to maintain a <B>well-kept
238 changelog</B> for the patch-branch, so users know if there bug has been
239 fixed in the next patch level.</P>
240
241 <BR>
242 <BR>
243
244 <H2>Releasing a bug-fixed patch-version</H2>
245
246 Once you have applied all the necessary bug-fixes to patch-branch, it may be time to
247 release a patched version, In this case RELEASE-4_9a. You need to freeze the
248 current state of the branch and give this frozen state a letter code.
249
250 <PRE>
251 % cd acedb4_9-patches
252 % cvs edit wnq/aceversion.c
253 % emacs wnq/aceversion.c
254 ----- change ACEDB_UPDATE letter to 'a' ------
255 % cvs commit wnq/aceversion.c
256 % cvs tag RELEASE-4_9a `cat $CVSROOT/DIRECTORIES.full-release`
257 </PRE>
258
259
260 Now tar up the directories and pre-compile the binaries as usual, but this time
261 based on the new RELEASE-4_9a tag.
262 <PRE> -------- Instructions to follow ---------</PRE>
263
264
265 <P>The working copy of the patch-branch should be treated in the same way as the
266 normal working directory. That means all collaborators who have worked on patch-level
267 bug-fixes should update their working copy of the patch-branch.</P>
268
269 <PRE>
270 % cd acedb4_9-patches
271 % cvs update w*
272 </PRE>
273
274 <P>You can now apply more bugfixes and free the patch-branch some
275 other time, with a new update letter, and re-release by repeating the
276 steps above.</P>
277
278
279 <P><B>NOTE :</B> There will only ever be one patch branch per major release number, it's name
280 will be <CODE>&lt;public-release-tag&gt;<I>-patches</I></CODE>. The different states
281 of this branch are tagged as update-release 'a', 'b' 'c' etc.</P>
282
283 <BR><BR>
284
285 <!--#exec cgi="/cgi-bin/footer" -->
286
287
288