Bug 1515022

Summary: mediawiki missing autoload for vendor timestamp defines
Product: [Fedora] Fedora Reporter: Scott Shambarger <scott-fedora>
Component: mediawikiAssignee: Michael Cronenworth <mike>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: axel.thimm, gwync, mike, puiterwijk
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mediawiki-1.29.2-2.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-30 15:38:21 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:

Description Scott Shambarger 2017-11-20 00:56:53 UTC
Description of problem:
mediawiki pages fill logs with errors similar to:

PHP Notice:  Use of undefined constant TS_UNIX - assumed 'TS_UNIX' in /usr/share/mediawiki/includes/libs/rdbms/database/Database.php on line 2905

{and full backtrace....}

Version-Release number of selected component (if applicable):

mediawiki-1.29.1-1.fc27.noarch

How reproducible:

On basically any page, several hundred lines of backtrace are created in the logs.

Additional info:

The problem appears to be in the mediawiki.spec file.  It removes the vendor/autoload.php shipped with mediawiki and creates a new one after removing some libraries supplied by depended rpms.

However, mediawiki 1.29 added the timestamp library, but static include wasn't correctly added to the re-created autoload.

An additional line needs to be added to the %build rule of the spec file:

echo "require dirname(dirname(__FILE__)) . '/vendor/wikimedia/timestamp/src/defines.php';" >> vendor/autoload.php

Comment 1 Fedora Update System 2017-11-20 21:35:51 UTC
mediawiki-1.29.2-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-78a4610238

Comment 2 Fedora Update System 2017-11-20 21:36:09 UTC
mediawiki-1.29.2-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-78a4610238

Comment 3 Fedora Update System 2017-11-22 06:30:52 UTC
mediawiki-1.29.2-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-78a4610238

Comment 4 Scott Shambarger 2017-11-23 00:23:12 UTC
Excellent.  Latest version works, I'll add karma :)

Comment 5 Fedora Update System 2017-11-30 15:38:21 UTC
mediawiki-1.29.2-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.