%define moodlewebdir %{_var}/www/moodle/web %define moodledatadir %{_var}/www/moodle/data # Suppress finding Perl libraries supplied by filter/algebra/*.p? %define __perl_requires %{nil} %define __perl_provides %{nil} Name: moodle Version: 2.2.11 Release: 1%{?dist} Summary: A Course Management System Group: Applications/Publishing License: GPLv2+ URL: http://moodle.org/ Source0: http://download.moodle.org/stable22/%{name}-%{version}.tgz Source1: moodle.conf Source2: moodle-config.php Source3: moodle.cron Source4: moodle-cron Source5: moodle.init Source6: moodle-README-rpm Patch0: moodle-CVE-2012-6087.patch Patch1: moodle-QuickForm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: unzip Requires: php-gd vixie-cron mimetex perl(lib) php-mysql php-xmlrpc Requires: perl(Encode) aspell perl(HTML::Parser) php Requires: perl(HTML::Entities) perl(CGI) Requires: php-Smarty Requires: php-adodb #Requires: php-magpierss Requires: gnu-free-sans-fonts Requires: php-pear-CAS Requires: php-markdown Requires: php-pear-Auth-RADIUS Requires: php-pear-Crypt-CHAP Requires: php-pear-HTML-Common Requires: php-pear-HTML-QuickForm Requires: php-pear-OLE Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %description Moodle is a course management system (CMS) - a free, Open Source software package designed using sound pedagogical principles, to help educators create effective online learning communities. %prep %setup -q -n %{name} cp %{SOURCE6} README-rpm %patch0 -p0 %patch1 -p0 find . -type f \! -name \*.pl -exec chmod a-x {} \; find . -name \*.cgi -exec chmod a+x {} \; chmod a+x admin/process_email.php chmod a+x mod/chat/chatd.php #rm search/.cvsignore sed -i 's/\r//' lib/adodb/license.txt sed -i 's/\r//' lib/adodb/readme.txt #sed -i 's/\r//' lib/mp3player/readme.txt %build rm config-dist.php install.php filter/tex/mimetex.* filter/tex/README.mimetex # Get rid of language files in subordinate packages for languages not supported # by moodle itself. rm lib/phpmailer/language/phpmailer.lang-fo.php %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{moodlewebdir} mkdir -p $RPM_BUILD_ROOT%{moodledatadir} cp -a * $RPM_BUILD_ROOT%{moodlewebdir} rm $RPM_BUILD_ROOT%{moodlewebdir}/README* install -p -D -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/moodle.conf install -p -D -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{moodlewebdir}/config.php install -p -D -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/moodle install -p -D -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/moodle-cron install -p -D -m 0755 %{SOURCE5} $RPM_BUILD_ROOT%{_initrddir}/moodle find $RPM_BUILD_ROOT -name \*.mimetex-\* -exec rm {} \; #use system smarty rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/smarty ln -s /usr/share/php/Smarty/ $RPM_BUILD_ROOT/var/www/moodle/web/lib/smarty #use system adodb rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/adodb ln -s /usr/share/php/adodb/ $RPM_BUILD_ROOT/var/www/moodle/web/lib/adodb #Symlink to FreeSans, to save space. rm -f $RPM_BUILD_ROOT%{moodlewebdir}/lib/default.ttf ln -s /usr/share/fonts/gnu-free/FreeSans.ttf $RPM_BUILD_ROOT%{moodlewebdir}/lib/default.ttf #use system php-pear-CAS rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/auth/cas/CAS ln -s /usr/share/pear/ $RPM_BUILD_ROOT/var/www/moodle/web/auth/cas/CAS #use system markdown rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/markdown.php ln -s /usr/share/php/markdown.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/markdown.php #use system php-pear-Auth-RADIUS rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/Auth/RADIUS.php ln -s /usr/share/pear/Auth/RADIUS.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/Auth/RADIUS.php #use system php-pear-Crypt-CHAP rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/Crypt/CHAP.php ln -s /usr/share/pear/Crypt/CHAP.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/Crypt/CHAP.php #use system php-pear-HTML-Common rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/Common.php ln -s /usr/share/pear/HTML/Common.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/Common.php #use system php-pear-HTML-QuickForm, preserving two added files. mv $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/QuickForm/DHTMLRulesTableless.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/ mv $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/QuickForm/Renderer/Tableless.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/ rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/QuickForm* ln -s /usr/share/pear/HTML/QuickForm $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/QuickForm ln -s /usr/share/pear/HTML/QuickForm.php $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/HTML/QuickForm.php #use system php-pear-OLE rm -rf $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/OLE ln -s /usr/share/pear/OLE $RPM_BUILD_ROOT/var/www/moodle/web/lib/pear/OLE %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add %{name} if [ -d /var/www/moodle/web/lib/smarty -a ! -L /var/www/moodle/web/lib/smarty ]; then mv /var/www/moodle/web/lib/smarty /var/www/moodle/web/lib/smarty.rpmbak && \ ln -s /usr/share/php/Smarty/ /var/www/moodle/web/lib/smarty rm -rf /var/www/moodle/web/lib/smarty.rpmbak fi if [ ! -L /var/www/moodle/web/lib/smarty ]; then ln -s /usr/share/php/Smarty/ /var/www/moodle/web/lib/smarty fi if [ -d /var/www/moodle/web/lib/adodb -a ! -L /var/www/moodle/web/lib/adodb ]; then mv /var/www/moodle/web/lib/adodb /var/www/moodle/web/lib/adodb.rpmbak && \ ln -s /usr/share/php/adodb/ /var/www/moodle/web/lib/adodb rm -rf /var/www/moodle/web/lib/adodb.rpmbak fi if [ ! -L /var/www/moodle/web/lib/adodb ]; then ln -s /usr/share/php/adodb/ /var/www/moodle/web/lib/adodb fi if [ -d /var/www/moodle/web/auth/cas/CAS -a ! -L /var/www/moodle/web/auth/cas/CAS ]; then mv /var/www/moodle/web/auth/cas/CAS /var/www/moodle/web/auth/cas/CAS.rpmbak && \ ln -s /usr/share/pear/ /var/www/moodle/web/auth/cas/CAS rm -rf /var/www/moodle/web/auth/cas/CAS.rpmbak fi if [ ! -L /var/www/moodle/web/auth/cas/CAS ]; then ln -s /usr/share/pear/ /var/www/moodle/web/auth/cas/CAS fi if [ ! -L /var/www/moodle/web/lib/pear/HTML/QuickForm ]; then ln -s /usr/share/pear/HTML/QuickForm /var/www/moodle/web/lib/pear/HTML/QuickForm fi if [ ! -L /var/www/moodle/web/lib/pear/OLE ]; then ln -s /usr/share/pear/OLE /var/www/moodle/web/lib/pear/OLE fi %preun if [ $1 = 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi %pre if [ -h /var/www/moodle/web/lib/magpie ]; then rm -f /var/www/moodle/web/lib/magpie fi if [ -L /var/www/moodle/web/auth/cas ]; then rm -f /var/www/moodle/web/auth/cas fi %files %defattr(-,root,root,-) %doc README* COPYING.txt TRADEMARK.txt local/readme.txt %dir %{_var}/www/moodle %config(noreplace) %{moodlewebdir}/config.php %config(noreplace) %{moodlewebdir}/course/format/scorm/config.php %config(noreplace) %{moodlewebdir}/course/format/social/config.php %config(noreplace) %{moodlewebdir}/course/format/topics/config.php %config(noreplace) %{moodlewebdir}/course/format/weeks/config.php %config(noreplace) %{moodlewebdir}/theme/formal_white/config.php %config(noreplace) %{moodlewebdir}/theme/standard/config.php %{moodlewebdir} %exclude /var/www/moodle/web/auth/cas/* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-b* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-c* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-d* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-es.php %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-f* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-h* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-i* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-j* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-n* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-p* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-r* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-s* %exclude %{moodlewebdir}/lib/phpmailer/language/phpmailer.lang-t* %attr(-,apache,apache) %{moodledatadir} %config(noreplace) %{_sysconfdir}/cron.d/%{name} %config(noreplace) %{_sysconfdir}/httpd/conf.d/moodle.conf %{_initrddir}/%{name} %{_sbindir}/%{name}-cron %ghost /var/www/moodle/web/lib/smarty %ghost /var/www/moodle/web/lib/adodb %exclude %{moodlewebdir}/COPYING.txt %changelog * Thu Jul 18 2013 Jon Ciesla - 2.2.11-1 - Latest upstream, patch for multiple CVEs. - Fix Quickform. * Mon May 20 2013 Jon Ciesla - 2.2.10-1 - Latest upstream, patch for multiple CVEs. * Mon Mar 25 2013 Jon Ciesla - 2.2.9-1 - Latest upstream, patch for multiple CVEs. * Tue Jan 15 2013 Jon Ciesla - 2.2.7-1 - Latest upstream, patch for CVE-2012-6087, * Mon Nov 19 2012 Jon Ciesla - 2.2.6-1 - Security update, BZ 878132. * Mon Sep 17 2012 Jon Ciesla - 2.2.5-1 - Security update. * Mon Jun 25 2012 Jon Ciesla - 2.2.4-1 - Security update, BZ 841954. * Wed May 23 2012 Jon Ciesla - 2.2.3-1 - Security update, BZ 824481. * Wed May 09 2012 Jon Ciesla - 2.2.2-3 - Unbundled php-markdown. - Unbundled php-pear-Auth-RADIUS. - Unbundled php-pear-Crypt-CHAP. - Unbundled php-pear-HTML-Common. - Unbundled php-pear-HTML-QuickForm. - Unbundled php-pear-OLE. * Wed May 09 2012 Jon Ciesla - 2.2.2-2 - Dropped bundled language packs, BZ 748958. * Tue Mar 13 2012 Jon Ciesla - 2.2.2-1 - Latest upstream. * Tue Mar 13 2012 Jon Ciesla - 2.2.1-2 - Fixed CAS unbundling per rcollet. * Tue Jan 24 2012 Jon Ciesla - 2.2.1-1 - New upstream, BZ 783534. * Fri Jan 13 2012 Fedora Release Engineering - 2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Dec 22 2011 Jon Ciesla - 2.2-1 - New upstream. * Thu Dec 08 2011 Jon Ciesla - 2.1.3-1 - New upstream, BZ 761249. * Fri Oct 21 2011 Jon Ciesla - 2.1.2-1 - New upstream, BZ 747445. * Tue Sep 27 2011 Jon Ciesla - 2.1.1-2 - Switched to cli cron script, BZ 733957. * Tue Aug 16 2011 Jon Ciesla - 2.1.1-1 - New upstream. * Mon May 09 2011 Jon Ciesla - 2.0.3-1 - New upstream. * Wed Apr 27 2011 Jon Ciesla - 2.0.2-2 - Moving from Perl-Text-Aspell to aspell. * Fri Apr 22 2011 Jon Ciesla - 2.0.2-1 - New upstream. - Merged in, updated the language packs. - Massive spec cleanup. * Tue Feb 22 2011 Jon Ciesla - 1.9.11-1 - New upstream, security fixes. * Tue Feb 08 2011 Fedora Release Engineering - 1.9.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Oct 26 2010 Jon Ciesla - 1.9.10-1 - New upstream, MSA-10-0017. - htmlpurifier patch upstreamed. * Mon Oct 04 2010 Jon Ciesla - 1.9.9-3 - Correction of CAS symlink typo. * Thu Aug 19 2010 Jon Ciesla - 1.9.9-2 - Switch to system php-pear-CAS, BZ 577467, 620772. - Patching htmlpurifier, BZ 624754. * Tue Jun 22 2010 Jon Ciesla - 1.9.9-1 - Update to 1.9.9, BZ 605810. * Thu Mar 25 2010 Jon Ciesla - 1.9.8-1 - Update to 1.9.8, BZ 575905. * Tue Dec 08 2009 Jon Ciesla - 1.9.7-1 - Update to 1.9.7, BZ 544766. * Thu Nov 05 2009 Jon Ciesla - 1.9.6-2 - Reverted erroneous cron fix. * Thu Nov 05 2009 Jon Ciesla - 1.9.6-1 - Update to 1.9.6. - Make moodle-cron honor lock, BZ 533171. * Wed Sep 23 2009 Jon Ciesla - 1.9.5-3 - Using weekly snapshot downloaded 09/23/2009 for new PHP, BZ 525120 - Added Urdu installer. * Sat Jul 25 2009 Fedora Release Engineering - 1.9.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu May 14 2009 Jon Ciesla - 1.9.5-1 - Move symlink scripts from pretrans to post, pre. - 1.9.5. * Fri Apr 03 2009 Jon Ciesla - 1.9.4-7 - Move symlink scripts from pre to pretrans. - Corrented moodle-cron BZ 494090. * Wed Apr 01 2009 Jon Ciesla - 1.9.4-6 - Patch for CVE-2009-1171, BZ 493109. * Tue Mar 24 2009 Jon Ciesla - 1.9.4-5 - Update for freefont->gnu-free-fonts change. * Thu Feb 26 2009 Jon Ciesla - 1.9.4-4 - Fix for symlink dir replacement. * Mon Feb 23 2009 Jon Ciesla - 1.9.4-2 - Putting back bundled MagpieRSS due to incompatibility, BZ 486777. - Corrected moodle-cron. * Tue Feb 10 2009 Jon Ciesla - 1.9.4-1 - Update to 1.9.4 to fix CVE-2009-0499,0500,0501,0502. * Tue Jan 27 2009 Jon Ciesla - 1.9.3-6 - Dropped and symlinked to khmeros-base-fonts. * Tue Jan 20 2009 Jon Ciesla - 1.9.3-5 - Dropped and symlinked illegal sm and to fonts. - Symlinking to FreeSans. - Drop spell-check-logic.cgi, CVE-2008-5153, per upstream, BZ 472117, 472119, 472120. * Wed Dec 17 2008 Jon Ciesla - 1.9.3-4 - Texed fix, BZ 476709. * Fri Nov 07 2008 Jon Ciesla - 1.9.3-3 - Moved to weekly downloaded 11/7/08 to fix Snoopy CVE-2008-4796. * Fri Oct 31 2008 Jon Ciesla - 1.9.3-2 - Fix for BZ 468929, overactive cron job. * Wed Oct 22 2008 Jon Ciesla - 1.9.3-1 - Updated to 1.9.3. - Updated language packs to 22 Oct 2008 versions. * Wed Aug 06 2008 Jon Ciesla - 1.9.2-2 - Remove bundled adodb, use system php-adodb. BZ 457886. - Remove bundled magpie, use system php-magpierss. BZ 457886. * Wed Aug 06 2008 Jon Ciesla - 1.9.2-1 - Updated to 1.9.2. - Remove bundled Smarty, use system php-Smarty. BZ 457886. - Updated language packs to 06 Aug 2008 versions. * Mon Jun 23 2008 Jon Ciesla - 1.9.1-2 - Add php Requires, BZ 452341. * Thu May 22 2008 Jon Ciesla - 1.9.1-1 - Update to 1.9.1. - Updated language packs to 22 May 2008 versions. - Added Welsh, Uzbek support. - Added php-xmlrpc Requires. * Sat Mar 29 2008 Jon Ciesla - 1.9-1 - Update to 1.9. - Updated language packs to 01 April 2008 versions. * Sat Jan 12 2008 Jon Ciesla - 1.8.4-1 - Upgrade to 1.8.4, fix CVE-2008-0123. - Added Tamil (Sri Lanka) support. * Mon Nov 12 2007 Jon Ciesla - 1.8.3-2 - Corrected init script to prevent starting by default. * Thu Oct 25 2007 Jon Ciesla - 1.8.3-1 - Update to 1.8.3. - Fix init script for LSB BZ 246986. - Updated language packs to 25 October 2007 versions. - Added Armenian, Macedonian. * Thu Aug 16 2007 Jon Ciesla - 1.8.2-2 - License tag correction. * Wed Jul 25 2007 Jon Ciesla - 1.8.2-1 - Update to 1.8.2. - Updated language packs to the 25 July 2007 versions. - Added Mongolian, Gujerati, Lao, Tongan, Maori (Waikato Uni), Samoan, Tamil. * Tue May 15 2007 Jerry James - 1.8-5 - Fix language packs to not obsolete themselves. - Update language packs to the 15 May 2007 versions. * Mon May 7 2007 Jerry James - 1.8-4 - Mark a bunch of config.php files as configuration files. - Update language packs to the 07 May 2007 versions. * Fri Apr 20 2007 Jerry James - 1.8-3 - perl-Text-Aspell is now available, so use it. Don't make the spellchecker a separate package, however, since it is an htmlarea plugin, not a moodle plugin. Somebody we will provide htmlarea as a separate package. - Fix version numbers on obsoletes. - Update language packs to the 20 Apr 2007 versions. * Tue Apr 17 2007 Jerry James - 1.8-2 - Fix a CVS gaffe. - Obsolete language packs with old names. - Update language packs to the 17 Apr 2007 versions. * Fri Apr 13 2007 Jerry James - 1.8-1 - Update to 1.8 (fixes BZ 232103) - Own /var/www/moodle/web (BZ 233882) - Drop unused mimetex patches - Add executable bits to 3 scripts that should have them - Remove the installation language files from the main package (twice) - Package the moodle language files, not just the installation files - Rename/add several language files to match the upstream list - Minor typo fixes in the scripts * Sun Jan 07 2007 Mike McGrath - 1.7-1 - Security fix for BZ# 220041 * Sat Oct 28 2006 Mike McGrath - 1.6.3-3 - Release bump * Sun Oct 22 2006 Mike McGrath - 1.6.3-2 - Added requires php-mysql * Fri Oct 13 2006 Mike McGrath - 1.6.3-1 - Major changes, update to 1.6.3 - SpellChecker moved - Language install method has been changed (added a cp) * Thu Sep 07 2006 Mike McGrath - 1.5.4-2 - Release bump * Thu Aug 24 2006 Jason L Tibbitts III - 1.5.4-1 - Update to 1.5.4. - Remove SA18267.patch; not needed in 1.5.4. - Add -nn subpackage for new Norwegian Nynorsk language. - Change description for -no subpackage to indicate Bokmal explicitly. Note that I have purposefully misspelled "Bokmal" in order to avoid introducing a non-ASCII character. * Mon Jan 9 2006 Ignacio Vazquez-Abrams 1.5.3-2 - Add security patch for adodb (SA18267) * Sat Dec 10 2005 Ignacio Vazquez-Abrams 1.5.3-1 - Update to 1.5.3 - Split off spell check package due to lack of Text::Aspell * Wed Oct 12 2005 Ignacio Vazquez-Abrams 1.5.2-1 - Initial RPM release