Information for Developers

From PKP Wiki
Revision as of 19:01, 19 February 2009 by Jmacgreg (Talk | contribs)

Jump to: navigation, search


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 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 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 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.


To checkout the most recent Lemon8 code, run

cvs -d 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 checkout -d ojs2-devel ojs2

OCS devel (2.3):

cvs -d checkout -d ocs2-devel ocs2

Harvester devel (2.3):

cvs -d checkout -d harvester2 harvester2

OMP devel (2.3):

cvs -d 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 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.


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