GPL Sockets

It is interesting how thinking and understanding of ideas change over time. This morning I woke up and started reading the GPL licence with the intent to take another look at what it actually stands for.

I have come to conclusion that its purpose is to give everyone the freedom to do whatever they want with my work as long as they retain the freedom to derive from it.

With every software there are only two things one can do with it — either run it or modify it. By applying the GPL licence to my original work I am making sure that these two things can always happen and nobody can take those freedoms away.

The important point is that I am ‘enforcing’ these rules only in the context of the work that I have written and distributed. WordPress has been built upon the b2 blogging software by modifying its source code and adding new functionality, and because b2 was licensed under the GPL, the derived and altered source code is also licenced under the GPL. Although there might be not a single line of code left from the days of b2, WordPress started off as a tiny modification of its source code, and therefore must retain its licence. This is a very important point to understand for those trying to dismiss the spirit of GPL, because it’s the only thing left when every single line of code is different from the original. And it doesn’t matter if that change happened in a single patch or thousands of them.

Plugin functionality in WordPress didn’t exist in b2 and was added only in 2004 when WordPress 1.2 was released. Before that, one would have to make changes directly to the source code in order to alter the way WordPress works.

Therefore, the important question is — if changing the source code is clearly deriving from the original, then what is a plugin? Is it simply an elegant way to “modify” the source code or is it something else?

If we think of the plugin architecture as a “socket” through which one can get access to the “power”, does GPL has any say over what can be plugged into that socket? Do I, as the creator of the “socket”, want to determine and have control over what can be plugged in there?

I view software exactly as devices with plugs which need sockets of power to function. If lower level sockets didn’t exist, everyone would need to write software in assembly with the only knowledge being the hardware on which it will run. Like building a table lamp with its own wind farm.

Relying on existing interfaces for creating new functionality is an inherent feature of how computers work. Even programming languages can be considered as semantic interfaces through which we communicate and control the hardware. For example, WordPress will always need PHP to run. Outside PHP WordPress is not WordPress anymore.

With that comparison in mind, we should note that WordPress can be licensed under the GPL only because the licence of PHP doesn’t impose any restrictions or rules on how the products derived from it are licensed. At the same time, WordPress has no influence over how PHP can be used.

I think that once you create an interface in your software through which you want others to modify or change the way software works, you have given others the freedom to plug in anything into it. You have created an interface which no longer requires others to derive from your original work, in order to use it. When someone uses that interface, nothing is being changed or altered in your original work.

By creating such plugin architecture, you have decided to give others the freedom to add any type of functionality without any restrictions. That added functionality is a derivative work only in a sense that it uses your “socket”, while the functionality itself stands on its own. It’s like plugging an amplifier into an audio system — the amplification depends only on the existence of a signal not on the type of socket it’s passed through.

To conclude, I think WordPress plugins and themes are not derivative works of WordPress. Use of plugins and themes is protected by the freedom Zero of the GPL — “the freedom to run the program, for any purpose”. Once you have allowed users to run any plugins or themes, you can’t limit them to plugins and themes that are licensed only under GPL.

6 Comments

  1. scribu.net/ says:

    Have you read Mark Jaquith’s post? I found it very easy to follow:
    Why WordPress themes are derivative of WordPress.
    However, I agree that a distinction should be made between 1) actual plugins that use actions & filters and 2) stand-alone libraries that just happen to have a plugin header.
    My first ever “plugin” was of the second kind and could not be considered a derivative work because it was just a single stand-alone function definition that I called from my theme.

    • Kaspars says:

      scribu, yeah I read that post and I know all the arguments he is talking about.

      Yet, no one has looked at this from the user’s perspective, who is given the freedom to run extensions licensed under any license. I think that once you create a plugin/theme API, you hand the control to the user and can no longer impose any restrictions on how it is used, because it’s now in the Freedom Zero space instead of the Derivative Work space.

  2. scribu says:

    Yes, users can do whatever they want, until they decide to distribute it.

  3. Kaspars says:

    GPL gives users complete freedom over how they run the program and what plugins they use. By saying that plugins that are being distributed can be only GPL (being a derivative work), you’re implying that plugins distributed under other licences are not allowed to be run, which contradicts the Freedom Zero.

  4. scribu.net/ says:

    In a perfect world, users couldn’t use non-GPL licensed derivative works because they wouldn’t exist. :)
    Anyway, that sounds like a contradiction in the license itself, more than anything else.

  5. scribu.net/ says:

    Yeah, couldn’t sleep, so:
    We should treat the fact that ill-licensed derivative works exist as an exception, in the programming sense, thrown by the real world.
    It’s handler is the court room.
    The guilty party is not the end user, but the one who applied the inappropriate license.
    Good night! :)

Leave a Reply