| 1 |
GLEP: 23 |
| 2 |
Title: Portage handling of ACCEPT_LICENSE |
| 3 |
Version: $Revision: 1.2 $ |
| 4 |
Last-Modified: $Date: 2004/03/11 02:35:40 $ |
| 5 |
Author: Jason Stubbs <jstubbs@gentoo.org>, |
| 6 |
Status: Accepted |
| 7 |
Type: Standards Track |
| 8 |
Content-Type: text/x-rst |
| 9 |
Created: 9-Mar-2004 |
| 10 |
Post-History: 8-Mar-2004 10-Mar-2004 25-Oct-2004 |
| 11 |
|
| 12 |
|
| 13 |
Abstract |
| 14 |
======== |
| 15 |
|
| 16 |
Currently, every ebuild in the portage tree is required to have a valid |
| 17 |
LICENSE entry. However, the syntax of this entry is not officially |
| 18 |
defined and the entry itself is only used when outputting package |
| 19 |
details. |
| 20 |
|
| 21 |
Status Update |
| 22 |
============= |
| 23 |
|
| 24 |
Repoman has been updated to check for the LICENSE syntax. |
| 25 |
|
| 26 |
|
| 27 |
Motivation |
| 28 |
========== |
| 29 |
|
| 30 |
Many users wish to regulate the software they install with regards to |
| 31 |
licenses for various reasons [1]_. Some want a system free of any |
| 32 |
software that is not OSI-approved; others are simply curious as to what |
| 33 |
licenses they are implicitly accepting. |
| 34 |
|
| 35 |
Furthermore, some software requires that a user interactively accept its |
| 36 |
license for its author's to consider it legally binding. This is |
| 37 |
currently implemented using ``eutils.eclass``. |
| 38 |
|
| 39 |
|
| 40 |
Specification |
| 41 |
============= |
| 42 |
|
| 43 |
Ebuild LICENSE Variable |
| 44 |
----------------------- |
| 45 |
|
| 46 |
Most ebuilds are for software which is released under a single license. |
| 47 |
In these cases, the current LICENSE variable can remain as is. For |
| 48 |
example: |
| 49 |
|
| 50 |
:: |
| 51 |
|
| 52 |
LICENSE="single-license" |
| 53 |
|
| 54 |
However, there are several ebuilds for software which is released under |
| 55 |
several licenses, of which the user must accept one, some or all [2]_. |
| 56 |
To complicate this, some ebuilds include optional components which fall |
| 57 |
under a different license. |
| 58 |
|
| 59 |
To accomodate these cases, LICENSE syntax should accomodate all |
| 60 |
functionality offered by a DEPEND string. To keep things simple, this |
| 61 |
GLEP proposes that the syntax be identical. For example: |
| 62 |
|
| 63 |
:: |
| 64 |
|
| 65 |
LICENSE="mandatory-license |
| 66 |
|| ( choosable-licence1 chooseable-license-2 ) |
| 67 |
useflag? ( optional-component-license )" |
| 68 |
|
| 69 |
|
| 70 |
License Groups |
| 71 |
-------------- |
| 72 |
|
| 73 |
Almost all users are willing to install any software that is |
| 74 |
FSF-approved. Other users are willing to install any software and |
| 75 |
implicitly accept its license. To this end, portage will also need to |
| 76 |
handle grouping of licenses. |
| 77 |
|
| 78 |
At a minimum, there needs to be the groups ``GPL-COMPATIBLE``, |
| 79 |
``FSF-APPROVED``, ``OSI-APPROVED`` and ``NON-INTERACTIVE``. |
| 80 |
``NON-INTERACTIVE`` licenses are those that don't require interactive |
| 81 |
acceptance for to be considered legally binding. This is the current |
| 82 |
behaviour of portage. |
| 83 |
|
| 84 |
|
| 85 |
ACCEPT_LICENSE |
| 86 |
-------------- |
| 87 |
|
| 88 |
This GLEP proposes that a user be able to explicitly accept or decline |
| 89 |
licenses by editing a new variable ``ACCEPT_LICENSE`` in |
| 90 |
``/etc/make.conf``. Again, to keep things simple, the syntax should be |
| 91 |
similar to that of other incrementals. For example: |
| 92 |
|
| 93 |
:: |
| 94 |
|
| 95 |
ACCEPT_LICENSE="-* accepted-license -declined-license" |
| 96 |
|
| 97 |
As an extension, ``ACCEPT_LICENSE`` must also support `license groups`_. |
| 98 |
This GLEP proposes that the license group be prepended by the special |
| 99 |
character "``@``". For example: |
| 100 |
|
| 101 |
:: |
| 102 |
|
| 103 |
ACCEPT_LICENSE="-* @FSF-APPROVED" |
| 104 |
|
| 105 |
|
| 106 |
Emerge Behaviour |
| 107 |
---------------- |
| 108 |
|
| 109 |
At a minimum, emerge must handle unaccepted licenses the same way that |
| 110 |
it handles blockers. That is, with the --pretend flag the |
| 111 |
not-yet-accepted license should be listed in the output. Without the |
| 112 |
--pretend flag, emerge should stop before any software is installed. |
| 113 |
|
| 114 |
This GLEP proposes that, unlike blockers, dependencies for software |
| 115 |
should be checked regardless of license acceptance. Doing so will allow |
| 116 |
the user to review all necessary licenses before initiating an actual |
| 117 |
emerge. |
| 118 |
|
| 119 |
It is also proposed that the --ask option will display an unaccepted |
| 120 |
license and ask for acceptance, but not update any configuration files |
| 121 |
at this stage. Finally, the --verbose option should also list the |
| 122 |
licenses accepted for each package. |
| 123 |
|
| 124 |
|
| 125 |
Rationale |
| 126 |
========= |
| 127 |
|
| 128 |
An implementation of this proposal should make it easy for users wishing |
| 129 |
to regulate their software without affecting those that don't. |
| 130 |
|
| 131 |
|
| 132 |
Reference Implementation |
| 133 |
======================== |
| 134 |
|
| 135 |
TODO |
| 136 |
|
| 137 |
|
| 138 |
Backwards Compatibility |
| 139 |
======================= |
| 140 |
|
| 141 |
There should be no change to the user experience without the user |
| 142 |
explicitly choosing to do so. This mandates that the |
| 143 |
configuration variable be named ``ACCEPT_LICENSE`` as some users may |
| 144 |
already have it set due to ebuilds using ``eutil.eclass``'s |
| 145 |
implementation. It also mandates that the default ``ACCEPT_LICENSE`` be |
| 146 |
set to ``@NON-INTERACTIVE``. |
| 147 |
|
| 148 |
|
| 149 |
References |
| 150 |
========== |
| 151 |
|
| 152 |
.. [1] Gentoo Linux Bug 17367 |
| 153 |
(http://bugs.gentoo.org/show_bug.cgi?id=17367) |
| 154 |
.. [2] Gentoo Linux Bug 34146 |
| 155 |
(http://bugs.gentoo.org/show_bug.cgi?id=34146) |
| 156 |
|
| 157 |
|
| 158 |
Copyright |
| 159 |
========= |
| 160 |
|
| 161 |
This document has been placed in the public domain. |