Introduction

This space is about packaging Moodle (www.moodle.org)

Changes applied to upstream code

Bundled libraries

Patches

Other

Testing

After the package is ready but before it's uploaded:

Config files

Apache config

I (Tomek) currently don't see a good method of generating apache configuration automatically. Alias directive will not work well with vhosts. Until I find some nicer way, I would like to ship the package that builds sample Apache configs but does not enable them.

Moodle config

By default Moodle will use persistent connections so there is no need to set this one up. The code from 1.9.8:

if (!isset($CFG->dbpersist) or !empty($CFG->dbpersist)) {    // Use persistent connection (default)

respectsessionsettings should be set to true if user wants to configure sessions in php.ini, httpd.conf or .htaccess.

Post-installation

Install with alias:

 ln -s /etc/moodle/apache.conf /etc/apache2/conf.d/moodle

Install as vhost:

 ln -s /etc/moodle/apache.vhost.conf /etc/apache2/sites-enabled/moodle

Language packs

Moodle used to be distributed with the several language packs but it's not anymore. This means that while upgrading from 1.8.2 to the latest 1.9.8, language packs will be removed.

Other

Find all license files:

find . -type f -iregex '.*\(license\|copying\).*'

Find all unnecessary files:

find . -type f -name .cvsignore

Debugging package

Pack files into debian package: pack.sh

tar -zcf control.tar.gz conffiles control md5sums postinst preinst config debian-binary postrm prerm
ar r moodle_1.9.8-1_all.deb debian-binary control.tar.gz data.tar.gz
./clean.sh

Unpack: unpack.sh

ar x moodle_1.9.8-1_all.deb
tar -zxf control.tar.gz

Clean up: clean.sh

rm data.tar.gz control.tar.gz conffiles control md5sums postinst preinst config debian-binary postrm prerm

Building the package

 git clone git://git.debian.org/pkg-moodle/moodle.git
 git branch upstream remotes/origin/upstream
 git-buildpackage

To push:

 git push git+ssh://USERNAME@git.debian.org/git/pkg-moodle/moodle.git

TODO

My blog (Tomek): http://techblog.zabuchy.net , twitter: http://twitter.com/zabuch