http://www.inb.uni-luebeck.de/~moeller/bioc/pkg-bioc-logo-R.png

= Debian CRAN/BioConductor/Omegahat package archive = The [http://alioth.debian.org/projects/pkg-bioc/ Alioth pkg-bioc] group is working on Debian packages repository for the [http://www.r-project.org/ GNU R] packages from the upstream sources at [http://cran.r-project.org/ CRAN] , [http://www.bioconductor.org/ ?BioConductor] and [http://www.omegahat.org/ Omegahat].

Advocacy

Contributions

The May 2007 brought us a repository for Debian packages. We hope to announce soon on this page once its regular maintenance for updates is secured. To help in that process or with the further development of the R packages, browse the code in the [http://alioth.debian.org/plugins/scmcvs/cvsweb.php/?cvsroot=pkg-bioc CVS repository] and you may want to introduce yourself on the [http://lists.alioth.debian.org/pipermail/pkg-bioc-devel/ pkg-bioc-devel mailing list]. The lines below explain how to automatically build the packages.

How to build the packages

This section explains how the .deb packages can be build locally. You will need about 1GB just for building the CRAN packages. The r_pkg_prepare.sh and r_pkg_update.pl scripts prepare and create the proper preparation of Debian packages with the ["pbuilder"] suite. It is strongly recommended to follow these instructions as it is a very nice piece of technology that makes Debian as strong as it is. The cran2deb.pl script will however also perform without these aids.

1. Create an empty directory and cd in it.

2. Prepare local Debian installation:

aptitude install cdbs cvs debhelper devscripts libapt-pkg-perl libdbd-sqlite3-perl libgraph-perl pbuilder r-base-core fakeroot cdebootstrap/unstable libdebian-installer4/unstable libdebian-installer-extra4/unstable

or to reduce the dependency on this wiki page the above can also be achieved with

aptitude install `perl ./cran2deb.pl --listRequiredDebianPackages`

3. Checkout the pkg-bioc's tools module via CVS, either

and go to the new directory

cd tools

4. Preparations for the packaging script: execute the r_pkg_prepare.sh with the right option. It will prepare

sh ./r_pkg_prepare.sh --create-all --us

sh ./r_pkg_prepare.sh --create-all --eu

If you just want the CRAN mirror, you might want to try the following option --create-cran in place of --create-all.

5. Preparation of the mirror and pbuilder: r_pkg_update.pl

./r_pkg_update.pl --doupdate --dopbuilderupdate

6. go to the respective freshly created directory for each of the R package repositories and start the compilation of packages.

Note: due to some cross-dependencies between CRAN, Bioc, Omegahat, the build order is not yet perfect. You will problably to run it twice or more.

Note: for a list of all the available options try :  ./cran2deb.pl --help  or  ./cran2deb.pl --man 

for repos in cran bioc-2.0 omegahat
do
   ( cd ../$repos && ./cran2deb.pl )
done

7. upload the results to the shared repository with the current directory still being in the tools subdir. (You need to have an access to our [http://alioth.debian.org/projects/pkg-bioc/ Alioth pkg-bioc] group. See the [http://lists.alioth.debian.org/pipermail/pkg-bioc-devel/ pkg-bioc-devel mailing-list] if you want to contribute.)

for repos in cran bioc-2.0 omegahat
do
   ./r_pkg_upload.pl --repos `pwd`/../$repos --username your-alioth-username
done

cran2deb Options (Might be obsolete, please check the uptodate content in the CVS)

perl cran2deb.pl --help

cran2deb -- Convert R packages from CRAN/BioConductor/Omegahat into Debian packages

Usage:
    cran2deb [options]

Options:
    --help                 show this help
    --man                  man page generated from POD
    --verbose              more verbose operation
    --debug                even more verbose for debugging purposes
    --dryrun               only simulate but don't build
    --dbname               specify filename of database to read/store
                           permanent info.  The data should be shared
                           between repositories (set to 'database')
    --binarch arch         binary architecture
    --maxsize <MB>         set max size of source package in Megabyte
                           (set to  MB)
    --subset regexp        regular expression to match package name
                           (set to '')
    --repository path      repository
    --changelobdbdir path  changelogdb directory
    --overwrite            build if debian package is found in build
                           directory
    --spotChangesToScript  rebuild package if change to this script
                           was detected (set to '0')
    --ignore               ignore build errors (for running over night)
    --rebuildall           build package even it is already known to Debian
    --tagsincontrol        add debtags in control file
    --tagsfile file        add debtags to that file
    --keepPatchedSource    do not removed the source directory (set
                           to '')
    --displayknown         display the entries already in the DB
    --skipTestOnInstalledBuildDependencies (set to '0')
                           If set, the build dependencies are not
                           checked for their installation.
    --installRequiredPackages (set to 'echo', can
                           be 'echo' or 'sudo' or 'pbuilder').
                           If test on installed packages is not skipped, then this routine
                           will find ways to install the missing packages.
                           * If set to 'echo', the routine will only declare to execute
                           a command for package installation but not perform such.
                           * If set to 'sudo' this routine will try to install dependencies
                           on your system directly.
                           * If set to 'pbuilder' the packages will be created in the
                           pbuilder enviroment.
    --doQAtest             insure that lintian and linda are installed on your system, and
                           run the freshly created deb packages against both of them.
    --listRequiredDebianPackages helps to get the latest list of packages that are
                           required to run this skript.
    --webpage              prints a table to STDOUT with all packages and those
                           dependencies that were manually added to the system.

Example:
    cran2deb --verbose

Automated assignment of Debtags

The ?BioConductor developers annotate their packages by words of a controlled hierarchically organised vocabulary. Details are laid out in the biocViews package. The Debian community has come up with Debian Tags, in short: [debtags.alioth.debian.org Debtags]. The Perl script tools/r_debtags_update.pl performs an automated translation of the biocView terms into entries of the Debtags initiative. It can be called without parameters and as a start reads through all DESCRIPTIONs of locally installed Debian packages. This is not perfect but it is something. The challenge now is to merge such automated efforts with manually created entries.

The CVS repository stores the latest list of tags in the file tools/R.tags. Nothing has yet been decided if an how we should make this accessible to access as a source in /etc/debtags/sources.list.