Bug 967302

Summary: Missing symlink in /var/www/wiki after initial install
Product: [Fedora] Fedora Reporter: Fritz Elfert <fritz>
Component: mediawikiAssignee: Michael Cronenworth <mike>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: fritz, mike, puiterwijk
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mediawiki-1.19.7-4.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-06 00:11:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for fixing mw-createinstance.in none

Description Fritz Elfert 2013-05-26 12:32:47 UTC
Description of problem:
After yum install mediawiki and enabling the *global* aliases in /etc/httpd/conf.d/mediawiki.conf (Not using mw-crateinstance): When visiting http://localhost/wiki, The initial page shows a link to complete the web-based installation. However: Following this link just returns an empty page. The httpd error log shows the following:

[Sun May 26 14:11:10.716036 2013] [:error] [pid 2788] [client 192.168.2.25:36856] PHP Warning:  require(/var/www/wiki/languages/Language.php): failed to open stream: No such file or directory in /usr/share/mediawiki/includes/AutoLoader.php on line 1008

After manually creating a symlink /usr/share/mediawiki/languages => /var/www/wiki/languages, the web-based installer starts working. 

Version-Release number of selected component (if applicable):
mediawiki-1.19.6-1.fc18.noarch

How reproducible:
always

Steps to Reproduce:
1. yum install mediawiki
2. Enable global aliases in /etc/httpd/conf.d/mediawiki.conf
3. Visit /wiki and follow the "complete the installation" link

Actual results:
Empty page, PHP error shown above.

Expected results:
Initial (language selection) page of mw-install

Additional info:

Comment 1 Michael Cronenworth 2013-05-28 13:50:05 UTC
I'm not sure why you created a bug report since you are not using the install script.

The package does not automatically create files in /var/www/wiki if you do not use the scripts. If you had any there then it is your responsibility.

Comment 2 Fritz Elfert 2013-05-28 21:08:56 UTC
1. It definitely *does* create /var/www/wiki with some contents.

2. Quote from the installed /etc/httpd/conf.d/mediawiki.conf:

# This is a sample configuration for a wiki instance located under
# /var/www/wiki and exposed as http://thishost/wiki. Please read
# /usr/share/doc/mediawiki-*/README.RPM on whether to use this
# instance or create copies of it.

So this suggests that the install-script is optional! (Only required if one wants to create multiple instances instead of using the predefined one located at /var/www/wiki

I suggest you fix this comment or create a README.Fedora wher ist clearly states that the predefinded thingy mentioned above is *not* suppoerted.

Comment 3 Fritz Elfert 2013-05-30 15:13:46 UTC
After some thorough testing on a FRESHLY F18 VM:

(In reply to Michael Cronenworth from comment #1)
> I'm not sure why you created a bug report since you are not using the
> install script.
> 
> The package does not automatically create files in /var/www/wiki if you do
> not use the scripts. If you had any there then it is your responsibility.

This is simply not true! See the following proof:

# rpm -V mediawiki
(no output, so nothing modified)
# rpm -qf /var/www/wiki
mediawiki-1.19.6-1.fc18.noarch
# rpm -qf /etc/mediawiki/instances
mediawiki-1.19.6-1.fc18.noarch
# cat /etc/mediawiki/instances
/var/www/wiki
# rpm -q --scripts mediawiki
postinstall scriptlet (using /bin/sh):
/usr/sbin/mw-updateallinstances >> /var/log/mediawiki-updates.log 2>&1 || :

# sh -x /usr/sbin/mw-updateallinstances
+ read path
+ cat /etc/mediawiki/instances
+ grep '^ *#'
+ echo /var/www/wiki
+ mw-createinstance /var/www/wiki
+ test -e /var/www/wiki/LocalSettings.php
+ read path

q.e.d.

The actual bug is in mw-createinstance in the for-loop starting at line 26,
which misses several names for which symlinks should be created.

Comment 4 Fritz Elfert 2013-05-30 15:20:54 UTC
Another comment on your closing comment:

Since the actual bug is in mw-createinstance it would have given the exact same result if i had used that script in the first place. No matter how the package is installed - it does not work at all without tweaking the file hierarchy manually.

Comment 5 Fritz Elfert 2013-05-30 19:28:30 UTC
Created attachment 755027 [details]
Patch for fixing mw-createinstance.in

This patch fixes mw-createinstance.in (refereced as Source4 in mediawiki.spec)
It adds symlinks for the following 4 subdirs from /usr/share/mediawiki to the current instance:

extensions languages resources skins

Comment 6 Fedora Update System 2013-07-27 16:49:37 UTC
mediawiki-1.19.7-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mediawiki-1.19.7-4.fc18

Comment 7 Fedora Update System 2013-07-29 00:28:15 UTC
Package mediawiki-1.19.7-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mediawiki-1.19.7-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13797/mediawiki-1.19.7-4.fc18
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2013-08-06 00:11:55 UTC
mediawiki-1.19.7-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.