relicensecheck.pl 37.2 KB
Newer Older
1 2 3 4 5 6 7
#!/usr/bin/perl -w
# vim:sw=4:et
# (c) Dirk Mueller. GPLv2+
# I would love to be a python script, but os.popen just sucks

use strict;

8 9
use List::Util qw(any);

10
### Please add your KDE (svn/git) account name in *alphabetical* order to the list
11 12 13
### below, then answer the following questions:
###
### 1. Include 'gplv23' if you are okay with contributions you've made under
14
###    "GPLv2" being relicensed as "GPLv2 or GPLv3".
15 16
###
### 2. Include 'lgplv23' if you are okay with contributions you've made under
17
###    "LGPLv2" being relicensed as "LGPLv2 or LGPLv3".
18 19
###
### 3. Include 'gplv2+' if you are okay with contributions you've made under
20
###    "GPLv2" being relicensed as "GPLv2 or later".
21 22
###
### 4. Include 'lgplv2+' if you are okay with contributions you've made under
23
###    "LGPLv2" being relicensed as "LGPLv2 or later".
24 25 26 27
###
### 5. Include '+eV' if you are okay with the KDE e.V. deciding on a future
###    licensing change to your code if necessary.
###
28 29
### 5. Include 'CCBYSA4+' if you are okay with contributions you've made under
###    "GNU FDL" being relicensed as "Creative Commons Attribution-ShareAlike 4.0 International".
30
### For more information, see https://community.kde.org/Guidelines_and_HOWTOs/Relicensing/KDE_Relicensing
31 32

my %license_table = (
33
    'acrouthamel'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
34
    'aheinecke'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Ahmad Samir's avatar
Ahmad Samir committed
35
    'ahmadsamir'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
36
    'arichardson'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
37
    'athurhfree'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Stefan Brüns's avatar
Stefan Brüns committed
38
    'bruns'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Carl Schwan's avatar
Carl Schwan committed
39
    'carlschwan'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
40
    'cfeck'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
41
    'cgerloff'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
42
    'cordlandwehr'  => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
David Bryant's avatar
David Bryant committed
43
    'davidbryant'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
44
    'davidedmundson'=> ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
45
    'davidhurka'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
46
    'davidre'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
47
    'emmanuelp'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
48
    'flherne'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
49
    'huoni'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
50
    'igorkushnir'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
51
    'jpoelen'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Harald Sitter's avatar
Harald Sitter committed
52
    'jriddell'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
53
    'kezik'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Gael de Chalendar's avatar
Gael de Chalendar committed
54
    'kleag'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', 'CCBYSA4' ],
55
    'lnj'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
56
    'ltoscano'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
57
    'lueck'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
58
    'mart'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Méven Car's avatar
Méven Car committed
59
    'meven'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
60
    'mgallien'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
61
    'michaeleden'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
62
    'michelh'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
63
    'mjansen'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
64
    'muhlenpfordt'  => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
65
    'ngraham'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
66
    'nicolasfella'  => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
67
    'ostroffjh'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
rkflx's avatar
rkflx committed
68
    'rkflx'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
69
    'safaalfulaij'  => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
70
    'sitter'        => ['CCBYSA4'],
71
    'sredman'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
72
    'sstjames'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
Tobias Fella's avatar
Tobias Fella committed
73
    'tfella'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
74
    'thomassc'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
75 76
    'vladz'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ],
    'wbauer'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV', 'CCBYSA4' ]
77 78 79 80
);

my %old_license_table_2 = (
    # From before CCBYSA4 was added, if you get an update for one of these people move it to %license_table
81 82 83
    'aacid'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'abryant'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'adawit'        => ['gplv23', 'lgplv23',                      '+eV' ],
84
    'ademko'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
85 86
    'adiaferia'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'afiestas'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
87 88
    'alexmerry'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'alund'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
89
    'amantia'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
90
    'amth'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
David Faure's avatar
David Faure committed
91
    'andreyc'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
92
    'antlarr'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
93
    'apol'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
94
    'arnolddumas'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
95
    'asensi'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
96 97 98
    'aseigo'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'asserhal'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'beaulen'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
99
    'bensi'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
100
    'beschow'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
101
    'bgupta'        => [                     'gplv2+', 'lgplv2+', '+eV' ],
102
    'bhards'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
103 104 105
    'bieker'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'bischoff'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'bks'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
106
    'blackie'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Benjamin Port's avatar
Benjamin Port committed
107
    'bport'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
108
    'bram'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
109
    'broulik'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
110
    'bruggie'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
111
    'bshah'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
112
    'capel'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
113 114
    'carewolf'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
    'cgiboudeaux'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
115
    'chani'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
116
    'chehrlic'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
117
    'clee'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
118
    'cmollekopf'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
119
    'coates'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
120
    'codrea'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
121
    'craig'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
122
    'cramblitt'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
123
    'cschumac'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
David Faure's avatar
David Faure committed
124
    'ctennis'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
125
    'cullmann'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Rolf Eike Beer's avatar
+dakon  
Rolf Eike Beer committed
126
    'dakon'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
127
    'danimo'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
128
    'dannya'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
129 130
    'deller'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
    'denis'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
131
    'deniskuplyakov'=> ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
132 133
    'dfaure'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'dhaumann'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
134
    'dherberth'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
135
    'domi'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
136
    'djarvie'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
137
    'dyp'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
138
    'dvratil'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
139
    'egorov'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
140 141
    'ehamberg'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'eliasp'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
142
    'elvisangelaccio'=>['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
143
    'epignet'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
144 145
    'ereslibre'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'eros'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Kevin Ottens's avatar
Kevin Ottens committed
146
    'ervin'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
147 148
    'eschepers'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+',       ],
    'eva'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
149
    'fabiank'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
150
    'fawcett'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Chao Feng's avatar
Chao Feng committed
151
    'fengchao'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Andi Fischer's avatar
Andi Fischer committed
152
    'fischer'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
153
    'fizz'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
154
    'flocati'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
155
    'fujioka'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
156
    'fux'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
157
    'garbanzo'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
David Faure's avatar
David Faure committed
158
    'gateau'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
159
    'geralds'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
160
    'giannaros'     => ['gplv23', 'lgplv23'                             ],
161
    'gioele'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
162
    'graesslin'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
163
    'granroth'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Gregor Mi's avatar
Gregor Mi committed
164
    'gregormi'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
165
    'groszdaniel'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
166
    'grulich'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
167
    'guymaurel'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
168 169
    'haeber'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'haeckel'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+',       ],
170
    'harris'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
171
    'hausmann'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Heiko Becker's avatar
Heiko Becker committed
172
    'heikobecker'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+',       ],
173
    'hein'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
174 175 176
    'hdhoang'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'hindenburg'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'hoelzer'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
177
    'hrvojes'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
178
    'hubner'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
179
    'huerlimann'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
180
    'huftis'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
181
    'ilic'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
182
    'ikomissarov'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
183 184 185 186 187
    'ivan'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'jbrouault'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'jehrichs'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'jekyllwu'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'jlee'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
188
    'johnflux'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
189 190
    'jones'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'jowenn'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
191
    'jschroeder'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
192
    'jtamate'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
193
    'kainhofe'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
194
    'kfunk'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
195
    'kloecker'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
196
    'knight'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Albert Astals Cid's avatar
Albert Astals Cid committed
197
    'knauss'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
198 199
    'kossebau'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'kylafas'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Luca Beltrame's avatar
Luca Beltrame committed
200
    'lbeltrame'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
201
    'leinir'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
202
    'leonh'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
203
    'leonhard'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
David Faure's avatar
David Faure committed
204
    'lilachaze'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Lasse Liehu's avatar
Lasse Liehu committed
205
    'lliehu'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
206
    'lukas'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Lamarque Souza's avatar
Lamarque Souza committed
207
    'lvsouza'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
208
    'lypanov'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Stefan Majewsky's avatar
Stefan Majewsky committed
209
    'majewsky'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Jean-Baptiste Mardelle's avatar
Jean-Baptiste Mardelle committed
210
    'mardelle'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
211
    'martyn'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
212
    'mbritton'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
213
    'mbroadst'      => ['gplv23', 'lgplv23'                     , '+eV' ],
Tomas Mecir's avatar
Tomas Mecir committed
214
    'mecir'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
215 216
    'michaelhowell' => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'michalhumpula' => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
217
    'milliams'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
218
    'mirko'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
219
    'mklapetek'     => ['gplv23', 'lgplv23',         ,          , '+eV' ],
220 221 222
    'mkoller'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'mlaurent'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'mludwig'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
223
    'mmrozowski'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
224
    'mpyne'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Miquel Sabaté's avatar
Miquel Sabaté committed
225
    'mssola'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
226 227
    'mueller'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
    'mwolff'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
228
    'nalvarez'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
229
    'narvaez'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
230
    'nhasan'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
231
    'nikitas'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
232 233
    'nsams'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
    'ogoffart'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
234
    'orcsik'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
235
    'palant'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
236
    'palimaka'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
237
    'pdamsten'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
238
    'peifengyu'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
239
    'pgquiles'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
240 241 242 243
    'pino'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'pletourn'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'pupeno'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'raabe'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
244
    'rahn'          => ['gplv23', 'lgplv23'                     , '+eV' ],
245
    'ralfjung'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
246
    'ralsina'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
247
    'rdale'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
248
    'reiher'        => ['gplv23', 'lgplv23',                      '+eV' ],
249
    'rich'          => ['gplv23', 'lgplv23'                     , '+eV' ],
250
    'richih'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
251
    'rkcosta'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
252
    'robbilla'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
253
    'romariorios'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
254
    'rpreukschas'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
255
    'rthomsen'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
256
    'ruedigergad'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
257
    'sanders'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
258
    'sandsmark'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
259
    'sars'          => ['gplv23', 'lgplv23',                      '+eV' ],
David Faure's avatar
David Faure committed
260
    'saschpe'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
261
    'savernik'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
262
    'scarpino'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
263
    'schmeisser'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
264
    'schroder'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
265
    'schwarzer'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
266
    'sebas'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
267
    'skelly'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
David Faure's avatar
David Faure committed
268
    'smartins'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
269
    'sping'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
270
    'staikos'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Jarosław Staniek's avatar
Jarosław Staniek committed
271
    'staniek'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
272
    'sune'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
273
    'taj'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
274
    'tanton'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
275 276 277
    'tenharmsel'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'teske'         => ['gplv23', 'lgplv23',                            ],
    'tfry'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
278
    'thiago'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
279
    'tjansen'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
280
    'tmcguire'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
281
    'tnyblom'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
282
    'treat'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
283 284
    'turbov'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'uga'           => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
285
    'uwolfer'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
286
    'vandenoever'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Vishesh Handa's avatar
Vishesh Handa committed
287
    'vhanda'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
288
    'vitters'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
289
    'vkrause'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
290
    'vonreth'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
Valentin Rusu's avatar
Valentin Rusu committed
291
    'vrusu'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
292 293 294 295 296
    'waba'          => ['gplv23', 'lgplv23',                      '+eV' ],
    'wheeler'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+'        ],
    'whiting'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'willy'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
    'woebbe'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
297
    'wstephens'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
298
    'yurchor'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
299
    'zack'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ],
300
    'zecke'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+', '+eV' ]
301
    # Do not add anything here. Use license_table instead.
302
);
303

304
my %old_license_table = (
305 306 307 308
    ### below is the older table -- from before we offered the +eV option.
    ### This means that in theory some of these contributors might accept
    ### to add the +eV if we ask them nicely. If they refuse, move the line
    ### to the above part of the table so that we don't ask them again.
309 310 311 312 313 314
    'adridg'        => ['gplv23', 'lgplv23'                      ],
    'ahartmetz'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'annma'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'apaku'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'arendjr'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'aumuell'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
315
    'bbroeksema'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
    'binner'        => ['gplv23', 'lgplv23'                      ],
    'bjacob'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'bmeyer'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'boemann'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'borgese'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'braxton'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'bvirlet'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'cartman'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'cconnell'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'charles'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'cies'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'cniehaus'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'coolo'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'cschlaeg'      => ['gplv23', 'lgplv23'                      ],
    'dimsuz'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'djurban'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'dmacvicar'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'dymo'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'edghill'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'emmott'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'espen'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'fela'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'fredrik'       => ['gplv23', 'lgplv23'                      ],
    'gladhorn'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'gogolok'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'goossens'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'gyurco'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'harald'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'hedlund'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'helio'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'howells'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'hschaefer'     => ['gplv23'                                 ],
    'ingwa'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'isaac'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'jens'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'jlayt'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'johach'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'krake'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'laidig'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'lunakl'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'lure'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'marchand'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mattr'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mcamen'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'menard'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mfranz'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mhunter'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'micron'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mkretz'        => ['gplv23', 'lgplv23'                      ],
    'mlarouche'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mm'            => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mrudolf'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'msoeken'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mstocker'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mutz'          => [                     'gplv2+', 'lgplv2+' ],
    'mvaldenegro'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'mwoehlke'      => ['gplv23', 'lgplv23'                      ],
    'nielsslot'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'okellogg'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'onurf'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'orzel'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'ossi'          => [                     'gplv2+', 'lgplv2+' ],
    'osterfeld'     => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'pfeiffer'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'piacentini'    => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'pitagora'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'ppenz'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'pstirnweiss'   => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'putzer'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'pvicente'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'quique'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
387
    'raggi'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
388
    'rempt'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
389 390
    'rjarosz'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'rodda'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
391 392 393 394 395 396 397 398 399
    'roffet'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'rohanpm'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'sebsauer'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'shaforo'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'shipley'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'silberstorff'  => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'thorbenk'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'tilladam'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'tokoe'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
400
    'toma'          => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
401
    'troeder'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
402
    'trueg'         => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ], # NOTE: except k3b
403 404 405 406
    'wgreven'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'winterz'       => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'zachmann'      => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ],
    'zander'        => ['gplv23', 'lgplv23', 'gplv2+', 'lgplv2+' ]
407
    # Do not add anything here. Use license_table instead.
408 409
);

410
my %secondary_mail_addresses = (
411 412 413
    '13thguards@gmail.com' => 'isemenov',
    'ABBAPOH@me.com' => 'ikomissarov',
    'aetf@unlimitedcodeworks.xyz' => 'peifengyu',
414
    'aleixpol@kde.org' => 'apol',
David Faure's avatar
David Faure committed
415
    'alex.merry@kde.org' => 'alexmerry',
416
    'arichardson.kde@googlemail.com' => 'arichardson',
417
    'asmond@gmx.com' => 'asensi',
418
    'athurh@gmail.com' => 'athurhfree',
419 420
    'bero@arklinux.org' => 'bero',
    'caleb@gentoo.org' => 'ctennis',
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
421
    'cgiboudeaux@gmx.com' => 'cgiboudeaux',
422
    'christoph@maxiom.de' => 'cfeck',
423
    'devel@the-user.org' => 'schmidt-domine',
424 425 426
    'devriese@kde.org' => 'domi',
    'ervin+bluesystems@kde.org' => 'ervin',
    'faure+bluesystems@kde.org' => 'dfaure',
427
    'git@the-user.org' => 'schmidt-domine',
428 429
    'guy.maurel@kde.org' => 'guymaurel',
    'john@layt.net' => 'jlayt',
430
    'kde@randomguy3.me.uk' => 'alexmerry',
David Faure's avatar
David Faure committed
431
    'kde@rusu.info' => 'valir',
Nate Graham's avatar
Nate Graham committed
432
    'keziolio123@gmail.com' => 'kezik',
433 434
    'kubito@gmail.com' => 'rkcosta',
    'lamarque@gmail.com' => 'lvsouza',
David Faure's avatar
David Faure committed
435
    'majewsky@gmx.net' => 'majewsky',
436
    'malte@kde.org' => 'malte',
437
    'mk-lists@email.de' => 'kaning',
David Faure's avatar
David Faure committed
438
    'mklapetek@kde.org' => 'mklapetek',
439
    'neoclust.kde@free.fr' => 'nlecureuil',
Christophe Giboudeaux's avatar
Christophe Giboudeaux committed
440
    'nyblom@kde.org' => 'tnyblom',
441 442
    'olav@vitters.nl' => 'vitters',
    'richard@goteborg.utfors.se' => 'larkang',
443
    'schwarzerf@gmail.com' => 'schwarzer',
444
    'sune@vuorela.dk' => 'sune',
Albert Astals Cid's avatar
Albert Astals Cid committed
445
    'thb@net-bembel.de' => 'tbaumgart',
446 447
    'trev@adblockplus.org' => 'palant',
    'tsdgeos@terra.es' => 'aacid',
448
    'nicolas.fella@kdab.com' => 'nicolasfella',
449 450
);

451 452 453
my %ruletable;
my %blacklist;
my %whitelist;
454
my %unknown_authors;
455 456
my @blacklist_revs;

457 458 459 460 461
foreach my $who (keys %old_license_table) {
    die "$who in both tables" if defined $license_table{$who};
    $license_table{$who} = $old_license_table{$who};
}

462 463 464 465 466
foreach my $who (keys %old_license_table_2) {
    die "$who in both tables" if defined $license_table{$who};
    $license_table{$who} = $old_license_table_2{$who};
}

467 468 469 470 471 472
foreach my $who (keys %license_table) {
    foreach my $license(@{$license_table{$who}}) {
        $ruletable{$license}->{$who} = 1;
    }
}

473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488
# Read kde-common/accounts for email->name mapping.

my $configfile = $ENV{HOME}. "/.config/KDE/relicensecheck.conf";

open(CONFIG, $configfile) or die "Please write the path to kde-common/accounts in $configfile";
my $accountfile;
while (<CONFIG>) {
    if (not /^#/) {
        chomp;
        $accountfile = $_;
    }
}
close CONFIG;
defined $accountfile or die "Please write the path to kde-common/accounts in $configfile";

my %authors = ();
489
my %authornames = ();
490 491 492
sub parseAccountsFile($)
{
    my ($accountfile) = @_;
493 494 495 496 497
    open(ACCOUNTS, $accountfile) || die "Account file not found: $accountfile";
    while (<ACCOUNTS>) {
        # The format is nick name email.
        if (/([^\s]*)\s+([^\s].*[^\s])\s+([^\s]+)/) {
            $authors{$3} = "$1";
498
            $authornames{$1} = "$2";
499 500 501 502 503
        }
        #elsif (/([^\s]*)\s+([^\s]*)/) {
        #    $authors{$1} = $2;
        #}
        else {
504
            die "$accountfile: couldn't parse $_";
505 506
        }
    }
507 508 509 510 511
    close ACCOUNTS;
}

if ($accountfile) {
    parseAccountsFile($accountfile);
512 513 514 515

    # Also read the "disabled accounts" file
    my $disabledaccountsfile = $accountfile;
    $disabledaccountsfile =~ s/accounts$/disabled-accounts/;
516 517
    die "I expected this to end with 'accounts': $accountfile" if ($accountfile eq $disabledaccountsfile);
    parseAccountsFile($disabledaccountsfile);
518 519 520 521 522 523
}

sub resolveEmail($) {
    my ($email) = @_;

    my $resolved = $authors{$email};
524 525 526
    if (not defined $resolved) {
        $resolved = $secondary_mail_addresses{$email};
    }
527
    if (not defined $resolved) {
528
        $unknown_authors{$email} = 1;
529
        return $email;
530 531 532 533
    }
    return $resolved;
}

534 535 536 537 538 539 540 541 542
sub skipCommitByAuthor($) {
    my ($author) = @_;
    return ($author eq "scripty" or
            $author eq "(no" or
            $author eq "nobody\@localhost" or
            $author eq "not.committed.yet" or
            $author eq "null\@kde.org");
}

543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583
sub usage()
{
 print << "EOM";
Usage:
    relicensecheck.pl file

    Output information on relicensing possibilities for <file>

    relicensecheck.pl -g
    relicensecheck.pl --generate-wiki

    Generate the table for the wiki page
EOM
}

my $generate_wiki = 0;
my @arguments;
sub parse_arguments(@)
{
    while (scalar @_) {
        my $arg = shift @_;

        if ($arg eq "-g" || $arg eq "--generate-wiki") {
            $generate_wiki = 1;
        } elsif ($arg eq "-?" || $arg eq "--?" || $arg eq "-h" || $arg eq "--help") {
            usage();
            exit 0;
        } elsif ($arg eq "--") {
            push @arguments, @_;
            return;
        } else {
            push @arguments, $arg;
        }
    }
}

parse_arguments(@ARGV);

if ($generate_wiki) {

    print "{| border=\"1\"\n";
584
    print "! Name !! GPLv2->GPLv2+ !! LGPLv2 -> LGPLv2+ !! GPLv2 -> GPLv2+v3 !! LGPLv2 -> LGPLv2+LGPLv3 !! KDE e.V. decides !! FDL -> CC-BY-SA 4.0 \n";
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
    print "|-\n";
    my @lines = ();
    foreach my $who (keys %license_table) {
        if (!defined $authornames{$who}) {
            die "ERROR: unknown author $who\n";
        }
        # Example: print "|Adam, Till || YES || YES || YES || YES || NO\n";
        my @licenses = @{$license_table{$who}};
        my %licensesHash = map { $_ => 1 } @licenses;
        my $gplv23 = exists($licensesHash{'gplv23'}) ? "YES" : "NO";
        my $lgplv23 = exists($licensesHash{'lgplv23'}) ? "YES" : "NO";
        my $gplv2plus = exists($licensesHash{'gplv2+'}) ? "YES" : "NO";
        my $lgplv2plus = exists($licensesHash{'lgplv2+'}) ? "YES" : "NO";
        my $eV = exists($licensesHash{'+eV'}) ? "YES" : "NO";
        $eV = "" if (exists $old_license_table{$who});
600 601 602
        my $ccbysa4 = exists($licensesHash{'CCBYSA4'}) ? "YES" : "NO";
        $ccbysa4 = "" if (exists $old_license_table_2{$who} || exists $old_license_table{$who});
        push @lines, "|$authornames{$who} || $gplv2plus || $lgplv2plus || $gplv23 || $lgplv23 || $eV || $ccbysa4\n";
603 604 605 606 607 608 609 610 611 612 613
    }
    use locale;
    foreach my $line (sort @lines) {
        print $line;
        print "|-\n";
    }
    print "|}\n";

    exit 0;
}
my $file = $arguments[0] || "";
614 615 616

die "need existing file: $file" if (! -r $file);

617 618 619 620 621 622
my $svn = (-d ".svn");

if ($svn) {
    open(IN, "-|") || exec 'svn', 'log', '-q', $file;
} else {
    # Format the git output to match the format of svn log.
623
    open(IN, "-|") || exec 'git', 'log', '--follow', '--abbrev-commit', '--pretty=format:r%h | %ae ', $file;
624
}
625 626
while(<IN>) {

627
    if (/^r(\S+) \| (\S+) /)  {
628
        my ($rev, $author) = ($1, $2);
629 630
        #print STDERR "rev=$rev author=$author\n";

631 632
        next if skipCommitByAuthor($author);

633 634 635 636
        if (not $svn) {
            # Resolve email to account name
            $author = resolveEmail($author);
        }
637

638 639
        foreach my $license(keys %ruletable) {
            if (!defined($ruletable{$license}->{$author})) {
640 641
                push(@{$blacklist{$license}->{$author}}, $rev);
            }
642 643 644
            else {
                push(@{$whitelist{$license}->{$author}}, $rev);
            }
645

646 647 648 649 650
        }
    }
}
close(IN);

651 652 653
my %loc_author = ();

if (-f $file) {
654 655 656 657 658 659 660 661
    if ($svn) {
        open(IN, "-|") || exec 'svn', 'ann', '-x', '-w', $file;
        while(<IN>) {
            my ($author) = (split)[1];
            $loc_author{$author}++;
        }
        close(IN);
    } else {
662
        open(IN, "-|") || exec 'git', 'blame', '-f', '-w', '-e', $file;
663 664 665 666 667
        while(<IN>) {
            # The format is:
            # b061712b kdecore/klockfile.cpp      (<faure@kde.org>   [...]
            if (m/^(\S+) (\S+) +\(<([^>]+)>/) {
                my ($author) = $3;
668
                next if skipCommitByAuthor($author);
669 670 671 672 673 674 675
                $author = resolveEmail($author);
                $loc_author{$author}++;
            } else {
                print STDERR "Parse error on git blame output: $_";
            }
        }
        close(IN);