2015年1月27日火曜日

Artistic License 2.0のソフトを自作アプリと一緒に配布するための条件

npmを現在開発中のエディタに埋め込んで一緒にバイナリを配布したいので、npmが使用しているArtistic License 2.0について調べてみました。
主にPerlで使われているようです。
http://ja.wikipedia.org/wiki/Artistic_License

原文
http://www.perlfoundation.org/artistic_license_2_0

埋め込む時のポイントは原文の以下の(7)と(8)です。

Aggregating or Linking the Package

(7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation.

(8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package.

Aggregateする場合は商用ソフトにも含めることができ(ただしnpmはArtistic Licenseのまま)、Linkする場合はnpmへのdirect interfaceを提供しなければ商用ソフトにもリンクして配布できそうです。

direct interfaceとは何でしょう?Artistic Licenseの補足のSection 8に説明があります。

http://www.perlfoundation.org/artistic_2_0_notes

Section 8:

You’re totally free to embed Perl inside your software in a way that doesn’t allow users to access Perl. On the other hand, if you embed it and users can nevertheless do things like running Perl scripts, then you really are distributing Perl and need make sure that your distribution fits one of the use cases in (1)-(7).

ユーザが直接npmのプログラムを実行できたらそれはdirect interfaceと見なされるみたいです。

AggregateとLinkの違いは何でしょう?
GNU GPLのFAQにaggregateの説明があります。

http://www.gnu.org/licenses/gpl-faq.html#MereAggregation

What is the difference between an “aggregate” and other kinds of “modified versions”?

An “aggregate” consists of a number of separate programs, distributed together on the same CD-ROM or other media. The GPL permits you to create and distribute an aggregate, even when the licenses of the other software are non-free or GPL-incompatible. The only condition is that you cannot release the aggregate under a license that prohibits users from exercising rights that each program’s individual license would grant them.

Where’s the line between two separate programs, and one program with two parts? This is a legal question, which ultimately judges will decide. We believe that a proper criterion depends both on the mechanism of communication (exec, pipes, rpc, function calls within a shared address space, etc.) and the semantics of the communication (what kinds of information are interchanged).

If the modules are included in the same executable file, they are definitely combined in one program. If modules are designed to run linked together in a shared address space, that almost surely means combining them into one program.

By contrast, pipes, sockets and command-line arguments are communication mechanisms normally used between two separate programs. So when they are used for communication, the modules normally are separate programs. But if the semantics of the communication are intimate enough, exchanging complex internal data structures, that too could be a basis to consider the two parts as combined into a larger program.

直接npmを静的or動的リンクせず、パイプやソケットを使ってプロセス間通信を行えばaggregateと見なされるみたいです。

結論

つまりnpmとリンクさせずプロセス間通信を使えばnpmを商用エディタに含めて配布することが可能みたいです。その際npmのバイナリだけでなくライセンスファイルも一緒に含めないといけません。