Page MenuHomePhabricator

audit/update headers in files
Closed, ResolvedPublic

Description

For one thing, many of our files have no headers.

Those files that do have headers say in them

  1. This file is subject to the license terms in the LICENSE file found in the
  2. qa-browsertests top-level directory and at
  3. https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE.

and we are just about to retire the /qa/browsertests repository and eliminate it completely.

It should probably be replaced with a similar message in /mediawiki/core/tests/browser

$ grep --include *.rb  -R -F 'qa-browsertests' .
./mediawiki/vagrant/mediawiki/extensions/ArticleFeedbackv5/tests/browser/features/step_definitions/aftv5_steps.rb:# qa-browsertests top-level directory and at
...
./mediawiki/vagrant/mediawiki/extensions/Math/tests/browser/features/step_definitions/math_steps.rb:# qa-browsertests top-level directory and at
...
./mediawiki/vagrant/mediawiki/extensions/PageTriage/tests/browser/features/step_definitions/page_triage_steps.rb:# qa-browsertests top-level directory and at
...
./mediawiki/vagrant/mediawiki/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb:# qa-browsertests top-level directory and at
...
./mediawiki/vagrant/mediawiki/tests/browser/features/step_definitions/create_account_steps.rb:# qa-browsertests top-level directory and at
...

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:26 AM
bzimport set Reference to bz67141.
bzimport added a subscriber: Unknown Object (MLST).

This is still present. Preferably, files should be subject to terms given in the same repository as the file. E.g. the PageTriage extension has headers like this, but I would prefer if the license for that file were given in the PageTriage repository.

At the very least, the broken link needs to be fixed. Right now, it says:

"No part of qa-browsertests, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file."

and then the link to said license is broken.

I want to solve the issue. Can anyone give the details of this issue ?

This is a rough list of files that has string qa-browsertests

https://github.com/search?q=org%3Awikimedia+qa-browsertests&type=Code

File headers should probably just be deleted. As far as I can see, other files have no license header.

Example from PdfHandler repository:

https://github.com/wikimedia/mediawiki-extensions-PdfHandler/blob/a526e649b60de9f5b7548a761767433a3a71fd0f/tests/browser/features/support/pages/random_page.rb

#
# This file is subject to the license terms in the LICENSE file found in the
# qa-browsertests top-level directory and at
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/LICENSE. No part of
# qa-browsertests, including this file, may be copied, modified, propagated, or
# distributed except according to the terms contained in the LICENSE file.
#
# Copyright 2012-2014 by the Mediawiki developers. See the CREDITS file in the
# qa-browsertests top-level directory and at
# https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
#

The repository uses GNU GPL license

https://github.com/wikimedia/mediawiki-extensions-PdfHandler/blob/a526e649b60de9f5b7548a761767433a3a71fd0f/COPYING

Please note that no changes should be made to mediawiki-debian and mediawiki-extensions-Wikidata repositories. As far as I can see, they reuse code from other repositories and will be updated after the code has been merged into the original repository.

Also, changes should be pushed to Gerrit, not GitHub.

@zeljkofilipin should the license headers present in all the files containing the string 'qa-browsertests' are to be removed (as in the link given by you above?) ?

@Rammanojpotla (I think) license headers should be:

  • removed - if the rest of the files in the repository do not have license headers
  • updated - if the rest of the files in the repository do have license headers - to whatever headers the rest of the files have

@zeljkofilipin as mentioned above in mediawiki-PdfHandler have a license in COPYING file(i.e GNU GPL license) so I have to modify it with the license in the randompage.rb(i.e in mediawiki-extensions-PdfHandler/tests/browser/features/support/pages/random_page.rb) should I place a link of it there or to copy the entire license in COPYING file?
and you said above the fallowing "please note that no changes should be made to mediawiki-debian and mediawiki-extensions-Wikidata repositories. As far as I can see, they reuse code from other repositories and will be updated after the code has been merged into the original repository."
does the above sentence mean that I have to make no changes in the license files of the above extensions?

@zeljkofilipin as mentioned above in mediawiki-PdfHandler have a license in COPYING file(i.e GNU GPL license) so I have to modify it with the license in the randompage.rb(i.e in mediawiki-extensions-PdfHandler/tests/browser/features/support/pages/random_page.rb) should I place a link of it there or to copy the entire license in COPYING file?

In general, files in PdfHandler repository do not have license headers (except PdfHandler.image.php and PdfHandler_body.php) I think license header from random_page.rb should be deleted.

and you said above the fallowing "please note that no changes should be made to mediawiki-debian and mediawiki-extensions-Wikidata repositories. As far as I can see, they reuse code from other repositories and will be updated after the code has been merged into the original repository."
does the above sentence mean that I have to make no changes in the license files of the above extensions?

Correct!

Change 352120 had a related patch set uploaded (by Rammanojpotla; owner: Rammanoj):
[mediawiki/extensions/PageTriage@master] audit/update headers in files

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

Change 352121 had a related patch set uploaded (by Rammanojpotla; owner: Rammanoj):
[mediawiki/extensions/Wikibase@master] audit/update headers in files

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

Change 352122 had a related patch set uploaded (by Rammanojpotla; owner: Rammanoj):
[mediawiki/extensions/PdfHandler@master] audit/update headers in files

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

Change 352121 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] audit/update headers in files

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

@zeljkofilipin updatd the commit message in the patches of Pdfhandler and PageTriage directories can you review it please?

I get e-mail notification from Gerrit. Thanks for the reminder, but it is not necessary.

Change 352120 merged by jenkins-bot:
[mediawiki/extensions/PageTriage@master] Audit/update headers in files

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

Change 352122 merged by jenkins-bot:
[mediawiki/extensions/PdfHandler@master] Audit/update headers in files

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

This is resolved, as far as I can see:

https://github.com/search?q=org%3Awikimedia+qa-browsertests&type=Code

The remaining two files with qa-browsertests string are in mediawiki-debian repository. It contains an old version of PdfHandler. Since it is fixed in PdfHandler, the next time mediawiki-debian is updated, qa-browsertests will be completely gone.