Skip to content

Latest commit

 

History

History
339 lines (331 loc) · 12.3 KB

licenses.org

File metadata and controls

339 lines (331 loc) · 12.3 KB

Epkgs: Licenses

(require 'emir)

(defun emir--format-license-table (table)
  (when-let ((elt (assoc "failure" table))) (setcar elt "((failure))"))
  (when-let ((elt (assoc "pending" table))) (setcar elt "((pending))"))
  (when-let ((elt (assoc "none" table)))    (setcar elt "((none))"))
  (when-let ((elt (assoc "custom" table)))  (setcar elt "((custom))"))
  (let ((total (apply '+ (mapcar 'cadr table)))
        (gnu   (apply '+ (mapcar (pcase-lambda (`(,license ,count))
                                   (if (and license
                                            (string-match-p "GPL" license))
                                       count
                                     0))
                                 table))))
      (cl-flet ((percent (n) (round (* (/ n total 1.0) 100))))
        `(("License" "Count" "Percent")
          hline ,@(mapcar (pcase-lambda (`(,license ,count))
                            (list license count (percent count)))
                          table)
          hline ("total GNU" ,gnu ,(percent gnu))
          hline ("total" ,total 100)))))

(defun emir--insert-mirror-packages-using-licenses (&rest licenses)
  (epkg-add-org-header
   (mapcar (pcase-lambda (`(,name ,license ,class))
             (list name license class
                   (if (epkg-get-recipe 'melpa name) t "")))
           (epkg-sql [:select [name license class]
                      :from packages
                      :where license :in $v1
                      :and (not (= class 'shelved))
                      :order-by [(asc name)]]
                     (apply #'vector licenses)))
   '("Package" "License" "Class" "M")))

(defun emir--insert-attic-packages-using-licenses (&rest licenses)
  (epkg-add-org-header
   (epkg-sql [:select [name license] :from packages
              :where license :in $v1
              :and (= class 'shelved)
              :order-by [(asc name)]]
             (apply #'vector licenses))
   '("Package" "License")))
(epkg-add-org-header rows header)

up

Emacsmirror

Overview

(emir--format-license-table
 (epkg-sql [:select [license (funcall count *)] :as count
            :from packages
            :where (and (not (= class 'builtin))
                        (not (= class 'shelved)))
            :group-by license
            :order-by [(desc count) (asc license)]]))
LicenseCountPercent
GPL-3.0-or-later488469
GPL-2.0-or-later117117
MIT4126
GPL-3.0-only1772
BSD-2-Clause841
BSD-3-Clause731
Apache-2.0641
Unlicense381
WTFPL361
public-domain310
ISC260
as-is230
AGPL-3.0-or-later220
LGPL-3.0-or-later90
CC0-1.070
GPL-3.040
MPL-2.040
Zlib40
GPL-1.0-or-later30
LGPL-3.0-only30
0BSD20
CECILL-2.120
CECILL-B20
FSFAP20
LGPL-2.1-only20
AGPL-3.0-only10
Artistic-2.010
Beerware10
MIT-010
MPL-1.110
MS-PL10
Ruby10
Unicode-TOU10
total GNU627688
total7093100

Packages with unknown licenses

(epkg--sql-keep
 (list name class license
       (and (epkg-get-recipe 'melpa name) ""))
 [:select [name class license] :from packages
  :where (and (not (= class 'shelved))
              (or (not (in license $v1))
                  (isnull license)))
  :order-by [(asc name)]]
 (vconcat ["as-is" "public-domain"]
          elx-spdx-license-identifiers))

Emacsattic

Overview

(emir--format-license-table
 (epkg-sql [:select [license (funcall count *)] :as count
            :from packages
            :where (= class 'shelved)
            :group-by license
            :order-by [(desc count) (asc license)]]))
LicenseCountPercent
GPL-2.0-or-later84953
GPL-3.0-or-later45829
GPL-2.0-only614
GPL433
public-domain392
GPL-3.0-only272
MIT272
GPL-1.0-or-later141
Unlicense91
((custom))91
WTFPL81
as-is81
BSD-2-Clause70
BSD-3-Clause70
Apache-2.050
AGPL-3.0-or-later30
LGPL-3.0-only30
GPL-2.1-or-later20
ISC20
MS-PL20
0BSD10
AGPL-3.0-only10
Artistic-1.010
Artistic-2.010
BSD10
Beerware10
CC0-1.010
EPL10
LGPL-2.1-only10
LGPL-2.1-or-later10
LGPL-3.0-or-later10
total GNU146492
total1594100

Packages with unknown/custom licenses

(epkg--sql-keep
 (list name class license
       (and (epkg-get-recipe 'melpa name) ""))
 [:select [name class license] :from packages
  :where (and (= class 'shelved)
              (not (in license $v1)))
  :order-by [(asc name)]]
 (vconcat ["as-is" "public-domain"
           "GPL" "GPL-2.1-or-later" "BSD" "EPL"]
          elx-spdx-license-identifiers))
Package (9)ClassLicenseM
eposhelvedcustom
phutballshelvedcustom
procmaillogshelvedcustom
psgml-jadeshelvedcustom
rmooshelvedcustom
speedreadshelvedcustom
whineshelvedcustom
yahamshelvedcustom
youwillshelvedcustom

Problematic licenses

(emir--insert-attic-packages-using-licenses "GPL" "GPL-2.0-only" "EPL")
Package (105)License
align-regexpGPL
amigoGPL-2.0-only
atom-bloggerGPL
axcessGPL
bibtex-modeGPL
blipGPL-2.0-only
buffer-thumbnailGPL
byrd-biffGPL
cdtGPL
commit-patch-bufferGPL-2.0-only
conjecture-modeGPL
copyeditGPL-2.0-only
cruisecontrolGPL-2.0-only
dbkGPL
devkitemacsGPL-2.0-only
dired-aGPL
dms-sigGPL
e-blogGPL-2.0-only
ecGPL-2.0-only
eformGPL
elderGPL
emdroidGPL-2.0-only
emudsGPL
env-printGPL
equinoxGPL-2.0-only
esheetGPL-2.0-only
espectGPL-2.0-only
faithGPL
filewatchGPL
flip-tablesGPL-2.0-only
fluiddbGPL-2.0-only
foldingoGPL
garbleGPL-2.0-only
gb4eGPL
global-modesGPL
haddocGPL-2.0-only
hier-imenuGPL-2.0-only
html-helper-imenuGPL-2.0-only
hugs-modeGPL
icapsGPL-2.0-only
ifile-gnusGPL
ilispGPL
inkmacsGPL
iso-htmlGPL
javadoc-helpGPL-2.0-only
jhg-cloadGPL-2.0-only
journalctl-modeGPL-2.0-only
lbdbGPL-2.0-only
line-numbers-modeGPL
linesGPL
lmselectGPL-2.0-only
media-filesGPL-2.0-only
mgp-mode-cdGPL
miranda-modeGPL
mojoGPL-2.0-only
mutt-aliasGPL-2.0-only
notebookGPL-2.0-only
osx-itunesGPL-2.0-only
osx-osascriptGPL-2.0-only
osx-typecreatorGPL-2.0-only
otpGPL-2.0-only
outline-mGPL
pastieGPL
perl-myvarGPL-2.0-only
physical-lineGPL
play-modeGPL-2.0-only
point-ringGPL
popup-menuGPL
postGPL
qaGPL-2.0-only
qtdocGPL-2.0-only
recentGPL-2.0-only
redshankGPL
rep-wordsGPL-2.0-only
repeat-insertGPL
repeatableGPL-2.0-only
reportmailGPL
rtf-modeGPL-2.0-only
save-and-dwimGPL-2.0-only
sawfishGPL-2.0-only
scrmableGPL-2.0-only
slashdotGPL-2.0-only
slime-ritzEPL
spamprobeGPL-2.0-only
spectre-modeGPL
studlycapsGPL-2.0-only
summaryeGPL
symlink-fixGPL
tab-in-tabularGPL-2.0-only
texmedGPL-2.0-only
tie-modeGPL
tigerGPL-2.0-only
tldGPL-2.0-only
todochikuGPL-2.0-only
tumblrGPL-2.0-only
twitGPL-2.0-only
undo-groupGPL-2.0-only
wcGPL-2.0-only
webinfoGPL-2.0-only
word-countGPL-2.0-only
word-counterGPL
work-timerGPL-2.0-only
wsh-replGPL-2.0-only
xbaseGPL-2.0-only
zendmd-comintGPL-2.0-only

Notes:

  • (mail) GPL-2 maintainer feedback