nexB / scancode-licensedb

A free and open database of all the licenses, in particular all the open source software licenses
https://scancode-licensedb.aboutcode.org
30 stars 4 forks source link

G10's license identified as fsf-unlimited-no-warranty #50

Open hesa opened 5 months ago

hesa commented 5 months ago

Background

On https://ubuntu.com/legal/open-source-licences?release=xenial you will find dbus, and if looking closer we can see

dbus    1.10.6-1ubuntu3.6   main    AFL-2.1,AFL-2.1,,BSD-3-clause,BSD-3-clause-generic,Expat,g10-permissive,GPL-2+,Tcl-BSDish

Looking (even) closer at the "g10-permissive" license on https://changelogs.ubuntu.com/changelogs/pool/main/d/dbus/dbus_1.10.6-1ubuntu3.6/copyright we can see the license referred to as "g10-permissive":

Files: dbus/versioninfo.rc.in
Copyright: © 2005 g10 Code GmbH
License: g10-permissive
 This file is free software; as a special exception the author gives
 unlimited permission to copy and/or distribute it, with or without
 modifications, as long as this notice is preserved.
 .
 This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Problem Scancode (32.0.8) identifies the above license as https://scancode-licensedb.aboutcode.org/fsf-unlimited-no-warranty.html.

However, these licenses (FSF and G10) are not (exactly) the same:

The FSF license

This file is free software; the Free Software Foundation gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

The G10 license

 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reproducing the bug

$ curl -LJO https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/dbus 1.10.6-1ubuntu3.6/dbus_1.10.6.orig.tar.gz
$ tar zxvf dbus_1.10.6.orig.tar.gz
$ scancode --classify --copyright --email --info --json-pp  dbus-1.10.6-scan.json --license --license-clarity-score --license-text --license-text-diagnostics --package --processes 16 --summary dbus-1.10.6

# Finding the match
# alt 1
$ cat dbus-1.10.6-scan.json | jq '.files[] | select(.path=="dbus-1.10.6/dbus/versioninfo.rc.in")' | jq .license_detections
# alt 2
$ pip install scarfer
$ scarfer dbus-1.10.6-scan.json -l -m -if dbus/versioninfo.rc.in
pombredanne commented 5 months ago

The rule that is matched is https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/rules/fsf-unlimited-no-warranty_5.RULE

IMHO, the only different that would be questionable would be "as a special exception" as otherwise the "this file" and "the Free Software Foundation" are also tagged as variable upstream.

From a meaning point of view, I do not think that the addition of "as a special exception" changes anything there.

I suggest we can resolve this in any of these ways:

  1. Report an issue upstream @ SPDX to ask them to add "as a special exception" as a variable part.
  2. Create a new license for https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/rules/fsf-unlimited-no-warranty_5.RULE
  3. Do nothing and consider the match acceptable.

The collected text matched by ScanCode is the correct text in all cases.

BTW, scarfer is cool!

pombredanne commented 5 months ago

@DennisClark is this a new license, or just a variant on the same text? I am fine either way.

BTW, I was the one who added this detection rule way back https://github.com/nexB/scancode-toolkit/blob/9dc597bcb380ba9e95da3038b839ba829794d57d/src/licensedcode/data/rules/fsf-mit_5.RULE

hesa commented 5 months ago

Providing documentation to the user If you create user documentation (e.g. (c) and license texts) from the licenses identified during scan you will provide the user with the FSF license for the G10 code.

... on the other hand, if we were to create a new license identifier for every change in a word or even letter, than we would have "quite a few licenses".

From a license compatibility point of view

pombredanne commented 5 months ago

ok, I am in favor of having a new license for now.

... on the other hand, if we were to create a new license identifier for every change in a word or even letter, than we would have "quite a few licenses".

That's not the case. Growth of the number of licenses is not too bad so far. We have ~ 2K and I think there are probably no more than ~ 3K out there :)

DennisClark commented 5 months ago

There is some very odd wording in the g10-permissive but I guess we should just accept it. The text states "as a special exception" -- exception to what? The rest of it is worded like a typical short permissive license. But we're not going to correct that, and I want to clarify that this is a standalone license, not an exception to some other license.

License: g10-permissive This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

DennisClark commented 5 months ago

I found the website of the g10-permissive owner "g10 Code GmbH" : https://g10code.com/

DennisClark commented 5 months ago

@AyanSinhaMahapatra please add this license:

id: g10-permissive (also the name and short name) category: permissive owner: g10 Code GmbH url: https://changelogs.ubuntu.com/changelogs/pool/main/d/dbus/dbus_1.10.6-1ubuntu3.6/copyright

text: This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

notes: Note that the license text "as a special exception" does not make this an exception to some other license; the g10-permissive is a standalone license.

hesa commented 5 months ago

The "exception" statement probably comes from the autoconf exception (https://scancode-licensedb.aboutcode.org/autoconf-exception-2.0.html).

g10 is the company behind GPG (GNU Privacy Guard).

I will check the GPG code for similar statements (i.e the discussed license text).

hesa commented 5 months ago

GPG

[1] scancode --classify --copyright --email --info --json-pp gnupg-scan.json --license --license-clarity-score --license-text --license-text-diagnostics --package --processes 16 --summary gnupg

[2]

$scarfer gnupg-scan.json -il fsf-unlimited-no-warranty | grep -v -e ^Files: -e ^\- | wc -l
28

[3] scarfer gnupg-scan.json -il fsf-unlimited-no-warranty | grep -v -e ^Files: -e ^\- | while read FILE; do echo " ---=== $FILE ===---"; grep -B 2 -A 10 "as a special exception" "$FILE"; done

Output from the last command

 ---=== gnupg/agent/gpg-agent-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/common/gc-opt-flags.h ===---
 * Copyright (C) 2004, 2007  Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This file is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

#ifndef GNUPG_GC_OPT_FLAGS_H
 ---=== gnupg/common/i18n.h ===---
 *  Copyright (C) 1998, 2001 Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This file is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

#ifndef GNUPG_COMMON_I18N_H
 ---=== gnupg/common/isascii.c ===---
 * Copyright (C) 2002 Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This file is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
 ---=== gnupg/common/w32info-rc.h.in ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

/* This file is processed by configure to create w32info-rc.h . */

 ---=== gnupg/dirmngr/dirmngr-client-w32info.rc ===---
 * Copyright (C) 2023 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/dirmngr/dirmngr-w32info.rc ===---
 * Copyright (C) 2023 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/dirmngr/dirmngr_ldap-w32info.rc ===---
 * Copyright (C) 2023 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/dirmngr/ldap-url.h ===---
/* Copyright 2007 g10 Code GmbH

 This file is free software; as a special exception the author gives
 unlimited permission to copy and/or distribute it, with or without
 modifications, as long as this notice is preserved.

 This file is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY, to the extent permitted by law; without even
 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.  */

#ifndef LDAP_URL_H
#define LDAP_URL_H 1
 ---=== gnupg/g10/gpg-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/g10/gpgv-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/kbx/keyboxd-w32info.rc ===---
 * Copyright (C) 2018 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/scd/scdaemon-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/sm/gpgsm-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/addgnupghome ===---
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PGM=addgnupghome
any_error=0

 ---=== gnupg/tools/applygnupgdefaults ===---
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PGM=applygnupgdefaults
errorfile=

 ---=== gnupg/tools/clean-sat.c ===---
 * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include <stdio.h>

 ---=== gnupg/tools/crlf.c ===---
 * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include <stdio.h>

 ---=== gnupg/tools/der-to-pem ===---
# Copyright 20032 Free Software Foundation, Inc.
#
# This program is Free Software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PGM="der-to-pem"
if [ $# == 0 ]; then
  input=""
 ---=== gnupg/tools/gpg-card-w32info.rc ===---
 * Copyright (C) 2019 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/gpg-check-pattern-w32info.rc ===---
 * Copyright (C) 2020 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/gpg-connect-agent-w32info.rc ===---
 * Copyright (C) 2013 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/gpg-wks-client-w32info.rc ===---
 * Copyright (C) 2020 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/gpgconf-w32info.rc ===---
 * Copyright (C) 2020 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/gpgtar-w32info.rc ===---
 * Copyright (C) 2020 g10 Code GmbH
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "afxres.h"
#include "../common/w32info-rc.h"
 ---=== gnupg/tools/lspgpot ===---
# from PGP keyrings and list them in GnuPG ownertrust format.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

if ! gpg --version > /dev/null 2>&1 ; then
   echo "GnuPG not available!"
   exit 1
 ---=== gnupg/tools/mail-signed-keys ===---
# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# FIXME: Use only valid email addresses, extract only given keys

dryrun=0
 ---=== gnupg/tools/no-libgcrypt.c ===---
 *  Copyright (C) 2003 Free Software Foundation, Inc.
 *
 * This file is free software; as a special exception the author gives
 * unlimited permission to copy and/or distribute it, with or without
 * modifications, as long as this notice is preserved.
 *
 * This file is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

#include <config.h>