SPDX KAboutLicense

Harald Sitter sitter at kde.org
Tue Jan 28 14:30:36 GMT 2020


On Tue, Jan 28, 2020 at 3:06 PM Aleix Pol <aleixpol at kde.org> wrote:
>
> On Tue, Jan 28, 2020 at 12:29 PM Harald Sitter <sitter at kde.org> wrote:
> >
> > Hey!
> >
> > For general interest, and so this thought doesn't only exist in my
> > head: As a follow-up to us embracing SPDX for code files it would make
> > a whole lot of sense sense to move KAboutLicense away from our custom
> > text format (see KAboutLicense::byKeyword) to SPDX as well. The text
> > format is particularly used in plugin and plasma applets
> > metadata/desktop files and while we managed to patch on a semblance of
> > spdx support by simply hardcoding mapping rules it's super limited
> > because we are constricted by the actual feature set of KAL, which
> > among other things means license expressions are not a thing at all
> > (e.g. [1]) which in turn then limits the license definition I can use
> > for my plasma applets.
> >
> > I reckon this can be pulled off backwards compatible, seeing as we
> > have retrofitted KAL with spdx license tag support we can "up-cast" a
> > KAL to a SpdxExpression.
>
> +1 for overall SPDX adoption.
>
> I'd say we need to keep the licences texts for --version in applications.

In fact we can easily expand on them even! The spdx.org data is
generated from machine readable definitions files and we could simply
ship a select view for local resolution
https://github.com/spdx/license-list-data/tree/master/text KAboutData
then simply needs to make a choice on how to represent each license.
One that has a local copy can just be dumped to stdout, ones which
cannot be resolved locally simply gets a URL to spdx.org. So as a
third party author using kaboutdata I can use "GPL-2.0 OR X11" and
--version will spit out the GPL2 (because it's one of ours, so we'd
ship a copy I expect) while linking to spdx.org for the X11 (because
we don't use it so we'd not ship a copy). Taking it a step further if
I make a windows installable I can kick out all copies or just ship
the ones applicable to my application.
(All of this is equally applicable to KAboutDialog, which can also
show the full license text)

HS


More information about the Kde-frameworks-devel mailing list