Bug 2125487 - license-fedora2spdx should print friendly error when unknow license is passed as argument
Summary: license-fedora2spdx should print friendly error when unknow license is passed...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: license-validate
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-09 07:51 UTC by Ralf Corsepius
Modified: 2022-09-21 01:21 UTC (History)
1 user (show)

Fixed In Version: license-validate-10-1.fc37 license-validate-10-1.fc36 license-validate-10-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-19 00:18:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ralf Corsepius 2022-09-09 07:51:01 UTC
Description of problem:

Run this:
# license-fedora2spdx 'Artistic'
No terminal defined for 'A' at line 1 col 1

Artistic
^

Expecting: {'CDL', '__ANON_52', '__ANON_58', 'NOKIA', 'EGENIX', 'AGPLV1', 'IMATIX', '__ANON_56', 'FSFAP', '__ANON_41', 'SCEA', 'BITTORRENT', 'LPAR', '__ANON_63', 'UTOPIA', 'LGPLV3', '__ANON_49', 'CRC32', '__ANON_73', 'EUROSYM', '__ANON_60', 'VSL', 'GPLV1', 'OGL', '__ANON_16', 'WADALAB', 'BIBTEX', 'POSTGRESQL', 'ARPHIC', 'NOWEB', 'MGOPEN', '__ANON_24', '__ANON_0', 'NGPL', 'XINETD', 'RICEBSD', 'GPLV3', 'MIROS', 'EC', '__ANON_68', '__ANON_29', 'MIDNIGHT', '__ANON_67', 'OFSFDL', 'ADSL', 'NETSCAPE', 'PUNKNOVA', 'ZED', 'SPL', 'CATOSL', 'MOTOSOTO', '__ANON_10', '__ANON_6', 'OAL', 'CUBE', 'GLIDE', 'PHORUM', 'BEOPEN', '__ANON_64', 'AMS', 'HASKELLREPORT', '__ANON_5', 'LDPL', '__ANON_27', '__ANON_36', 'XSKAT', 'ERPL', 'NOSL', 'RPSL', 'OFL', 'OPENLDAP', 'THREEPARTTABLE', 'BAEKMUK', 'XPP', '__ANON_20', '__ANON_21', 'EPICS', '__ANON_11', 'RSFS', 'SENDMAIL', 'RADVD', 'LPPL', 'WXWINDOWS', '__ANON_44', 'NEWMAT', '__ANON_31', 'IMAGEMAGICK', 'XANO', '__ANON_69', 'NISTSL', '__ANON_38', 'GNUPLOT', 'GIFTWARE', 'WTFPL', 'BOOST', '__ANON_12', 'W3C', '__ANON_26', 'ADOBE', 'TMATE', 'ZEND', 'CPL', 'PHP', 'GPLV2', 'RDISC', '__ANON_22', '__ANON_42', 'FTL', 'IJG', 'CECILL', '__ANON_43', 'HOFL', '__ANON_37', 'XEROX', '__ANON_65', 'NAUMEN', 'DVIPDFM', 'NEWSLETR', 'SEQUENCE', 'BAHYPH', 'OPENSSL', 'MUP', 'PLAINTEX', '__ANON_59', 'AFL', 'JASPER', '__ANON_47', 'IMLIB2', 'DSL', '__ANON_25', '__ANON_14', 'IBM', '__ANON_70', 'DOC', 'GLULXE', '__ANON_61', 'PLEXUS', 'AML', '__ANON_62', 'LOSLA', 'SAXPATH', '__ANON_75', '__ANON_3', 'ABSTYLES', '__ANON_55', 'DOTSEQN', '__ANON_13', 'FAIR', 'GL2PS', 'ARL', '__ANON_53', 'NLPL', '__ANON_40', '__ANON_15', 'TCL', 'SOFTSURFER', 'INTERBASE', 'UNICODE', 'AFMPARSE', 'ECOS', 'RUBY', 'UNLICENSE', 'VOSTROM', 'BARR', 'ENTESSA', 'CPAL', 'BEERWARE', 'MITNFA', 'AMDPLPA', '__ANON_2', '__ANON_9', 'BORCEUX', 'IPA', 'CONDOR', 'AGPLV3', '__ANON_72', 'WSUIPA', 'SISSL', 'MAKEINDEX', '__ANON_35', '__ANON_23', '__ANON_30', 'LUCIDA', 'GEOGRATIS', 'DSDP', '__ANON_7', 'ROMIO', 'HSRL', 'GFDL', 'LGPLV2', '__ANON_1', 'EFML', '__ANON_4', '__ANON_34', 'CNRI', '__ANON_48', '__ANON_32', 'QHULL', 'CC0', '__ANON_33', '__ANON_19', 'VERBATIM', '__ANON_17', '__ANON_45', 'APAFML', 'AHFL', 'DMIT', 'JABBER', 'SNIA', 'UPL', '__ANON_71', 'CPM', 'BSD', 'LATEX2E', 'SLEEPYCAT', 'FSFUL', 'TGPPL', '__ANON_50', 'LPL', 'SLIB', 'ELVISH', 'LEPTONICA', 'FBSDDL', 'JPYTHON', 'MPLUS', 'NCSA', '__ANON_51', '__ANON_57', 'OML', 'AAL', 'LOGICA', 'TOSL', '__ANON_54', 'CROSSWORD', 'PAR', 'MTLL', '__ANON_28', 'STIX', '__ANON_74', '__ANON_66', 'LIBERATION', 'VNLSL', 'DIFFMARK', 'DMTF', 'CHARTER', 'FSFULLR', 'NETCDF', 'SCRIP', 'DOUBLESTROKE', 'ISC', 'TOLUA', 'REX', '__ANON_39', 'QPL', 'MIT', 'IEEE', 'LIBTIFF', 'SWL', 'ZLIB', 'HERSHEY', 'STMPL', '__ANON_18', 'LHCYR', 'PSUTILS', 'RSA', 'VIM', '__ANON_8', '__ANON_46', 'OUVERTE', 'PTFL', 'PSFRAG'}


Version-Release number of selected component (if applicable):
license-validate-9-1.fc36.noarch

Comment 1 Miroslav Suchý 2022-09-10 19:12:03 UTC
This happens when you use license which is not valid fedora short name (Callaway id). Artistic is incorrect because it should be either 'Artistic clarified' or 'Artistic 2.0'.

I agree that the script should produce a more friendly error.

Comment 2 Ralf Corsepius 2022-09-11 05:17:49 UTC
(In reply to Miroslav Suchý from comment #1)
> This happens when you use license which is not valid fedora short name
> (Callaway id). Artistic is incorrect because it should be either 'Artistic
> clarified' or 'Artistic 2.0'.

I encountered this with perl packages. Probably 1000s of them use 'GPL+ or Artistic'

Unfortunately license-fedora2spdx doesn't provide a reasonably translation for them:
# license-fedora2spdx 'GPL+ or Artistic'
Warning: we do not have SPDX identifier for GPL+ or Artistic
GPL+ or Artistic

So I tried
license-fedora2spdx 'GPL+'
Warning: more options how to interpret GPL+. Possible options: ['GPL-1.0-or-later', 'GPL-1.0-or-later']
GPL-1.0-or-later

and 
license-fedora2spdx 'Artistic'
which produces this bug.

> I agree that the script should produce a more friendly error.
Openly said, I think, in its present shape license-fedora2spdx is completely unusable.

Comment 3 Fedora Update System 2022-09-11 15:48:00 UTC
FEDORA-2022-0f36435e8e has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0f36435e8e

Comment 4 Fedora Update System 2022-09-11 15:48:01 UTC
FEDORA-2022-72139afbab has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-72139afbab

Comment 5 Fedora Update System 2022-09-11 15:48:02 UTC
FEDORA-2022-0699371c4d has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-0699371c4d

Comment 6 Fedora Update System 2022-09-11 20:11:24 UTC
FEDORA-2022-0699371c4d has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-0699371c4d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0699371c4d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Miroslav Suchý 2022-09-12 07:36:58 UTC
(In reply to Ralf Corsepius from comment #2)
> I encountered this with perl packages. Probably 1000s of them use 'GPL+ or
> Artistic'

https://gitlab.com/fedora/legal/fedora-license-data/-/blob/main/data/GPL-1.0-or-later_OR_Artistic-1.0-Perl.toml


> # license-fedora2spdx 'GPL+ or Artistic'

This is the right use. It takes it as one license.

> license-fedora2spdx 'GPL+'
> license-fedora2spdx 'Artistic'

This is not. This takes it as two separate licenses, where the second does not exist.

We still did not set a good release process for fedora-license-data. And the cadence of data changes there is too fast now. Please take a bit of patience. It will settle down in the upcoming weeks.

Comment 8 Fedora Update System 2022-09-13 02:29:43 UTC
FEDORA-2022-72139afbab has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-72139afbab`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-72139afbab

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-09-13 02:37:26 UTC
FEDORA-2022-0f36435e8e has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-0f36435e8e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-0f36435e8e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-09-19 00:18:43 UTC
FEDORA-2022-0699371c4d has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2022-09-21 01:11:45 UTC
FEDORA-2022-72139afbab has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2022-09-21 01:21:26 UTC
FEDORA-2022-0f36435e8e has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.