Packages and installation

Drugle uses SCons as the build tool, SystemAssembler for assembling files belonging to the Drugle packages and the Debian package management system for creating release and installation packages. SystemAssembler is a Python tool developed by Seibo Software Studios.


The basic principles for the design of Drugle packages are:

  • Command line programs/scripts are combined in packages if they are functionally related.
  • Every shared library has its own package in accordance with the Debian Policy Manual.
  • The server/REST API has its own package.
  • The main web application has its own package.
  • Prepepared and indexed databases (from sources) are put in separate packages.
  • The web (demo application) has its own package. This is basically config files.

Installation footprint

This is the installation footprint:

Directory or File Comment
/etc/apache2/sites-available Apache configuration file for Drugle web application.
/etc/drugle Configuration files and setup scripts for data.
/var/www/drugle Root directory for Drugle web application.
/var/lib/drugle Root directory for Drugle data including Xapian database.
/var/lib/drugle/profiles Directory containing Drugle search profiles.
/usr/lib/python2.5/site-packages/drugle Drugle Python module.

Debian packages

Currently Drugle is installed with the Bash install scripts. This works fine for developer machines, but in the future we intend to use the Debian packages for installation in production environments.

Package name Current Debian package name Contents Dependencies Status
drugle-server drugle-server-0.1.0.deb Drugle server. Built with dpkg-buildpackage (deb-helper & python-central). python (>=2.5), apache2 (>=2.2) Implemented. Testing locally (paco)
drugle-demo-config drugle-demo-config-0.1.0.deb Drugle demo config files. Built with dpkg-deb drugle-server (=0.1.0), apache2 (>=2.2) Implemented. Testing locally (paco)
drugle-profiles drugle-profiles-0.1.0.deb Drugle user profiles. Built with dpkg-deb. python (>=2.5), drugle-server (=0.1.0) Implemented. Testing locally (paco)
drugle-init drugle-init-0.1.0.deb Drugle initialization scripts drugle-server (=0.1.0) -
drugle-core-db drugle-core-db-0.1.0.deb Package for Drugle core databases and data. drugle-server (=0.1.0) -
drugle-extractors drugle-extractors-0.1.0.deb Package for the Drugle extractor scripts. Built with dpkg-deb. python (>=2.5) drugle-server (=0.1.0) -
drugle-web drugle-web-0.1.0.deb Package for the Drugle web application. Built with dpkg-deb. python (>=2.5), apache2 (>=2.2), drugle-server (=0.1.0) -
drugle-translations drugle-translations-0.1.0.deb Drugle web application translations. Built with dpkg-deb. drugle-web (=0.1.0) -

Installing DRUGLE

Installation can be done on two types of targets:

Installation target Comment
Personal development machine Use the domain '' and map that to in your '/etc/hosts' file.
Internet server Use the domain (?)

Eventually installation will be done with Debian packages which can be easily installed and uninstalled (removed and/or purged). For the time being we are using Bash scripts to install the system.

Installing with install scripts

If you are on a development machine, you can build and do a complete install of the system with:

$ÐRUGLE_DEV/bld/system$ ./

This script will first build (assemble) the Drugle system and then run the install scripts "" and "install_extractors" which will install the system.

For more fine grained control of the installation you run the following commands from the root of the build directory or from the root of the unzipped build package file ''

SOMEWHERE/Drugle-system-0.1.0$ ./
SOMEWHERE/Drugle-system-0.1.0$ ./

Post installation stuff

After installing with the scripts there may be a few additional steps to be done. Assuming you already have source files downloaded you should consider doing the following:

Empty the local search results cache:

$ sudo rm /var/www/drugle/results/*

Rebuild all index files:

$ python -m drugle.index -a

Note that this may take some time (+1 hour)! You can use "--source=emea" to specifiy only EMEA index files.

Regenerate the div data elements used in the index files:

$ python -m drugle.index -a --div

This may also take some time (30 minutes).

Setting up a database

If you wish to setup a new EMEA database from scratch and index it, go to the following directory and run:

SOMEWHERE/Drugle-system-0.1.0/extractors-1.0.0/drugle/sources/emea$ ./add_emea_to_drugle

There are similar scripts for setting up MHRA, AES and LMC databases in the same directory. Note that it may take a long time to download all files!

Installing Debian packages

Debian packages are uninstalled with 'dpkg --purge' (remove all files related to the package) and installed with 'dpkg --install'. To quickly see which Drugle packages are currently installed type 'dpkg -l | grep drugle'.

Configuring logging

To configure Apache debug logging, edit the file '/etc/apache2/sites-available/' and add the lines:

    ErrorLog /var/log/apache2/drugle_error.log
    LogLevel debug

The last line above is set to 'LogLevel warn' by default, so you should just change that line.