4 FVWM development uses a CVS server.
6 Note: the state of code in the CVS repository fluctuates wildly. It will
7 contain bugs, maybe ones that crash the program. It may not even compile for
8 you. Consider it alpha-quality code. You have been warned.
12 Before You Begin Initial Setup Checking Out Source Code Building The Tree
13 Code Updates Starting a Project Hacking the Code Conflicts Getting Commit
14 Access Committing Changes Adding Directories and Files Deleting Directories
15 and Files Renaming/Moving Files Creating New Branches Creating New Source
16 Trees Working on the fvwm-web Source Tree Before You Begin [top]
18 To know what is going in with the source tree you should be reading mail on
19 the Fvwm Workers List. See the Mailing List Info page for more information.
21 To build FVWM from the CVS sources, you must have several GNU tools:
23 the CVS client version 1.9 or better, GCC, GNU make, autoconf, version 2.13
24 or better, and automake, version 1.4 or better. Without these tools, you
25 won't be able to build out of the CVS source tree. But don't despair:
26 download one of the daily snapshots instead!
31 To make life easier on yourself, create the file `~/.cvsrc', and insert the
32 following lines. These set useful default options for the three most used
33 CVS commands. Do this now before going any further.
40 The last line makes cvs operations quieter, but you still get full error
43 Also, if you are on a slow net link (like a dialup), you'll also want a line
44 containing `cvs -z3' in this file. This turns on a useful compression level
45 for all cvs commands. Setting it higher will only waste your CPU time.
47 Before you can download development source code for the first time, you must
50 cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm login
52 The password is `guest'. The command outputs nothing if it works, and an
53 error message if it failed. You only need to log in once; all subsequent CVS
54 commands read the password stored in the file `~/.cvspass'.
56 CHECKING OUT SOURCE CODE
57 ------------------------
59 Next, you checkout the source code. First you must decide what version
60 you're interested in. The structure of the CVS tree is as follows:
62 The latest code is always available at the tip of the main branch. All
63 branches are labeled as branch-ver. So, for example, as development of the
64 2.3.x (latest) code continues on the main branch, a branch branch-2_2 has
65 been created for changes that would go into a 2.2.1 or future release. At
66 various points we decide to checkpoint the code with a version number
67 change; there is always a label associated with every version number as
68 well. The label will have the format version-ver; for example,
69 version-2_1_13 or version-2_2_1. Given these rules, you should be able to
70 translate the version of you want to retrieve to a label for use with the
71 checkout command below (or other CVS commands which might need them).
73 You use the CVS checkout (or co) command to retrieve an initial copy of the
74 code. The simplest form of this command, for retrieving the latest code,
75 doesn't require any label:
77 cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm checkout fvwm
79 This will create a new directory fvwm in your current directory, containing
80 the latest, up-to-the-minute code.
82 If you want to work on the latest code in the 2.2.x branch of the code, you
83 can use the branch label on the checkout command line:
85 cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm co -r branch-2_2 fvwm
87 This will put a copy of the very latest code on the 2.2.x branch into a
88 subdirectory fvwm. If you're going to be working on multiple branches at the
89 same time, or just feel like it, you can tell CVS to use a different name
90 for the directory with the checkout -d option:
92 cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm co -r branch-2_2 \
95 Now the code will be checked out into a directory fvwm-2.2.x rather than
96 fvwm. In this way you can keep multiple copies of the source around and
97 "active" simultaneously. (It is also permissible to just checkout into fvwm
98 and rename the directory yourself.)
100 Finally, if you want to see a particular version of the sources you can use
101 a version label instead of a branch label on the checkout command:
103 cvs -d :pserver:anonymous@cvs.fvwm.org:/home/cvs/fvwm co -r \
104 version-2_1_10 -d fvwm-2.1.10 fvwm
106 Please note that if you check out a specific version, the update command
107 will be useless in that copy: after all, the code for that version hasn't
108 changed so there's nothing to update...
110 The version and branch labels "stick" to your copy of the tree, so that if
111 you check out a branch, all update commands will be handled with respect to
112 that branch. These are called "sticky tags"; please see the CVS
113 documentation for more details on these and how they work, or how to
114 "un-stick" a checked out version if you need to.
116 Note that when you are inside the working directory, you no longer need the
117 "-d :pserver:..." argument when issuing CVS commands.
119 CVS commands work from anywhere inside the source tree, and recurse
120 downwards. So if you happen to issue an update from inside the `docs'
121 subdirectory it will work fine, but only update the docs. In all of the
122 following command examples, we assume that you have cd'd to the top of the
128 So, you now have a copy of the code. Get in there and get to work!
130 The first thing you need to do is create a configure script. The configure
131 script will also need the Makefile.in files in order to generate the
132 Makefiles. The autoconf and automake tools do this for you (you did remember
133 to install autoconf and automake, right?)
135 So, when you have a newly checked-out source tree the first thing to do is:
140 automake --add-missing
143 The last command is autoreconf, not autoconf. You will get some warning
144 messages from autoreconf and possibly from automake. As long as you end up
145 with a working configure script, you should ignore them.
147 To automate this step we include a shell script
149 utils/configure_dev.sh
151 in the cvs tree, it may be run with usual ./configure arguments instead of
152 all auto commands above.
154 Once that's done, you can proceed to build the code as discussed in the
155 INSTALL.fvwm and INSTALL files:
157 ./configure make make install
159 with appropriate options and arguments, as you like.
164 From time to time, the dedicated FVWM Workers will make changes to the CVS
165 repository. Announcements of this are automatically sent to the fvwm-workers
166 list. You will want to be subscribed to this list!
168 You can update your copy of the sources to match the master repository with
169 the update command. Note it's not necessary to check out a new copy! Using
170 update is significantly faster and simpler, as it will download only patches
171 instead of entire files, only update files that have changed since your last
172 update, and it will automatically merge any changes in the CVS repository
173 with any local changes you may have made.
177 If you didn't use a tag when you checked out, this will update your sources
178 to the latest version on the main branch. If you used a branch tag, it will
179 update to the latest version on that branch. If you used a version tag, it
180 won't do anything (see above).
182 After updating the local source directory, it is usually enough to issue
183 make to rebuild everything. It is safe to manually run aclocal, automake and
184 autoconf if you think something should be rebuilt, but this sould be run
185 automatically on make.
190 Discuss your ideas on the workers list before you start. Someone may be
191 working on the same thing you have in mind. Or they may have good ideas
192 about how to go about it.
194 If you just have a small patch you want to make, you may just commit it to
195 the main branch. If the change is large, and lots of other work is going on,
196 you may want to do your changes on a "side branch" which will get merged
197 into the main branch later on. Before creating a branch, you discuss the
198 matter with the other workers. If you are new to CVS, you should read the
199 CVS documentation several times, and ask for help. The documentation is
200 sufficiently large and confusing that it is rather difficult to get right
206 So you've found a bug you want to fix? Want to implement a feature from the
207 Jitterbug list? Got a new feature to implement? Hacking the code couldn't be
208 easier. Just edit your copy of the sources. No need to copy files to `.orig'
209 or anything; CVS has copies of the originals.
211 When you have the code in a working state, generate a patch against the
212 current sources in the CVS repository.
215 cvs diff -u > patchfile
217 Mail the patch to the fvwm-workers list with a description of what you did.
218 But read the FAQ file about ChangeLog entries before doing so.
223 If someone else has been working on the same files as you have, you may find
224 that you have made conflicting modifications. You'll discover this when you
225 try to update your sources.
228 RCS file: /home/cvs/fvwm/fvwm/fvwm/icons.c,v
229 retrieving revision 1.5
230 retrieving revision 1.6
231 Merging differences between 1.5 and 1.6 into icons.c
232 rcsmerge: warning: conflicts during merge
233 cvs server: conflicts found in fvwm/icons.c
236 Don't Panic! Your working file, as it existed before the update, is saved
237 under the filename `.#icons.c.1.5'; hence you can always recover it, should
238 things go horribly wrong. The file named `icons.c' now contains both the old
239 (i.e. your) version and new version of lines that conflicted. You simply
240 edit the file and resolve each conflict by deleting the unwanted version of
244 XpmImage my_image = {0}; /* testing */
248 Don't forget to delete the lines with all the "<", "=", and ">" symbols.
250 GETTING COMMIT ACCESS
251 ---------------------
253 Using the procedures described above, and being on the workers list are a
254 prerequisite to gaining update access. We expect to have heard from you more
255 than once on the fvwm-workers list so that we have some idea who you are.
257 Doing some testing, submitting some patches, and getting involved in the
258 discussions will help us know about you.
260 After you have been involved for a while, if we don't suggest it, then ask.
261 The FVWM development team is not a closed environment, we welcome new
262 members. There are no required duties, all work is strictly voluntary.
264 If there is agreement on the list that you should be given update access,
265 you will need to choose a CVS user ID and provide an encrypted password. The
266 latter can be obtained with the following Perl snippet:
268 perl -e 'print crypt("yourpass", join("", \
269 ((a..z, A..Z, 0..9)[rand(62), rand(62)]))), "\n"'
271 Change yourpass to whatever you want your password to be. Send the encrypted
272 password to Jason Tibbitts, (tibbs@math.uh.edu). Jason is the list
273 maintainer, and provides our CVS repository.
275 Once you have update access, re-do the login command above using your CVS
276 user ID in place of anonymous and your password in place of guest, and you
282 Now that you have write permissions and have logged in with your CVS
283 username, you can commit changes. This is done (surprise!) with the CVS
286 Note it's usually a good idea to run a cvs update just before you commit, to
287 make sure you've got the latest code. If you try to commit changes to a file
288 that someone else has changed since you last updated, CVS will complain and
289 not allow the commit. But, changes to other files could indirectly affect
290 your new code, as well. In general if you're doing development it really
291 pays to follow the old(?) adage, "Update early and often".
293 To commit all the modified files in your workspace, use:
297 CVS will pop up your favorite editor to allow you to enter comments about
298 what changes you've made. These comments will appear in the email sent to
299 fvwm-workers, so please write something useful.
301 Also, you will see a complete list of files that CVS thinks you have
302 changed. Please sanity-check this list! Make sure there's nothing you don't
303 expect there, and everything you do expect.
305 If you don't like the all-or-nothing approach, you can specify only certain
306 files to be committed:
308 cvs commit fvwm/fvwm.1 modules/FvwmAuto/FvwmAuto.1
310 Again, please sanity-check the list to be sure you have everything.
312 Adding Directories and Files [top]
314 First create the new directories and files locally. Then, assuming the new
315 directory is named `newdir' and the new file is `newmod.c':
317 cvs add -m "New directory for ..." newdir
319 cvs add -m "File newmod.c is a module that ..." newmod.c
321 When adding new directories and files, please be sure to take a look at the
322 relevant Makefile.am files and modify them as appropriate! See the
323 DEVELOPERS file for more details on this.
325 DELETING DIRECTORIES AND FILES
326 ------------------------------
328 You don't directly delete directories, you delete all the files in a
329 directory and the directory goes away during an `update -dP'. To delete one
332 cvs remove filename...
333 cvs commit -m 'deleted files because' filename...
335 Again, when removing directories or files please be sure to update the
336 appropriate Makefile.am files. See DEVELOPERS.
338 RENAMING/MOVING FILES
339 ---------------------
341 There is no perfect way to rename or move files in CVS. There are a few
342 different methods, each with good and bad points. For FVWM, we've chosen the
343 most straightforward method: remove the old file and add a new file. In
344 order to preserve some kind of link, please include a pointer to the old
345 file in the comments of the new file (and vice versa).
347 Again, when renaming or moving files please be sure to update the
348 appropriate Makefile.am files. See DEVELOPERS.
350 CREATING NEW BRANCHES
351 ---------------------
353 Please contact the fvwm-workers list and discuss any new branch you'd like
354 to create, just so we have an idea about what and why.
356 When creating a branch it's best to base it off of a previously-existing,
357 labeled checkpoint. Here we'll use the example of creating a new branch for
358 2.2.x development after the 2.2 release was made. Because of our rules, we
359 know that the new branch name should be branch-2_2, but if you're creating a
360 branch for a new feature you can use any valid label.
362 Once you know where you want to branch from and what you want to call the
363 new branch, use the cvs rtag command to create the branch (be sure you're in
364 the root of your checkout):
366 cvs rtag -b -r version-2_2_0 branch-2_2 .
368 The first thing you'll probably want to do on the new branch is edit the
369 configure.in file to change the version number, so people know it's
370 different. See the DEVELOPERS file for information on this.
372 CREATING NEW SOURCE TREES
373 -------------------------
375 Please contact the fvwm-workers list and discuss any new source trees you'd
376 like to create, just so we have an idea about what and why.
378 The source code for Fvwm is in the "fvwm" source tree. At the time this
379 sentence was written, (September, 1999), there were 1 more source tree,
382 If you have update access to "fvwm", you can also update the other source
383 trees and create new source trees.
385 WORKING ON THE FVWM-WEB SOURCE TREE
386 -----------------------------------
388 It's important to remember anything checked into the fvwm-web branch will
389 automatically appear on the fvwm web pages. Be careful to check your work
390 before you commit a change.
392 You can check to see what your changes will look like before a commit, by
393 using a "file:" URL to look at your changes with your browser. If you have
394 the fvwm-web source in /home/my/fvwm-web, your browser should be able to
395 view the source with the URL file:/home/my/fvwm-web. (This is one of the
396 reasons you want to use relative URLs to link one page to another.)
398 Some of the sub-directories in the fvwm-web branch can take a long time to
399 checkout or commit due to their large size. This is especially true over
400 dial-up connections. All of the CVS commands can be convinced to only work
401 on one directory or sub-directory by using the -l argument.
403 Some parts of the fvwm-web tree are generated from fvwm tree source files.
404 The generated files are in the directories:
408 fvwm-web/documentation/faq/
409 fvwm-web/documentation/manpages/
410 fvwm-web/documentation/perllib/
412 Each directory has a script generating one or more php files. You would normally
413 run these scripts (at least in the first 3 directories) whenever you made a
414 change to fvwm/NEWS, fvwm/docs/FAQ or fvwm/AUTHORS that you want to appear
415 on the fvwm web site. Instructions are in the scripts.