Running Savane Locally - howto

"Savane" is the code name for the server software that runs GNU Savannah, among other things.

"Savane" has many parts. This page describes a method to run a locally copy of Savane frontend PHP part on your computer.

"Savane" is an old, delicate beast and is quick to anger. Tread lightly and send questions to savannah-hackers-public@gnu.org (archive: http://lists.gnu.org/archive/html/savannah-hackers-public/).

The following instructions have been tested on Debian 8 (Jessie) and Ubuntu 14.04 LTS running as non-root user. Other configurations might not work (See below for know issues). If you encounter errors, please write to savannah-hackers-public@gnu.org .

Use the instructions below to run the PHP code locally on your computer. The PHP code needs a MySQL with a pre-configured database. Either use our demo server, or create a local MySQL server (instructions for both, below).

# Install required packages
sudo apt-get install -y git php5-cli php5-mysql mysql-client \
                        imagemagick autoconf automake gettext make

# Get Savane code
git clone git://git.sv.gnu.org/administration/savane.git
cd savane

# Run required initialization
./bootstrap
./configure
make

# Start local server
./run-local-dev.sh

Once the PHP server is started, you'll see this message:

$ ./run-local-dev.sh
PHP 5.6.30-0+deb8u1 Development Server started at Sun Feb 12 00:17:54 2017
Listening on http://127.0.0.1:7890
Document root is /home/gordon/savane/frontend/php
Press Ctrl-C to quit.

Open a web browser and visit http://127.0.0.1:7890.

When you run the server for the first time, you'll see this message:

Hello Savannah Developer!

It seems this is the first time you run the savane PHP code.

The code need to access a savane mock-up database.

To request access to such database, please write to
  savannah-hackers-public@gnu.org
and ask for username/password.

Once you receive them, please edit the following file
(locally on your computer):

   /home/gordon/savane/local2/etc-savane/savane-dev-db.php

Set the hostname, database, username and password,
then reload the website.

Send us an email to savannah-hackers-public@gnu.org, introduce yourself and ask for access to our demo MySQL server. We'll send you (privately) the following information:

$sys_dbhost="demo.database.foobar.org";
$sys_dbname="savane_XXXXXX";
$sys_dbuser="XXXXXXX";
$sys_dbpasswd="XXXXXXXXXX";

Paste the above values in the indicated file (e.g. /home/gordon/savane/local2/etc-savane/savane-dev-db.php above).

Reloading the savannah web page on your local web browser should now 'just work' and display the savannah website (with dummy values).

There is just one project in the demo database: site-administration. There is one user in the database: admin (password admin).

Each volunteer developer will get a dedicated copy of the demo database, so adding/removing/updating information and creating projects will not interfere with other developers.

Supported PHP versions

Savannah currently requires php version 5.4, 5.5 or 5.6. Earlier versions will not work locally (the script requires php -S). Newer versions (php 7.0) fail to run some of savane's old code (fixes and patches are very welcomed).

Other environments/distributions

As long as you have PHP 5.4/5.5/5.6 with MySQL, savane should mostly work. If you don't have autoconf/automake/gettext/perl/etc, you can even skip the bootstrap / configure / make steps - the main PHP should still work, but many of the images and icons will be missing.

On Fedora-25, these are the relevant packages:

sudo dnf -y install git automake autoconf gettext make \
                        ImageMagick php-cli php-mysqlnd \
                        community-mysql perl-ExtUtils-MakeMaker

However Fedora25 moved to PHP-7.0, and so the code won't "just work". (If you want to help adjusting savannah's PHP code to PHP-7.0, this will be a good way to start).

Running local MySQL demo database

If you prefer to run a local MySQL server, the following guidelines should work (but YMMV):

# Download a snapshot of the demo database:

$ wget https://download-mirror.savannah.gnu.org/releases/administration/savane_demo-2017-02-12.sql.gz
$ sha256sum savane_demo-2017-02-12.sql.gz
78ddffc7eddcaace1e4539bf9f0753ad5489362824658c8e60ae8e9e8d214bf1

# Create a new MySQL database
$ echo "CREATE DATABASE savane_demo;" | mysql

# Load the demo tables
$ zcat savane_demo-2017-02-12.sql.gz | mysql savane_demo

# Create a demo user
$ echo "grant SELECT on savane_demo.* TO 'USER'@'%' IDENTIFIED by 'PASSWORD';" | mysql savane_demo
$ echo "grant insert,update,select,delete on savane_demo.* to 'USER'@'%';" | mysql savane_demo

Set USER and PASSWORD above to your desired values.

Then update the configuration file with your local values (e.g. /home/gordon/savane/local2/etc-savane/savane-dev-db.php above):

$sys_dbhost="localhost";
$sys_dbname="savane_demo";
$sys_dbuser="USER";
$sys_dbpasswd="PASSWORD";

More Information

  • FrontEndDebuggingTips for log files and PHP debugging tips.
  • This Message for a tour of the configurable 'site-specific-content'. In your local savannah instance the files are in ./savane/etc/site-specific-content.
  • FrontEndSetup - how the same PHP code is configured on savannah's servers.