--- rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/05/31 02:55:04 1.1 +++ rpms/smeserver-mediawiki/contribs10/smeserver-mediawiki.spec 2022/08/02 05:45:21 1.17 @@ -1,27 +1,31 @@ -# $Id: smeserver-mediawiki.spec,v 1.1 2013/03/03 04:58:08 unnilennium Exp $ +# $Id: smeserver-mediawiki.spec,v 1.16 2022/08/02 05:43:47 jpp Exp $ # Authority: ber_die # Name: Dietmar Berteld %define name smeserver-mediawiki -%define version 1.6.10 -%define release 9 +%define version 1.38.2 +%define release 2 -Summary: Mediawiki Web Application for SME Server 7.x based on Mediawiki 1.6.10 +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}.tar.gz -Patch0: smeserver-mediawiki-1.6.10-1.patch + +Patch0: smeserver-mediawiki-1.38.2-bz12133-httpd24.patch + URL: http://mediawiki.org/ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArch: noarch -Requires: e-smith-base, e-smith-release >= 7 +Requires: e-smith-base, e-smith-release >= 10 +Requires: e-smith-apache >= 2.6.0-19 +Requires: smeserver-php >= 3.0.0-43 BuildRequires: e-smith-devtools %description -This RPM is an unofficial addon for the SME Server 7.x. +This RPM is an addon for the SME Server v10 The target audience is the Linux/E-smith administrator who wants to add Wikipedia-SW. Mediawiki is a very popular Wiki and is used by the wikipedia-project. @@ -29,6 +33,39 @@ 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] + +* 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. + Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or .... + Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or .... + +* Tue May 31 2022 Brian Read 1.6.10-10 sme +- Update to SME10 [SME:11987] +- Add php-fpm stuff to httpd.conf +- Update to mw 1.37.2 + * Mon May 12 2008 Dietmar Berteld> 1.6.10-9 - Disabing automatic creation of SME groups. No idea to synchronise them to mediawiki groups. @@ -38,10 +75,12 @@ http://your_e-smith-server_adress/wiki configuration file as well so admins only need to add users to the proper groups in the server-manager -* Thu Feb 26 2008 Dietmar Berteld> +* Tue Feb 26 2008 Dietmar Berteld> + Thu Feb 26 2008 --> Thu Feb 21 2008 or Tue Feb 26 2008 or Thu Feb 28 2008 or .... - [1.6.10-7] Fixed httpd-settings for local access only -* Thu Oct 23 2007 Dietmar Berteld> +* Tue Oct 23 2007 Dietmar Berteld> + Thu Oct 23 2007 --> Thu Oct 18 2007 or Tue Oct 23 2007 or Thu Oct 25 2007 or .... - [1.6.10-6] Fixed automated uninstall issue for MySQL-DB and MySQL-user * Fri Oct 19 2007 Dietmar Berteld> @@ -73,8 +112,10 @@ rm -rf $RPM_BUILD_ROOT %setup %patch0 -p1 +#%patch1 -p1 %build +perl createlinks %install rm -rf $RPM_BUILD_ROOT @@ -112,7 +153,8 @@ esac APP=MediaWiki URL=wiki WORKDIR=/root -INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/Sources +MEDIAWIKIVERSION='1.38.2' +INSTALLDIR=/usr/share/doc/mediawiki-$MEDIAWIKIVERSION/Sources HTMLDIR=/opt/mediawiki MYSQLDB=mediawiki MYSQLUSER=mediawikiuser @@ -128,16 +170,17 @@ rm -rf lang* #Untar application echo "Decompressing files..." mkdir -p $HTMLDIR -tar xzf $INSTALLDIR/mediawiki-1.6.10.tar.gz -C /opt +tar xzf $INSTALLDIR/mediawiki-$MEDIAWIKIVERSION.tar.gz -C /opt case $UPDATE in - 0) mv -f /opt/mediawiki-1.6.10/* $HTMLDIR ;; - *) cp -ufR /opt/mediawiki-1.6.10/* $HTMLDIR --reply=yes ;; + 0) mv -f /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; + *) cp -ufR /opt/mediawiki-$MEDIAWIKIVERSION/* $HTMLDIR ;; esac -rm -rf /opt/mediawiki-1.6.10 +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 ;; @@ -145,8 +188,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" @@ -171,6 +215,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 ;; @@ -181,13 +226,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 -/usr/local/bin/svc -h /service/httpd-e-smith +#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) @@ -195,8 +241,8 @@ case $UPDATE in echo "Reminder:" echo "- Website open globally" echo "- go to http://$DOMAIN/$URL" - echo "- Usernames are identical with SME users" - echo "- Passwords are identical with SME passwords" + #echo "- Usernames are identical with SME users" + #echo "- Passwords are identical with SME passwords" echo "- MediaWiki admin = SME admin" ;; *) @@ -206,8 +252,8 @@ case $UPDATE in echo " PLEASE MOVE THIS DIRECTORY TO A SAFE PLACE!!!" echo "- Website open globally" echo "- go to http://$DOMAIN/$URL" - echo "- Usernames are identical with SME users" - echo "- Passwords are identical with SME passwords" + #echo "- Usernames are identical with SME users" + #echo "- Passwords are identical with SME passwords" echo "- MediaWiki admin = SME admin" ;; esac @@ -218,13 +264,14 @@ echo " # config setprop $MYSQLDB Publ echo " " echo "Don't forget to apply modifications with following commands:" echo " # expand-template /etc/httpd/conf/httpd.conf" -echo " # svc -h /service/httpd-e-smith" +echo " # systemctl restart httpd-e-smith.service" echo " " echo "For more details, see http://wiki.contribs.org/Mediawiki" echo "-------------------------------------------------------------------------------" %preun -INSTALLDIR=/usr/share/doc/mediawiki-1.6.10/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 @@ -233,7 +280,8 @@ fi if [ $1 = 0 ] ; then echo "Restarting services..." /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf - /usr/local/bin/svc -h /service/httpd-e-smith + #/usr/local/bin/svc -h /service/httpd-e-smith + systemctl restart httpd-e-smith.service echo " " echo "Uninstallation finished!" echo "If you want to completly remove it (installation files and MySQL user+database)"