--- rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/06/01 13:28:34 1.9 +++ rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/07/12 15:13:30 1.14 @@ -1,19 +1,21 @@ -# $Id: smeserver-mediawiki.spec,v 1.8 2022/06/01 13:27:57 brianr Exp $ +# $Id: smeserver-mediawiki.spec,v 1.13 2022/07/12 11:47:01 brianr Exp $ # Authority: ber_die # Name: Dietmar Berteld %define name smeserver-mediawiki -%define version 1.37.2 -%define release 2 +%define version 1.38.2 +%define release 1 -Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.37.2 +Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.38.0 Name: %{name} Version: %{version} Release: %{release}%{?dist} License: GPL Group: /Web/Applications -Source: %{name}-%{version}-1.tar.gz -#Patch0: smeserver-mediawiki-1.6.10-1.patch +Source: %{name}-%{version}.tar.gz + +#Patch0: smeserver-mediawiki-1.38.1-Fix-sql-create.patch +#Patch0: smeserver-mediawiki-1.37.2-Fix-up-password-generation-and-localsettings.patch #Patch1: smeserver-mediawiki-1.6.10-Update-to-SME10.patch URL: http://mediawiki.org/ @@ -31,6 +33,25 @@ After installation open your webbrowser http://your_e-smith-server_adress/wiki %changelog +* Tue Jul 12 2022 Brian Read 1.38.2-1.sme +- Update version to Mediawiki-1.38.2 [sme: 11987] +- Fix initial admin user + +* Thu Jun 09 2022 Brian Read 1.38.1-2.sme +- fix sql user create [SME: 11987] + +* Wed Jun 08 2022 Brian Read 1.38.0-2.sme +- Update version to Mediawiki-1.38.1 [sme: 11987] + +* Fri Jun 03 2022 Brian Read 1.38.0-2.sme +- update sql create [SME: 11987] + +* Fri Jun 03 2022 Brian Read 1.38.0-1.sme +- Rollup tar file to include mediawiki 1.38.0 [SME: 11987] + +* Wed Jun 01 2022 Brian Read 1.37.2-3.sme +- Fix-up-password-generation-and-localsettings [SME: 11987] + * Wed Jun 01 2022 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. @@ -91,6 +112,7 @@ rm -rf $RPM_BUILD_ROOT #%patch1 -p1 %build +perl createlinks %install rm -rf $RPM_BUILD_ROOT @@ -128,7 +150,8 @@ esac APP=MediaWiki URL=wiki WORKDIR=/root -INSTALLDIR=/usr/share/doc/mediawiki-1.37.2/Sources +MEDIAWIKIVERSION='1.38.2' +INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources HTMLDIR=/opt/mediawiki MYSQLDB=mediawiki MYSQLUSER=mediawikiuser @@ -144,16 +167,17 @@ rm -rf lang* #Untar application echo "Decompressing files..." mkdir -p $HTMLDIR -tar xzf $INSTALLDIR/mediawiki-1.37.2.tar.gz -C /opt +tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt case $UPDATE in - 0) mv -f /opt/mediawiki-1.37.2/* $HTMLDIR ;; - *) cp -ufR /opt/mediawiki-1.37.2/* $HTMLDIR --reply=yes ;; + 0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; + *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; esac -rm -rf /opt/mediawiki-1.37.2 +rm -rf /opt/mediawiki-$MEDIAWIKIVERSION cp $INSTALLDIR/sme.* $HTMLDIR/skins/common/images #Prepare config settings sed 's.mediawikipassword.'$MYSQLPASS'.g' $INSTALLDIR/LocalSettings.php > $HTMLDIR/LocalSettings.php -sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php +sed "s/mydomain/$DOMAIN/g" $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings1.php +sed "s/myhost/$SRVNAME/g" $HTMLDIR/LocalSettings1.php > $HTMLDIR/LocalSettings2.php case "$LANG" in de_DE) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "de";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; es_ES) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "es";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; @@ -161,8 +185,9 @@ case "$LANG" in it_IT) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "it";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; *) sed 's.$wgLanguageCode = "en";.$wgLanguageCode = "en";.g' $HTMLDIR/LocalSettings2.php > $HTMLDIR/LocalSettings.php ;; esac +rm $HTMLDIR/LocalSettings1.php rm $HTMLDIR/LocalSettings2.php -cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php +#cp $INSTALLDIR/PwAuthPlugin.php $HTMLDIR/extensions/PwAuthPlugin.php #Creating SME-Groups for MediaWiki (disabled) #/sbin/e-smith/db accounts set mw_read group #/sbin/e-smith/db accounts setprop mw_read Description "MediaWiki Read" @@ -187,6 +212,7 @@ case $UPDATE in echo "Creating MySQL User and DataBase..." mysqladmin -u root create $MYSQLDB mysql $MYSQLDB < $INSTALLDIR/$MYSQLDB.sql + mysql $MYSQLDB -e "UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'mediawikiadmin' ) ) ) WHERE user_id =1 " mysql -u root -e "SET PASSWORD FOR $MYSQLUSER@localhost = PASSWORD( '$MYSQLPASS' ) " mysqladmin flush-privileges ;; @@ -197,13 +223,14 @@ case $UPDATE in ;; esac # Rebuilding Wiki language menus -php $HTMLDIR/maintenance/rebuildMessages.php --rebuild -echo "Applying modifications to services..." +#php $HTMLDIR/maintenance/rebuildMessages.php --rebuild +#echo "Applying modifications to services..." # Uncomment the PwAuth-function sed 's.#!..g' $HTMLDIR/LocalSettings.php > $HTMLDIR/LocalSettings2.php mv $HTMLDIR/LocalSettings2.php $HTMLDIR/LocalSettings.php -/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf -systemctl restart httpd-e-smith.service +#Handled in the -update event +#/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf +#systemctl restart httpd-e-smith.service echo "-------------------------------------------------------------------------------" case $UPDATE in 0) @@ -240,7 +267,8 @@ echo "For more details, see http://wiki. echo "-------------------------------------------------------------------------------" %preun -INSTALLDIR=/usr/share/doc/mediawiki-1.37.2/Sources +MEDIAWIKIVERSION='1.38.2' +INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources if [ $1 = 0 ] ; then mv $INSTALLDIR/DO_NOT_USE_OR_DELETE/MW-Full-Uninstall.sh /root/ fi