What is source code? GPL

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 3267 Views - Last Post: 10 January 2013 - 03:57 AM

#1 jgsource  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-December 12

What is source code? GPL

Post icon  Posted 27 December 2012 - 04:13 PM

What is source code?
Stupid question, right?
Wikipedia defines source code as any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.

But what is your definition of source code, the GPL license requires changes, and developments to GPL licensed code to be openly shared under the license.

So can I demand Wikipedia provides my with there specific implementation of 'LocalSettings.php' file which contains their database connection string the lines:
$wgDBserver = "mysql.wikipedia.org";
$wgDBuser = "root";
$wgDBpassword = "password";



are all source code right? So why is Wikipedia not in violation of the GPL license by not providing them to me, and what other exemptions can be made?

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: What is source code? GPL

#2 sepp2k  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2087
  • Posts: 3,175
  • Joined: 21-June 11

Re: What is source code? GPL

Posted 27 December 2012 - 04:44 PM

The reason that Wikipedia doesn't have to give you its LocalSettings.php isn't that it's exempt. It's that Wikipedia doesn't have to give you any of its code.

The GPL does not say, that you have to give your source code to anyone who asks. It only requires you to give your source to anyone who you give your program to. If you don't distribute your application to anyone, you also don't have to give your source code to anybody.
Was This Post Helpful? 0
  • +
  • -

#3 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: What is source code? GPL

Posted 27 December 2012 - 07:43 PM

Wikipedia is not the software, MediaWiki it is.

And that is a merely configuration of the software, not a modification. Nobody have to distribute those.
Was This Post Helpful? 0
  • +
  • -

#4 sepp2k  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2087
  • Posts: 3,175
  • Joined: 21-June 11

Re: What is source code? GPL

Posted 28 December 2012 - 07:04 AM

View Postanonymouscodder, on 28 December 2012 - 03:43 AM, said:

Wikipedia is not the software, MediaWiki it is.

And that is a merely configuration of the software, not a modification. Nobody have to distribute those.


You're missing the point. LocalSettings.php is a php file and thus clearly source code. The question was whether the GPL somehow counts files like this (i.e. source files whose sole purpose is configuration - or something along those lines) as not being part of the source. As far as I am aware, the answer to that is "no".

So if you download media wiki and modify the LocalSettings.php, you're running an application that's derived from MediaWiki. And if you ever distributed that application, the LocalSettings.php would be affected by the GPL just as any other source file. That is, you'd not be allowed to distribute a compiled (or obfuscated or whatevered) version of your installation without also making the source of LocalSettings.php available.

However none of that matters because you're not going to distribute your MediaWiki installation (and neither is Wikipedia distributing theirs).
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,681
  • Joined: 19-March 11

Re: What is source code? GPL

Posted 28 December 2012 - 07:58 AM

View Postsepp2k, on 28 December 2012 - 09:04 AM, said:

Quote

And that is a merely configuration of the software, not a modification. Nobody have to distribute those.


However none of that matters because you're not going to distribute your MediaWiki installation (and neither is Wikipedia distributing theirs).


I think I see agreement here, not disagreement. Configuration details are not source code, they're data: the data that your software runs on.
Another way to look at this is, you don't have to distribute your configuration files for the same reason you don't have to distribute the documents you create with OpenOffice.

This post has been edited by jon.kiparsky: 28 December 2012 - 08:22 AM

Was This Post Helpful? 1
  • +
  • -

#6 sepp2k  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2087
  • Posts: 3,175
  • Joined: 21-June 11

Re: What is source code? GPL

Posted 28 December 2012 - 08:20 AM

View Postjon.kiparsky, on 28 December 2012 - 03:58 PM, said:

I think I see agreement here, not disagreement.


I disagree :P

Quote

Configuration details are not source code, they're data


If the configuration is in a PHP file, then yes, it's source code.

So, from my understanding, if MediaWiki was licensed under the AGPL, which requires that you have to give your source code to anyone that can access your website, then this would mean that Wikipedia would have to give access to their LocalSettings.php (yes, I realize that that would be insanely stupid).
Was This Post Helpful? 0
  • +
  • -

#7 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,681
  • Joined: 19-March 11

Re: What is source code? GPL

Posted 28 December 2012 - 08:41 AM

So the same data is either source or not depending on the name of the file that contains it? If I have a file with config settings as "key=value" pairs, it's not source, but if it says .php on it, it's source?

I'm not sure that makes a lot of sense to me, but I guess stranger things have happened in the law.
Was This Post Helpful? 1
  • +
  • -

#8 sepp2k  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2087
  • Posts: 3,175
  • Joined: 21-June 11

Re: What is source code? GPL

Posted 28 December 2012 - 08:49 AM

View Postjon.kiparsky, on 28 December 2012 - 04:41 PM, said:

So the same data is either source or not depending on the name of the file that contains it? If I have a file with config settings as "key=value" pairs, it's not source, but if it says .php on it, it's source?


It's not so much that it's named like a source file (as we know, file extensions are completely meaningless), but that's used as one. That is it's included just like any other source file and is then executed by the PHP interpreter, not manually parsed by the MediaWiki code like a "key=value" file would be.
Was This Post Helpful? 0
  • +
  • -

#9 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7564
  • View blog
  • Posts: 12,681
  • Joined: 19-March 11

Re: What is source code? GPL

Posted 28 December 2012 - 08:59 AM

Hm. By the terms of the license,

Quote

The “source code” for a work means the preferred form of the work for making modifications to it


This would not seem to include local settings, regardless of where they may appear.

Let me check this point: do we agree that we can make a reasonable analogy to cryptography, where the system is public and the key is secure?
It's my sense that if this reading of "software" is correct, and the only thing preventing me from demanding wikipedia's db settings is a technicality about whether wikipedia's installation is "distributed", then that's a bug in the license which would need to be fixed. Does that seem sensible to you?
Was This Post Helpful? 2
  • +
  • -

#10 no2pencil  Icon User is offline

  • Dic Head
  • member icon

Reputation: 5165
  • View blog
  • Posts: 26,840
  • Joined: 10-May 07

Re: What is source code? GPL

Posted 28 December 2012 - 09:00 AM

If I were required to provide the file, I woud change (or even remove) those lines, provide the file, & change mine back.

Good luck proving me wrong.

My question is how do you prove, or even question to prove what software a website &/or company is running. Say I were to accuse facebook, Yahoo, or even Google of running GPL software. What right do I have to court order them to give up their sourcecode? If they've done nothing wrong, what grounds is there to even motion such a silly demand?
Was This Post Helpful? 0
  • +
  • -

#11 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 572
  • View blog
  • Posts: 2,985
  • Joined: 19-May 09

Re: What is source code? GPL

Posted 28 December 2012 - 09:01 AM

After looking over the actual AGPL specification, I have to say that the definition of what "source code" is shows a lack of attention and care. AFAICS, the entire definition is "The 'source code' for a work means the preferred form of the work for making modifications to it." [Edit: jon, I see you are thinking along the same lines that I am, and wrote this before I noticed your post. Bear with me...]

This fails to specify whether "the work" distinguishes between configuration data and actual instructions. Furthermore, if "the work" is a database, one could argue that "the preferred form of making modifications to it" is to add data to it. Therefore, if you distribute a database that you have created under this spec, you also have to distribute your HR data, if you're using it internally for HR, and so on. If I am to concede (and I don't see anything in the definition that requires such a concession) that data other than configuration data need not be distributed, it still means that a connection string that includes the sa password is configuration data and would have to be distributed.

Looks to me that there's a big hole in the spec; it remains silent on what a "work" is, and specifically whether modifications to data that it uses represent modifications to the "work" itself.

Sepp2k, I find nothing in the spec to support your assertion that php files are automatically source code, because I find nothing in the spec that says that whether an item is source code is dependent on the extension of the file name. Please feel free to use the spec to demonstrate the correctness of your assertion. :)

This post has been edited by BobRodes: 28 December 2012 - 09:07 AM

Was This Post Helpful? 0
  • +
  • -

#12 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3452
  • View blog
  • Posts: 10,655
  • Joined: 05-May 12

Re: What is source code? GPL

Posted 28 December 2012 - 12:40 PM

A couple random thoughts.

It seems that Wikipedia isn't complying with the APGL requirements:

From section 13, of the AGPLv3 (emphasis mine):

Quote

Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.


I'm not seeing any "prominent offer" on the Wikipedia.org main page for the source code.

I must be missing it. Where does say that MediaWiki is APGLv3?

I'm only seeing that MediaWiki is licensed under GPLv2 from the downloads page:

Quote

MediaWiki is free software licensed under version 2 of the GNU General Public License.


LocalSetting.php is not part of the source code

If you download MediaWiki v1.20.2, there is no LocalSettings.php included in the source code. It is only the installation process that generates the file on the fly.

Claiming that the LocalSettings.php is GPL (or AGPL) licensed source code is then just like claiming that the documents you create using OpenOffice is also covered by the Apache licence that OpenOffice is released under.
Was This Post Helpful? 0
  • +
  • -

#13 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3452
  • View blog
  • Posts: 10,655
  • Joined: 05-May 12

Re: What is source code? GPL

Posted 28 December 2012 - 12:50 PM

View PostSkydiver, on 28 December 2012 - 02:40 PM, said:

A couple random thoughts.

It seems that Wikipedia isn't complying with the APGL requirements:

From section 13, of the AGPLv3 (emphasis mine):

Quote

Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.


I'm not seeing any "prominent offer" on the Wikipedia.org main page for the source code.

I must be missing it. Where does say that MediaWiki is APGLv3?

I'm only seeing that MediaWiki is licensed under GPLv2 from the downloads page:

Quote

MediaWiki is free software licensed under version 2 of the GNU General Public License.


Ah, I missed the "if" on post #6. That answers my confusion on those aspects regarding AGPLv3.
Was This Post Helpful? 0
  • +
  • -

#14 Bengie25  Icon User is offline

  • D.I.C Head

Reputation: 17
  • View blog
  • Posts: 53
  • Joined: 07-July 10

Re: What is source code? GPL

Posted 28 December 2012 - 02:37 PM

View PostSkydiver, on 28 December 2012 - 01:40 PM, said:

A couple random thoughts.

It seems that Wikipedia isn't complying with the APGL requirements:

From section 13, of the AGPLv3 (emphasis mine):

Quote

Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.


I'm not seeing any "prominent offer" on the Wikipedia.org main page for the source code.

I must be missing it. Where does say that MediaWiki is APGLv3?

I'm only seeing that MediaWiki is licensed under GPLv2 from the downloads page:

Quote

MediaWiki is free software licensed under version 2 of the GNU General Public License.


LocalSetting.php is not part of the source code

If you download MediaWiki v1.20.2, there is no LocalSettings.php included in the source code. It is only the installation process that generates the file on the fly.

Claiming that the LocalSettings.php is GPL (or AGPL) licensed source code is then just like claiming that the documents you create using OpenOffice is also covered by the Apache licence that OpenOffice is released under.


So if I take the source code and put it into another file that "auto generates" the code, then I can skirt the license?

-Devil's Advocate
Was This Post Helpful? 1
  • +
  • -

#15 ziggyfish  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 05-August 12

Re: What is source code? GPL

Posted 28 December 2012 - 07:50 PM

View Postjgsource, on 27 December 2012 - 04:13 PM, said:

What is source code?
Stupid question, right?
Wikipedia defines source code as any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.

But what is your definition of source code, the GPL license requires changes, and developments to GPL licensed code to be openly shared under the license.

So can I demand Wikipedia provides my with there specific implementation of 'LocalSettings.php' file which contains their database connection string the lines:
$wgDBserver = "mysql.wikipedia.org";
$wgDBuser = "root";
$wgDBpassword = "password";



are all source code right? So why is Wikipedia not in violation of the GPL license by not providing them to me, and what other exemptions can be made?

Thanks


To answer this question. Think about this.

There are two ways to create a configuration file, either creating this file by hand or by the software generating the file based on input provided in a wiki.

Will start with the second option, which is how MediaWiki does its installation. This file is generated by a script that is opensource, so you do have the source for that file, and you are using the software to generate the configuration files.

The second option is creating the files by hand. In most open source software, you are normally required to copy a template from another file. This means that the configuration files are not part of the software and in that sense you have the source code. So by creating this file by hand you are not modifying the program, you are simply using the software to create an input file that the program can then use.

In both cases your using the software, it just so happens that the output of that usage is the configuration input files.

The GPL isn't a bad thing. Its designed to support and recognize the developers that made the original work. Because why should I allow you to make money directly off of the work I have done. IMHO if you were a self respecting developer you should be defending the GPL, rather than attacking its very existence.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2