--- rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/06/08 12:13:07 1.11 +++ rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/08/02 05:43:47 1.16 @@ -1,10 +1,10 @@ -# $Id: smeserver-mediawiki.spec,v 1.10 2022/06/03 09:35:35 brianr Exp $ +# $Id: smeserver-mediawiki.spec,v 1.15 2022/07/12 15:37:07 brianr Exp $ # Authority: ber_die # Name: Dietmar Berteld %define name smeserver-mediawiki -%define version 1.38.1 -%define release 1 +%define version 1.38.2 +%define release 2 Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.38.0 Name: %{name} @@ -13,9 +13,8 @@ Release: %{release}%{?dist} License: GPL Group: /Web/Applications Source: %{name}-%{version}.tar.gz -Patch0: smeserver-mediawiki-1.38.0-fix-up-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 + +Patch0: smeserver-mediawiki-1.38.2-bz12133-httpd24.patch URL: http://mediawiki.org/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot @@ -32,6 +31,16 @@ After installation open your webbrowser http://your_e-smith-server_adress/wiki %changelog +* Tue Aug 02 2022 Jean-Philippe Pialasse 1.38.2-2.sme +- update to httpd 2.4 access syntax [SME: 12133] + +* Tue Jul 12 2022 Brian Read 1.38.2-1.sme +- Update version to Mediawiki-1.38.2 [sme: 11987] +- Fix initial admin user password + +* 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] @@ -101,10 +110,10 @@ rm -rf $RPM_BUILD_ROOT %setup %patch0 -p1 - #%patch1 -p1 %build +perl createlinks %install rm -rf $RPM_BUILD_ROOT @@ -142,7 +151,7 @@ esac APP=MediaWiki URL=wiki WORKDIR=/root -MEDIAWIKIVERSION='1.38.0' +MEDIAWIKIVERSION='1.38.2' INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources HTMLDIR=/opt/mediawiki MYSQLDB=mediawiki @@ -162,13 +171,14 @@ mkdir -p $HTMLDIR tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt case $UPDATE in 0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; - *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR --reply=yes ;; + *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; esac 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 ;; @@ -176,8 +186,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" @@ -202,6 +213,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 ;; @@ -212,13 +224,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) @@ -255,7 +268,7 @@ echo "For more details, see http://wiki. echo "-------------------------------------------------------------------------------" %preun -MEDIAWIKIVERSION='1.38.0' +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/