Make WordPress Core

Opened 17 years ago

Closed 14 years ago

Last modified 14 years ago

#6663 closed enhancement (fixed)

Wordpress source files do not correctly mark themselves as GPL

Reported by: mattlgnu's profile mattlgnu Owned by:
Milestone: 3.1 Priority: lowest
Severity: trivial Version:
Component: General Keywords: needs-patch
Focuses: Cc:

Description

Under the GNU GPL, source files are required to clearly state that they are under the GNU GPL.

I've got a patch which adds the required comments to each .php file in SVN Wordpress.

The state of copyright is unknown to me, and I was unable to find anything on the site, so I marked each file as 'Copyright 2007, 2008 Automattic, Inc'.

Attachments (1)

mattl.patch (158.1 KB) - added by mattlgnu 17 years ago.

Download all attachments as: .zip

Change History (27)

@mattlgnu
17 years ago

#1 @filosofo
17 years ago

Why isn't the license.txt file sufficient?

#2 follow-up: @mattlgnu
17 years ago

The license states that this is the correct way to mark your files. It also helps people who want to use functions from the source code in their own programs understand the license :)

I checked with the licensing people at the FSF :)

#3 in reply to: ↑ 2 ; follow-up: @filosofo
17 years ago

Replying to mattlgnu:

The license states that this is the correct way to mark your files.

Sorry to be obtuse, but could you quote the relevant section?

#4 @mattlgnu
17 years ago

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html#SEC4

f you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

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.

#5 @filosofo
17 years ago

That's not part of the license; it's a recommendation on the part of the GNU folks, "to most effectively convey the exclusion of warranty."

My questions are whether the license requires that these lines appear at the beginning of each included file (this does not seem to be the case), and whether the license is somehow invalidated if not done this way or whether there is good legal reason to do so (I have my doubts).

Without good reasons to do so, including an extra 160kb of text--about a 4% increase in 2.5's overall size--just seems like a waste of space to me.

#6 @mattlgnu
17 years ago

I think the main point is that by not having this, it makes the source files very clearly licensed under the GNU GPL. It is not beyond the realms of possibility for someone to either include one of the Wordpress php files in their project, or to find one by itself and use it in their project.

By having all the files marked with the correct headers, you explictly declare it to a) be a part of Wordpress and b) Under the GNU GPL.

Having the license explicit like this would also make sense, if there were ever any legal question over someone using Wordpress sources in their non-GPL project, as they would have to remove the headers.

#7 @darkdragon
17 years ago

  1. You need to have PHP comments with the <?php ... ?> tags.
  2. Some of the files you are documenting as "Part of WordPress..." are actually external libraries separate from WordPress and Automattic does not hold the copyright to.
  3. Automattic does not hold the copyright to the code or at least not to my code. If Automattic wants the copyright to my code, I only offered my code as GPL. It would be better to just say "@copyright WordPress". Automattic can't own the copyright to WordPress, because so many other people also hold copyrights to their code. In order for Automattic to gain that copyright, they would have to contact the original B2 author and contributors, as well as the past and current WordPress contributors. If Automattic owned the copyright, they could easily say that WordPress is now under a commercial license tomorrow and we'll all be screwed, but luckily Automattic isn't that evil (...yet).
  4. You should look into phpdoc for file level comments, some files already have file level phpdoc. If you add the @license GPL 2.0 <link>, which is a single line directing to the GPL file, then that would be okay.

You have to fix the first problem first, because committing your patch as it is now would violate the copyrights of the external files and would break (or at least show the comments that WordPress is GPL, which is plain useless to the visitors).

#8 follow-up: @darkdragon
17 years ago

  • Keywords needs-patch added; has-patch removed

#9 @darkdragon
17 years ago

  • Priority changed from normal to lowest
  • Severity changed from normal to trivial
  • Type changed from defect to enhancement

#10 in reply to: ↑ 8 @zamoose
17 years ago

Replying to darkdragon:

Not to mention add 160Kb to the total code size. Let's not lose sight of the not-inconsiderable costs this GPL-championing would incur.

#11 @darkdragon
17 years ago

I believe I've went over this before. Comments add only a few milliseconds overhead and only barely that. The PHP Engine does a very good job removing PHP comments from the source, with opcode caching you'll never notice that there were comments in the first place.

Comment themselves should not be considered overhead, because of the advantages of having comments far outweigh the extremely small amount of overhead in the parse stage of PHP.

#12 @pishmishy
16 years ago

  • Milestone 2.7 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

I'm going to resolve this as invalid. Not even the Linux source marks each file explicitly as GPL licensed. I'm not a legal expert but I think that the license.txt is sufficient as the absence of a license when looking at a source file in isolation doesn't give you any distribution rights.

What may need to be fixed is something like the Akismet plugin which is distributed as a package in it's own right but doesn't include any license details in the source. This isn't the Akismet trac though :-)

#13 @hakre
14 years ago

Tag: FIXIPO

#14 follow-up: @jacobsantos
14 years ago

I think the debate is not settled. The issue is how to go about linking to the license.

You can do this several ways:

@license GPL

@license ./license.txt GPL base files.

@license ../license.txt GPL for wp-includes.

If you were going to put the GPL summary in each file, what would be the copyright holder? Also, the GPL FAQ that the copyright is only required if it exists prior to the forking of the web application. I'm not sure what it means for the copyright to add it in after the project has already been forked. As far as the GPL (from the FAQ) is concerned, the terms have been upheld.

It is difficult barring from the fact that we have no idea to whom the original copyright was beholden. Was it to Mike? B2/CafePress Community, some company before Automattic? Given the difficulty of knowing who to specify the copyright holder, it makes it extremely difficult to use the summary GPL in each file.

Which is why @license GPL is probably the best you'll be able to do to satisfy this ticket.

#15 in reply to: ↑ 14 ; follow-up: @hakre
14 years ago

Replying to jacobsantos:

I think the debate is not settled. The issue is how to go about linking to the license.

This is not only about linking. The recommendation to put a copyright/license notice into a file has it's reasons in the legal matters of copyright. It's a general practice to do so.

@license says not much in that domain, it's for automated documentation needs mainly (PHPDOC). So this can be helpful for programmers and systems (e.g. to generate the appropriate header(s) in build systems). But it is less helpful in the sense of legal matters.

If you were going to put the GPL summary in each file, what would be the copyright holder?

The copyright holder for each file are the authors of the code in that file that is significant to copyright.

Also, the GPL FAQ that the copyright is only required if it exists prior to the forking of the web application.

A copyright existed prior to forking and was removed in r48. Full History: WordPress Copyright.

I'm not sure what it means for the copyright to add it in after the project has already been forked. As far as the GPL (from the FAQ) is concerned, the terms have been upheld.

I was unable to located that in the FAQ, please share the link.

It is difficult barring from the fact that we have no idea to whom the original copyright was beholden. Was it to Mike? B2/CafePress Community, some company before Automattic? Given the difficulty of knowing who to specify the copyright holder, it makes it extremely difficult to use the summary GPL in each file.

That wouldn't be for each file. For the time of fork, the named copyright was:

b2 is (c) 2001, 2002 Michel Valdrighi - m@… - http://tidakada.com

Which is why @license GPL is probably the best you'll be able to do to satisfy this ticket.

To mark something under a license, copyright must be clear first. It's not a need in all countries to explicitly name the copyright, but for international distribution you should have at least the term copyright in there.

If copyright is clear then first, licensing can apply as licensing is build on top of copyright.

Not to repeat everything, the GNU folks have a How-To which is helpfull to help users who get the code to reuse it: How to use GNU licenses for your own software

I'm pretty sure they went through a lot of discussions why or why not to do it that way.

#16 in reply to: ↑ 15 ; follow-up: @jacobsantos
14 years ago

The inquiries were more of a general request for more information and not arguments against. I apologize if there was any confusion.

Replying to hakre:

Replying to jacobsantos:

I think the debate is not settled. The issue is how to go about linking to the license.

This is not only about linking. The recommendation to put a copyright/license notice into a file has it's reasons in the legal matters of copyright. It's a general practice to do so.

@license says not much in that domain, it's for automated documentation needs mainly (PHPDOC). So this can be helpful for programmers and systems (e.g. to generate the appropriate header(s) in build systems). But it is less helpful in the sense of legal matters.

If you were going to put the GPL summary in each file, what would be the copyright holder?

The copyright holder for each file are the authors of the code in that file that is significant to copyright.

Also, the GPL FAQ that the copyright is only required if it exists prior to the forking of the web application.

A copyright existed prior to forking and was removed in r48. Full History: WordPress Copyright.

I'm not sure what it means for the copyright to add it in after the project has already been forked. As far as the GPL (from the FAQ) is concerned, the terms have been upheld.

I was unable to located that in the FAQ, please share the link.

It is difficult barring from the fact that we have no idea to whom the original copyright was beholden. Was it to Mike? B2/CafePress Community, some company before Automattic? Given the difficulty of knowing who to specify the copyright holder, it makes it extremely difficult to use the summary GPL in each file.

That wouldn't be for each file. For the time of fork, the named copyright was:

b2 is (c) 2001, 2002 Michel Valdrighi - m@… - http://tidakada.com

Which is why @license GPL is probably the best you'll be able to do to satisfy this ticket.

To mark something under a license, copyright must be clear first. It's not a need in all countries to explicitly name the copyright, but for international distribution you should have at least the term copyright in there.

If copyright is clear then first, licensing can apply as licensing is build on top of copyright.

Not to repeat everything, the GNU folks have a How-To which is helpfull to help users who get the code to reuse it: How to use GNU licenses for your own software

I'm pretty sure they went through a lot of discussions why or why not to do it that way.

#17 in reply to: ↑ 16 ; follow-up: @hakre
14 years ago

Replying to jacobsantos:

The inquiries were more of a general request for more information and not arguments against. I apologize if there was any confusion.

Same for my comments. Do you still know the link from the FAQ, that sounded interesting to me.

#18 in reply to: ↑ 17 @jacobsantos
14 years ago

Replying to hakre:

Replying to jacobsantos:

The inquiries were more of a general request for more information and not arguments against. I apologize if there was any confusion.

Same for my comments. Do you still know the link from the FAQ, that sounded interesting to me.

There was no FAQ, it was simply a logical conclusion based on known facts at the time. If A is not B. It might end up being more of a logical fallacy on my part.

#19 in reply to: ↑ 3 @hakre
14 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Replying to filosofo:

Replying to mattlgnu:

The license states that this is the correct way to mark your files.

Sorry to be obtuse, but could you quote the relevant section?

The relevant section is Section 1 in the GPL v2 license text. Keep in mind that wordpress is a derivate of b2/cafelog.

#20 @hakre
14 years ago

Related: #16100

Version 0, edited 14 years ago by hakre (next)

#21 follow-up: @filosofo
14 years ago

  1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

That's section one of GPL 2. Why would we take "each copy" of the source to mean each individual file as opposed to each distribution?

#22 @filosofo
14 years ago

This is what I would call a long-term conversation. :)

#23 @nacin
14 years ago

  • Milestone set to 3.1
  • Resolution set to fixed
  • Status changed from reopened to closed

#24 @hakre
14 years ago

Related: #16269

#25 in reply to: ↑ 21 @hakre
14 years ago

Replying to filosofo:

  1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

That's section one of GPL 2. Why would we take "each copy" of the source to mean each individual file as opposed to each distribution?

Well from what I've learned it's possible to have a central location for the whole package (“single COPYRIGHT file” method) for notice preservation requirements, instead of in each file (“file-by-file” method). So strictly spoken, there seems no must to add notices to each file. As for preservation of notices be it in individual files or in form of a central registry, I have no specific information how the wordpress.org project has made up it's mind about that. I think it's somehow in the progress as in #16269 but I don't want to stress words too much here, so that just as an assumption that things are taken care of.

Generally I know that most core devs are in favor of not adding legal comments to files, but I think the topic is about more then just I prefer red over blue. At least I'm still learning about the legal comments / notice preservation details.

The requirements of the GPL you referred to above are for the time of fork, as forking is first of all making verbatim copies prior to modifying them.

I like to highlight a part from 1. and then look into the code-base:

conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty

At the time of fork the coypright notice has been (text version):

 Copyright notes:
 
   b2 is (c) 2001, 2002 Michel Valdrighi - m@tidakada.com - http://tidakada.com
 
 Wherever third party code has been used, credit has been given in the code's comments.
 b2 is released under the GPL (see license.txt).}}}

(Next to the copyright notice, I saw this requirement: requirements: [...] ...and a link to http://cafelog.com on your site. [1] )

As for "conspicuously and appropriately publish on each copy an appropriate copyright notice" I'm not a lawyer, but it sounds like, that at least the existing coypright statement should be kept intact. That's the (whole) one in 3.0.5 AFAIK:

 License
 
 WordPress is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.

The term Copyright got lost in the go, more details. On this overall "copyright" topic there has not been much committer feedback so far which makes it indifferent to discuss about.

The disclaimer of warranty was always part of license.txt and there never existed a prominent notice regarding it. I do not know if it has any license implications to not make the disclaimer of warranty "more" visible. At least, technically, there was a notice pointing to license.txt which contained the disclaimer and it has been preserved.

Probably this all is perfectly in order for wordpress.org. The removal of the copyright statement might have all been done in accordance with the original copyright holder and individually they contracted this to be not under copyright or whatever any longer. It's just not documented or at least I don't know where it's documented so I can not really say. My questions regarding this are not satisfactory answered so far.

What I know is that for everybody else, the terms of the license still apply, so users would benefit from clarification in all these points.

What does "conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty" mean for the WordPress package for example?

Where and how to keep track of changes someone's does when modifying the package?

Which versions of WordPress can be forked w/o violating a contributors requirements?

Probably such and related is something WP.org can find answers to with help of some lawyers.


[1] This might somehow conflict meanings, as the GNU GPL terms shipping with that release state, that it does not cover the output of a program. So this is an additional restriction by the copyright holder. I think that is called attribution. I can not say if the one wish of the copyright owner supersedes the other or both work well together. This is an additional discussion, I don't want to do here.

#26 @hakre
14 years ago

Copyright/Attribution Related: #12366

Note: See TracTickets for help on using tickets.