Difference between revisions of "Information for Developers"

From PKP Wiki
Jump to: navigation, search
Line 1: Line 1:
 
= Bugzilla =
 
= Bugzilla =
  
You can access our Bugzilla database [http://pkp.sfu.ca/bugzilla here]. We welcome any bug reports and feature requests, so long as they are understandably written flagged correctly (mostly an issue of setting the severity between enhancement; trivial; minor; normal; major; critical; or blocker levels, although you can also set the priority as well if you'd like). You can see a great set of writing guidelines [http://pkp.sfu.ca/bugzilla/page.cgi?id=bug-writing.html here].  
+
You can access our Bugzilla database [http://pkp.sfu.ca/bugzilla here]. We welcome any bug reports and feature requests, so long as they are understandably written and flagged correctly (mostly an issue of setting the severity between enhancement; trivial; minor; normal; major; critical; or blocker levels, although you can also set the priority as well if you'd like). You can see a great set of bug-writing guidelines [http://pkp.sfu.ca/bugzilla/page.cgi?id=bug-writing.html here].  
  
 
You are also advised to [http://pkp.sfu.ca/bugzilla/query.cgi search] for similar reports to avoid duplication.  
 
You are also advised to [http://pkp.sfu.ca/bugzilla/query.cgi search] for similar reports to avoid duplication.  
Line 9: Line 9:
 
== Web-based CVS ==  
 
== Web-based CVS ==  
  
You can view our CVS repository online [http://pkp.sfu.ca/cvs/cvsweb.cgi/#dirlist here].
+
You can browse our CVS repository online [http://pkp.sfu.ca/cvs/cvsweb.cgi/#dirlist here].  
  
 
== Command Line CVS access ==  
 
== Command Line CVS access ==  
  
You can check out all CVS modules via anonymous CVS. Before you do so, you should know which modules, exactly, you want to work with. OJS and OCS each have a stable and devel branch; the stable branches are standalone maintenance releases (extensions of OJS 2.2.2 and OCS 2.1.1 codebases), while the devel branches also require you to check out the PKP Web Application Library, which then needs to be symlinked. Harvester2 and Open Monograph Press only have one devel branch (each also needing the PKP WAL). Lemon8 is a standalone program with only one branch at the moment.
+
(This is not a guide on how to use CVS. For more CVS information, try [http://www.nongnu.org/cvs/ here], [http://www.eyrie.org/~eagle/notes/cvs/basic-usage.html here], and [http://en.wikipedia.org/wiki/Concurrent_Versions_System here].
 +
 
 +
You can check out all CVS modules via anonymous CVS. Before you do so, you should know which modules, exactly, you want to work with. OJS and OCS each have a stable and devel branch; the stable branches are standalone maintenance releases (extensions of OJS 2.2.2 and OCS 2.1.1 codebases), while the devel branches also requires the PKP Web Application Library (WAL) be checked out and installed in the lib/ directory. Harvester2 and Open Monograph Press only have one devel branch, and each require the PKP WAL. Lemon8 is a standalone program with only one branch at the moment.
  
 
=== Setting up the Environment ===
 
=== Setting up the Environment ===
  
The following instructions are directly applicable to *nix operating systems (OS X incl.); Windows users probably need to do things a little differently. Also, these are general instructions, pertaining to how I manage my own setup -- you might want to do things a little bit differently.  
+
The following instructions are more or less directly applicable to any *nix operating systems (OS X incl.); Windows users probably need to do things a little differently. Also, these are general instructions, pertaining to how I manage my own setup -- you might want to do things a little bit differently.  
  
Firstly, create a CVS directory to store all your cvs checkouts in. I created mine in /Users/jmacgreg/ and then entered the new directory:  
+
Firstly, create a CVS directory to store all your cvs checkouts in. I created mine in /Users/jmacgreg/ and then entered into the new directory, from which I ran the remaining commands:  
  
 
  mkdir /Users/jmacgreg/cvs
 
  mkdir /Users/jmacgreg/cvs
 
  cd cvs
 
  cd cvs
  
You'll then have to log into our CVS repository using our anonymous credentials (username: anonymous; password is blank):  
+
You'll then have to log into our CVS repository using our anonymous credentials:
  
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs login
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs login
Line 36: Line 38:
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ojs2-stable -r ojs2-branch-2_2_2 ojs2
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ojs2-stable -r ojs2-branch-2_2_2 ojs2
  
The above command will download the current code for the OJS 2.2.2 branch of the ojs2 module, and deposit in a new 'ojs2-stable' directory in the directory you are currently in (you're in your handy 'cvs' directory, right?)
+
The above command will download the current code for the OJS 2.2.2 branch of the ojs2 module, and deposit in a new 'ojs2-stable' directory in the directory you are currently in (you moved to your cvs/ directory, right?)
  
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ocs2-stable -r ocs2-branch-2_1_1 ocs2
 
  cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ocs2-stable -r ocs2-branch-2_1_1 ocs2
Line 76: Line 78:
  
  
Now the tricky part. You need to download the PKP WAL (called 'pkp' in CVS) and either copy it or symlink it to your devel instances' lib/ directory. I prefer symlinking, as I can do this for each devel instance I'm running, and only need to remember to update one directory.  
+
Now the tricky part. You need to download the PKP WAL (called 'pkp' in CVS) and either copy it or [http://en.wikipedia.org/wiki/Symbolic_link symlink] it to your devel instances' lib/ directory. I prefer symlinking, as I can do this for each devel instance I'm running, and only have to remember to update one directory.  
  
 
Checkout the pkp module:  
 
Checkout the pkp module:  
Line 88: Line 90:
 
... and repeat as necessary for each application.
 
... and repeat as necessary for each application.
  
=== Making Patches ===  
+
== Patches ==
  
We're always happy to receive patches, whether for contribution to a project or for general community availability on [http://pkp.sfu.ca/support/forum the forums]. The one thing we do ask is that you provide the patch in Unified Diff format. If you are patching against one of the above CVS modules, the easiest thing to do is generate your patch using something like the following command (which will generate a diff of the entire directory you are currently in, for example ojs2-devel, against the entire cvs module):  
+
=== Making Patches ===
 +
 
 +
We're always happy to receive patches, whether for contribution to a project or for general community availability on [http://pkp.sfu.ca/support/forum the forums]. The one thing we do ask is that you provide the patch in [http://en.wikipedia.org/wiki/Diff#Unified_format Unified Diff] format. If you are patching against one of the above CVS modules, the easiest thing to do is generate your patch using something like the following command (which will generate a diff of the entire directory you are currently in, for example ojs2-devel, against the entire cvs module):  
  
 
  cvs diff -uN ./ > patch.diff
 
  cvs diff -uN ./ > patch.diff
 +
 +
=== Applying Patches ===
 +
 +
If you want to apply a patch, download it to your development environment, and from the application's root directory and run
 +
 +
patch -p0 < ./path/to/patch.diff

Revision as of 20:01, 19 February 2009

Bugzilla

You can access our Bugzilla database here. We welcome any bug reports and feature requests, so long as they are understandably written and flagged correctly (mostly an issue of setting the severity between enhancement; trivial; minor; normal; major; critical; or blocker levels, although you can also set the priority as well if you'd like). You can see a great set of bug-writing guidelines here.

You are also advised to search for similar reports to avoid duplication.

CVS Access

Web-based CVS

You can browse our CVS repository online here.

Command Line CVS access

(This is not a guide on how to use CVS. For more CVS information, try here, here, and here.

You can check out all CVS modules via anonymous CVS. Before you do so, you should know which modules, exactly, you want to work with. OJS and OCS each have a stable and devel branch; the stable branches are standalone maintenance releases (extensions of OJS 2.2.2 and OCS 2.1.1 codebases), while the devel branches also requires the PKP Web Application Library (WAL) be checked out and installed in the lib/ directory. Harvester2 and Open Monograph Press only have one devel branch, and each require the PKP WAL. Lemon8 is a standalone program with only one branch at the moment.

Setting up the Environment

The following instructions are more or less directly applicable to any *nix operating systems (OS X incl.); Windows users probably need to do things a little differently. Also, these are general instructions, pertaining to how I manage my own setup -- you might want to do things a little bit differently.

Firstly, create a CVS directory to store all your cvs checkouts in. I created mine in /Users/jmacgreg/ and then entered into the new directory, from which I ran the remaining commands:

mkdir /Users/jmacgreg/cvs
cd cvs

You'll then have to log into our CVS repository using our anonymous credentials:

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs login

You will be asked for a password — there is none, so just hit enter. After which you should be able to run the following commands to grab specific modules.

OJS and OCS stable branches

To grab the OCS and OJS stable branches, run the following commands:

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ojs2-stable -r ojs2-branch-2_2_2 ojs2

The above command will download the current code for the OJS 2.2.2 branch of the ojs2 module, and deposit in a new 'ojs2-stable' directory in the directory you are currently in (you moved to your cvs/ directory, right?)

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ocs2-stable -r ocs2-branch-2_1_1 ocs2

The above command will download the OCS 2.1.1 code into ocs2-stable/.

Setting this up to be served by Apache is up to you (I have it symlinked to my web folder). Remember, while this branch is still fairly stable in comparison to the heavily modified devel branch, it's still a work in progress and shouldn't be used in a production environment unless you know what you're doing.

Lemon8-XML

To checkout the most recent Lemon8 code, run

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d lemon8-xml lemon8-xml

The above command will download the latest Lemon8 development code into a new lemon8-xml directory.

Development Branches

OJS and OCS development branches, as well as the only Harvester2 and OMP (and de facto development) branches, all work a little differently: they all rely on the PKP WAL module as a dependency. The WAL module needs to be 'installed' (symlinking is fine) in each branches' lib/ directory.

First, checkout the packages you need:

OJS devel (2.3):

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ojs2-devel ojs2

OCS devel (2.3):

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d ocs2-devel ocs2

Harvester devel (2.3):

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d harvester2 harvester2


OMP devel (2.3):

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d omp omp


Now the tricky part. You need to download the PKP WAL (called 'pkp' in CVS) and either copy it or symlink it to your devel instances' lib/ directory. I prefer symlinking, as I can do this for each devel instance I'm running, and only have to remember to update one directory.

Checkout the pkp module:

cvs -d :pserver:anonymous@lib-pkp.lib.sfu.ca:/cvs checkout -d pkp pkp

Symlink the module to eg. OJS' lib/ directory:

ln -s /Users/jmacgreg/cvs/pkp /Users/jmacgreg/cvs/ojs2-devel/lib/pkp

... and repeat as necessary for each application.

Patches

Making Patches

We're always happy to receive patches, whether for contribution to a project or for general community availability on the forums. The one thing we do ask is that you provide the patch in Unified Diff format. If you are patching against one of the above CVS modules, the easiest thing to do is generate your patch using something like the following command (which will generate a diff of the entire directory you are currently in, for example ojs2-devel, against the entire cvs module):

cvs diff -uN ./ > patch.diff

Applying Patches

If you want to apply a patch, download it to your development environment, and from the application's root directory and run

patch -p0 < ./path/to/patch.diff