Bug 967302 - Missing symlink in /var/www/wiki after initial install
Missing symlink in /var/www/wiki after initial install
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mediawiki (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Cronenworth
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-26 08:32 EDT by Fritz Elfert
Modified: 2013-08-05 20:11 EDT (History)
3 users (show)

See Also:
Fixed In Version: mediawiki-1.19.7-4.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-05 20:11:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for fixing mw-createinstance.in (531 bytes, patch)
2013-05-30 15:28 EDT, Fritz Elfert
no flags Details | Diff

  None (edit)
Description Fritz Elfert 2013-05-26 08:32:47 EDT
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 09:50:05 EDT
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 17:08:56 EDT
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 11:13:46 EDT
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 11:20:54 EDT
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 15:28:30 EDT
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 12:49:37 EDT
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-28 20:28:15 EDT
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-05 20:11:55 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.