I wrote a script which converts Fedora's shortname to SPDX

  https://pagure.io/copr/license-validate/blob/main/f/license-fedora2spdx.py

It is not packaged yet. You need to have `license-validate` and `rpminspect-data-fedora` packages installed. Plus the script above. In fact you need

  https://github.com/rpminspect/rpminspect-data-fedora/blob/c06dee22da8db10c65b369309c7eb377438d214c/licenses/fedora.json

because the file fedora.json in master and in Fedora's `rpminspect-data-fedora` is not JSON valid.

If you go over these obstacles you can try it:


$ ./license-fedora2spdx.py GPLv2
GPL-2.0


$ ./license-fedora2spdx.py 'MIT or (GPLv1 and Glide)'
Warning: more options how to interpret MIT. Possible options: ['Adobe-Glyph', 'MIT-CMU', 'MIT-CMU', 'HPND', 'HPND', 'no-spdx-yet (MIT license (also X11))', 'SGI-B-2.0', 'SGI-B-2.0', 'SMLNJ', 'MI
T-enna', 'MIT-feh', 'mpich2']
mpich2 or ( GPL-1.0 and Glide )

I.e. it will honor operators and parenthesis, and if the conversion is straight script will give you the result. If there is some confusion, e.g., Fedora's MIT shortname can be converted to more than one SPDX identifier, it will print a warning. And you should investigate what is the right SPDX identifier.

I welcome your comments. I will resolve any issues you will find and then add it to `license-validate` package.

I hope this will ease the migration to SPDX when the time comes.

Miroslav