Working with SVN: Difference between revisions
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
== Tips for users wanting to contributing code == | == Tips for users wanting to contributing code == | ||
=== Code Standards=== | |||
=== Legal issues === | |||
==== Copyright ==== | |||
* The developer may keep copyright on submitted code | |||
* Please be sure to include copyright and licensing information in the header comments of your code so that others may know how they can use, extend, modify, and redistribute your work. | |||
* The developer is encouraged to assign co-copyright to the GRASS Development Team. This gives the GRASS project flexibility over the source code, without this the Team must contact all former developers before allowing a license change or confirming the original license. In a 20+ year old project, with often only a name and old email to go by, this becomes unworkable. | |||
===== Example ===== | |||
at the top of a shell script: | |||
#!/bin/sh | |||
############################################################################ | |||
# | |||
# MODULE: v.in.e00 | |||
# | |||
# AUTHOR(S): Markus Neteler, Otto Dassau | |||
# | |||
# PURPOSE: Import E00 data into a GRASS vector map | |||
# Imports single and split E00 files (.e00, .e01, .e02 ...) | |||
# | |||
# COPYRIGHT: (c) 2004, 2005 GDF Hannover bR, http://www.gdf-hannover.de | |||
# | |||
# This program is free software under the GNU General Public | |||
# License (>=v2). Read the file COPYING that comes with GRASS | |||
# for details. | |||
# | |||
############################################################################# | |||
==== Licensing ==== | |||
* GRASS uses the GNU General Public License (the GPL). | |||
==== Due diligence ==== | |||
* PSC RFC2 | |||
=== Code submission method === | |||
==== Preparing a patch ==== | |||
* create a unidiff patch against the latest development branch CVS | |||
==== Submitting it to the code tracker ==== | |||
* http://wald.intevation.org/projects/grass/ | |||
==== Announcing it on the GRASS Development mailing list ==== | |||
* http://grass.ibiblio.org/devel/index.php#list | |||
==== Getting help ==== | |||
* IRC | |||
== Tips for GRASS developers == | == Tips for GRASS developers == |
Revision as of 07:28, 7 December 2006
[I find the main grass website CVS help pages many, complex, and confusing. So trying to start over here with a more consise help page]
Tips for everyone
- You can setup default CVS options in a file called .cvsrc in your home directory.
cat << EOF >> ~/.cvsrc -z3 diff -u update -dP EOF
Tips for users
(read-only access to the latest code)
Setting it up
First time
- Download latest source code snapshot
wget http://grass.itc.it/grass63/source/snapshot/grass-6.3.cvs_src_snapshot_${DATE}.tar.gz
- move it somewhere on your filesystem without spaces or special characters in the path.
mv grass-6.3.cvs_src_snapshot_${DATE}.tar.gz /usr/local/src/
- decomress it
tar xzf grass-6.3.cvs_src_snapshot_${DATE}.tar.gz
- at this stage, you may want to rename the source directory to something shorter
mv grass-6.3.cvs_src_snapshot_${DATE}/ grass63/ cd grass63/
- set for anonymous connection to CVS server
CVSROOT=:pserver:grass-guest@intevation.de:/home/grass/grassrepository export CVSROOT
- login to CVS
cvs login password: grass
- update to the latest
cvs -z3 update -dP
Updating entire source tree (second time)
The is no need to login to CVS now, it remembers all that.
- clear away the existing rubble
make distclean
- update (You can skip the reporting of all directories by adding the -q flag (assumes -z3 and -dP were added to ~/.cvsrc)
cvs -q update
- re run ./configure and make
Updating just one module
Often you are interested in just a single bugfix or updated module. Assuming the change didn't affect libraries or the build system, you can just update and recompile the code in the module's directory.
- for example, updating just the r.cost module
cd raster/r.cost cvs up make
- If includes/ or module header files (*.h) have changed, you will have to run
make clean
before "make".
Tips for users wanting to contributing code
Code Standards
Legal issues
Copyright
- The developer may keep copyright on submitted code
- Please be sure to include copyright and licensing information in the header comments of your code so that others may know how they can use, extend, modify, and redistribute your work.
- The developer is encouraged to assign co-copyright to the GRASS Development Team. This gives the GRASS project flexibility over the source code, without this the Team must contact all former developers before allowing a license change or confirming the original license. In a 20+ year old project, with often only a name and old email to go by, this becomes unworkable.
Example
at the top of a shell script:
#!/bin/sh ############################################################################ # # MODULE: v.in.e00 # # AUTHOR(S): Markus Neteler, Otto Dassau # # PURPOSE: Import E00 data into a GRASS vector map # Imports single and split E00 files (.e00, .e01, .e02 ...) # # COPYRIGHT: (c) 2004, 2005 GDF Hannover bR, http://www.gdf-hannover.de # # This program is free software under the GNU General Public # License (>=v2). Read the file COPYING that comes with GRASS # for details. # #############################################################################
Licensing
- GRASS uses the GNU General Public License (the GPL).
Due diligence
- PSC RFC2
Code submission method
Preparing a patch
- create a unidiff patch against the latest development branch CVS
Submitting it to the code tracker
Announcing it on the GRASS Development mailing list
Getting help
- IRC
Tips for GRASS developers
(CVS write access, and committing)
Becoming a GRASS developer
The GRASS Project Steering Committee is in charge of giving new developers write access to the CVS.
Setting it up
ssh, firewalls, login, etc.