Live GIS Add Project

What gets into OSGeoLive?
We have an emphasis of quality, and we are space constrained on OSGeoLive and so are selective about what is included.

Priority for selecting OSGeoLive projects to package is:
 * 1) OSGeo Projects
 * 2) OSGeo Projects in incubation
 * 3) Stable GeoSpatial Open Source Software being presented in workshops, tutorials, or presentations at FOSS4G
 * 4) Other Stable GeoSpatial Open Source Software with established project communities and a wide user base
 * 5) It will be ready for the next release in accordance with our schedule

Projects need to provide:
 * Project Champion
 * Someone who will liaise between the OSGeoLive team and the project and ensures the application remains up to date on OSGeoLive.


 * A base for installing onto an Ubuntu Linux based system.
 * in line with OSGeoLive templates
 * Someone who will run and verify the applications works in development releases
 * Project Status to be maintained.

If you think you can cover all these criteria for your project, then send an email to the OSGeoLive email list asking if your project is appropriate.

Which version to use?

 * Stable, always! LiveGIS users are usually seeing OSGeo newbies and will be turned off by any software bugs.

Install Script
Each project is to write a shell script which installs and configures your stable application into the OSGeoLive Xubuntu.

All install scripts for building the LiveGIS disc shall be licensed as LGPL.

When finished, ask the OSGeoLive team to reference your script from main.sh.

Scripts are stored here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/bin/

The script may be as simple as: install_mapserver.sh, which just apt-get install mapserver

Projects that haven't been packaged for Ubuntu yet are slightly more complicated:

The uDig package is a good example: install_udig.sh

cp -f ../sources.list/ubuntugis.list /etc/apt/sources.list.d/
 * 3rd Party Repositories: Create an .list file with your repository in sources.list.d/ in the svn, in your script copy the file to the local machine like

don't forget to add the repository key like so apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68436DDF

Packaging conventions

 * sudo: Assume the script is to be executed as root. This means that sudo is only needed if you need to execute a command as e.g. the database user.
 * This means that ~/ refers to the directory /home/root/, so you should use ~user/ to reference /home/user/.
 * Preferred method is to put the USER_NAME and USER_HOME variables at the top, so these can be easily changed in all scripts if needed.

USER_NAME="user" USER_HOME="/home/$USER_NAME" cp package_readme.txt "$USER_HOME"


 * Called twice: Assume that the script will be executed multiple times, (as people may re-run the install process to get it right).
 * Make sure that nothing is corrupted if the script runs a second time.


 * No Prompts: Try not to have any interactive steps which prompt the user for an answer, as we want the scripts to be run automatically. In particular, try running the script a second time, and see if you get prompted to overwrite files.


 * /tmp: Copy all downloads into /tmp/build_ /
 * Don't delete the /tmp/build_ directory afterwards. If the script is re-run, then time and bandwidth is saved by not having to download large files again.


 * Icons: Where appropriate, create an icon on the desktop which loads the application. The file should be called .desktop and placed in /home/user/Desktop/ for further processing. The icons will be sorted and the Geospatial menu will be auto-generated from here.
 * Install .png icon files to the /usr/share/icons/ directory.
 * see install_qgis.sh for an example


 * Browser bookmarks: If the application is launched from the browser, then include the application in Firefox bookmarks.
 * (Todo: How do we do this?)

wget -c package.tar.gz
 * wget: When downloading large files using wget, use the "-c" continue command, as it will not re-download files if they already exist, and will continue if one is partially downloaded:
 * Do not use -c if there is a chance the file of that name will change on the server. Add "--progress=dot:mega" to the wget command line if the file is at all large.
 * Tiny files should use wget's -nv (non-verbose) flag.

mkdir -p
 * mkdir: Use -p (create parents too) option when creating a directory, as it doesn't complain about creating the directory a second time.


 * Binary files: Do not put large (>5mb) binary files into the SVN repository without asking first. Due to SVN's preservation of history, once they are added they can never be removed, and forever-more clog up the backend database. Subversion is designed to be a source code management tool, not a data warehouse. There is space for large static data files (e.g. sample data) at http://download.osgeo.org/livedvd/data/. Just ask on the mailing list if you'd like to house something there.

= Packaging considerations =

The criteria used to select applications for the LiveGIS follow.

Space considerations

 * DVD: approx 4.2gb compressed
 * USB stick: For a 4gb persistent USB stick with some room left over for user-workspace, 3.2-3.5gb compressed. (This pretty much works out to the DVD version minus the preloaded Mac and Windows installers)
 * Virtual Machines: theoretically unlimited, but in practice 20gb uncompressed

So smaller apps (<30mb) of lesser priority may easily slip in under the ire radar, but an external project that wants to use a 25% of the available disc space would be the first to be compromised away.

Memory considerations
Both Virtual Machines, and a LiveDVD images are likely to be constrained by limited memory. So to reduce memory usage. Disk image size is not of major concern, as we can just distribute less data.

The following principles should be followed.
 * Do not start applications upon power up. (Ie, don't start deamons, allow users to start them instead).
 * Set up examples which, by default, don't depend on other applications. Less applications open, means less memory. Ie, Have GeoServer access a shapefile instead of PostGIS.
 * Try to avoid scenarios which write data to disk, as disk space in the Live DVD is stored in RAM, and is not cleared afterward.

File permissions and filesystem user IDs can get garbled during the ISO build process. Therefore a special method is used to ensure that data files which must be read-write can be accessed.

To install a writable data directory or files, change its group to "users" and set the file(s) as group-writable:

adduser $USER_NAME users chmod -R g+w /usr/local/share/ /data/ chown -R root.users /usr/local/share/ /data/

and symlink into the user's home directory if necessary.

Setting files to have universal write permission is strongly discouraged.

= Directory Structure =


 * 1) /tmp Temporary files (e.g., downloaded archives) go into /tmp. Please create a separate folder for your project.
 * 2) /usr/lib application are usually installed into /usr/lib
 * 3) /usr/bin things that get executed by the user such as startup scripts or links to them should go into /usr/bin
 * 4) /etc/init.d startup/shutdown scripts for services (e.g., postgres, apache, tomcat) are stored in /etc/init.d
 * 5) /usr/local/share sample data and documentation goes into /usr/local/share
 * 6) /etc config files are stored in /etc
 * 7) /home/user user specific config files or working directories can go into /home/user/. However, keep files in /home/user as small as possible as this folder is loaded into memory in the Live DVD. Symlinks into /usr/local can be useful here.


 * You are strongly encouraged to use /usr/local/ and /var/local/ for storing non-packaged content.

.deb Packaging
While many packages are installed from a bash script, ideally, applications should be packaged in UbuntuGIS or DebianGIS repositories, or in a Launchpad PPA (e.g. available from the UbuntuGIS repository). Next would be packaged into .debs from your own Ubuntu repository. An official Debian package could be used, but we'd have to rebuild it from source (this takes time but is fairly easy; usually these are already sucked in Ubuntu automatically so it isn't an issue).

If you must build from source, building a .deb package and installing that is preferred to "make install". If you do need to "make install", please set the path prefix to /usr/local/ and ensure that your package does not introduce namespace conflicts.

In practice a number of scripts employ a hybrid approach, with as much as possible installed via official packages, and the occasional plugin compiled from source.

A base set of build-tools are already included, but if you install a bunch of -dev packages to build your app, make sure that you clean them all up after you are done.

Using "gdebi" instead of "dpkg -i" can be useful for installing .deb packages manually, as it ensures that all dependencies are also installed.

Application Overview
The Application Overview is a one page marketing page targeted at a someone considering using GeoSpatial Open Source, who may be a GeoSpatial User, a Technical person without much geospatial expertise, or manager with limited GeoSpatial or technical experience. Published Overviews are linked from here: http://live.osgeo.org/overview/overview.html

The source Overviews are written in RST wiki format and built using sphinx. Source documents are to be stored here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/overview/en/ _overview.rst. They should follow the structure and style of the reference Overview, which has lots of helpful comments, at https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/overview/en/postgis_overview.rst

The Overviews are currently published as HTML pages. In future we intend to also create 1 page PDFs, (to hand out as a flier at conferences, and as a page in the OSGeo Book of projects), and as Word/OpenOffice (to be cut and pasted into project proposals and articles which usually use these formats).

Overviews also require:
 * an image for the application, usually a screen shot or collage of screen shots, taken from a 1024x768 display, and stored here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/images/screenshots/1024x768
 * (An 800x600 desktop image will be acceptable, but is not the preferred, as we plan to create additional higher quality PDF files from these images)


 * Screenshots with large areas of constant color (menus, etc.) should be in PNG format, screenshots containing large areas of imagery (satellite images, shaded relief DEMs, etc.) should be in JPEG format.
 * For PNGs please run a program like pngcrush to reduce the size of the image without degrading quality.


 * A project logo as per

Try printing the html page from the browser, and ensure that the page is less than one page long. (The less words you write, the more people will read your documentation.)

Once finished, note your documentation is complete in the OSGeo-Live project status at: http://spreadsheets.google.com/ccc?key=0Al9zh8DjmU_RdGIzd0VLLTBpQVJuNVlHMlBWSDhKLXc&hl=en_GB#gid=5

Application Quick Start
The Application Quick Start defines detailed steps, with screen shots, for a new user to run one of the application's core functions. It should be able to be run in 5 to 10 minutes.

This documentation is highly desirable for our 4.0 release for FOSS4G 2010, and will become mandatory for all projects in following releases.

Source documentation is written in RST wiki format, is built using sphinx, and is stored here:

https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/en/quickstart/ _quickstart.rst

The reference quickstart, which includes structure guidelines and with tips on how to fill in the quickstart is here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/en/overview/udig_quickstart.rst and is published here: http://live.osgeo.org/quickstart/udig_quickstart.html

Applications are expected to include screen shots for each major step in the quickstart. This is not mandatory for 2011, but will become a criteria in future releases.

Screenshots are to be taken from a 1024x768 display, and stored here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/images/screenshots/1024x768/ _.png (A 800x600 desktop image will be acceptable, but is not the preferred, as we plan to create additional higher quality PDF files from these images)
 * Screenshots with large areas of constant color (menus, etc.) should be in PNG format, screenshots containing large areas of imagery (satellite images, shaded relief DEMs, etc.) should be in JPEG format.

Once finished, note your documentation is complete in the project status at: http://spreadsheets.google.com/ccc?key=0Al9zh8DjmU_RdGIzd0VLLTBpQVJuNVlHMlBWSDhKLXc&hl=en_GB#gid=5

Logo
The Project's logo is used in the headers of documentation (like Project Overviews, QuickStarts, Powerpoint presentations etc, and as icons on the OSGeo-Live Desktop. Hence there are a few different requirements for the logo.


 * Header logo:
 * Stored here: https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/doc/images/project_logos
 * Filename should be "logo- .png"
 * Should have a transparent background (not white)
 * Preferably stored in size 125x125 pixels (for use in Project Overview and QuickStarts)
 * Should preferably be in PNG format
 * For PNGs please run a program like pngcrush to reduce the size of the image without degrading quality.
 * Preferably also available as SVG, stored as "logo- .svg"


 * Desktop logo:
 * We are still to define the requirements for creating a desktop logo. They will likely include:
 * A 32x32-pixel XPM icon for use by the Debian menus
 * A 48x48-pixel PNG icon for use by freedesktop.org menus

Publishing Documentation
Once finished, you can verify your reST text looks good by building using the following:
 * (you will have to have Sphinx 0.6.4 or greater installed, it's in the python-sphinx</tt> Debian package)

sudo apt-get install python-sphinx

cd osgeo/livedvd/gisvm/trunk/doc/ make html

You can then view the results in: osgeo/livedvd/gisvm/trunk/doc/_build/*.html

Testing procedure
Provide test steps for your application as per the Live GIS Disc Testing wiki page.

Once the application has been included into a release candidate, ensure the test steps are executed and work on the release candidate. Write up the results as per the Live GIS Disc Testing wiki page.

= Translations = For details on how to translate, refer to Live GIS Translate