rpms/mediawiki/EL-5 mediawiki-1.14.0-commoncode.patch, NONE, 1.1 mediawiki.spec, 1.15, 1.16 sources, 1.11, 1.12

Stephen J Smoogen smooge at fedoraproject.org
Tue Mar 10 19:09:22 UTC 2009


Author: smooge

Update of /cvs/pkgs/rpms/mediawiki/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5015

Modified Files:
	mediawiki.spec sources 
Added Files:
	mediawiki-1.14.0-commoncode.patch 
Log Message:
Updated tree to F-10. Built and tested on my system.



mediawiki-1.14.0-commoncode.patch:

--- NEW FILE mediawiki-1.14.0-commoncode.patch ---
--- mediawiki-1.14.0/includes/templates/NoLocalSettings.php.commoncode	2009-02-20 14:58:49.000000000 +0100
+++ mediawiki-1.14.0/includes/templates/NoLocalSettings.php	2009-02-28 19:09:38.000000000 +0100
@@ -61,7 +61,7 @@
 		<h1>MediaWiki <?php echo $wgVersion ?></h1>
 		<div class='error'>
 		<?php
-		if ( file_exists( 'config/LocalSettings.php' ) ) {
+		if ( file_exists( $DIR . '/config/LocalSettings.php' ) ) {
 			echo( 'To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory.' );
 		} else {
 			echo( "Please <a href=\"${path}config/index.{$ext}\" title='setup'> set up the wiki</a> first." );
--- mediawiki-1.14.0/includes/WebStart.php.commoncode	2008-11-07 17:38:01.000000000 +0100
+++ mediawiki-1.14.0/includes/WebStart.php	2009-02-28 19:10:12.000000000 +0100
@@ -103,14 +103,14 @@
 	# LocalSettings.php is the per site customization file. If it does not exit
 	# the wiki installer need to be launched or the generated file moved from
 	# ./config/ to ./
-	if( !file_exists( "$IP/LocalSettings.php" ) ) {
+	if( !file_exists( "$DIR/LocalSettings.php" ) ) {
 		require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version
 		require_once( "$IP/includes/templates/NoLocalSettings.php" );
 		die();
 	}
 
 	# Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked)
-	require_once( "$IP/LocalSettings.php" );
+	require_once( "$DIR/LocalSettings.php" );
 }
 wfProfileOut( 'WebStart.php-conf' );
 
--- mediawiki-1.14.0/maintenance/archives/upgradeWatchlist.php.commoncode	2008-07-11 00:00:04.000000000 +0200
+++ mediawiki-1.14.0/maintenance/archives/upgradeWatchlist.php	2009-02-28 19:09:38.000000000 +0100
@@ -15,7 +15,7 @@
 # Convert watchlists to new format
 
 global $IP;
-require_once( "../LocalSettings.php" );
+require_once( "$DIR/LocalSettings.php" );
 require_once( "$IP/Setup.php" );
 
 $wgTitle = Title::newFromText( "Rebuild links script" );
--- mediawiki-1.14.0/maintenance/update.php.commoncode	2008-07-19 14:15:07.000000000 +0200
+++ mediawiki-1.14.0/maintenance/update.php	2009-02-28 19:09:38.000000000 +0100
@@ -10,6 +10,9 @@
  * @ingroup Maintenance
  */
 
+$DIR=getcwd();
+chdir('/usr/share/mediawiki');
+
 /** */
 $wgUseMasterForMaintenance = true;
 $options = array( 'quick', 'nopurge' );
--- mediawiki-1.14.0/maintenance/commandLine.inc.commoncode	2008-06-16 22:21:26.000000000 +0200
+++ mediawiki-1.14.0/maintenance/commandLine.inc	2009-02-28 19:09:38.000000000 +0100
@@ -182,7 +182,7 @@
 	if ( isset( $options['conf'] ) ) {
 		$settingsFile = $options['conf'];
 	} else {
-		$settingsFile = "$IP/LocalSettings.php";
+		$settingsFile = "$DIR/LocalSettings.php";
 	}
 	if ( isset( $options['wiki'] ) ) {
 		$bits = explode( '-', $options['wiki'] );
@@ -208,7 +208,7 @@
 
 	$adminSettings = isset( $options['aconf'] )
 		? $options['aconf']
-		: "{$IP}/AdminSettings.php";
+		: "{$DIR}/AdminSettings.php";
 	if( is_readable( $adminSettings ) )
 		require_once( $adminSettings );
 
--- mediawiki-1.14.0/config/index.php.commoncode	2009-02-20 15:17:47.000000000 +0100
+++ mediawiki-1.14.0/config/index.php	2009-02-28 19:09:38.000000000 +0100
@@ -19,6 +19,8 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
+$DIR=dirname( getcwd() );
+chdir('/usr/share/mediawiki/config');
 error_reporting( E_ALL );
 header( "Content-type: text/html; charset=utf-8" );
 @ini_set( "display_errors", true );
@@ -27,7 +29,7 @@
 $wgRequestTime = microtime( true );
 
 # Attempt to set up the include path, to fix problems with relative includes
-$IP = dirname( dirname( __FILE__ ) );
+$IP = '/usr/share/mediawiki';
 define( 'MW_INSTALL_PATH', $IP );
 
 # Define an entry point and include some files
@@ -212,18 +214,18 @@
 
 /* Check for existing configurations and bug out! */
 
-if( file_exists( "../LocalSettings.php" ) ) {
+if( file_exists( "$DIR/LocalSettings.php" ) ) {
 	$script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php';
 	dieout( "<p><strong>Setup has completed, <a href='../$script'>your wiki</a> is configured.</strong></p>
 	<p>Please delete the /config directory for extra security.</p>" );
 }
 
-if( file_exists( "./LocalSettings.php" ) ) {
+if( file_exists( "$DIR/LocalSettings.php" ) ) {
 	writeSuccessMessage();
 	dieout( '' );
 }
 
-if( !is_writable( "." ) ) {
+if( !is_writable( $DIR . "/config" ) ) {
 	dieout( "<h2>Can't write config file, aborting</h2>
 
 	<p>In order to configure the wiki you have to make the <tt>config</tt> subdirectory
@@ -1133,7 +1135,7 @@
 		$localSettings = "<" . "?php$endl$local";
 		// Fix up a common line-ending problem (due to CVS on Windows)
 		$localSettings = str_replace( "\r\n", "\n", $localSettings );
-		$f = fopen( "LocalSettings.php", 'xt' );
+		$f = fopen( $DIR . "/config/LocalSettings.php", 'xt' );
 
 		if( $f == false ) {
 			print( "</li>\n" );
@@ -1680,7 +1682,7 @@
 if( defined( 'MW_INSTALL_PATH' ) ) {
 	\$IP = MW_INSTALL_PATH;
 } else {
-	\$IP = dirname( __FILE__ );
+	\$IP = '/usr/share/mediawiki';
 }
 
 \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" );
--- mediawiki-1.14.0/index.php.commoncode	2008-12-28 16:17:21.000000000 +0100
+++ mediawiki-1.14.0/index.php	2009-02-28 19:09:38.000000000 +0100
@@ -35,6 +35,9 @@
  */
 
 
+$DIR=getcwd();
+chdir('/usr/share/mediawiki');
+
 # Initialise common code
 $preIP = dirname( __FILE__ );
 require_once( "$preIP/includes/WebStart.php" );


Index: mediawiki.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mediawiki/EL-5/mediawiki.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mediawiki.spec	1 Oct 2008 20:15:26 -0000	1.15
+++ mediawiki.spec	10 Mar 2009 19:08:51 -0000	1.16
@@ -1,11 +1,12 @@
 Summary: A wiki engine
 Name: mediawiki
-Version: 1.11.2
-Release: 1%{?dist}
-License: GPL
+Version: 1.14.0
+Release: 45%{?dist}
+License: GPLv2+
 Group: Applications/Internet
 URL: http://www.mediawiki.org/
-Source0: http://download.wikimedia.org/mediawiki/1.11/%{name}-%{version}.tar.gz
+Source0: http://download.wikimedia.org/mediawiki/1.14/%{name}-%{version}.tar.gz
+Patch0: mediawiki-1.14.0-commoncode.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: ocaml >= 3.06
 # to make sure the "apache" group is created before mediawiki is installed
@@ -13,13 +14,8 @@
 Requires: php >= 5, php-xml
 Requires: php-mysql, php-pgsql
 Requires: diffutils, ImageMagick, php-gd
-Requires: tetex-latex, tetex-dvips
-Provides: mediawiki-math = %{version}-%{release}
-Obsoletes: mediawiki-math < %{version}-%{release}
-
-# Ugly workaround, don't do that at home, kids!
-# #250992
-ExcludeArch: ppc64
+Requires: mediawiki-nomath = %{version}-%{release}
+Requires: mediawiki-math = %{version}-%{release}
 
 %description
 MediaWiki is the software used for Wikipedia and the other Wikimedia
@@ -32,47 +28,48 @@
 interface. Remember to remove the config dir after completing the
 configuration.
 
+%package nomath
+Summary: mediawiki w/o texvc.
+Group: Development/Tools
+
+%description nomath
+This subpackage contains all mediawiki parts except the ones to aid in
+creating inline math. This is done for minimal wiki installs that do
+not require math formulae and therefore no dependencies to LaTeX are
+set up.
+
+%package math
+Summary: Math support for mediawiki.
+Group: Development/Tools
+Requires: mediawiki = %{version}-%{release}
+Requires: mediawiki-nomath = %{version}-%{release}
+Requires: tetex-latex, tetex-dvips
+
+%description math
+This subpackage contains the math support for mediawiki.
+
 %prep
 %setup -q
+%patch0 -p1 -b .commoncode
 
 %build
-cd ./math
+cd math
 make
-cd ..
 
 %install
 rm -rf %{buildroot}
 mkdir -p %{buildroot}%{_datadir}/mediawiki
 cp -a * %{buildroot}%{_datadir}/mediawiki/
 
-# remove Test Trees
-rm -fr %{buildroot}%{_datadir}/mediawiki/{t,test}
-
-# remove tables for ZH char sets. Breaks build.
+# remove undeeded parts
+rm -fr %{buildroot}%{_datadir}/mediawiki/{t,test,tests}
 rm -fr %{buildroot}%{_datadir}/mediawiki/includes/zhtable
 
-## Remove any .htaccess files that might have creeped in.
+## Remove any .htaccess/.cmi files that might have creeped in.
 ## Many directories have them there.
-for file in $( find %{buildroot} -type f -print | grep .htaccess$); do
-	rm $file
-done
-
-## Remove any *.cmi files that might have creeped in 
-#find %{buildroot}%{_datadir}/mediawiki/ -name \*.cmi | xargs rm
-for file in $( find %{buildroot} -type f -print | grep .cmi$); do
-	rm $file
-done
-
-## Find and remove subversion files
-for file in $( find %{buildroot} -type f -print | grep .svnignore$); do
-	rm $file
-done
-
-## Find and remove .commoncode files. Changed construct to not break
-## build if files do not exist
-for file in $( find %{buildroot} -type f -print | grep .commoncode$ ); do
-	rm $file
-done
+find %{buildroot}%{_datadir}/mediawiki/ \
+  \( -name .htaccess -or -name \*.cmi \) \
+  | xargs rm
 
 # fix permissions
 chmod +x %{buildroot}%{_datadir}/mediawiki/bin/*
@@ -85,9 +82,14 @@
      %{buildroot}%{_libdir}/mediawiki/
 fi
 
+## Find and remove subversion files
+find %{buildroot} -name .svnignore | xargs rm
+## Find and remove .commoncode files.
+find %{buildroot} -name \*.commoncode | xargs rm
+
 mkdir -p %{buildroot}/var/www/wiki
 cd %{buildroot}/var/www/wiki/
-mkdir images
+mkdir -p images/{archive,deleted,temp,thumb}
 cp -a %{buildroot}%{_datadir}/mediawiki/config .
 ln -s %{_datadir}/mediawiki/index.php index.php
 
@@ -97,15 +99,53 @@
 %files
 %defattr(-,root,root,-)
 %doc COPYING FAQ HISTORY README RELEASE-NOTES UPGRADE
+
+%files nomath
+%defattr(-,root,root,-)
+%doc COPYING
 %{_datadir}/mediawiki
 %attr(-,apache,apache) %dir %{_datadir}/mediawiki/config
-%{_datadir}/mediawiki/config
-%{_libdir}/mediawiki
+%{_datadir}/mediawiki/config/*
 /var/www/wiki
 %attr(-,apache,apache) %dir /var/www/wiki/config
 /var/www/wiki/config/*
 
+%files math
+%defattr(-,root,root,-)
+%{_libdir}/mediawiki
+
+
 %changelog
+* Tue Mar 10 2009  <smooge at gmail.com> - 1.14.0-45
+- Merged with F-10's 1.14.0
+
+
+* 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
+
 * Fri May 16 2008 Stephen John Smoogen <smooge at canopus.unm.edu> - 1.12.0-1
 - Began testing. {remove commoncode entry.}
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/mediawiki/EL-5/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sources	1 Oct 2008 20:15:26 -0000	1.11
+++ sources	10 Mar 2009 19:08:51 -0000	1.12
@@ -1 +1 @@
-12e81f27a37b15b9d1ed110d6f48b35f  mediawiki-1.11.2.tar.gz
+36bfd924e92b61a6f5fe70c6bc8e5aac  mediawiki-1.14.0.tar.gz




More information about the fedora-extras-commits mailing list