Skip to content

Commit

Permalink
add packages ambiguation and additional licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
mahlzahn committed Oct 15, 2023
1 parent 7c42172 commit 9b13102
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
6 changes: 6 additions & 0 deletions src/vrms_arch/disambiguation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'adobe-source-serif-pro-fonts': ['OFL'],
'amd-ucode': ['custom:non-free'],
'aom': ['BSD', 'custom:free'],
'apptainer': ['BSD-3-Clause-LBNL'],
'blas': ['custom:BSD-like'],
'boost': ['Boost'],
'boost-libs': ['Boost'],
Expand All @@ -17,6 +18,7 @@
'cups-filters': ['GPL', 'GPL2', 'GPL3-only', 'GPL3'],
'db': ['custom:Sleepycat'],
'discord': ['custom:non-free'],
'endless-sky': ['custom:GPL-2.0-or-later', 'custom:GPL-3.0-or-later', 'custom:public-domain', 'custom:CC0', 'custom:CC-BY-2.0', 'custom:CC-BY-3.0', 'custom:CC-BY-4.0', 'custom:CC-BY-SA-3.0', 'custom:CC-BY-SA-4.0'],
'expat': ['MIT'],
'file': ['BSD'],
'flashplugin': ['custom:non-free'],
Expand Down Expand Up @@ -131,6 +133,7 @@
'spirv-tools': ['Apache'],
'steam': ['custom:non-free'],
'sudo': ['ISC', 'BSD3', 'BSD2', 'ZLIB'],
'svt-av1': ['BSD-3-Clause'], # additionally 'Alliance for Open Media Patent License 1.0'
'tcl': ['custom:BSD-like'],
'tk': ['custom:BSD-like'],
'ttf-bitstream-vera': ['custom:bitstream-vera'],
Expand All @@ -157,6 +160,7 @@
'xfce4-wavelan-plugin': ['BSD2'],
'xfce4-xkb-plugin': ['BSD2'],
'xkeyboard-config': ['MIT', 'custom:HPND', 'custom:X11', 'custom:MIT-style'],
'xcalib': ['GPL-2.0'], # additionally with optional postcardware
'xorg-bdftopcf': ['custom:X11'],
'xorg-fonts-encodings': ['custom:Public Domain'],
'xorg-font-util': ['custom:UCD', 'MIT', 'BSD2'],
Expand Down Expand Up @@ -197,6 +201,8 @@
'zoom': ['custom:non-free'], # AUR
'zsh-abbr': ['custom:CC-BY-NC-SA-4.0', 'custom:Hippocratic'], # AUR
'zsh': ['custom:MIT-style', 'GPL'],
'zeroc-ice': ['GPL-2.0-only'], # alternatively non-free commercial license
'zeroc-ice-java': ['GPL-2.0-only'], # alternatively non-free commerical license
}

class Package(object):
Expand Down
28 changes: 22 additions & 6 deletions src/vrms_arch/license_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def clean_license_name(license):
# CCPL (Creative Commons) should be specified with one of the
# sublicenses (one of /usr/share/licenses/common/CCPL/*), some of
# which are non-free
"Creative Commons",
"CC",
"CCPL",
"Creative Commons",
]]

FREE_LICENSES = [clean_license_name(license) for license in [
Expand All @@ -36,26 +37,32 @@ def clean_license_name(license):
'Beerware',
'bitstream-vera',
'Boost',
'0BSD',
'BSD',
'BSD2',
'BSD-2-clause',
'BSD-2-Clause',
'BSD-2-Clause-Patent',
'BSD3',
'BSD-3-clause',
'BSD-3-Clause',
'BSD-3-Clause-LBNL',
'BSD License',
'BSD-like',
'BSDL',
'BSD-style',
'BSL',
'bzip2',
'CC0',
'CC0 1.0',
'CC0-1.0',
'CC-BY',
'CC-BY-2.5',
'CC-BY-3.0',
'CC-BY-4.0',
'CC-BY-SA',
'CC-BY-SA-2.5',
'CC-BY-SA-3.0',
'CC BY-SA-4.0',
'CC-BY-SA-4.0',
'CCPL:by',
'CCPL:by-4.0'
'CCPL:by-sa',
'CCPL:cc-by',
'CCPL:cc-by-sa',
Expand All @@ -81,6 +88,7 @@ def clean_license_name(license):
'FFSL',
'FIPL',
'font embedding exception',
'Free Public License 1.0.0',
'FSFAP',
'GD',
'GFDL',
Expand Down Expand Up @@ -134,11 +142,14 @@ def clean_license_name(license):
'LGPL2_1',
'LGPL-2.1-only',
'LGPL-2.1-or-later',
'LGPL2.1 with linking exception',
'LGPL3',
'LGPLv3+',
'LGPL-3.0',
'LGPL-3.0-only',
'LGPL-3.0-or-later',
'LGPL-3.0+ with WxWindows-exception-3.1',
'LGPL-exception',
'libpng',
'libtiff',
'libxcomposite',
Expand All @@ -155,15 +166,18 @@ def clean_license_name(license):
'MPL2',
'MPLv2',
'NCSA',
'NCSAOSL',
'neovim',
'nfsidmap',
'NoCopyright',
'NYSL',
'OASIS',
'OFL',
'OFL-1.1',
'OPEN DATA LICENSE',
'OpenLDAP',
'OpenMPI',
'OpenSSL Linking Exception',
'OSGPL',
'perl',
'PerlArtistic',
Expand All @@ -174,7 +188,7 @@ def clean_license_name(license):
'PostgreSQL',
'PSF',
'Public',
'Public Domain',
'public-domain',
'Python',
'Qhull',
'QPL',
Expand All @@ -183,6 +197,7 @@ def clean_license_name(license):
'Ruby',
'scite',
'scowl',
'sdbus-c++ LGPL Exception 1.0',
'Sendmail',
'Sendmail open source license',
'SGI',
Expand Down Expand Up @@ -218,6 +233,7 @@ def clean_license_name(license):
'X11-DEC',
'XFREE86',
'Xiph',
'Zero-Clause BSD',
'zlib',
'zlib/libpng',
'ZPL',
Expand Down

0 comments on commit 9b13102

Please sign in to comment.