Introduction
This space is about packaging Moodle (www.moodle.org)
Changes applied to upstream code
Bundled libraries
- smarty
- YUI
- magpie
nusoap ( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529573 ) - there is no need for this library in PHP5
- fpdf in lib/fpdf - left one extra file fpdfprotection.php that is not packaged with php-fpdf
- PHP Markdown libmarkdown-php is packaged by Debian but Moodle uses a different version - PHP Markdown Extra
- pclzip
Moodle has modified the library a bit to fix the bug, see http://tracker.moodle.org/browse/MDL-7828 . This bug, however affects only Windows platform, so we should be fine replacing bundled library with one that is packaged in Debian.
- Snoopy Ideally Snoopy should not be needed at all - as we depend on php5-curl. Unfortunately, it seems like some parts of the code use Snoopy directly instead of lib/filelib.php. Moodle has done some changes to the Snoopy class but they are only cosmetic - the version shipped with Debian should be just fine.
Patches
- there is no need for any patches at this time
Other
- Chat daemon script is not shipped (rm debian/moodle/usr/share/moodle/mod/chat/chatd.php)
- admin/delete.php used to be removed because of security issue that has since been fixed upstream
- mod/wiki/ewiki/fragments/mkhuge was removed as well, I don't know why
- lib/editor/htmlarea/plugins/SpellChecker was removed - I don't know why
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
$CFG->dbpersist
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)
$CFG->respectsessionsettings
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
TODO
- font in lib/default.ttf - lintian warning re font-in-non-font-package
- create a script for gathering information for bug reports (and add dh_bugfiles)
- on the first install we don't need user to actually go to the site and click through the installation process - whole database could be dumped as a template and then restored using dbconfig
My blog (Tomek): http://techblog.zabuchy.net , twitter: http://twitter.com/zabuch