Page MenuHomePhabricator

Missing detailed license info on enwiki
Closed, ResolvedPublic

Description

Looking through the licenses for extensions installed on enwiki, the following are missing detailed license information:

  • RevisionSlider (no license file)
  • TwoColConflict (no license file)
  • UniversalLanguageSelector (multiple license files, none named how MW expects. MW only also supports 1 file)
  • QuickSurveys (no license file)
  • ParsoidBatchAPI (no license file)
  • RelatedArticles (no license file)
  • FancyCaptcha (license file is in parent ConfirmEdit folder)
  • CodeMirror (no license file)
  • Timeless (no license file)

For the result, see, eg, https://en.wikipedia.org/wiki/Special:Version/License/Timeless - "No detailed license information was found for this extension."

This is due to MW not finding a COPYING or LICENSE file in the extension root:

	public static function getExtLicenseFileName( $extDir ) {
		if ( !$extDir ) {
			return false;
		}

		foreach ( scandir( $extDir ) as $file ) {
			$fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
			if ( preg_match( '/^((COPYING)|(LICENSE))(\.txt)?$/', $file ) &&
				is_readable( $fullPath ) &&
				is_file( $fullPath )
			) {
				return $fullPath;
			}
		}

		return false;
	}

Depending on the actual files that exist for the listed extensions:

  • MW should support more filenames
  • Add a license file where one is missing to the extension folder
  • Rename the license file inside the extension to match where appropriate so MediaWiki can detect and read it

Event Timeline

Dumb question, but why exactly do we need to manually include the license with every extension when for the most part there are only like five different licenses between the lot of them? Maybe it's just that I'm not really coming from a software background, here, but that just seems needlessly redundant, especially when they all rely on mw to even do anything in the first place.

Anyway, if this is such an issue, I would recommend running a bot through all of gerrit to fix at least the common ones, since there are going to be a lot more extensions there that lack the detailed info than just this list.

Actually, there are enough extensions where there is no clear license information whatsoever, or the license information contradicts itself, so I do not think this is a good job for a bot…

However, for Wikimedia deployed extensions, this should not be an issue.

ULS has clear license information. Core doesn't seem to support multiple licenses.

Reedy renamed this task from Missing licenses on enwiki to Missing detailed license info on enwiki.Sep 28 2019, 4:42 AM
Reedy updated the task description. (Show Details)

Dumb question, but why exactly do we need to manually include the license with every extension when for the most part there are only like five different licenses between the lot of them? Maybe it's just that I'm not really coming from a software background, here, but that just seems needlessly redundant, especially when they all rely on mw to even do anything in the first place.

With the GPL...

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

So, I guess for that reason, we tend to include a copy, so it's there with the relevant code

Patches welcomed for adding the GPL license to QuickSurveys and RelatedArticles. Will happily review.

Change 545435 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/RevisionSlider@master] Add license file

https://gerrit.wikimedia.org/r/545435

Change 545436 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/TwoColConflict@master] Add license file

https://gerrit.wikimedia.org/r/545436

Change 545436 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Add license file

https://gerrit.wikimedia.org/r/545436

Change 545435 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@master] Add license file

https://gerrit.wikimedia.org/r/545435

Patches welcomed for adding the GPL license to QuickSurveys and RelatedArticles. Will happily review.

QuickSurveys is MIT according to extension.json... :)

Change 574547 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/extensions/CodeMirror@master] CodeMirror: Add COPYING file and credit for CodeMirror authors

https://gerrit.wikimedia.org/r/574547

Change 574547 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] CodeMirror: Add COPYING file and credit for CodeMirror authors

https://gerrit.wikimedia.org/r/574547

We expect to undeploy ParsoidBatchAPI from our cluster shortly, which will resolve the issue.

Change 593760 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/skins/Timeless@master] Add COPYING

https://gerrit.wikimedia.org/r/593760

Change 593762 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/RelatedArticles@master] Add COPYING

https://gerrit.wikimedia.org/r/593762

Change 593763 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/QuickSurveys@master] Add COPYING

https://gerrit.wikimedia.org/r/593763

Change 593764 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/ConfirmEdit@master] Add COPYING

https://gerrit.wikimedia.org/r/593764

Change 593760 merged by jenkins-bot:
[mediawiki/skins/Timeless@master] Add COPYING

https://gerrit.wikimedia.org/r/593760

Change 593763 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Add COPYING

https://gerrit.wikimedia.org/r/593763

Change 593764 merged by jenkins-bot:
[mediawiki/extensions/ConfirmEdit@master] Add COPYING

https://gerrit.wikimedia.org/r/593764

Change 593762 merged by jenkins-bot:
[mediawiki/extensions/RelatedArticles@master] Add COPYING

https://gerrit.wikimedia.org/r/593762

Change 593805 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/extensions/ParsoidBatchAPI@master] Add missing LICENSE file

https://gerrit.wikimedia.org/r/593805

Change 593805 merged by jenkins-bot:
[mediawiki/extensions/ParsoidBatchAPI@master] Add missing LICENSE file

https://gerrit.wikimedia.org/r/593805

UniversalLanguageSelector (multiple license files, none named how MW expects. MW only also supports 1 file)

Filed T251642: Make Special:Version/License support multiple license files in a repo and T251643: Clarify license of Universal Language Selector

Reedy claimed this task.
Reedy removed Reedy as the assignee of this task.