[mediawiki115] Initial import (#000)
Stephen J Smoogen
smooge at fedoraproject.org
Sat Nov 13 01:42:30 UTC 2010
commit cf7745c5451e0dbe5bb0cc20c1778cd1a7bf202e
Author: Stephen Smoogen <smooge at xanadu.int.smoogespace.com>
Date: Fri Nov 12 18:42:16 2010 -0700
Initial import (#000)
README.RPM | 107 ++++++++++++++++
mediawiki115-sharepath.patch | 76 ++++++++++++
mediawiki115.conf | 18 +++
mediawiki115.spec | 280 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 481 insertions(+), 0 deletions(-)
---
diff --git a/README.RPM b/README.RPM
new file mode 100644
index 0000000..51d41ce
--- /dev/null
+++ b/README.RPM
@@ -0,0 +1,107 @@
+This mediawiki package differs from the main mediawiki package by not
+patching in support for multiple instances (e.g. Wiki Farms).
+
+RPM specific instruction for MediaWiki
+======================================
+
+- this is RPM packaged MediaWiki
+- this package is prepared to run one global Wiki
+- global Wiki is under /var/www/mediawiki115/ directory
+- this directory contain only files for this one instance:
+ index.php - symbolic link to /usr/share/mediawiki/index.php
+ LocalSettings.php - local configuration
+ config - directory for startup configuration
+ images - directory structure for uploaded files (images etc)
+
+How to run your Wiki
+====================
+
+1) install packages mediawiki115 and httpd, then (re)start your Web server
+ and make sure it will autostart after reboot:
+
+ yum install httpd mediawiki115
+ /etc/init.d/httpd restart
+ chkconfig httpd on
+
+2) install MySQL (or PostreSQL) database, run it and make sure it will
+ autostart after reboot:
+
+ yum install mysql-server
+ /etc/init.d/mysqld start
+ chkconfig mysqld on
+
+3) set up admin (root) access to your preffered SQL database
+
+ mysqladmin password YourSecretPassword
+
+4) allow write access to /var/www/mediawiki115/config by:
+
+ chmod a+w /var/www/mediawiki115/config
+
+5) use WebBrowser to go to http://localhost/wiki115/config and fill
+ up needed info on this page to create LocalSettings.php
+ If you would like to config your Wiki from remote host, you have
+ to allow access to the config directory by modyfying directory
+ directive in /etc/httpd/conf.d/mediawiki115.conf
+
+6) move /var/www/mediawiki115/config/LocalSettings.php to /var/www/mediawiki115/
+ and change owner to root:
+
+ mv /var/www/mediawiki115/config/LocalSettings.php /var/www/mediawiki115
+ chown root:root /var/www/mediawiki115/LocalSettings.php
+
+7) disable write access to /var/www/mediawiki115/config by:
+
+ chmod 775 /var/www/mediawiki115/config
+
+8) modify your /etc/httpd/conf.d/mediawiki115.conf to fit your needs
+
+
+How to run another independent Wiki
+===================================
+
+1) create new directory in the user's public_html directory, for
+ example:
+
+ mkdir /home/myhomedir/public_html/wiki
+
+2) copy startup config directory there by:
+
+ cp -a /usr/share/mediawiki115/config /home/myhomedir/public_html/wiki
+
+3) create symbolic link to your common installation
+
+ cd /home/myhomedir/public_html/wiki
+ DIR=/usr/share/mediawiki115/
+
+ LINKS="StartProfiler.php api.php extensions includes index.php languages maintenance opensearch_desc.php serialized skins"
+ for i in ${LINKS}; do
+ ln -s ${DIR}/${i} ./${i}
+ done
+
+
+4) create upload structure and allow write access (for uploaded files)
+
+ cd /home/myhomedir/public_html/wiki
+ mkdir -p images/{archive,deleted,temp,thumb}
+ chmod 2777 images images/*
+
+5) alter your httpd server configuration by adding this lines to the
+ config file /etc/httpd/conf.d/mediawiki115.conf:
+
+ Alias /~myhomedir/wiki/skins /usr/share/mediawiki115/skins
+ Alias /~myhomedir/wiki/images /home/myhomedir/ke/public_html/wiki/images
+ Alias /~myhomedir/wiki /home/myhomedir/ke/public_html/wiki/index.php
+
+8) reload your server:
+
+ /etc/init.d/httpd reload
+
+7) go to http://localhost/~myhomedir/wiki/config and fill the form
+
+8) move newly created LocalSettings.php and change ownership by:
+
+ mv /home/myhomedir/public_html/wiki/config/LocalSettings.php /home/myhomedir/public_html/wiki
+ chown myhomedir:myhomedir /home/myhomedir/public_html/wiki/LocalSettings.php
+
+===
diff --git a/mediawiki115-sharepath.patch b/mediawiki115-sharepath.patch
new file mode 100644
index 0000000..40d767f
--- /dev/null
+++ b/mediawiki115-sharepath.patch
@@ -0,0 +1,76 @@
+diff -up mediawiki-1.15.5/config/index.php.sharepath mediawiki-1.15.5/config/index.php
+--- mediawiki-1.15.5/config/index.php.sharepath 2009-05-07 23:51:15.000000000 -0600
++++ mediawiki-1.15.5/config/index.php 2010-09-05 14:31:48.637097787 -0600
+@@ -27,7 +27,10 @@ header( "Content-type: text/html; charse
+ $wgRequestTime = microtime( true );
+
+ # Attempt to set up the include path, to fix problems with relative includes
+-$IP = dirname( dirname( __FILE__ ) );
++#$IP = dirname( dirname( __FILE__ ) );
++$IP = '/usr/share/mediawiki115';
++
++
+ define( 'MW_INSTALL_PATH', $IP );
+
+ # Define an entry point and include some files
+@@ -599,7 +602,7 @@ print "<li style='font-weight:bold;color
+ }
+
+ $conf->DBserver = importPost( "DBserver", "localhost" );
+- $conf->DBname = importPost( "DBname", "wikidb" );
++ $conf->DBname = importPost( "DBname", "wikidb115" );
+ $conf->DBuser = importPost( "DBuser", "wikiuser" );
+ $conf->DBpassword = importPost( "DBpassword" );
+ $conf->DBpassword2 = importPost( "DBpassword2" );
+diff -up mediawiki-1.15.5/includes/DefaultSettings.php.sharepath mediawiki-1.15.5/includes/DefaultSettings.php
+--- mediawiki-1.15.5/includes/DefaultSettings.php.sharepath 2010-07-28 01:12:30.000000000 -0600
++++ mediawiki-1.15.5/includes/DefaultSettings.php 2010-09-05 14:25:57.055159949 -0600
+@@ -1737,7 +1737,7 @@ $wgSpecialPageCacheUpdates = array(
+ */
+ $wgUseTeX = false;
+ /** Location of the texvc binary */
+-$wgTexvc = './math/texvc';
++$wgTexvc = '/usr/bin/texvc115';
+
+ #
+ # Profiling / debugging
+diff -up mediawiki-1.15.5/maintenance/checkAutoLoader.php.sharepath mediawiki-1.15.5/maintenance/checkAutoLoader.php
+--- mediawiki-1.15.5/maintenance/checkAutoLoader.php.sharepath 2008-08-08 11:34:36.000000000 -0600
++++ mediawiki-1.15.5/maintenance/checkAutoLoader.php 2010-09-05 14:25:57.056161269 -0600
+@@ -1,7 +1,9 @@
+ <?php
+ if ( php_sapi_name() != 'cli' ) exit;
+
+-$IP = dirname(__FILE__) .'/..';
++#$IP = dirname(__FILE__) .'/..';
++$IP = '/usr/share/mediawiki114';
++
+ require( "$IP/includes/AutoLoader.php" );
+ $files = array_unique( $wgAutoloadLocalClasses );
+
+diff -up mediawiki-1.15.5/maintenance/language/date-formats.php.sharepath mediawiki-1.15.5/maintenance/language/date-formats.php
+--- mediawiki-1.15.5/maintenance/language/date-formats.php.sharepath 2008-05-20 11:13:28.000000000 -0600
++++ mediawiki-1.15.5/maintenance/language/date-formats.php 2010-09-05 14:25:57.057160509 -0600
+@@ -7,7 +7,8 @@
+ $ts = '20010115123456';
+
+
+-$IP = dirname( __FILE__ ) . '/../..';
++#$IP = dirname( __FILE__ ) . '/../..';
++$IP = '/usr/share/mediawiki114';
+ require_once( "$IP/maintenance/commandLine.inc" );
+
+ foreach ( glob( "$IP/languages/messages/Messages*.php" ) as $filename ) {
+diff -up mediawiki-1.15.5/maintenance/language/validate.php.sharepath mediawiki-1.15.5/maintenance/language/validate.php
+--- mediawiki-1.15.5/maintenance/language/validate.php.sharepath 2008-05-20 11:13:28.000000000 -0600
++++ mediawiki-1.15.5/maintenance/language/validate.php 2010-09-05 14:25:57.058160371 -0600
+@@ -13,7 +13,8 @@ array_shift( $argv );
+ define( 'MEDIAWIKI', 1 );
+ define( 'NOT_REALLY_MEDIAWIKI', 1 );
+
+-$IP = dirname( __FILE__ ) . '/../..';
++# $IP = dirname( __FILE__ ) . '/../..';
++$IP = '/usr/share/mediawiki114';
+
+ require_once( "$IP/includes/Defines.php" );
+ require_once( "$IP/languages/Language.php" );
diff --git a/mediawiki115.conf b/mediawiki115.conf
new file mode 100644
index 0000000..9b8abc3
--- /dev/null
+++ b/mediawiki115.conf
@@ -0,0 +1,18 @@
+# This is a sample configuration for a wiki instance located under
+# /var/www/mediawiki115 and exposed as http://thishost/wiki115. Please
+# read /usr/share/doc/mediawiki115-*/README.RPM on whether to use this
+# instance or create copies of it.
+
+# Alias /wiki115 /var/www/mediawiki115/index.php
+# Alias /wiki115/index.php /var/www/mediawiki115/index.php
+# Alias /wiki115/api.php /var/www/mediawiki115/api.php
+# Alias /wiki115/opensearch_desc.php /var/www/mediawiki115/opensearch_desc.php
+# Alias /wiki115/skins /var/www/mediawiki115/skins
+# Alias /wiki115/images /var/www/mediawiki115/images
+
+# Remove this after installing.
+#Alias /wiki115/config /var/www/mediawiki115/config
+
+#<Directory /var/www/mediawiki115>
+# Options FollowSymLinks
+#</Directory>
diff --git a/mediawiki115.spec b/mediawiki115.spec
new file mode 100644
index 0000000..c5ac35f
--- /dev/null
+++ b/mediawiki115.spec
@@ -0,0 +1,280 @@
+%define mwdatadir %{_datadir}/mediawiki115
+%define mwikidir %{_var}/www/mediawiki115
+
+Summary: A wiki engine
+Name: mediawiki115
+Version: 1.15.5
+Release: 6%{?dist}
+License: GPLv2+
+Group: Development/Tools
+URL: http://www.mediawiki.org/
+Source0: http://download.wikimedia.org/mediawiki/1.15/mediawiki-%{version}.tar.gz
+Source1: mediawiki115.conf
+Source2: README.RPM
+Patch0: mediawiki115-sharepath.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+ExcludeArch: sparc64 s390 s390x
+BuildRequires: ocaml >= 3.06, prelink
+Requires(pre): httpd
+Requires: php >= 5, php-xml, php-mysql, php-pgsql, php-gd
+Requires: diffutils, tex(latex), tex(dvips)
+
+%description
+MediaWiki is the software used for Wikipedia and the other Wikimedia
+Foundation websites. Compared to other wikis, it has an excellent
+range of features and support for high-traffic websites using multiple
+servers
+
+%prep
+%setup -q -n mediawiki-%{version}
+%patch0 -p1 -b .sharepath
+##
+## Copy over the README's
+cp -p %{SOURCE2} .
+
+%build
+cd math
+make
+if [[ -f /usr/bin/execstack ]]; then
+ execstack -c texvc
+fi
+
+
+%install
+rm -rf %{buildroot}
+
+# move away the documentation to the final folder.
+mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
+
+# now copy the rest to the buildroot.
+mkdir -p %{buildroot}%{mwdatadir}
+
+FILES="AdminSettings.sample StartProfiler.php api.php api.php5 img_auth.php img_auth.php5 index.php index.php5 install-utils.inc opensearch_desc.php opensearch_desc.php5 php5.php5 profileinfo.php redirect.php redirect.php5 redirect.phtml thumb.php thumb.php5 trackback.php trackback.php5 wiki.phtml"
+
+DIRECS="bin config extensions images includes languages maintenance serialized skins"
+
+for i in ${FILES} ${DIRECS}; do
+ cp -a ./${i} %{buildroot}%{mwdatadir}/${i}
+done
+
+# remove unneeded parts
+rm -fr %{buildroot}%{mwdatadir}/includes/zhtable
+find %{buildroot}%{mwdatadir}/ \( -name .htaccess \) -exec rm '{}' \;
+find %{buildroot}%{mwdatadir}/ \( -name \*.cmi \) -exec rm '{}' \;
+find %{buildroot}%{mwdatadir}/ \( -name .svgignore \) -exec rm '{}' \;
+find %{buildroot}%{mwdatadir}/ \( -name \*.sharepath \) -exec rm '{}' \;
+
+## REMOVE FOR RPMLINT
+rm -f %{buildroot}%{mwdatadir}/maintenance/archives/patch-image_reditects.sql
+rm -f %{buildroot}%{mwdatadir}/maintenance/archives/patch-page_no_title_convert.sql
+
+# fix permissions
+chmod +x %{buildroot}%{mwdatadir}/bin/*
+find %{buildroot}%{mwdatadir} -name \*.pl | xargs chmod +x
+
+mkdir -p %{buildroot}%{_bindir}
+install -p math/texvc %{buildroot}%{_bindir}/texvc115
+
+# create a default instance of which other instances can be copied
+mkdir -p %{buildroot}%{mwikidir}
+cd %{buildroot}%{mwikidir}/
+
+cp -a %{buildroot}%{mwdatadir}/images .
+cp -a %{buildroot}%{mwdatadir}/config .
+
+LINKS="StartProfiler.php api.php extensions includes index.php languages maintenance opensearch_desc.php serialized skins"
+for i in ${LINKS}; do
+ ln -s %{mwdatadir}/${i} ./${i}
+done
+
+## Remind user to remove this.
+##
+ln -s %{mwdatadir}/config ./config
+
+
+mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
+install -m 0644 -p %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/mediawiki115.conf
+
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING CREDITS FAQ HISTORY INSTALL README RELEASE-NOTES UPGRADE docs
+%doc README.RPM
+%attr(-,apache,apache) %dir %{mwdatadir}/images
+%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/conf.d/mediawiki115.conf
+%attr(0755,root,root) %{_bindir}/*
+%{mwikidir}
+%{mwdatadir}
+
+
+%changelog
+* Tue Oct 12 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-6
+- Change tex names to provide names
+- Try a better find to remove ignored files
+- Remove execstack
+
+* Tue Sep 7 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-5
+- Fix minor issues with patch and get works for me version
+
+* Fri Sep 3 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-4
+- Add patch from https://bugzilla.redhat.com/show_bug.cgi?id=484855
+
+* Mon Aug 30 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-3
+- More little fixes to make a sort of makefile inside of spec
+
+* Thu Aug 26 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-2
+- Make more rpmlint fixes
+
+* Thu Aug 26 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-1
+- Made a proper doc section versus a mv
+- Made it so we don't over-write an played with mediawiki.conf file
+
+* Wed Aug 25 2010 Stephen Smoogen <smooge at xanadu.int.smoogespace.com> - 1.15.5-1
+- Take mainstream mediawiki-1.15 spec file and update
+- Changed Readme.RPM to https://bugzilla.redhat.com/show_bug.cgi?id=475841
+ (thankyou Milan Kerslager)
+- Remove commoncode patch due to https://fedorahosted.org/fesco/ticket/225
+
+* Wed Apr 7 2010 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.3-53
+- Update to 1.15.3 (Fixes login CSRF vulnerability).
+
+* Wed Mar 31 2010 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.2-51
+- Update to 1.15.2 (Fixes CSS validation issue and data leakage
+ vulnerability).
+
+* Fri Jul 24 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.1-50
+- Add a README.RPM and a sample apache mediawiki.conf file.
+
+* Thu Jul 23 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.1-49
+- All (runtime) dependencies from mediawiki need to move to
+ mediawiki-nomath.
+
+* Mon Jul 13 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.1-48
+- Update to 1.15.1 (Fixes XSS vulnerability).
+
+* Sat Jul 11 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.0-47
+- Fix api.php breakage.
+
+* Sat Jun 13 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.15.0-46
+- Update to 1.15.0.
+
+* Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x at lists.fedoraproject.org>
+- ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs
+ (added sparc64 per request from the sparc maintainer)
+
+* Sat Feb 28 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.14.0-45
+- Update to 1.14.0.
+
+* Sun Feb 22 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.4-44
+- Split package up, so some users can decide to not install math
+ support (results in smaller installs), see RH bug #485447.
+
+* Wed Feb 18 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.4-43
+- Update to 1.13.4, closes RH bug #485728.
+
+* Tue Dec 23 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.3-42
+- Update to 1.13.3, closes RH bug #476621 (CVE-2008-5249,
+ CVE-2008-5250, CVE-2008-5252 and CVE-2008-5687, CVE-2008-5688)
+
+* Sun Oct 5 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.2-41
+- Update to 1.13.2.
+
+* Sun Aug 24 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.0-40
+- Use consistently Patch0 and %%patch0.
+
+* Sat Aug 16 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.13.0-39
+- Update to 1.13.0.
+
+* Wed May 21 2008 Tom "spot" Callaway <tcallawa at redhat.com> 1.10.4-40
+- fix license tag
+
+* Tue Mar 4 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.10.4-38
+- Update to 1.10.4.
+
+* Tue Feb 17 2008 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.10.3-37
+- Update to 1.10.3.
+- Fixes CVE-2008-0460 (bug #430286).
+
+* Wed May 9 2007 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.10.0-35
+- Update to 1.10.0.
+
+* Thu Feb 22 2007 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.9.3-34
+- Update to 1.9.4.
+
+* Mon Feb 5 2007 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.9.2-33
+- Update to 1.9.2.
+
+* Fri Feb 2 2007 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.9.1-32
+- Fix permissions.
+- Remove some parts not needed at runtime anymore.
+
+* Thu Feb 1 2007 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.9.1-31
+- Update to 1.9.1.
+
+* Sat Oct 14 2006 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.8.2-28
+- Update to 1.8.2.
+
+* Wed Oct 11 2006 Axel Thimm <Axel.Thimm at ATrpms.net> - 1.8.1-27
+- Update to 1.8.1.
+- Update to 1.8.0.
+
+* Mon Jul 10 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.7.1.
+
+* Wed Jun 7 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.6.7.
+
+* Fri May 26 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.6.6.
+
+* Thu Apr 13 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.6.3.
+
+* Sat Apr 8 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.6.2.
+
+* Fri Apr 7 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.6.1.
+
+* Mon Apr 3 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.8.
+
+* Thu Mar 2 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.7.
+
+* Thu Jan 19 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.6.
+
+* Fri Jan 6 2006 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.5.
+
+* Sun Dec 4 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.3.
+
+* Fri Nov 4 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.2.
+
+* Mon Oct 31 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.1.
+
+* Thu Oct 6 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5.0.
+
+* Fri Sep 2 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5rc4.
+
+* Sun Jul 31 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5beta4.
+
+* Fri Jul 8 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5beta3.
+
+* Tue Jul 5 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Update to 1.5beta2.
+
+* Sun Jul 3 2005 Axel Thimm <Axel.Thimm at ATrpms.net>
+- Initial build.
+
More information about the scm-commits
mailing list